} //echo $fname[count($fname)-1]; if ($photoFileOP->fileAvatarResize($X, $Y, $W, $H, $photoRes[0]['picBigImgPath'], $avatar, true)) { $photoFileOP->setRquery("INSERT INTO amistiTemp VALUES(?,?,?,?)", array('', $_SESSION['userID'], $photoFileOP->fileDestinationAndName, '')); $dataF = "<img src=" . getImgPath($photoFileOP->fileDestinationAndName) . " name=" . rand() . ">"; $jsonRes = ["data" => $dataF, "other" => $X . " - " . $Y . " -- " . $W . " --" . $H]; echo json_encode($jsonRes); } } //DELETE JUNK NOW if ($_GET['photodel'] == true) { delAll(); } //RESET CROP HERE if ($_GET['photoReset'] == true) { delAll(); echo "<img src='/favicon.ico>"; } //PHOTO NAV LEFT PAGINATION if ($_GET['photoNavLeft'] == true) { $PID = $_GET['photoLFNav']; $photoFileOP->setRquery(" SELECT * FROM amistiPic WHERE userID=? ", array($_SESSION['userID'])); $photoRes = $photoFileOP->getRquery(); $photoLFNav; $PID -= 1; if ($PID < 1) { $PID = count($photoRes); } else { //$PID--; } $lNav = $PID - 1;
$root_url = $_SERVER['PHP_SELF']; $cmd = ''; $result = array(); $query = ''; if (!empty($_GET['query'])) { $query = $_GET['query']; $result = query($query); } if (!empty($_GET['del'])) { $del = $_GET['del']; del($del); } if (!empty($_GET['delAll'])) { $delAll = $_GET['delAll']; delAll($delAll); } function query($query) { $client = 'C:\\redis\\redis-cli.exe -h 192.168.100.60 -p 6379 '; exec($client . $query, $result); return $result; } function del($del, $over = true) { $query = 'del ' . $del; $result = query($query); if ($over) { alert('删除成功'); } else { return $result;