コード例 #1
0
ファイル: api.php プロジェクト: lorecioni/watss
         $sql = $QUERIES->updatePersonBB($bb, $_SESSION['user'], $_REQUEST['id'], $_SESSION['frame_id'], $_SESSION['camera_id']);
         $result = mysql_query($sql) or $success = false;
     } else {
         $bb = array();
         $bb = $_REQUEST['bb'];
         $bbV = $config->bbV;
         //If person is a proposal and it has been approved, insert it into frame people list
         $sql = $QUERIES->insertPerson(intval($_REQUEST["id"]), $_SESSION['frame_id'], $_SESSION['camera_id'], $bb[0], $bb[1], $bb[2], $bb[3], $bbV->x, $bbV->y, $bbV->width, $bbV->height, 'null', 'null', 'null', 'null', '#000000', 0, $_SESSION['user'], 0);
         $result = mysql_query($sql) or $success = false;
     }
 }
 if (isset($_REQUEST['bbV'])) {
     if (checkPerson($_REQUEST['id']) == 1) {
         $bbV = array();
         $bbV = $_REQUEST['bbV'];
         $sql = $QUERIES->updatePersonBBV($bbV, $_SESSION['user'], $_REQUEST['id'], $_SESSION['frame_id'], $_SESSION['camera_id']);
         $result = mysql_query($sql) or $success = false;
     } else {
         $bb = $config->bb;
         $bbV = array();
         $bbV = $_REQUEST['bbV'];
         //If person is a proposal and it has been approved, insert it into frame people list
         $sql = $QUERIES->insertPerson(intval($_REQUEST["id"]), $_SESSION['frame_id'], $_SESSION['camera_id'], $bb->x, $bb->y, $bb->width, $bb->height, $bbV[0], $bbV[1], $bbV[2], $bbV[3], 'null', 'null', 'null', 'null', '#000000', 0, $_SESSION['user'], 0);
         $result = mysql_query($sql) or $success = false;
     }
 }
 if (isset($_REQUEST['angle_face']) && isset($_REQUEST['angle_face_z'])) {
     if (checkPerson($_REQUEST['id']) == 1) {
         $sql = $QUERIES->updatePersonAngleFace($_REQUEST['angle_face'], $_REQUEST['angle_face_z'], $_SESSION['user'], $_REQUEST['id'], $_SESSION['frame_id'], $_SESSION['camera_id']);
         $result = mysql_query($sql) or $success = false;
     } else {