Example #1
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 #2
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)");
    }
}
function DelClasstemp($add, $userid, $username)
{
    global $empire, $dbtbpre, $public_r;
    $tempid = (int) $add['tempid'];
    if (!$tempid) {
        printerror("EmptyClasstempid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "template");
    $gid = (int) $add['gid'];
    $r = $empire->fetch1("select tempname from " . GetDoTemptb("enewsclasstemp", $gid) . " where tempid={$tempid}");
    $sql = $empire->query("delete from " . GetDoTemptb("enewsclasstemp", $gid) . " where tempid={$tempid}");
    //删除备份记录
    DelEbakTempAll('classtemp', $gid, $tempid);
    if ($gid == $public_r['deftempid'] || !$public_r['deftempid'] && ($gid == 1 || $gid == 0)) {
        //删除动态模板缓存文件
        DelOneTempTmpfile('classtemp' . $tempid);
    }
    if ($sql) {
        //操作日志
        insert_dolog("tempid={$tempid}&tempname={$r['tempname']}&gid={$gid}");
        printerror("DelClasstempSuccess", "ListClasstemp.php?classid={$add['cid']}&gid={$gid}");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #4
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 #5
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'];
    $addhash = $add['addhash'];
    $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];
        $menuname[$i] = hRepPostStr($menuname[$i], 1);
        $menuurl[$i] = hRepPostStr($menuurl[$i], 1);
        $addhash[$i] = (int) $addhash[$i];
        $empire->query("update {$dbtbpre}enewsmenu set menuname='" . $menuname[$i] . "',menuurl='" . $menuurl[$i] . "',myorder='" . $myorder[$i] . "',addhash='" . $addhash[$i] . "' where menuid='" . $menuid[$i] . "'");
    }
    //操作日志
    insert_dolog("classid={$classid}&del={$del}");
    printerror("EditMenuSuccess", "ListMenu.php?classid={$classid}" . hReturnEcmsHashStrHref2(0));
}
Example #6
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)");
    }
}
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 #8
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 #9
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 #10
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)");
    }
}
Example #11
0
function EditMenuClass($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $classid = $add['classid'];
    $delclassid = $add['delclassid'];
    $classname = $add['classname'];
    $myorder = $add['myorder'];
    $classtype = $add['classtype'];
    $count = count($classid);
    if (!$count) {
        printerror("EmptyMenuClass", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "menu");
    //删除
    $del = 0;
    $ids = '';
    $delcount = count($delclassid);
    if ($delcount) {
        $dh = '';
        for ($j = 0; $j < $delcount; $j++) {
            $ids .= $dh . intval($delclassid[$j]);
            $dh = ',';
        }
        $empire->query("delete from {$dbtbpre}enewsmenuclass where classid in (" . $ids . ")");
        $empire->query("delete from {$dbtbpre}enewsmenu where classid in (" . $ids . ")");
        $del = 1;
    }
    //修改
    for ($i = 0; $i < $count; $i++) {
        $classid[$i] = (int) $classid[$i];
        if (strstr(',' . $ids . ',', ',' . $classid[$i] . ',')) {
            continue;
        }
        $myorder[$i] = (int) $myorder[$i];
        $classtype[$i] = (int) $classtype[$i];
        $empire->query("update {$dbtbpre}enewsmenuclass set classname='" . addslashes($classname[$i]) . "',myorder='" . $myorder[$i] . "',classtype='" . $classtype[$i] . "' where classid='" . $classid[$i] . "'");
    }
    MenuClassToShow();
    //操作日志
    insert_dolog("del={$del}");
    printerror("EditMenuClassSuccess", "MenuClass.php");
}
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 #13
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 #14
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 #15
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 #16
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 #17
0
function DelKey($keyid, $userid, $username)
{
    global $empire, $dbtbpre;
    $keyid = (int) $keyid;
    if (!$keyid) {
        printerror("NotDelKeyid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "key");
    $r = $empire->fetch1("select keyname from {$dbtbpre}enewskey where keyid='{$keyid}'");
    $sql = $empire->query("delete from {$dbtbpre}enewskey where keyid='{$keyid}'");
    GetConfig();
    //更新缓存
    if ($sql) {
        //操作日志
        insert_dolog("keyid=" . $keyid . "<br>keyname=" . $r[keyname]);
        printerror("DelKeySuccess", "key.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #18
0
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)");
    }
}
Example #19
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 #20
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)");
    }
}
Example #21
0
function SetShopDd($ddid, $doing, $userid, $username)
{
    global $empire, $dbtbpre;
    //验证权限
    CheckLevel($userid, $username, $classid, "shopdd");
    $count = count($ddid);
    if (empty($count)) {
        printerror("NotSetDdid", "history.go(-1)");
    }
    $add = '';
    for ($i = 0; $i < $count; $i++) {
        $add .= "ddid='" . intval($ddid[$i]) . "' or ";
    }
    $add = substr($add, 0, strlen($add) - 4);
    //已付费
    if ($doing == 1) {
        $sql = $empire->query("update {$dbtbpre}enewsshopdd set haveprice=1 where " . $add);
        $mess = "SetHavepriceSuccess";
    } elseif ($doing == 2) {
        $sql = $empire->query("update {$dbtbpre}enewsshopdd set outproduct=1 where " . $add);
        $mess = "SetOutProductSuccess";
    } elseif ($doing == 3) {
        $sql = $empire->query("update {$dbtbpre}enewsshopdd set checked=1 where " . $add);
        $mess = "SetCheckedSuccess";
    } elseif ($doing == 4) {
        $sql = $empire->query("update {$dbtbpre}enewsshopdd set checked=0 where " . $add);
        $mess = "SetNoCheckedSuccess";
    } elseif ($doing == 5) {
        $sql = $empire->query("delete from {$dbtbpre}enewsshopdd where " . $add);
        $mess = "DelDdSuccess";
    } else {
    }
    if ($sql) {
        //操作日志
        insert_dolog("doing=" . $doing);
        printerror($mess, "ListDd.php");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
function DelBuyGroup($id, $userid, $username)
{
    global $empire, $dbtbpre;
    //验证权限
    CheckLevel($userid, $username, $classid, "buygroup");
    $id = (int) $id;
    if (!$id) {
        printerror('EmptyBuyGroupid', '');
    }
    $r = $empire->fetch1("select id,gname,gfen,gdate from {$dbtbpre}enewsbuygroup where id='{$id}'");
    if (!$r[id]) {
        printerror('EmptyBuyGroupid', '');
    }
    $sql = $empire->query("delete from {$dbtbpre}enewsbuygroup where id='{$id}'");
    if ($sql) {
        //操作日志
        insert_dolog("id={$id}&gname={$r['gname']}&gfen={$r['gfen']}&gdate={$r['gdate']}");
        printerror('DelBuyGroupSuccess', 'ListBuyGroup.php');
    } else {
        printerror('DbError', '');
    }
}
function DelTempvar($varid, $cid, $userid, $username)
{
    global $empire, $dbtbpre;
    $varid = (int) $varid;
    if (!$varid) {
        printerror("NotDelTempvarid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "tempvar");
    $gid = (int) $_GET['gid'];
    $r = $empire->fetch1("select myvar from " . GetDoTemptb("enewstempvar", $gid) . " where varid='{$varid}'");
    $sql = $empire->query("delete from " . GetDoTemptb("enewstempvar", $gid) . " where varid='{$varid}'");
    //删除备份记录
    DelEbakTempAll('tempvar', $gid, $varid);
    if ($sql) {
        //操作日志
        insert_dolog("varid=" . $varid . "<br>var=" . $r[myvar] . "&gid={$gid}");
        printerror("DelTempvarSuccess", "ListTempvar.php?classid={$cid}&gid={$gid}");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #24
0
function DelPubVarClass($classid, $userid, $username)
{
    global $empire, $dbtbpre;
    $classid = (int) $classid;
    if (!$classid) {
        printerror("NotDelPubVarClassid", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "pubvar");
    $r = $empire->fetch1("select classname from {$dbtbpre}enewspubvarclass where classid='{$classid}'");
    $sql = $empire->query("delete from {$dbtbpre}enewspubvarclass where classid='{$classid}'");
    //删除变量
    $delsql = $empire->query("delete from {$dbtbpre}enewspubvar where classid='{$classid}'");
    if ($sql) {
        GetConfig();
        //操作日志
        insert_dolog("classid=" . $classid . "<br>classname=" . $r[classname]);
        printerror("DelPubVarClassSuccess", "PubVarClass.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #25
0
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)");
    }
}
Example #26
0
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 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");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Example #28
0
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));
}
Example #29
0
require "../../class/db_sql.php";
require "../../class/functions.php";
$link = db_connect();
$empire = new mysqlquery();
$editor = 1;
//验证用户
$lur = is_login();
$logininid = $lur['userid'];
$loginin = $lur['username'];
$loginrnd = $lur['rnd'];
$loginlevel = $lur['groupid'];
$loginadminstyleid = $lur['adminstyleid'];
//ehash
$ecms_hashur = hReturnEcmsHashStrAll();
//验证权限
CheckLevel($logininid, $loginin, $classid, "template");
$sql = $empire->query("select classid,classname from {$dbtbpre}enewsbqtempclass order by classid desc");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link href="../adminstyle/<?php 
echo $loginadminstyleid;
?>
/adminstyle.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
Example #30
0
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)");
    }
}