示例#1
0
    $copyclassids = '<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
              <tr>
                <td>同时发布到以下栏目:</td>
              </tr>
              <tr>
                <td height="25" bgcolor="#FFFFFF" id="copyinfoshowclassnav">本信息已同步发布到其他栏目,信息ID:<br>' . $r[copyids] . '</td>
              </tr>
            </table>';
}
//表单文件
$modfile = "../data/html/" . $modid . ".php";
//栏目链接
$getcurlr['classid'] = $classid;
$classurl = sys_ReturnBqClassname($getcurlr, 9);
//当前使用的模板组
$thegid = GetDoTempGid();
$phpmyself = urlencode($_SERVER['PHP_SELF'] . "?" . $_SERVER["QUERY_STRING"]);
?>
<html>
<head>
<title><?php 
echo $word;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="adminstyle/<?php 
echo $loginadminstyleid;
?>
/adminstyle.css" type="text/css">
<link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="adminstyle/<?php 
echo $loginadminstyleid;
示例#2
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'];
$temptype = RepPostVar($_GET['temptype']);
$gid = (int) $_GET['gid'];
if (!$gid) {
    $gid = GetDoTempGid();
}
if ($temptype == 'indexpage') {
    $gid = 1;
}
$tempid = (int) $_GET['tempid'];
if (!$temptype || !$gid || !$tempid) {
    printerror("ErrorUrl", "history.go(-1)");
}
//操作权限
if ($temptype == 'tempvar') {
    CheckLevel($logininid, $loginin, $classid, "tempvar");
} else {
    CheckLevel($logininid, $loginin, $classid, "template");
}
$gname = CheckTempGroup($gid);
示例#3
0
function CheckTempGroup($gid)
{
    global $empire, $dbtbpre;
    if (empty($gid)) {
        $gid = GetDoTempGid();
    }
    $r = $empire->fetch1("select gid,gname from {$dbtbpre}enewstempgroup where gid='{$gid}'");
    if (empty($r['gid'])) {
        printerror("ErrorUrl", "");
    }
    return $r['gname'];
}
示例#4
0
文件: tempfun.php 项目: novnan/meiju
function ReEBakTemp($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $bid = (int) $add['bid'];
    if (!$bid) {
        printerror("NotBakTemp", "history.go(-1)");
    }
    $r = $empire->fetch1("select * from {$dbtbpre}enewstempbak where bid='{$bid}'");
    if (!$r['bid']) {
        printerror("NotBakTemp", "history.go(-1)");
    }
    //操作权限
    if ($r['temptype'] == 'tempvar') {
        CheckLevel($userid, $username, $classid, "tempvar");
    } else {
        CheckLevel($userid, $username, $classid, "template");
    }
    $gid = (int) $r['gid'];
    if (!$gid) {
        $gid = GetDoTempGid();
    }
    if ($temptype == 'indexpage') {
        $gid = 1;
    }
    if ($r['temptype'] == 'bqtemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewsbqtemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',modid='{$r['modid']}',showdate='" . StripAddsData($r[showdate]) . "',listvar='" . addslashes($r[listvar]) . "',subnews='{$r['subnews']}',rownum='{$r['rownum']}',classid='{$r['classid']}',docode='{$r['docode']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'classtemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewsclasstemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',classid='{$r['classid']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'jstemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewsjstemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',classid='{$r['classid']}',showdate='" . StripAddsData($r[showdate]) . "',modid='{$r['modid']}',subnews='{$r['subnews']}',subtitle='{$r['subtitle']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'listtemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewslisttemp", $gid) . " set subnews='{$r['subnews']}',tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',listvar='" . addslashes($r[listvar]) . "',rownum='{$r['rownum']}',modid='{$r['modid']}',showdate='" . StripAddsData($r[showdate]) . "',subtitle='{$r['subtitle']}',classid='{$r['classid']}',docode='{$r['docode']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'newstemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewsnewstemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',showdate='" . StripAddsData($r[showdate]) . "',modid='{$r['modid']}',classid='{$r['classid']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'pltemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspltemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'printtemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewsprinttemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',showdate='" . StripAddsData($r[showdate]) . "',modid='{$r['modid']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'searchtemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewssearchtemp", $gid) . " set subnews='{$r['subnews']}',tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "',listvar='" . addslashes($r[listvar]) . "',rownum='{$r['rownum']}',modid='{$r['modid']}',showdate='" . StripAddsData($r[showdate]) . "',subtitle='{$r['subtitle']}',classid='{$r['classid']}',docode='{$r['docode']}' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'tempvar') {
        $sql = $empire->query("update " . GetDoTemptb("enewstempvar", $gid) . " set myvar='" . StripAddsData($r[tempname]) . "',varname='" . StripAddsData($r[listvar]) . "',varvalue='" . addslashes($r[temptext]) . "',classid='{$r['classid']}',isclose='{$r['docode']}',myorder='{$r['subnews']}' where varid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'votetemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewsvotetemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'pagetemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspagetemp", $gid) . " set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'indexpage') {
        $sql = $empire->query("update {$dbtbpre}enewsindexpage set tempname='" . StripAddsData($r[tempname]) . "',temptext='" . addslashes($r[temptext]) . "' where tempid='{$r['tempid']}'");
    } elseif ($r['temptype'] == 'pubindextemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set indextemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubcptemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set cptemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubsearchtemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set searchtemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubsearchjstemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set searchjstemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubsearchjstemp1') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set searchjstemp1='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubotherlinktemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set otherlinktemp='" . addslashes($r[temptext]) . "',otherlinktempsub='{$r['subtitle']}',otherlinktempdate='" . StripAddsData($r[showdate]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubdownsofttemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set downsofttemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubonlinemovietemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set onlinemovietemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'publistpagetemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set listpagetemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubpljstemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set pljstemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubdownpagetemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set downpagetemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubgbooktemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set gbooktemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'publoginiframe') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set loginiframe='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'publoginjstemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set loginjstemp='" . addslashes($r[temptext]) . "' limit 1");
    } elseif ($r['temptype'] == 'pubschalltemp') {
        $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set schalltemp='" . addslashes($r[temptext]) . "',schallsubnum='{$r['subnews']}',schalldate='" . StripAddsData($r[showdate]) . "' limit 1");
    }
    if ($sql) {
        //操作日志
        insert_dolog("bid={$bid}&temptype={$r['temptype']}<br>tempid={$r['tempid']}&tempname={$r['tempname']}&gid={$r['gid']}");
        echo "<script>opener.ReTempBak();window.close();</script>";
        exit;
    } else {
        printerror("DbError", "history.go(-1)");
    }
}