Example #1
0
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 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'] . " 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');
    }
    echo "<meta http-equiv=\"refresh\" content=\"0;url=ClearSearchAll.php?enews=ClearSearchAll&line={$line}&start={$newstart}\">" . $fun_r[OneClearSearchAllSuccess] . "(ID:<font color=red><b>" . $newstart . "</b></font>)";
    exit;
}
Example #3
0
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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #4
0
function EditPlface($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $facefile = $add[facefile];
    $faceword = $add[faceword];
    $count = count($faceword);
    $plface = '||';
    for ($i = 0; $i < $count; $i++) {
        $facefile[$i] = DoRepPlface($facefile[$i]);
        $faceword[$i] = DoRepPlface($faceword[$i]);
        if ($faceword[$i]) {
            $plface .= $faceword[$i] . "##" . $facefile[$i] . "||";
        }
    }
    $sql = $empire->query("update {$dbtbpre}enewspublic set plface='{$plface}' limit 1");
    if ($sql) {
        GetPlfaceJs();
        GetConfig();
        //操作日志
        insert_dolog("");
        printerror("EditPlfaceSuccess", "plface.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #5
0
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)");
    }
}
Example #6
0
function ReInfoUrl($start, $classid, $from, $retype, $startday, $endday, $startid, $endid, $tbname, $userid, $username)
{
    global $empire, $public_r, $class_r, $fun_r, $dbtbpre;
    //验证权限
    //CheckLevel($userid,$username,$classid,"changedata");
    $start = (int) $start;
    $tbname = RepPostVar($tbname);
    if (empty($tbname) || !eCheckTbname($tbname)) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $add1 = '';
    //按栏目刷新
    $classid = (int) $classid;
    if ($classid) {
        if (empty($class_r[$classid][islast])) {
            $where = ReturnClass($class_r[$classid][sonclass]);
        } else {
            $where = "classid='{$classid}'";
        }
        $add1 = " and (" . $where . ")";
    }
    //按ID刷新
    if ($retype) {
        $startid = (int) $startid;
        $endid = (int) $endid;
        if ($endid) {
            $add1 .= " and id>={$startid} and id<={$endid}";
        }
    } else {
        $startday = RepPostVar($startday);
        $endday = RepPostVar($endday);
        if ($startday && $endday) {
            $add1 .= " and truetime>=" . to_time($startday . " 00:00:00") . " and truetime<=" . to_time($endday . " 23:59:59");
        }
    }
    $b = 0;
    $sql = $empire->query("select id,classid,checked from {$dbtbpre}ecms_" . $tbname . "_index where id>{$start}" . $add1 . " order by id limit " . $public_r[delnewsnum]);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $new_start = $r[id];
        //返回表
        $infotb = ReturnInfoMainTbname($tbname, $r['checked']);
        $infor = $empire->fetch1("select newspath,filename,groupid,isurl,titleurl from " . $infotb . " where id='{$r['id']}' limit 1");
        $infourl = GotoGetTitleUrl($r['classid'], $r['id'], $infor['newspath'], $infor['filename'], $infor['groupid'], $infor['isurl'], $infor['titleurl']);
        $empire->query("update " . $infotb . " set titleurl='{$infourl}' where id='{$r['id']}' limit 1");
    }
    if (empty($b)) {
        insert_dolog("");
        //操作日志
        printerror("ReInfoUrlSuccess", $from);
    }
    echo $fun_r[OneReInfoUrlSuccess] . "(ID:<font color=red><b>" . $new_start . "</b></font>)<script>self.location.href='ReInfoUrl.php?enews=ReInfoUrl&tbname={$tbname}&classid={$classid}&start={$new_start}&from=" . urlencode($from) . "&retype={$retype}&startday={$startday}&endday={$endday}&startid={$startid}&endid={$endid}" . hReturnEcmsHashStrHref(0) . "';</script>";
    exit;
}
Example #7
0
function PushInfoToZt($add,$userid,$username){
	global $empire,$dbtbpre,$class_r;
	$classid=(int)$add['classid'];
	$tid=(int)$add['tid'];
	$ztid=$add['ztid'];
	$cid=$add['cid'];
	$id=$add['id'];
	$count=count($ztid);
	if(!$count||!$id)
	{
		echo"<script>window.close();</script>";
		exit();
	}
	//表名
	$tbname='';
	if($classid)
	{
		$tbname=$class_r[$classid]['tbname'];
	}
	elseif($tid)
	{
		$tbr=$empire->fetch1("select tbname from {$dbtbpre}enewstable where tid='$tid'");
		$tbname=$tbr['tbname'];
	}
	if(!$tbname)
	{
		printerror('ErrorUrl','');
	}
	//ID
	$id=eReturnInids($id);
	$where='id in ('.$id.')';
	$ztids='';
	$zcids='';
	for($i=0;$i<$count;$i++)
	{
		$true_ztid=(int)$ztid[$i];
		if(!$true_ztid)
		{
			continue;
		}
		$true_cid=(int)$cid[$true_ztid];
		if($true_cid<0)
		{
			$true_cid=0;
		}
		$ztids.=$dh.$true_ztid;
		$dh=',';
		AddMoreInfoToZt($true_ztid,$true_cid,$tbname,$where,1);
	}
	//操作日志
	insert_dolog("classid=$classid&tid=$tid<br>ztid=".$ztids."<br>id=".$id);
	echo"<script>alert('推送成功');window.close();</script>";
	exit();
}
Example #8
0
function EditZtOrder($ztid, $myorder, $userid, $username)
{
    global $empire, $dbtbpre;
    for ($i = 0; $i < count($ztid); $i++) {
        $newmyorder = (int) $myorder[$i];
        $ztid[$i] = (int) $ztid[$i];
        $sql = $empire->query("update {$dbtbpre}enewszt set myorder='{$newmyorder}' where ztid='{$ztid[$i]}'");
    }
    //操作日志
    insert_dolog("");
    printerror("EditZtOrderSuccess", $_SERVER['HTTP_REFERER']);
}
Example #9
0
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");
}
Example #10
0
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)");
    }
}
Example #11
0
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;
}
Example #12
0
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");
    } 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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #14
