예제 #1
0
파일: box.php 프로젝트: Gavinxyj/GJXM
     $bRet = Box::deleteBoxById($_GET['code']);
     echo true;
 } else {
     if (isset($_GET['active']) && $_GET['active'] == "alterBox") {
         $area = Area::getAreaInfo();
         $road = Area::getRoadInfo();
         $user = User::getUserInfo();
         $handle = @fopen("./version.txt", "r");
         if ($handle) {
             while (!feof($handle)) {
                 $buffer = fgets($handle, 4096);
                 $version[] = $buffer;
             }
             fclose($handle);
         }
         $box = Box::getBoxByCode($_GET['code']);
         $rs['area'] = $area;
         $rs['road'] = $road;
         $rs['user'] = $user;
         $rs['box'] = $box;
         $rs['version'] = $version;
         echo json_encode($rs, JSON_UNESCAPED_UNICODE);
     } else {
         if (isset($_POST['submit']) && $_POST['id'] == "update") {
             //$preCode = $_POST['preName'];
             $code = $_POST['code'];
             //$midCode = substr($tempPre,2);
             //	$tempMid = substr($midCode,0,strlen($midCode) - 8 );
             //	$version = $_POST['version'];
             if ($code != "") {
                 $arrayBean = array($_POST['area'], $_POST['road'], $_POST['address'], $_POST['name'], $_POST['user'], $_POST['code']);