Ejemplo n.º 1
0
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)");
    }
}
Ejemplo n.º 2
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)");
    }
}
Ejemplo n.º 3
0
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)");
    }
}
Ejemplo n.º 4
0
$r[subnews] = 0;
$r[rownum] = 1;
$r[subtitle] = 0;
$r[showdate] = "Y-m-d H:i:s";
$url = $urlgname . "<a href=ListSearchtemp.php?gid={$gid}>管理搜索模板</a>&nbsp;>&nbsp;增加搜索模板";
$autorownum = " checked";
//复制
if ($enews == "AddMSearchtemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempname,temptext,subnews,listvar,rownum,modid,showdate,subtitle,classid,docode from " . GetDoTemptb("enewssearchtemp", $gid) . " where tempid='{$tempid}'");
    $url = $urlgname . "<a href=ListSearchtemp.php?gid={$gid}>管理搜索模板</a>&nbsp;>&nbsp;复制搜索模板:" . $r[tempname];
}
//修改
if ($enews == "EditMSearchtemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempname,temptext,subnews,listvar,rownum,modid,showdate,subtitle,classid,docode from " . GetDoTemptb("enewssearchtemp", $gid) . " where tempid='{$tempid}'");
    $url = $urlgname . "<a href=ListSearchtemp.php?gid={$gid}>管理搜索模板</a>&nbsp;>&nbsp;修改搜索模板:" . $r[tempname];
}
//系统模型
$msql = $empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid");
while ($mr = $empire->fetch($msql)) {
    if ($mr[mid] == $r[modid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $mod .= "<option value=" . $mr[mid] . $select . ">" . $mr[mname] . "</option>";
}
//分类
$cstr = "";
$csql = $empire->query("select classid,classname from {$dbtbpre}enewssearchtempclass order by classid");
Ejemplo n.º 5
0
$enews = ehtmlspecialchars($_GET['enews']);
$r[subnews] = 0;
$r[rownum] = 1;
$r[showdate] = "Y-m-d H:i:s";
$url = $urlgname . "<a href=ListBqtemp.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理标签模板</a>&nbsp;>&nbsp;增加标签模板";
$autorownum = " checked";
//复制
if ($enews == "AddBqtemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select * from " . GetDoTemptb("enewsbqtemp", $gid) . " where tempid='{$tempid}'");
    $url = $urlgname . "<a href=ListBqtemp.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理标签模板</a>&nbsp;>&nbsp;复制标签模板:" . $r[tempname];
}
//修改
if ($enews == "EditBqtemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select * from " . GetDoTemptb("enewsbqtemp", $gid) . " where tempid='{$tempid}'");
    $url = $urlgname . "<a href=ListBqtemp.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理标签模板</a>&nbsp;>&nbsp;修改标签模板:" . $r[tempname];
}
//系统模型
$msql = $empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid");
while ($mr = $empire->fetch($msql)) {
    if ($mr[mid] == $r[modid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $mod .= "<option value=" . $mr[mid] . $select . ">" . $mr[mname] . "</option>";
}
//分类
$cstr = "";
$csql = $empire->query("select classid,classname from {$dbtbpre}enewsbqtempclass order by classid");
Ejemplo n.º 6
0
$urlgname = $gname . "&nbsp;>&nbsp;";
$mid = $_GET['mid'];
$cid = $_GET['cid'];
$enews = $_GET['enews'];
$r[showdate] = "Y-m-d H:i:s";
$url = $urlgname . "<a href=ListNewstemp.php?gid={$gid}>管理内容模板</a>&nbsp;>&nbsp;增加内容模板";
//复制
if ($enews == "AddNewstemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempname,temptext,modid,showdate,classid from " . GetDoTemptb("enewsnewstemp", $gid) . " where tempid='{$tempid}'");
    $url = $urlgname . "<a href=ListNewstemp.php?gid={$gid}>管理内容模板</a>&nbsp;>&nbsp;复制内容模板:" . $r[tempname];
}
//修改
if ($enews == "EditNewstemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempname,temptext,modid,showdate,classid from " . GetDoTemptb("enewsnewstemp", $gid) . " where tempid='{$tempid}'");
    $url = $urlgname . "<a href=ListNewstemp.php?gid={$gid}>管理内容模板</a>&nbsp;>&nbsp;修改内容模板:" . $r[tempname];
}
//系统模型
$msql = $empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid");
while ($mr = $empire->fetch($msql)) {
    if ($mr[mid] == $r[modid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $mod .= "<option value=" . $mr[mid] . $select . ">" . $mr[mname] . "</option>";
}
//分类
$cstr = "";
$csql = $empire->query("select classid,classname from {$dbtbpre}enewsnewstempclass order by classid");
Ejemplo n.º 7
0
function DelBqtemp($tempid, $add, $userid, $username)
{
    global $empire, $dbtbpre;
    $tempid = (int) $tempid;
    if (!$tempid) {
        printerror("NotDelTemplateid", "history.go(-1)");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "template");
    $gid = (int) $add['gid'];
    $r = $empire->fetch1("select tempname from " . GetDoTemptb("enewsbqtemp", $gid) . " where tempid='{$tempid}'");
    //删除模板
    $sql = $empire->query("delete from " . GetDoTemptb("enewsbqtemp", $gid) . " where tempid='{$tempid}'");
    //删除模板备份
    DelEbakTempAll('bqtemp', $gid, $tempid);
    if ($sql) {
        //操作日志
        insert_dolog("tempid=" . $tempid . "<br>tempname=" . $r[tempname] . "&gid={$gid}");
        printerror("DelBqtempSuccess", "ListBqtemp.php?classid={$add['cid']}&modid={$add['mid']}&gid={$gid}" . hReturnEcmsHashStrHref2(0));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Ejemplo n.º 8
0
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)");
    }
}
Ejemplo n.º 9
0
function DelListtemp($tempid, $add, $userid, $username)
{
    global $empire, $dbtbpre, $public_r;
    $tempid = (int) $tempid;
    if (!$tempid) {
        printerror("NotDelTemplateid", "history.go(-1)");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "template");
    $gid = (int) $add['gid'];
    $tr = $empire->fetch1("select tempname from " . GetDoTemptb("enewslisttemp", $gid) . " where tempid='{$tempid}'");
    $sql = $empire->query("delete from " . GetDoTemptb("enewslisttemp", $gid) . " where tempid='{$tempid}'");
    //删除备份记录
    DelEbakTempAll('listtemp', $gid, $tempid);
    if ($gid == $public_r['deftempid'] || !$public_r['deftempid'] && ($gid == 1 || $gid == 0)) {
        //删除动态模板缓存文件
        DelOneTempTmpfile('list' . $tempid);
    }
    if ($sql) {
        //操作日志
        insert_dolog("tempid=" . $tempid . "<br>tempname=" . $tr[tempname] . "&gid={$gid}");
        printerror("DelListTempSuccess", "ListListtemp.php?classid={$add['cid']}&modid={$add['mid']}&gid={$gid}" . hReturnEcmsHashStrHref2(0));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Ejemplo n.º 10
0
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)");
    }
}
Ejemplo n.º 11
0
$gid = (int) $_GET['gid'];
$gname = CheckTempGroup($gid);
$urlgname = $gname . "&nbsp;>&nbsp;";
$enews = $_GET['enews'];
$r[showdate] = "Y-m-d H:i:s";
$url = $urlgname . "<a href=ListPrinttemp.php?gid={$gid}>管理打印模板</a>&nbsp;>&nbsp;增加打印模板";
//复制
if ($enews == "AddPrintTemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempid,tempname,temptext,showdate,modid from " . GetDoTemptb("enewsprinttemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListPrinttemp.php?gid={$gid}>管理打印模板</a>&nbsp;>&nbsp;复制打印模板:<b>" . $r[tempname] . "</b>";
}
//修改
if ($enews == "EditPrintTemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempid,tempname,temptext,showdate,modid from " . GetDoTemptb("enewsprinttemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListPrinttemp.php?gid={$gid}>管理打印模板</a>&nbsp;>&nbsp;修改打印模板:<b>" . $r[tempname] . "</b>";
}
//系统模型
$mod = '';
$msql = $empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid");
while ($mr = $empire->fetch($msql)) {
    if ($mr[mid] == $r[modid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $mod .= "<option value=" . $mr[mid] . $select . ">" . $mr[mname] . "</option>";
}
db_close();
$empire = null;
Ejemplo n.º 12
0
function DelNewsTemp($tempid, $add, $userid, $username)
{
    global $empire, $dbtbpre, $public_r;
    $tempid = (int) $tempid;
    if (!$tempid) {
        printerror("NotDelTemplateid", "history.go(-1)");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "template");
    $gid = (int) $add['gid'];
    $r = $empire->fetch1("select tempname,modid from " . GetDoTemptb("enewsnewstemp", $gid) . " where tempid='{$tempid}'");
    $dotempname = $r['tempname'];
    $sql = $empire->query("delete from " . GetDoTemptb("enewsnewstemp", $gid) . " where tempid='{$tempid}'");
    //将信息设为未生成
    $mr = $empire->fetch1("select tbname from {$dbtbpre}enewsmod where mid='{$r['modid']}'");
    //$usql=$empire->query("update {$dbtbpre}ecms_".$mr[tbname]." set havehtml=0 where newstempid='$tempid'");
    //删除备份
    DelEbakTempAll('newstemp', $gid, $tempid);
    if ($gid == $public_r['deftempid'] || !$public_r['deftempid'] && ($gid == 1 || $gid == 0)) {
        //删除动态模板缓存文件
        DelOneTempTmpfile('text' . $tempid);
    }
    if ($sql) {
        //操作日志
        insert_dolog("tempid=" . $tempid . "<br>tempname=" . $dotempname . "&gid={$gid}");
        printerror("DelNewsTempSuccess", "ListNewstemp.php?classid={$add['cid']}&modid={$add['mid']}&gid={$gid}" . hReturnEcmsHashStrHref2(0));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Ejemplo n.º 13
0
function DelPagetemp($add,$userid,$username){
	global $empire,$dbtbpre;
	$tempid=(int)$add['tempid'];
	if(!$tempid)
	{
		printerror("EmptyPagetempid","history.go(-1)");
    }
	//验证权限
	CheckLevel($userid,$username,$classid,"template");
	$gid=(int)$add['gid'];
	$r=$empire->fetch1("select tempname from ".GetDoTemptb("enewspagetemp",$gid)." where tempid='$tempid'");
	$sql=$empire->query("delete from ".GetDoTemptb("enewspagetemp",$gid)." where tempid='$tempid'");
	//删除备份记录
	DelEbakTempAll('pagetemp',$gid,$tempid);
	if($sql)
	{
		//操作日志
		insert_dolog("tempid=$tempid&tempname=$r[tempname]&gid=$gid");
		printerror("DelPagetempSuccess","ListPagetemp.php?gid=$gid".hReturnEcmsHashStrHref2(0));
	}
	else
	{
		printerror("DbError","history.go(-1)");
	}
}
Ejemplo n.º 14
0
$loginadminstyleid = $lur['adminstyleid'];
//ehash
$ecms_hashur = hReturnEcmsHashStrAll();
//验证权限
CheckLevel($logininid, $loginin, $classid, "tempvar");
$gid = (int) $_GET['gid'];
$gname = CheckTempGroup($gid);
$urlgname = $gname . "&nbsp;>&nbsp;";
$enews = ehtmlspecialchars($_GET['enews']);
$cid = ehtmlspecialchars($_GET['cid']);
$r[myorder] = 0;
$url = $urlgname . "<a href=ListTempvar.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理模板变量</a>&nbsp;>&nbsp;增加模板变量";
//修改
if ($enews == "EditTempvar") {
    $varid = (int) $_GET['varid'];
    $r = $empire->fetch1("select myvar,varname,varvalue,classid,isclose,myorder from " . GetDoTemptb("enewstempvar", $gid) . " where varid='{$varid}'");
    $r[varvalue] = ehtmlspecialchars(stripSlashes($r[varvalue]));
    $url = $urlgname . "<a href=ListTempvar.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理模板变量</a>&nbsp;>&nbsp;修改模板变量:" . $r[myvar];
}
//分类
$cstr = "";
$csql = $empire->query("select classid,classname from {$dbtbpre}enewstempvarclass order by classid");
while ($cr = $empire->fetch($csql)) {
    $select = "";
    if ($cr[classid] == $r[classid]) {
        $select = " selected";
    }
    $cstr .= "<option value='" . $cr[classid] . "'" . $select . ">" . $cr[classname] . "</option>";
}
db_close();
$empire = null;
Ejemplo n.º 15
0
function DefaultMSearchtemp($tempid, $add, $userid, $username)
{
    global $empire, $dbtbpre;
    $tempid = (int) $tempid;
    if (!$tempid) {
        printerror("EmptyDefaultSearchtempid", "history.go(-1)");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "template");
    $gid = (int) $add['gid'];
    $tr = $empire->fetch1("select tempname from " . GetDoTemptb("enewssearchtemp", $gid) . " where tempid='{$tempid}'");
    $usql = $empire->query("update " . GetDoTemptb("enewssearchtemp", $gid) . " set isdefault=0");
    $sql = $empire->query("update " . GetDoTemptb("enewssearchtemp", $gid) . " set isdefault=1 where tempid='{$tempid}'");
    if ($sql) {
        //操作日志
        insert_dolog("tempid=" . $tempid . "<br>tempname=" . $tr[tempname] . "&gid={$gid}");
        printerror("DefaultMSearchtempSuccess", "ListSearchtemp.php?classid={$add['cid']}&modid={$add['mid']}&gid={$gid}");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Ejemplo n.º 16
0
    $tname = '打印模板';
    $url = $urlgname . "<a href='ListPrinttemp.php?gid={$gid}' target='_blank'>管理打印模板</a>&nbsp;>&nbsp;模板 <b>{$tr['tempname']}</b> 的修改记录";
} elseif ($temptype == 'searchtemp') {
    $tr = $empire->fetch1("select tempname from " . GetDoTemptb("enewssearchtemp", $gid) . " where tempid='{$tempid}'");
    $tname = '搜索模板';
    $url = $urlgname . "<a href='ListSearchtemp.php?gid={$gid}' target='_blank'>管理搜索模板</a>&nbsp;>&nbsp;模板 <b>{$tr['tempname']}</b> 的修改记录";
} elseif ($temptype == 'tempvar') {
    $tr = $empire->fetch1("select myvar,varname from " . GetDoTemptb("enewstempvar", $gid) . " where varid='{$tempid}'");
    $tname = '公共模板变量';
    $url = $urlgname . "<a href='ListTempvar.php?gid={$gid}' target='_blank'>管理公共模板变量</a>&nbsp;>&nbsp;变量 <b>" . $tr[myvar] . " (" . $tr[varname] . ")</b> 的修改记录";
} elseif ($temptype == 'votetemp') {
    $tr = $empire->fetch1("select tempname from " . GetDoTemptb("enewsvotetemp", $gid) . " where tempid='{$tempid}'");
    $tname = '投票模板';
    $url = $urlgname . "<a href='ListVotetemp.php?gid={$gid}' target='_blank'>管理投票模板</a>&nbsp;>&nbsp;模板 <b>{$tr['tempname']}</b> 的修改记录";
} elseif ($temptype == 'pagetemp') {
    $tr = $empire->fetch1("select tempname from " . GetDoTemptb("enewspagetemp", $gid) . " where tempid='{$tempid}'");
    $tname = '自定义页面模板';
    $url = $urlgname . "<a href='ListPagetemp.php?gid={$gid}' target='_blank'>管理自定义页面模板</a>&nbsp;>&nbsp;模板 <b>{$tr['tempname']}</b> 的修改记录";
} elseif ($temptype == 'indexpage') {
    $tr = $empire->fetch1("select tempname from {$dbtbpre}enewsindexpage where tempid='{$tempid}'");
    $tname = '首页方案';
    $url = $urlgname . "<a href='ListIndexpage.php?gid={$gid}' target='_blank'>管理首页方案</a>&nbsp;>&nbsp;模板 <b>{$tr['tempname']}</b> 的修改记录";
} elseif ($temptype == 'pubindextemp') {
    $tname = '首页模板';
    $url = $urlgname . "公共模板&nbsp;>&nbsp;<b>首页模板</b> 的修改记录";
} elseif ($temptype == 'pubcptemp') {
    $tname = '控制面板模板';
    $url = $urlgname . "公共模板&nbsp;>&nbsp;<b>控制面板模板</b> 的修改记录";
} elseif ($temptype == 'pubsearchtemp') {
    $tname = '高级搜索表单模板';
    $url = $urlgname . "公共模板&nbsp;>&nbsp;<b>高级搜索表单模板</b> 的修改记录";
Ejemplo n.º 17
0
CheckLevel($logininid, $loginin, $classid, "template");
$gid = (int) $_GET['gid'];
$gname = CheckTempGroup($gid);
$urlgname = $gname . "&nbsp;>&nbsp;";
$enews = ehtmlspecialchars($_GET['enews']);
$url = $urlgname . "<a href=ListVotetemp.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理投票模板</a>&nbsp;>&nbsp;增加投票模板";
//复制
if ($enews == "AddVoteTemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempid,tempname,temptext from " . GetDoTemptb("enewsvotetemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListVotetemp.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理投票模板</a>&nbsp;>&nbsp;复制投票模板:<b>" . $r[tempname] . "</b>";
}
//修改
if ($enews == "EditVoteTemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select tempid,tempname,temptext from " . GetDoTemptb("enewsvotetemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListVotetemp.php?gid={$gid}" . $ecms_hashur['ehref'] . ">管理投票模板</a>&nbsp;>&nbsp;修改投票模板:<b>" . $r[tempname] . "</b>";
}
db_close();
$empire = null;
?>
<!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">
<SCRIPT lanuage="JScript">
Ejemplo n.º 18
0
function DefPrintTemp($add, $userid, $username)
{
    global $empire, $dbtbpre, $public_r;
    $tempid = (int) $add[tempid];
    if (!$tempid) {
        printerror("NotChangePrintTempid", "history.go(-1)");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "template");
    $gid = (int) $add['gid'];
    $tr = $empire->fetch1("select tempname from " . GetDoTemptb("enewsprinttemp", $gid) . " where tempid='{$tempid}'");
    $usql = $empire->query("update " . GetDoTemptb("enewsprinttemp", $gid) . " set isdefault=0");
    $sql = $empire->query("update " . GetDoTemptb("enewsprinttemp", $gid) . " set isdefault=1 where tempid='{$tempid}'");
    if ($gid == $public_r['deftempid'] || !$public_r['deftempid'] && ($gid == 1 || $gid == 0)) {
        $empire->query("update {$dbtbpre}enewspublic set defprinttempid='{$tempid}' limit 1");
        GetConfig();
        //更新缓存
    }
    if ($sql) {
        //操作日志
        insert_dolog("tempid=" . $tempid . "<br>tempname=" . $tr[tempname] . "&gid={$gid}");
        printerror("DefPrintTempSuccess", "ListPrinttemp.php?gid={$gid}" . hReturnEcmsHashStrHref2(0));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Ejemplo n.º 19
0
$gname = CheckTempGroup($gid);
$urlgname = $gname . "&nbsp;>&nbsp;";
$cid = $_GET['cid'];
$enews = $_GET['enews'];
$r[showdate] = "[m-d]";
$url = $urlgname . "<a href=ListJstemp.php?gid={$gid}>管理JS模板</a>&nbsp;>&nbsp;增加JS模板";
//复制
if ($enews == "AddJstemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select * from " . GetDoTemptb("enewsjstemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListJstemp.php?gid={$gid}>管理JS模板</a>&nbsp;>&nbsp;复制JS模板: " . $r[tempname];
}
//修改
if ($enews == "EditJstemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select * from " . GetDoTemptb("enewsjstemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListJstemp.php?gid={$gid}>管理JS模板</a>&nbsp;>&nbsp;修改JS模板: " . $r[tempname];
}
//系统模型
$msql = $empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid");
while ($mr = $empire->fetch($msql)) {
    if ($mr[mid] == $r[modid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $mod .= "<option value=" . $mr[mid] . $select . ">" . $mr[mname] . "</option>";
}
//分类
$cstr = "";
$csql = $empire->query("select classid,classname from {$dbtbpre}enewsjstempclass order by classid");
Ejemplo n.º 20
0
$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");
$gid = (int) $_GET['gid'];
$gname = CheckTempGroup($gid);
$tname = ehtmlspecialchars($_GET['tname']);
$r = $empire->fetch1("select * from " . GetDoTemptb('enewspubtemp', $gid) . " limit 1");
db_close();
$empire = null;
?>
<!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">
<SCRIPT lanuage="JScript">
<!--
function tempturnit(ss)