$download_list = $db->get_one("SELECT * FROM {$met_download} WHERE id='{$id}'"); if (!$download_list) { metsave('-1', $lang_dataerror, $depth); } if ($met_webhtm != 0 or $metadmin[pagename]) { if ($met_htmpagename == 1) { $updatetime = date('Ymd', strtotime($download_list[updatetime])); } deletepage($folder[foldername], $id, 'showdownload', $updatetime, $download_list[filename]); } if (!$met_recycle) { $query = "delete from {$met_plist} where listid='{$id}' and module='4'"; $db->query($query); } $query = $met_recycle ? "update {$met_download} set recycle='4',updatetime='" . date('Y-m-d H:i:s') . "' where id='{$id}'" : "delete from {$met_download} where id='{$id}'"; $db->query($query); if (!$met_recycle) { if ($download_list) { delimg($download_list, 1, 2); } else { delimg($id, 3, 2); } } $htmjs = indexhtm() . '$|$'; $class1 = $download_list[class1]; $class2 = $download_list[class2]; $class3 = $download_list[class3]; $htmjs .= classhtm($class1, $class2, $class3); $gent = '../../sitemap/index.php?lang=' . $lang . '&htmsitemap=' . $met_member_force; metsave($backurl, '', $depth, $htmjs, $gent); }
metsave('../content/recycle/index.php?lang=' . $lang . '&anyid=' . $anyid, '', $depth); } else { $rid = explode('|', $id); switch ($rid[1]) { case 2: $recycle = $met_news; break; case 3: $recycle = $met_product; break; case 4: $recycle = $met_download; break; case 5: $recycle = $met_img; break; } $admin_list = $db->get_one("SELECT * FROM {$recycle} WHERE id='{$rid['0']}'"); if (!$admin_list) { metsave('-1', $lang_dataerror, $depth); } delimg($admin_list, 1, $rid[1]); if ($rid[1] != 2) { $query = "delete from {$met_plist} where listid='{$rid['0']}' and module='{$rid['1']}'"; $db->query($query); } $query = "delete from {$recycle} where id='{$rid['0']}'"; $db->query($query); metsave('../content/recycle/index.php?lang=' . $lang . '&anyid=' . $anyid, '', $depth); } }
function delcolumn($column) { global $lang, $db, $met_deleteimg, $depth; global $met_admin_table, $met_column, $met_cv, $met_download, $met_feedback, $met_flist, $met_img, $met_job, $met_link, $met_list, $met_message, $met_news, $met_parameter, $met_plist, $met_product, $met_config, $met_mlist; if ($column['releclass']) { $classtype = "class1"; } else { $classtype = "class" . $column['classtype']; } switch ($column['module']) { default: $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 2: if ($met_deleteimg) { $query = "select * from {$met_news} where {$classtype}='{$column['id']}'"; $del = $db->get_all($query); delimg($del, 2, 2); } $query = "delete from {$met_news} where {$classtype}='{$column['id']}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 3: $query = "select * from {$met_product} where {$classtype}='{$column['id']}'"; $del = $db->get_all($query); delimg($del, 2, 3); foreach ($del as $key => $val) { $query = "delete from {$met_plist} where listid='{$val['id']}' and module='{$column['module']}'"; $db->query($query); } $query = "delete from {$met_product} where {$classtype}='{$column['id']}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 4: $query = "select * from {$met_download} where {$classtype}='{$column['id']}'"; $del = $db->get_all($query); delimg($del, 2, 4); foreach ($del as $key => $val) { $query = "delete from {$met_plist} where listid='{$val['id']}' and module='{$column['module']}'"; $db->query($query); } $query = "delete from {$met_download} where {$classtype}='{$column['id']}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 5: $query = "select * from {$met_img} where {$classtype}='{$column['id']}'"; $del = $db->get_all($query); delimg($del, 2, 5); foreach ($del as $key => $val) { $query = "delete from {$met_plist} where listid='{$val['id']}' and module='{$column['module']}'"; $db->query($query); } $query = "delete from {$met_img} where {$classtype}='{$column['id']}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 6: if ($met_deleteimg) { $query = "select * from {$met_cv} where lang='{$lang}'"; $del = $db->get_all($query); delimg($del, 2, 6); } $query = "delete from {$met_plist} where lang='{$lang}' and module='{$column['module']}'"; $db->query($query); $query = "delete from {$met_cv} where lang='{$lang}'"; $db->query($query); $query = "delete from {$met_job} where lang='{$lang}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 7: $query = "delete from {$met_message} where lang='{$lang}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); $query = "delete from {$met_config} where columnid='{$column['id']}' and lang='{$lang}'"; $db->query($query); $query = "delete from {$met_parameter} where lang='{$lang}' and module=7"; $db->query($query); $query = "delete from {$met_mlist} where lang='{$lang}' and module=7"; $db->query($query); break; case 8: $query = "select * from {$met_feedback} where class1='{$column['id']}'"; $del = $db->get_all($query); delimg($del, 2, 8); foreach ($del as $key => $val) { $query = "delete from {$met_flist} where listid='{$list['id']}'"; $db->query($query); } $query = "delete from {$met_parameter} where module='{$column['module']}' and class1='{$column['id']}' and lang='{$lang}'"; $db->query($query); $query = "delete from {$met_feedback} where class1='{$column['id']}' and lang='{$lang}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); $query = "delete from {$met_config} where columnid='{$column['id']}' and lang='{$lang}'"; $db->query($query); break; case 9: $query = "delete from {$met_link} where lang='{$lang}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; case 10: $query = "delete from {$met_admin_table} where usertype!=3 and lang='{$lang}'"; $db->query($query); $query = "delete from {$met_column} where id='{$column['id']}'"; $db->query($query); break; } /*删除文件*/ $admin_lists = $db->get_one("SELECT * FROM {$met_column} WHERE foldername='{$column['foldername']}'"); if (!$admin_lists['id'] && ($column['classtype'] == 1 || $column['releclass'])) { if ($column['foldername'] != '' && ($column['module'] < 6 || $column['module'] == 8) && $column['if_in'] != 1) { if (!unkmodule($column['foldername'])) { $foldername = $depth . "../../" . $column['foldername']; deldir($foldername); } } } /*删除栏目图片*/ if ($met_deleteimg) { file_unlink($depth . "../" . $column[indeximg]); file_unlink($depth . "../" . $column[columnimg]); } }
require '../include/config.php'; require '../functions/functions_checkuser.php'; header("Content-type:text/html;charset=UTF-8"); $select = isset($_GET['select']) ? $_GET['select'] : ''; switch ($select) { case 'add': adddata(); break; case 'edit': editdata(); break; case 'del': deldata(); break; case 'delimg': delimg(); break; default: header('Location: ../index.php'); break; } /* Add a user */ function adddata() { require '../include/config.php'; $name = $_POST['txtname']; $file = $_FILES['fle']['name']; $file_tmp = $_FILES['fle']['tmp_name']; if ($file != "") {
cpmsg(dz55625_haodian($php_lang['al_nodelc']), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pic'); } } } elseif ($_GET['haodian_pic'] == 'del') { $imgid = intval($_G["gp_del_id"]); if ($imgid) { delimg($imgid); cpmsg(dz55625_haodian($php_lang['up_delok']), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pic'); } else { cpmsg(dz55625_haodian($php_lang['updateiderror']), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pic'); } } elseif ($_G["gp_haodian_pic"] == "del_all") { $del_id = $_GET['del_id']; $deid = explode('|', $del_id); foreach ($deid as $ssd) { delimg($ssd); } cpmsg(dz55625_haodian($php_lang['up_delok']), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pic'); } function delimg($imgid) { $sql = "select * from " . DB::table("forum_alliance_albums_img") . " where id={$imgid}"; $img = DB::fetch_first($sql); $albums_id = $img[albums_id]; if ($img) { $sql1 = "select * from " . DB::table("forum_alliance_albums") . " where id={$img['albums_id']}"; $albums = DB::fetch_first($sql1); if ($albums[img_url] == $img[shrink_url]) { $img1 = DB::fetch_first("select * from " . DB::table("forum_alliance_albums_img") . " where albums_id={$albums['id']}"); if ($img1) { DB::query("update " . DB::table("forum_alliance_albums") . " set img_url='{$img1['shrink_url']}' where id={$albums['id']}");