www.gusucode.com > HadSky PHP轻论坛系统源码 v2.4.2源码程序 > ytqlt_v2.4.2.0701/phpscript/plug/superadmin/delete.php
<?php if (!defined('puyuetian') || !defined('SUPERADMIN')) exit('403'); $tip = '操作成功!'; switch ($table) { case 'set' : //set表删除 break; case 'plug' : case 'readsort' : case 'upload' : case 'download' : case 'user' : if ($table == 'upload' || $table == 'download') { $fileinfo = $_G['TABLE'][strtoupper($table)] -> getData($id); if ($fileinfo) { $uid = $fileinfo['uid']; $filename = $fileinfo['filename']; @unlink("{$_G['SYSTEM']['PATH']}/uploadfiles/{$uid}/{$filename}"); } } $_G['TABLE'][strtoupper($table)] -> delData($id); break; case 'read' : case 'reply' : $ids = (array)$_POST['ids']; /*deltype 0:正常 1:移动至回收站 2:移动至审核区*/ if ($_POST['delcmd'] == 'del') { $delcmd = FALSE; } else { $delcmd = Cnum($_POST['delcmd']); } if ($ids) { $_G['TABLE'][strtoupper($table)] -> delDatas($ids, $delcmd); } break; default : break; }