0
File: url.php Project: novnan/meiju
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)");
    }
}
Example #15
0
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)");
    }
}
Example #16
0
function EditInfoType($add, $userid, $username)
{
    global $empire, $dbtbpre, $emod_r;
    $tid = (int) $add['tid'];
    $tbname = RepPostVar($add['tbname']);
    $mid = (int) $add[mid];
    $typeid = $add['typeid'];
    $tname = $add['tname'];
    $myorder = $add['myorder'];
    $yhid = $add['yhid'];
    $deltypeid = $add['deltypeid'];
    $count = count($typeid);
    if (!$tid || !$tbname || !$mid || !$count) {
        printerror("EmptyInfoTypeName", "history.go(-1)");
    }
    //删除
    $del = 0;
    $ids = '';
    $delcount = count($deltypeid);
    if ($delcount) {
        $dh = '';
        for ($j = 0; $j < $delcount; $j++) {
            $ids .= $dh . intval($deltypeid[$j]);
            $dh = ',';
        }
        $empire->query("delete from {$dbtbpre}enewsinfotype where typeid in (" . $ids . ")");
        if ($emod_r[$mid][tbname]) {
            $empire->query("update {$dbtbpre}ecms_" . $emod_r[$mid][tbname] . " set ttid=0 where ttid in (" . $ids . ")");
        }
        $del = 1;
    }
    //修改
    for ($i = 0; $i < $count; $i++) {
        if (strstr(',' . $ids . ',', ',' . $typeid[$i] . ',')) {
            continue;
        }
        $empire->query("update {$dbtbpre}enewsinfotype set tname='" . $tname[$i] . "',myorder='" . intval($myorder[$i]) . "',yhid='" . intval($yhid[$i]) . "' where typeid='" . intval($typeid[$i]) . "'");
    }
    GetClass();
    //更新缓存
    //操作日志
    insert_dolog("mid=" . $mid . "&del={$del}");
    printerror("EditInfoTypeSuccess", "InfoType.php?tid={$tid}&tbname={$tbname}&mid={$mid}");
}
Example #17
0
function DelTruePathFile($level, $path, $filename, $userid, $username)
{
    global $empire, $dbtbpre, $public_r;
    $count = count($filename);
    if (empty($count)) {
        printerror("NotFileid", "history.go(-1)");
    }
    //基目录
    $basepath = ECMS_PATH . $path;
    for ($i = 0; $i < $count; $i++) {
        if (!$filename[$i] || !eReturnCkCFile($filename[$i])) {
            continue;
        }
        DelFiletext($basepath . "/" . $filename[$i]);
    }
    //操作日志
    insert_dolog("path={$path}");
    printerror("DelFileSuccess", $_SERVER['HTTP_REFERER']);
}
Example #18
0
function DelPs($pid, $userid, $username)
{
    global $empire, $dbtbpre;
    $pid = (int) $pid;
    if (!$pid) {
        printerror("EmptyPayfsid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "shopps");
    $r = $empire->fetch1("select pname from {$dbtbpre}enewsshopps where pid='{$pid}'");
    $sql = $empire->query("delete from {$dbtbpre}enewsshopps where pid='{$pid}'");
    if ($sql) {
        //操作日志
        insert_dolog("pid=" . $pid . "<br>pname=" . $r[pname]);
        printerror("DelPayfsSuccess", "ListPs.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #19
0
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");
    } 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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #21
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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #22
0
function DelKeyClass($classid, $userid, $username)
{
    global $empire, $dbtbpre;
    $classid = (int) $classid;
    if (!$classid) {
        printerror("NotKeyClassid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "key");
    $r = $empire->fetch1("select classname from {$dbtbpre}enewskeyclass where classid='{$classid}'");
    $sql = $empire->query("delete from {$dbtbpre}enewskeyclass where classid='{$classid}'");
    $sql1 = $empire->query("update {$dbtbpre}enewskey set cid=0 where cid='{$classid}'");
    if ($sql) {
        //操作日志
        insert_dolog("classid=" . $classid . "<br>classname=" . $r[classname]);
        printerror("DelKeyClassSuccess", "KeyClass.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #23
0
function DelLink($lid, $cid, $userid, $username)
{
    global $empire, $dbtbpre;
    $lid = (int) $lid;
    $cid = (int) $cid;
    if (!$lid) {
        printerror("EmptyLid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "link");
    $r = $empire->fetch1("select lname from {$dbtbpre}enewslink where lid='{$lid}'");
    $sql = $empire->query("delete from {$dbtbpre}enewslink where lid='{$lid}'");
    if ($sql) {
        //操作日志
        insert_dolog("lid=" . $lid . "<br>lname=" . $r[lname]);
        printerror("DelLinkSuccess", "ListLink.php?classid={$cid}");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #24
0
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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #25
0
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)");
    }
}
Example #26
0
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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #27
0
function EditMenu($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $classid = (int) $add['classid'];
    $menuid = $add['menuid'];
    $delmenuid = $add['delmenuid'];
    $menuname = $add['menuname'];
    $menuurl = $add['menuurl'];
    $myorder = $add['myorder'];
    $count = count($menuid);
    if (!$classid || !$count) {
        printerror("EmptyMenu", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "menu");
    //删除
    $del = 0;
    $ids = '';
    $delcount = count($delmenuid);
    if ($delcount) {
        $dh = '';
        for ($j = 0; $j < $delcount; $j++) {
            $ids .= $dh . intval($delmenuid[$j]);
            $dh = ',';
        }
        $empire->query("delete from {$dbtbpre}enewsmenu where menuid in (" . $ids . ")");
        $del = 1;
    }
    //修改
    for ($i = 0; $i < $count; $i++) {
        $menuid[$i] = (int) $menuid[$i];
        if (strstr(',' . $ids . ',', ',' . $menuid[$i] . ',')) {
            continue;
        }
        $myorder[$i] = (int) $myorder[$i];
        $empire->query("update {$dbtbpre}enewsmenu set menuname='" . addslashes($menuname[$i]) . "',menuurl='" . addslashes($menuurl[$i]) . "',myorder='" . $myorder[$i] . "' where menuid='" . $menuid[$i] . "'");
    }
    //操作日志
    insert_dolog("classid={$classid}&del={$del}");
    printerror("EditMenuSuccess", "ListMenu.php?classid={$classid}");
}
function hDelMemberFeedback_All($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $fid = $add['fid'];
    $count = count($fid);
    if (empty($count)) {
        printerror("NotDelMemberFeedbackid", "history.go(-1)");
    }
    for ($i = 0; $i < $count; $i++) {
        $addsql .= "fid='" . intval($fid[$i]) . "' or ";
    }
    $addsql = substr($addsql, 0, strlen($addsql) - 4);
    $sql = $empire->query("delete from {$dbtbpre}enewsmemberfeedback where (" . $addsql . ")");
    if ($sql) {
        //操作日志
        insert_dolog("");
        printerror("DelMemberFeedbackSuccess", $_SERVER['HTTP_REFERER']);
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #29
0
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)");
    }
}
Example #30
0
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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}