|
@@ -264,7 +264,7 @@
|
|
|
echo json_encode($jsone);
|
|
|
exit;
|
|
|
}
|
|
|
- if(!ereg("[0-9]",$_POST[$id])){
|
|
|
+ if(!is_numeric($_POST[$id])){
|
|
|
$jsone['result'] = "Fail";
|
|
|
$jsone['message'] = "You have entered a wrong value on " . $id . ", it should be numeric";
|
|
|
echo json_encode($jsone);
|
|
@@ -280,7 +280,7 @@
|
|
|
echo json_encode($jsone);
|
|
|
exit;
|
|
|
}
|
|
|
- if(!ereg("[0-1]",$_POST[$id])){
|
|
|
+ if(!is_numeric($_POST[$id])){
|
|
|
$jsone['result'] = "Fail";
|
|
|
$jsone['message'] = "You have entered a wrong value on " . $id . ", it should be 0 or 1";
|
|
|
echo json_encode($jsone);
|
|
@@ -296,7 +296,7 @@
|
|
|
// echo json_encode($jsone);
|
|
|
// exit;
|
|
|
// }
|
|
|
- // if(!ereg("[0-9]",$_POST[$id]) & !ereg("[0-9]{2}",$_POST[$id])){
|
|
|
+ // if(!is_numeric($_POST[$id]) & !is_numeric($_POST[$id])){
|
|
|
// $jsone['result'] = "Fail";
|
|
|
// $jsone['message'] = "You have entered a wrong value on " . $id . ", it should be numeric";
|
|
|
// echo json_encode($jsone);
|
|
@@ -306,4 +306,4 @@
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
-?>
|
|
|
+?>
|