Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sfcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush
sfcode
Commits
bf95b9eb
Commit
bf95b9eb
authored
Dec 08, 2020
by
Paarth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor
parent
b4c4c11c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
backend/.htaccess
backend/.htaccess
+6
-0
backend/filedelete.php
backend/filedelete.php
+3
-2
backend/questions/question_save.php
backend/questions/question_save.php
+0
-3
No files found.
backend/.htaccess
0 → 100644
View file @
bf95b9eb
<
FilesMatch
".(ttf|otf|eot|woff|woff2)$"
>
<
IfModule
mod_headers.c
>
Allow
from
all
Header
set
Access-Control-Allow-Origin "*"
</
IfModule
>
</
FilesMatch
>
backend/filedelete.php
View file @
bf95b9eb
...
@@ -4,8 +4,7 @@ include_once("database.php");
...
@@ -4,8 +4,7 @@ include_once("database.php");
$postData
=
file_get_contents
(
"php://input"
);
$postData
=
file_get_contents
(
"php://input"
);
if
(
isset
(
$postData
)
&&
!
empty
(
$postData
))
{
if
(
isset
(
$postData
)
&&
!
empty
(
$postData
))
{
// echo $postData;
// exit(0);
$request
=
json_decode
(
$postData
,
true
);
$request
=
json_decode
(
$postData
,
true
);
$isFile
=
trim
(
$request
[
'isFile'
]);
$isFile
=
trim
(
$request
[
'isFile'
]);
if
(
$isFile
){
if
(
$isFile
){
...
@@ -15,6 +14,8 @@ if (isset($postData) && !empty($postData)) {
...
@@ -15,6 +14,8 @@ if (isset($postData) && !empty($postData)) {
$path
=
'../users/'
.
$username
.
'/'
.
trim
(
$request
[
'file'
][
'path'
])
.
'/'
.
$filename
.
$lang
;
$path
=
'../users/'
.
$username
.
'/'
.
trim
(
$request
[
'file'
][
'path'
])
.
'/'
.
$filename
.
$lang
;
if
(
unlink
(
$path
))
{
if
(
unlink
(
$path
))
{
$sql
=
"UPDATE users SET n_files=n_files-1 WHERE username =
$username
"
;
mysqli_query
(
$mysqli
,
$sql
);
$msg
=
"file successfully deleted"
;
$msg
=
"file successfully deleted"
;
echo
json_encode
(
$msg
);
echo
json_encode
(
$msg
);
...
...
backend/questions/question_save.php
View file @
bf95b9eb
...
@@ -9,9 +9,6 @@ header("Content-Type: application/json; charset=UTF-8");
...
@@ -9,9 +9,6 @@ header("Content-Type: application/json; charset=UTF-8");
include_once
(
"../database.php"
);
include_once
(
"../database.php"
);
$postData
=
file_get_contents
(
"php://input"
);
$postData
=
file_get_contents
(
"php://input"
);
echo
$postData
;
exit
(
0
);
if
(
isset
(
$postData
)
&&
!
empty
(
$postData
)){
if
(
isset
(
$postData
)
&&
!
empty
(
$postData
)){
$request
=
json_decode
(
$postData
);
$request
=
json_decode
(
$postData
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment