fixed some bugs of exporting json
This commit is contained in:
parent
ef5b08752c
commit
28f13fa764
20
ajax.php
20
ajax.php
|
|
@ -3,7 +3,7 @@
|
||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-01-16 23:01:33
|
* @Date: 2016-01-16 23:01:33
|
||||||
* @Last Modified by: prpr
|
* @Last Modified by: prpr
|
||||||
* @Last Modified time: 2016-01-17 12:10:44
|
* @Last Modified time: 2016-01-17 12:18:00
|
||||||
*
|
*
|
||||||
* All ajax requests will be handled here
|
* All ajax requests will be handled here
|
||||||
*/
|
*/
|
||||||
|
|
@ -88,8 +88,6 @@ if ($action == "login") {
|
||||||
$json[1]['msg'] = "Uncaught error.";
|
$json[1]['msg'] = "Uncaught error.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
echo "shit";
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$json['errno'] = 1;
|
$json['errno'] = 1;
|
||||||
|
|
@ -131,13 +129,13 @@ function checkFile() {
|
||||||
if (($_FILES["skin_file"]["type"] == "image/png") || ($_FILES["skin_file"]["type"] == "image/x-png")) {
|
if (($_FILES["skin_file"]["type"] == "image/png") || ($_FILES["skin_file"]["type"] == "image/x-png")) {
|
||||||
// if error occured while uploading file
|
// if error occured while uploading file
|
||||||
if ($_FILES["skin_file"]["error"] > 0) {
|
if ($_FILES["skin_file"]["error"] > 0) {
|
||||||
$json[0]['errno'] = 1;
|
$json['errno'] = 1;
|
||||||
$json[0]['msg'] = $_FILES["skin_file"]["error"];
|
$json['msg'] = $_FILES["skin_file"]["error"];
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$json[0]['errno'] = 1;
|
$json['errno'] = 1;
|
||||||
$json[0]['msg'] = 'Skin file type error.';
|
$json['msg'] = 'Skin file type error.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,13 +145,13 @@ function checkFile() {
|
||||||
if (($_FILES["cape_file"]["type"] == "image/png") || ($_FILES["cape_file"]["type"] == "image/x-png")) {
|
if (($_FILES["cape_file"]["type"] == "image/png") || ($_FILES["cape_file"]["type"] == "image/x-png")) {
|
||||||
// if error occured while uploading file
|
// if error occured while uploading file
|
||||||
if ($_FILES["cape_file"]["error"] > 0) {
|
if ($_FILES["cape_file"]["error"] > 0) {
|
||||||
$json[0]['errno'] = 1;
|
$json['errno'] = 1;
|
||||||
$json[0]['msg'] = $_FILES["cape_file"]["error"];
|
$json['msg'] = $_FILES["cape_file"]["error"];
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$json[0]['errno'] = 1;
|
$json['errno'] = 1;
|
||||||
$json[0]['msg'] = 'Cape file type error.';
|
$json['msg'] = 'Cape file type error.';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user