query("SELECT picurl FROM pic WHERE id = " . $id); if ($row = $result->fetch_assoc()) { if (strpos($row['picurl'], '/System/') === 0) { $delfile = $_SERVER['DOCUMENT_ROOT'] . $row['picurl']; if (file_exists($delfile)) { unlink($delfile); } } $conn->query("DELETE FROM pic WHERE id = " . $id); } } } header("Location: ?Keys=$keys&Ord=$ord&Page=$page&cpid=$cpid"); exit; } // Now start HTML output ?> 管理区域
query("SELECT id, picurl FROM pic WHERE cpid = " . (int)$cpid . " ORDER BY id DESC"); ?>
num_rows > 0) { $tempNum = 0; while ($row = $result->fetch_assoc()) { $tempNum++; ?>
序号 缩略图
当前还没有图片