<!DOCTYPE html> <?php require_once '../inc/mysql.inc.php'; require_once '../inc/soup.inc.php'; require_once '../inc/utils.inc.php'; $num = isset($_GET['num']) ? strip_tags(mysql_escape_string($_GET['num'])) : 1; $SoupDao = new SoupDao(); $soup = $SoupDao->findById($num); if ($soup == null) { echo "<script>location.href='http://soup.setin.cn/';</script>"; exit; } $nextid = $SoupDao->searchNextArticleID($num); $preid = $SoupDao->searchPreArticleID($num); Mysql::close(); $title = substr_ext($soup['content'], 0, 30); $title = preg_replace("/\\s/", "", $title); $descrip = substr_ext($soup['content'], 0, 100); $descrip = preg_replace("/\\s/", "", $descrip); ?> <html lang="zh-CN"> <head> <meta charset="UTF-8" /> <meta name="renderer" content="webkit" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="Cache-Control" content="no-transform " /> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="keywords" content="心灵鸡汤,<?php echo $soup['j_tag']; ?>
foreach ($KeyList as $k => $v) { if (!isset($_GET[$v])) { $res = ['ok' => 0, 'error' => "param invalid "]; echo json_encode($res); die; } } $mysql = new Mysql(); $result = $mysql->select("*", "footprint", "`footId`", "'{$_GET['footprintId']}'"); if ($result) { if ($result['userId'] == $_GET['userId']) { $myMemcache = new MyMemcache(); $footprintId = $result['id']; $removeFootprint = "delete from footprint where id={$footprintId}"; //echo $removeFootprint; $mysql->query($removeFootprint); $myMemcache->delete($_GET['userId'] . "foot" . $result['footId']); if ($myMemcache->get("like" . $result['footId']) && $myMemcache->get("like" . $result['footId']) == 1) { //$removeFoot="delete from foot where id={$result['footId']}"; //$mysql->query($removeFoot); } echo json_encode(['ok' => 1]); } else { echo json_encode(['ok' => 0, 'error' => "no permission"]); die; } } else { echo json_encode([ok => 0, error => "footId not exsit"]); } $mysql->close();