function DelAdClass($classid, $userid, $username) { global $empire, $public_r, $dbtbpre; $classid = (int) $classid; if (!$classid) { printerror("NotChangeAdClassid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "ad"); $c = $empire->fetch1("select classname from {$dbtbpre}enewsadclass where classid='{$classid}'"); $sql = $empire->query("delete from {$dbtbpre}enewsadclass where classid='{$classid}'"); /* //删除广告内容 $a=$empire->query("select adid from {$dbtbpre}enewsad where classid='$classid'"); while($r=$empire->fetch($a)) { $file="../../../d/js/acmsd/".$public_r[adfile].$r[adid].".js"; DelFiletext($file); } */ if ($sql) { //操作日志 insert_dolog("classid=" . $classid . "<br>classname=" . $c[classname]); printerror("DelAdClassSuccess", "AdClass.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function ClearSearchAll($start, $line, $userid, $username) { global $empire, $dbtbpre, $class_r, $fun_r; $line = (int) $line; if (empty($line)) { $line = 500; } $start = (int) $start; $b = 0; $sql = $empire->query("select id,classid,sid from {$dbtbpre}enewssearchall where sid>{$start} order by sid limit " . $line); while ($r = $empire->fetch($sql)) { $b = 1; $newstart = $r['sid']; if (empty($class_r[$r[classid]]['tbname'])) { $empire->query("delete from {$dbtbpre}enewssearchall where sid='" . $r['sid'] . "'"); continue; } $num = $empire->gettotal("select count(*) as total from {$dbtbpre}ecms_" . $class_r[$r[classid]]['tbname'] . "_index where id='{$r['id']}' and classid='{$r['classid']}' limit 1"); if (!$num) { $empire->query("delete from {$dbtbpre}enewssearchall where sid='" . $r['sid'] . "'"); } } if (empty($b)) { //操作日志 insert_dolog(""); printerror('ClearSearchAllSuccess', 'ClearSearchAll.php' . hReturnEcmsHashStrHref2(1)); } echo "<meta http-equiv=\"refresh\" content=\"0;url=ClearSearchAll.php?enews=ClearSearchAll&line={$line}&start={$newstart}" . hReturnEcmsHashStrHref(0) . "\">" . $fun_r[OneClearSearchAllSuccess] . "(ID:<font color=red><b>" . $newstart . "</b></font>)"; exit; }
function DelSearchKey_all($add, $userid, $username) { global $empire, $dbtbpre; //验证权限 CheckLevel($userid, $username, $classid, "searchkey"); $searchid = $add['searchid']; $count = count($searchid); if (empty($count)) { printerror("EmptySearchId", "history.go(-1)"); } $ids = ''; for ($i = 0; $i < $count; $i++) { $dh = ','; if ($i == 0) { $dh = ''; } $ids .= $dh . intval($searchid[$i]); } $sql = $empire->query("delete from {$dbtbpre}enewssearch where searchid in (" . $ids . ");"); if ($sql) { //操作日志 insert_dolog(""); printerror("DelSearchKeySuccess", "SearchKey.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function EditMemberConnect($add, $userid, $username) { global $empire, $dbtbpre; $add[id] = (int) $add[id]; if (empty($add[appname]) || !$add[id]) { printerror("EmptyMemberConnect", "history.go(-1)"); } $add[isclose] = (int) $add[isclose]; $add[myorder] = (int) $add[myorder]; $add[appname] = eaddslashes(ehtmlspecialchars($add[appname])); $add[appid] = eaddslashes($add[appid]); $add[appkey] = eaddslashes($add[appkey]); $add[qappname] = eaddslashes($add[qappname]); $add[appsay] = eaddslashes($add[appsay]); $sql = $empire->query("update {$dbtbpre}enewsmember_connect_app set appname='{$add['appname']}',appid='{$add['appid']}',appkey='{$add['appkey']}',isclose='{$add['isclose']}',myorder='{$add['myorder']}',qappname='{$add['qappname']}',appsay='{$add['appsay']}' where id='{$add['id']}'"); $appr = $empire->fetch1("select apptype from {$dbtbpre}enewsmember_connect_app where id='{$add['id']}'"); if ($sql) { GetConfig(); //操作日志 insert_dolog("id=" . $add[id] . "&apptype=" . $appr[apptype] . "<br>appname=" . $add[appname]); printerror("EditMemberConnectSuccess", "MemberConnect.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function SetWap($add, $userid, $username) { global $empire, $dbtbpre; $wapopen = (int) $add['wapopen']; $wapdefstyle = (int) $add['wapdefstyle']; $wapshowmid = RepPostVar($add['wapshowmid']); $waplistnum = (int) $add['waplistnum']; $wapsubtitle = (int) $add['wapsubtitle']; $wapchar = (int) $add['wapchar']; $sql = $empire->query("update {$dbtbpre}enewspublic set wapopen={$wapopen},wapdefstyle={$wapdefstyle},wapshowmid='{$wapshowmid}',waplistnum={$waplistnum},wapsubtitle={$wapsubtitle},wapshowdate='{$add['wapshowdate']}',wapchar={$wapchar} limit 1"); //操作日志 insert_dolog(""); printerror("SetWapSuccess", "SetWap.php" . hReturnEcmsHashStrHref2(1)); }
function SetRewrite($add, $userid, $username) { global $empire, $dbtbpre; CheckLevel($userid, $username, $classid, "public"); //验证权限 $sql = $empire->query("update {$dbtbpre}enewspublic set rewriteinfo='" . eaddslashes($add[rewriteinfo]) . "',rewriteclass='" . eaddslashes($add[rewriteclass]) . "',rewriteinfotype='" . eaddslashes($add[rewriteinfotype]) . "',rewritetags='" . eaddslashes($add[rewritetags]) . "',rewritepl='" . eaddslashes($add[rewritepl]) . "' limit 1"); if ($sql) { GetConfig(); //操作日志 insert_dolog(""); printerror("SetRewriteSuccess", "SetRewrite.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function ClearTags($start, $line, $userid, $username) { global $empire, $dbtbpre, $class_r, $fun_r; $line = (int) $line; if (empty($line)) { $line = 500; } $start = (int) $start; $b = 0; $sql = $empire->query("select id,classid,tid,tagid from {$dbtbpre}enewstagsdata where tid>{$start} order by tid limit " . $line); while ($r = $empire->fetch($sql)) { $b = 1; $newstart = $r['tid']; if (empty($class_r[$r[classid]]['tbname'])) { $empire->query("delete from {$dbtbpre}enewstagsdata where tid='{$r['tid']}'"); $empire->query("update {$dbtbpre}enewstags set num=num-1 where tagid='{$r['tagid']}'"); continue; } $index_r = $empire->fetch1("select id,classid,checked from {$dbtbpre}ecms_" . $class_r[$r[classid]]['tbname'] . "_index where id='{$r['id']}' limit 1"); if (!$index_r['id']) { $empire->query("delete from {$dbtbpre}enewstagsdata where tid='{$r['tid']}'"); $empire->query("update {$dbtbpre}enewstags set num=num-1 where tagid='{$r['tagid']}'"); } else { //返回表 $infotb = ReturnInfoMainTbname($class_r[$r[classid]]['tbname'], $index_r['checked']); //主表 $infor = $empire->fetch1("select stb from " . $infotb . " where id='{$r['id']}' limit 1"); //返回表信息 $infodatatb = ReturnInfoDataTbname($class_r[$r[classid]]['tbname'], $index_r['checked'], $infor['stb']); //副表 $finfor = $empire->fetch1("select infotags from " . $infodatatb . " where id='{$r['id']}' limit 1"); $tagr = $empire->fetch1("select tagname from {$dbtbpre}enewstags where tagid='{$r['tagid']}'"); if (!stristr(',' . $finfor['infotags'] . ',', ',' . $tagr['tagname'] . ',')) { $empire->query("delete from {$dbtbpre}enewstagsdata where tid='{$r['tid']}'"); $empire->query("update {$dbtbpre}enewstags set num=num-1 where tagid='{$r['tagid']}'"); } elseif ($index_r['classid'] != $r[classid]) { $empire->query("update {$dbtbpre}enewstagsdata set classid='{$index_r['classid']}' where tid='{$r['tid']}'"); } } } if (empty($b)) { //操作日志 insert_dolog(""); printerror('ClearTagsSuccess', 'ClearTags.php' . hReturnEcmsHashStrHref2(1)); } echo "<meta http-equiv=\"refresh\" content=\"0;url=ClearTags.php?enews=ClearTags&line={$line}&start={$newstart}" . hReturnEcmsHashStrHref(0) . "\">" . $fun_r[OneClearTagsSuccess] . "(ID:<font color=red><b>" . $newstart . "</b></font>)"; exit; }
function SetPayFen($add, $userid, $username) { global $empire, $dbtbpre; $add[paymoneytofen] = (int) $add[paymoneytofen]; $add[payminmoney] = (int) $add[payminmoney]; if (empty($add[paymoneytofen])) { printerror("EmptySetPayFen", "history.go(-1)"); } $sql = $empire->query("update {$dbtbpre}enewspublic set paymoneytofen='{$add['paymoneytofen']}',payminmoney='{$add['payminmoney']}'"); if ($sql) { //操作日志 insert_dolog("moneytofen={$add['paymoneytofen']}&minmoney={$add['payminmoney']}"); printerror("SetPayFenSuccess", "SetPayFen.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelDownRecord($add, $userid, $username) { global $empire, $dbtbpre; if (empty($add['downtime'])) { printerror("EmptyDownTime", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "deldownrecord"); $truetime = to_time($add['downtime']); $sql = $empire->query("delete from {$dbtbpre}enewsdownrecord where truetime<=" . $truetime); if ($sql) { //操作日志 insert_dolog("time={$add['downtime']}"); printerror("DelDownRecordSuccess", "DelDownRecord.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelDownurl($urlid, $userid, $username) { global $empire, $dbtbpre; $urlid = (int) $urlid; if (empty($urlid)) { printerror("NotChangeDownurlid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "downurl"); $sql = $empire->query("delete from {$dbtbpre}enewsdownurlqz where urlid='{$urlid}'"); if ($sql) { //操作日志 insert_dolog("urlid=" . $urlid); printerror("DelDownurlSuccess", "url.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function SetClassInfoType($add, $logininid, $loginin) { global $empire, $dbtbpre; CheckLevel($logininid, $loginin, $classid, "class"); //验证权限 $classid = (int) $add['classid']; if (empty($classid)) { printerror("ErrorUrl", "history.go(-1)"); } $cr = $empire->fetch1("select classid,modid,classname,islast from {$dbtbpre}enewsclass where classid='{$classid}'"); if (!$cr['classid'] || !$cr['islast'] || !$cr['modid']) { printerror("ErrorUrl", "history.go(-1)"); } $noclassinfo = (int) $add['noclassinfo']; if ($noclassinfo == 1) { $ttids = '-'; } else { $typeid = $add['typeid']; $count = count($typeid); $ttids = ''; if ($count) { $dh = ''; for ($i = 0; $i < $count; $i++) { $tid = (int) $typeid[$i]; if (empty($tid)) { continue; } $ttids .= $dh . $tid; $dh = ','; } if ($ttids) { $ttids = ',' . $ttids . ','; } } } $sql = $empire->query("update {$dbtbpre}enewsclassadd set ttids='{$ttids}' where classid='{$classid}'"); if ($sql) { insert_dolog("classid={$classid}&classname={$cr['classname']}"); //操作日志 printerror("SetClassInfoTypeSuccess", "ClassInfoType.php?classid={$classid}" . hReturnEcmsHashStrHref2(0)); } else { printerror("DbError", "history.go(-1)"); } }
function DelSpClass($classid, $userid, $username) { global $empire, $dbtbpre; $classid = (int) $classid; if (!$classid) { printerror("NotDelSpClassid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "sp"); $r = $empire->fetch1("select classname from {$dbtbpre}enewsspclass where classid='{$classid}'"); $sql = $empire->query("delete from {$dbtbpre}enewsspclass where classid='{$classid}'"); if ($sql) { //操作日志 insert_dolog("classid=" . $classid . "<br>classname=" . $r[classname]); printerror("DelSpClassSuccess", "ListSpClass.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelNotcj($id, $userid, $username) { global $empire, $dbtbpre; //验证权限 CheckLevel($userid, $username, $classid, "notcj"); $id = (int) $id; if (!$id) { printerror("EmptyDelNotcjid", "history.go(-1)"); } $sql = $empire->query("delete from {$dbtbpre}enewsnotcj where id='{$id}'"); GetNotcj(); if ($sql) { //操作日志 insert_dolog("id={$id}"); printerror("DelNotcjSuccess", "NotCj.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelWorkflow($add, $userid, $username) { global $empire, $dbtbpre; $wfid = (int) $add[wfid]; if (!$wfid) { printerror('NotDelWorkflowid', 'history.go(-1)'); } //验证权限 CheckLevel($userid, $username, $classid, "workflow"); $r = $empire->fetch1("select wfname from {$dbtbpre}enewsworkflow where wfid='{$wfid}'"); $sql = $empire->query("delete from {$dbtbpre}enewsworkflow where wfid='{$wfid}'"); $sql2 = $empire->query("delete from {$dbtbpre}enewsworkflowitem where wfid='{$wfid}'"); if ($sql && $sql2) { //操作日志 insert_dolog("wfid=" . $wfid . "<br>wfname=" . $r[wfname]); printerror("DelWorkflowSuccess", "ListWf.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelWapStyle($styleid, $userid, $username) { global $empire, $dbtbpre, $public_r; $styleid = (int) $styleid; if (!$styleid) { printerror("EmptyWapStyleid", "history.go(-1)"); } $r = $empire->fetch1("select stylename,path from {$dbtbpre}enewswapstyle where styleid={$styleid}"); if ($styleid == $public_r['wapdefstyle']) { printerror("NotDelDefWapStyle", "history.go(-1)"); } $sql = $empire->query("delete from {$dbtbpre}enewswapstyle where styleid={$styleid}"); if ($sql) { //操作日志 insert_dolog("styleid={$styleid}&stylename={$r['stylename']}"); printerror("DelWapStyleSuccess", "WapStyle.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelWord($wordid, $userid, $username) { global $empire, $dbtbpre; $wordid = (int) $wordid; if (!$wordid) { printerror("NotDelWordid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "word"); $sql = $empire->query("delete from {$dbtbpre}enewswords where wordid='{$wordid}'"); GetConfig(); //更新缓存 if ($sql) { //操作日志 insert_dolog("wordid=" . $wordid); printerror("DelWordSuccess", "word.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelDoLog_date($add, $userid, $username) { global $empire, $dbtbpre; //验证权限 CheckLevel($userid, $username, $classid, "log"); $start = RepPostVar($add['startday']); $end = RepPostVar($add['endday']); if (!$start || !$end) { printerror('EmptyDelLogTime', ''); } $startday = $start . ' 00:00:00'; $endday = $end . ' 23:59:59'; $sql = $empire->query("delete from {$dbtbpre}enewsdolog where logtime<='{$endday}' and logtime>='{$startday}'"); if ($sql) { //操作日志 insert_dolog("time=" . $start . "~" . $end); printerror("DelLogSuccess", "ListDolog.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelWriter($wid, $userid, $username) { global $empire, $dbtbpre; $wid = (int) $wid; if (!$wid) { printerror("NotDelWid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "writer"); $r = $empire->fetch1("select writer from {$dbtbpre}enewswriter where wid='{$wid}'"); $sql = $empire->query("delete from {$dbtbpre}enewswriter where wid='{$wid}'"); GetConfig(); //更新缓存 if ($sql) { //操作日志 insert_dolog("wid=" . $wid . "<br>writer=" . $r[writer]); printerror("DelWriterSuccess", "writer.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelBefrom($befromid, $userid, $username) { global $empire, $dbtbpre; $befromid = (int) $befromid; if (!$befromid) { printerror("NotDelBefromid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "befrom"); $r = $empire->fetch1("select sitename from {$dbtbpre}enewsbefrom where befromid='{$befromid}'"); $sql = $empire->query("delete from {$dbtbpre}enewsbefrom where befromid='{$befromid}'"); GetConfig(); //更新缓存 if ($sql) { //操作日志 insert_dolog("befromid=" . $befromid . "<br>sitename=" . $r[sitename]); printerror("DelBefromSuccess", "BeFrom.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelPayRecord_all($id, $userid, $username) { global $empire, $dbtbpre; //验证权限 CheckLevel($userid, $username, $classid, "pay"); $count = count($id); if (!$count) { printerror("NotDelPayRecordid", "history.go(-1)"); } for ($i = 0; $i < $count; $i++) { $add .= " id='" . intval($id[$i]) . "' or"; } $add = substr($add, 0, strlen($add) - 3); $sql = $empire->query("delete from {$dbtbpre}enewspayrecord where" . $add); if ($sql) { //操作日志 insert_dolog(""); printerror("DelPayRecordSuccess", "ListPayRecord.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelVoteTemp($tempid, $userid, $username) { global $empire, $dbtbpre; $tempid = (int) $tempid; if (empty($tempid)) { printerror("NotChangeVoteTempid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "template"); $gid = (int) $_GET['gid']; $r = $empire->fetch1("select tempname from " . GetDoTemptb("enewsvotetemp", $gid) . " where tempid={$tempid}"); $sql = $empire->query("delete from " . GetDoTemptb("enewsvotetemp", $gid) . " where tempid={$tempid}"); //删除备份记录 DelEbakTempAll('votetemp', $gid, $tempid); if ($sql) { //操作日志 insert_dolog("tempid={$tempid}&tempname={$r['tempname']}&gid={$gid}"); printerror("DelVoteTempSuccess", "ListVotetemp.php?gid={$gid}" . hReturnEcmsHashStrHref2(0)); } else { printerror("DbError", "history.go(-1)"); } }
function DelError_all($errorid, $userid, $username) { global $empire, $dbtbpre; //验证权限 CheckLevel($userid, $username, $classid, "downerror"); $count = count($errorid); if (empty($count)) { printerror("EmptyDelErrorid", "history.go(-1)"); } for ($i = 0; $i < $count; $i++) { $add .= "errorid='" . intval($errorid[$i]) . "' or "; } $add = substr($add, 0, strlen($add) - 4); $sql = $empire->query("delete from {$dbtbpre}enewsdownerror where " . $add); if ($sql) { //操作日志 insert_dolog(""); printerror("DelErrorSuccess", "ListError.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function EditDtTempFiletext($add, $userid, $username) { global $empire, $dbtbpre; //操作权限 CheckLevel($userid, $username, $classid, 'dttemp'); $tempid = (int) $add['tempid']; if (!$tempid) { printerror('ErrorUrl', ''); } $tempr = $empire->fetch1("select tempid,tempname,tempvar,tempfile from {$dbtbpre}enewstempdt where tempid='{$tempid}'"); if (!$tempr['tempid']) { printerror('ErrorUrl', ''); } $file = ECMS_PATH . $tempr['tempfile']; if (!file_exists($file)) { printerror('FileNotExist', ''); } $temptext = ClearAddsData($add['temptext']); WriteFiletext_n($file, $temptext); //操作日志 insert_dolog("tempid=" . $tempid . "<br>tempname=" . $tempr['tempname']); printerror("EditDttempSuccess", "EditDttemp.php?tempid={$tempid}" . hReturnEcmsHashStrHref2(0)); }
function DelPlayer($id, $userid, $username) { global $empire, $dbtbpre; $id = (int) $id; if (!$id) { printerror("NotDelPlayerID", "history.go(-1)"); } $r = $empire->fetch1("select id,player from {$dbtbpre}enewsplayer where id='{$id}'"); if (!$r[id]) { printerror("NotDelPlayerID", "history.go(-1)"); } $sql = $empire->query("delete from {$dbtbpre}enewsplayer where id='{$id}'"); if ($sql) { //操作日志 insert_dolog("id={$id}<br>player={$r['player']}"); printerror("DelPlayerSuccess", "player.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function DelInfoType($add,$userid,$username){ global $empire,$dbtbpre; $typeid=(int)$add[typeid]; if(!$typeid) { printerror("NotDelInfoTypeid",""); } CheckLevel($userid,$username,$classid,"infotype"); $r=$empire->fetch1("select * from {$dbtbpre}enewsinfotype where typeid='$typeid'"); if(empty($r[typeid])) { printerror("NotDelInfoTypeid","history.go(-1)"); } //删除专题 $sql=$empire->query("delete from {$dbtbpre}enewsinfotype where typeid='$typeid'"); $delpath=ECMS_PATH.$r[tpath]; $del=DelPath($delpath); //改变信息分类值 $usql=$empire->query("update {$dbtbpre}ecms_".$r[tbname]." set ttid=0 where ttid='$typeid'"); $usql=$empire->query("update {$dbtbpre}ecms_".$r[tbname]."_check set ttid=0 where ttid='$typeid'"); $usql=$empire->query("update {$dbtbpre}ecms_".$r[tbname]."_doc set ttid=0 where ttid='$typeid'"); GetClass();//更新缓存 if($sql) { insert_dolog("typeid=".$typeid."<br>tname=".$r[tname]);//操作日志 printerror("DelInfoTypeSuccess","InfoType.php?mid=$add[fmid]".hReturnEcmsHashStrHref2(0)); } else { printerror("DbError",""); } }
function DelMoreGbook($add, $logininid, $loginin) { global $empire, $dbtbpre; CheckLevel($logininid, $loginin, $classid, "gbook"); //验证权限 //变量处理 $name = RepPostStr($add['name']); $ip = RepPostVar($add['ip']); $email = RepPostStr($add['email']); $mycall = RepPostStr($add['mycall']); $lytext = RepPostStr($add['lytext']); $startlyid = (int) $add['startlyid']; $endlyid = (int) $add['endlyid']; $startlytime = RepPostVar($add['startlytime']); $endlytime = RepPostVar($add['endlytime']); $checked = (int) $add['checked']; $ismember = (int) $add['ismember']; $bid = (int) $add['bid']; $havere = (int) $add['havere']; $where = ''; //留言分类 if ($bid) { $where .= " and bid='{$bid}'"; } //是否会员 if ($ismember) { if ($ismember == 1) { $where .= " and userid=0"; } else { $where .= " and userid>0"; } } //留言ID if ($endlyid) { $where .= ' and lyid BETWEEN ' . $startlyid . ' and ' . $endlyid; } //发布时间 if ($startlytime && $endlytime) { $where .= " and lytime>='{$startlytime}' and lytime<='{$endlytime}'"; } //是否审核 if ($checked) { $checkval = $checked == 1 ? 0 : 1; $where .= " and checked='{$checkval}'"; } //是否回复 if ($havere) { if ($havere == 1) { $where .= " and retext<>''"; } else { $where .= " and retext=''"; } } //姓名 if ($name) { $where .= " and name like '%{$name}%'"; } //发布IP if ($ip) { $where .= " and ip like '%{$ip}%'"; } //邮箱 if ($email) { $where .= " and email like '%{$email}%'"; } //电话 if ($mycall) { $where .= " and `mycall` like '%{$mycall}%'"; } //留言内容 if ($lytext) { $where .= " and lytext like '%{$lytext}%'"; } if (!$where) { printerror("EmptyDelMoreGbook", "history.go(-1)"); } $where = substr($where, 5); $sql = $empire->query("delete from {$dbtbpre}enewsgbook where " . $where); insert_dolog(""); //操作日志 printerror("DelGbookSuccess", "DelMoreGbook.php" . hReturnEcmsHashStrHref2(1)); }
function DefaultJstemp($add, $userid, $username) { global $empire, $dbtbpre; $tempid = (int) $add['tempid']; if (!$tempid) { printerror("EmptyJstempid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "template"); $gid = (int) $add['gid']; $r = $empire->fetch1("select tempname from " . GetDoTemptb("enewsjstemp", $gid) . " where tempid={$tempid}"); $usql = $empire->query("update " . GetDoTemptb("enewsjstemp", $gid) . " set isdefault=0"); $sql = $empire->query("update " . GetDoTemptb("enewsjstemp", $gid) . " set isdefault=1 where tempid={$tempid}"); $psql = $empire->query("update {$dbtbpre}enewspublic set jstempid={$tempid}"); if ($sql) { //操作日志 insert_dolog("tempid={$tempid}&tempname={$r['tempname']}&gid={$gid}"); printerror("DefaultJstempSuccess", "ListJstemp.php?classid={$add['cid']}&gid={$gid}" . hReturnEcmsHashStrHref2(0)); } else { printerror("DbError", "history.go(-1)"); } }
function DelPubVar($varid, $cid, $userid, $username) { global $empire, $dbtbpre; $varid = (int) $varid; if (!$varid) { printerror("NotDelPubVarid", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "pubvar"); $r = $empire->fetch1("select myvar,tocache from {$dbtbpre}enewspubvar where varid='{$varid}'"); $sql = $empire->query("delete from {$dbtbpre}enewspubvar where varid='{$varid}'"); if ($r['tocache']) { GetConfig(); } if ($sql) { //操作日志 insert_dolog("varid=" . $varid . "<br>var=" . $r[myvar]); printerror("DelPubVarSuccess", "ListPubVar.php?classid={$cid}" . hReturnEcmsHashStrHref2(0)); } else { printerror("DbError", "history.go(-1)"); } }
function DelMoreport($add, $userid, $username) { global $empire, $dbtbpre; $pid = (int) $add['pid']; if (!$pid) { printerror("NotChangeMoreportId", "history.go(-1)"); } //验证权限 CheckLevel($userid, $username, $classid, "moreport"); $r = $empire->fetch1("select pname from {$dbtbpre}enewsmoreport where pid='{$pid}'"); $sql = $empire->query("delete from {$dbtbpre}enewsmoreport where pid='{$pid}'"); //更新缓存 Moreport_UpdateIsclose(); GetConfig(); if ($sql) { //操作日志 insert_dolog("pid={$pid}&pname={$r['pname']}"); printerror("DelMoreportSuccess", "ListMoreport.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function SetTags($add, $userid, $username) { global $empire, $dbtbpre; //验证权限 CheckLevel($userid, $username, $classid, "tags"); $opentags = (int) $add['opentags']; $tagstempid = (int) $add['tagstempid']; $usetags = eReturnRDataStr($add['umid']); $chtags = eReturnRDataStr($add['cmid']); $tagslistnum = (int) $add['tagslistnum']; $sql = $empire->query("update {$dbtbpre}enewspublic set opentags='{$opentags}',tagstempid='{$tagstempid}',usetags='{$usetags}',chtags='{$chtags}',tagslistnum='{$tagslistnum}' limit 1"); if ($sql) { GetConfig(); //操作日志 insert_dolog(""); printerror("SetTagsSuccess", "SetTags.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }