当前位置: 首页>>代码示例>>PHP>>正文


PHP GetDoTemptb函数代码示例

本文整理汇总了PHP中GetDoTemptb函数的典型用法代码示例。如果您正苦于以下问题:PHP GetDoTemptb函数的具体用法?PHP GetDoTemptb怎么用?PHP GetDoTemptb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetDoTemptb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DelClasstemp

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)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:26,代码来源:ListClasstemp.php

示例2: DelVoteTemp

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)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:22,代码来源:ListVotetemp.php

示例3: DelTempvar

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)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:22,代码来源:ListTempvar.php

示例4: GetDoTemptb

$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");
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:AddSearchtemp.php

示例5: ehtmlspecialchars

$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");
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddBqtemp.php

示例6: GetDoTemptb

$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");
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:AddNewstemp.php

示例7: DelBqtemp

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)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:23,代码来源:ListBqtemp.php

示例8: DefaultJstemp

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)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:22,代码来源:ListJstemp.php

示例9: DelListtemp

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)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:26,代码来源:ListListtemp.php

示例10: ReEBakTemp

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)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:88,代码来源:tempfun.php

示例11: CheckTempGroup

$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;
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:AddPrinttemp.php

示例12: DelNewsTemp

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)");
    }
}
开发者ID:novnan,项目名称:meiju,代码行数:30,代码来源:ListNewstemp.php

示例13: DelPagetemp

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)");
	}
}
开发者ID:novnan,项目名称:meiju,代码行数:25,代码来源:ListPagetemp.php

示例14: hReturnEcmsHashStrAll

$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;
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddTempvar.php

示例15: DefaultMSearchtemp

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)");
    }
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:21,代码来源:ListSearchtemp.php


注:本文中的GetDoTemptb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。