public static function photo_del() { $photoId = empty($_GET['photoId']) ? "" : $_GET['photoId']; mod_index::delPhoto($photoId); $rs = mod_index::getPhoto(); render_template("photo.php", array("photo_list" => $rs)); }
public static function updateText() { $id = $_POST['id']; $text = $_POST['text']; $param['id'] = $id; $param['text'] = $text; $rs = mod_index::updateText($param); echo json_encode(array("error" => "0", "id" => $id)); }
public static function index() { $rs = mod_index::getIndex(); $bigPhoto = array(); $smallPhoto = array(); foreach ($rs as $key => $val) { if ($val['type'] == 1) { array_push($bigPhoto, $val); } elseif ($val['type'] == 2) { array_push($smallPhoto, $val); } } render_template("index.php", array("bigPhoto" => $bigPhoto, "smallPhoto" => $smallPhoto)); }