Example #1
0
{
	Utility::msg("删除成功");
}
else
{
	Utility::msg("删除成功",$_REQUEST["url"]);
}
*/
$t = str_filter($_REQUEST['t']);
$del = str_filter($_REQUEST["del"]);
$url = str_filter($_REQUEST["url"]);
$type = str_filter($_REQUEST["type"]);
if ($del) {
    if ($t == constant('PDO_CONNECT') . "pictures") {
        //批量删除图片!
        $list = $db->get_results(SqlText::select("*", $t, "id in(" . $del . ")", "sort desc,id desc", null, null, null));
        foreach ($list as $item) {
            @unlink(get_lcation_path($item["picture"]));
        }
    }
    $db->query('delete from ' . $t . ' where id in(' . $del . ')');
    if (!$url) {
        msg_box("删除成功");
    } else {
        if ($type) {
            msg_box("删除成功", $url . "?type=" . $type);
        } else {
            msg_box("删除成功", $url);
        }
    }
}