<td bgcolor="#FFFFFF"> <div align="left"> 
        <input name="textfield5" type="text" value="<?php 
echo $public_r[newsurl];
?>
search">
        [<a href="../../search" target="_blank">预览</a>]</div></td>
  </tr>
  <tr> 
    <td height="24" bgcolor="#FFFFFF"> 
      <div align="center">控制面板地址</div></td>
    <td height="24" bgcolor="#FFFFFF">
<input name="textfield52" type="text" value="<?php 
echo $public_r[newsurl];
?>
e/member/cp">
      [<a href="../member/cp" target="_blank">预览</a>]</td>
    <td bgcolor="#FFFFFF"><div align="center"></div></td>
    <td bgcolor="#FFFFFF"><div align="center"></div></td>
  </tr>
  <tr class="header"> 
    <td height="25" colspan="4">js调用方式:&lt;script src=js地址&gt;&lt;/script&gt;</td>
  </tr>
</table>
</body>
</html>
<?php 
db_close();
$empire = null;
$string = @ob_get_contents();
WriteFiletext($fcfile, AddCheckViewTempCode() . $string);
function GetDownloadPage()
{
    global $empire, $public_r, $dbtbpre, $fun_r;
    $pr = $empire->fetch1("select downpagetemp from " . GetTemptb("enewspubtemp") . " limit 1");
    $temptext = $pr['downpagetemp'];
    $url = "<a href='" . $public_r[newsurl] . "'>" . $fun_r['index'] . "</a>&nbsp;>&nbsp;<a href='<?=\$titleurl?>'><?=\$r[title]?></a>&nbsp;>&nbsp;<?=\$thisdownname?>";
    $pagetitle = "<?=htmlspecialchars(\$r[title])?> - <?=htmlspecialchars(\$thisdownname)?>";
    $temptext = ReplaceSvars($temptext, $url, "<?=\$r[classid]?>", $pagetitle, $pagetitle, $pagetitle, $add, 1);
    //分类
    $temptext = str_replace("[!--classid--]", "<?=\$r[classid]?>", $temptext);
    $temptext = str_replace("[!--class.name--]", "<?=\$classname?>", $temptext);
    $temptext = str_replace("[!--bclass.id--]", "<?=\$bclassid?>", $temptext);
    $temptext = str_replace("[!--bclass.name--]", "<?=\$bclassname?>", $temptext);
    //下载地址
    $temptext = str_replace("[!--down.url--]", "<?=\$url?>", $temptext);
    $temptext = str_replace("[!--true.down.url--]", "<?=\$trueurl?>", $temptext);
    $temptext = str_replace("[!--down.name--]", "<?=\$thisdownname?>", $temptext);
    //下载权限
    $temptext = str_replace("[!--fen--]", "<?=\$fen?>", $temptext);
    $temptext = str_replace("[!--group--]", "<?=\$downuser?>", $temptext);
    //信息
    $temptext = str_replace("[!--id--]", "<?=\$r[id]?>", $temptext);
    $temptext = str_replace("[!--titleurl--]", "<?=\$titleurl?>", $temptext);
    $temptext = str_replace("[!--title--]", "<?=\$r[title]?>", $temptext);
    $temptext = str_replace("[!--newstime--]", "<?=\$newstime?>", $temptext);
    $temptext = str_replace("[!--titlepic--]", "<?=\$titlepic?>", $temptext);
    $temptext = str_replace("[!--keyboard--]", "<?=\$r[keyboard]?>", $temptext);
    $temptext = str_replace("[!--userid--]", "<?=\$r[userid]?>", $temptext);
    $temptext = str_replace("[!--username--]", "<?=\$r[username]?>", $temptext);
    $temptext = str_replace("[!--pathid--]", "<?=\$pathid?>", $temptext);
    $temptext = str_replace("[!--totaldown--]", "<?=\$r[totaldown]?>", $temptext);
    $temptext = str_replace("[!--onclick--]", "<?=\$r[onclick]?>", $temptext);
    $file = "../data/template/downpagetemp.php";
    WriteFiletext($file, AddCheckViewTempCode() . $temptext);
}
function LoadOutMod($add, $userid, $username)
{
    global $empire, $dbtbpre;
    $tid = (int) $add['tid'];
    $tbname = RepPostVar($add['tbname']);
    $mid = (int) $add['mid'];
    if (!$tid || !$tbname || !$mid) {
        printerror("EmptyLoadMod", "");
    }
    $mr = $empire->fetch1("select * from {$dbtbpre}enewsmod where mid={$mid} and tid={$tid}");
    if (!$mr['mid']) {
        printerror("EmptyLoadMod", "");
    }
    $tr = $empire->fetch1("select tbname,tname,tsay from {$dbtbpre}enewstable where tid={$tid}");
    if (!$tr['tbname']) {
        printerror("EmptyLoadMod", "");
    }
    //数据表结构
    $loadmod = "<?php\r\n" . LoadModReturnstru($dbtbpre . "ecms_" . $mr['tbname'], $mr['tbname'], 0) . "\r\n";
    $loadmod .= LoadModReturnstru($dbtbpre . "ecms_" . $mr['tbname'] . "_data_1", $mr['tbname'], 5) . "\r\n";
    $loadmod .= LoadModReturnstru($dbtbpre . "ecms_" . $mr['tbname'] . "_doc", $mr['tbname'], 1) . "\r\n";
    $loadmod .= LoadModReturnstru($dbtbpre . "ecms_" . $mr['tbname'] . "_doc_data", $mr['tbname'], 4) . "\r\n";
    $loadmod .= LoadModReturnstru($dbtbpre . "ecms_infoclass_" . $mr['tbname'], $mr['tbname'], 2) . "\r\n";
    $loadmod .= LoadModReturnstru($dbtbpre . "ecms_infotmp_" . $mr['tbname'], $mr['tbname'], 3) . "\r\n";
    //数据表
    $loadmod .= "\$empire->query(\"insert into \".\$dbtbpre.\"enewstable(tbname,tname,tsay,isdefault,datatbs,deftb,yhid,mid) values('\$tbname','" . $tr[tname] . "','" . LMEscape_str($tr[tsay]) . "',0,',1,','1',0,0);\");\r\n\$tid=\$empire->lastid();\r\n";
    //字段
    $fsql = $empire->query("select * from {$dbtbpre}enewsf where tid={$tid} order by fid");
    while ($fr = $empire->fetch($fsql)) {
        $loadmod .= "\$empire->query(\"insert into \".\$dbtbpre.\"enewsf(f,fname,fform,fhtml,fzs,isadd,isshow,iscj,cjhtml,myorder,ftype,flen,dotemp,tid,tbname,savetxt,fvalue,iskey,tobr,dohtml,qfhtml,isonly,linkfieldval,samedata,fformsize,tbdataf,ispage,adddofun,editdofun,qadddofun,qeditdofun,linkfieldtb,linkfieldshow,editorys,issmalltext) values('{$fr['f']}','{$fr['fname']}','{$fr['fform']}','" . LMEscape_str($fr['fhtml']) . "','" . LMEscape_str($fr[fzs]) . "',{$fr['isadd']},{$fr['isshow']},{$fr['iscj']},'" . LMEscape_str($fr[cjhtml]) . "',{$fr['myorder']},'{$fr['ftype']}','{$fr['flen']}',{$fr['dotemp']},\$tid,'\$tbname',{$fr['savetxt']},'" . LMEscape_str($fr[fvalue]) . "',{$fr['iskey']},{$fr['tobr']},{$fr['dohtml']},'" . LMEscape_str($fr[qfhtml]) . "',{$fr['isonly']},'" . LMEscape_str($fr[linkfieldval]) . "',{$fr['samedata']},'{$fr['fformsize']}','{$fr['tbdataf']}','{$fr['ispage']}','" . LMEscape_str($fr[adddofun]) . "','" . LMEscape_str($fr[editdofun]) . "','" . LMEscape_str($fr[qadddofun]) . "','" . LMEscape_str($fr[qeditdofun]) . "','" . LMEscape_str($fr[linkfieldtb]) . "','" . LMEscape_str($fr[linkfieldshow]) . "','{$fr['editorys']}','{$fr['issmalltext']}');\");\r\n";
    }
    //模型
    $loadmod .= "\$empire->query(\"insert into \".\$dbtbpre.\"enewsmod(mname,mtemp,mzs,cj,enter,tempvar,sonclass,searchvar,tid,tbname,qenter,mustqenterf,qmtemp,listandf,setandf,listtempvar,qmname,canaddf,caneditf,definfovoteid,showmod,usemod,myorder,orderf,isdefault,listfile,printtempid) values('{$mr['mname']}','" . LMEscape_str($mr[mtemp]) . "','" . LMEscape_str($mr[mzs]) . "','" . LMEscape_str($mr[cj]) . "','" . LMEscape_str($mr[enter]) . "','" . LMEscape_str($mr[tempvar]) . "','','" . LMEscape_str($mr[searchvar]) . "',\$tid,'\$tbname','" . LMEscape_str($mr[qenter]) . "','" . LMEscape_str($mr[mustqenterf]) . "','" . LMEscape_str($mr[qmtemp]) . "','" . LMEscape_str($mr[listandf]) . "',{$mr['setandf']},'" . LMEscape_str($mr[listtempvar]) . "','" . LMEscape_str($mr[qmname]) . "','" . LMEscape_str($mr[canaddf]) . "','" . LMEscape_str($mr[caneditf]) . "',0,0,0,0,'" . LMEscape_str($mr[orderf]) . "',0,'',0);\");\r\n\$mid=\$empire->lastid();\r\n?>";
    $file = $tr['tbname'] . time() . ".mod";
    $filepath = ECMS_PATH . "e/data/tmp/mod/" . $file;
    WriteFiletext_n($filepath, AddCheckViewTempCode() . $loadmod);
    DownLoadFile($file, $filepath, 1);
    //操作日志
    insert_dolog("tid={$tid}&tb={$tr['tbname']}<br>mid={$mid}&m={$mr['mname']}");
    exit;
}
Exemple #4
0
function PreviewIndexpage($tempid, $userid, $username)
{
    global $empire, $dbtbpre, $public_r, $emod_r, $class_r, $class_zr, $fun_r, $navclassid, $navinfor, $class_tr, $level_r, $etable_r;
    //验证权限
    CheckLevel($userid, $username, $classid, "template");
    $tempid = (int) $tempid;
    if (!$tempid) {
        printerror('ErrorUrl', '');
    }
    $tempr = $empire->fetch1("select tempid,temptext from {$dbtbpre}enewsindexpage where tempid='{$tempid}'");
    if (!$tempr['tempid']) {
        printerror('ErrorUrl', '');
    }
    $indextext = stripSlashes($tempr['temptext']);
    $indextext = ReplaceTempvar($indextext);
    //替换全局模板变量
    $pr = $empire->fetch1("select sitekey,siteintro from {$dbtbpre}enewspublic limit 1");
    //页面
    $pagetitle = ehtmlspecialchars($public_r['sitename']);
    $pagekey = ehtmlspecialchars($pr['sitekey']);
    $pagedes = ehtmlspecialchars($pr['siteintro']);
    $url = "<a href=\"" . ReturnSiteIndexUrl() . "\">" . $fun_r['index'] . "</a>";
    //栏目导航
    $onclick = '';
    $file = ECMS_PATH . DASHBOARD . '/data/tmp/indexpage' . $tempid . '.php';
    $indextext = ReplaceSvars($indextext, $url, 0, $pagetitle, $pagekey, $pagedes, $add, 0);
    $indextext = str_replace("[!--page.stats--]", $onclick, $indextext);
    //替换标签
    $indextext = DoRepEcmsLoopBq($indextext);
    $indextext = RepBq($indextext);
    //写文件
    WriteFiletext($file, AddCheckViewTempCode() . $indextext);
    //读取文件内容
    ob_start();
    include $file;
    $string = ob_get_contents();
    ob_end_clean();
    $string = RepExeCode($string);
    //解析代码
    echo stripSlashes($string);
    exit;
}
Exemple #5
0
if ($_GET['doopen']) {
    $open = (int) $_GET['open'];
    SetDisplayClass($open);
}
//图标
if (getcvar('displayclass', 1)) {
    $img = "<a href='ListClass.php?doopen=1&open=0" . $ecms_hashur['ehref'] . "' title='展开'><img src='../data/images/displaynoadd.gif' width='15' height='15' border='0'></a>";
} else {
    $img = "<a href='ListClass.php?doopen=1&open=1" . $ecms_hashur['ehref'] . "' title='收缩'><img src='../data/images/displayadd.gif' width='15' height='15' border='0'></a>";
}
//缓存
$displayclass = (int) getcvar('displayclass', 1);
$fcfile = "../data/fc/ListClass" . $displayclass . ".php";
$fclistclass = '';
if (file_exists($fcfile)) {
    $fclistclass = str_replace(AddCheckViewTempCode(), '', ReadFiletext($fcfile));
}
?>
<!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 rel="stylesheet" href="adminstyle/<?php 
echo $loginadminstyleid;
?>
/adminstyle.css" type="text/css">
<SCRIPT lanuage="JScript">
function turnit(ss)
{
 if (ss.style.display=="") 
Exemple #6
0
if (stristr($enews, ',doinfo,')) {
    if (!HaveNavClassCache("navtype='listenews'")) {
        if (empty($cacher['listenews'])) {
            $cacher['listenews'] = $notrecordword;
        }
        $infofcfile = '../data/fc/ListEnews.php';
        WriteFiletext($infofcfile, AddCheckViewTempCode() . $cacher['listenews']);
        InsertNavClassCache('listenews', 0, 0);
    }
}
//用户信息缓存
if (stristr($enews, ',douserinfo,')) {
    if ($userid) {
        if (!HaveNavClassCache("navtype='userenews' and userid='{$userid}'")) {
            $userinfofcfile = '../data/fc/ListEnews' . $userid . '.php';
            WriteFiletext($userinfofcfile, AddCheckViewTempCode() . $cacher['userenews']);
            $userinfojsfile = '../data/fc/userclass' . $userid . '.js';
            WriteFiletext_n($userinfojsfile, "document.write(\"" . addslashes($cacher['userjs']) . "\");");
            InsertNavClassCache('userenews', $userid, 0);
        }
    }
}
//------ JS ------
if (stristr($enews, ',doinfo,')) {
    if (!HaveNavClassCache("navtype='jsclass'")) {
        $jsfile = "../data/fc/cmsclass.js";
        $search_jsfile = "../data/fc/searchclass.js";
        $search_jsstr = str_replace(" style='background:" . $public_r['chclasscolor'] . "'", "", $cacher['jsstr']);
        WriteFiletext_n($jsfile, "document.write(\"" . addslashes($cacher['jsstr']) . "\");");
        WriteFiletext_n($search_jsfile, "document.write(\"" . addslashes($search_jsstr) . "\");");
        InsertNavClassCache('jsclass', 0, 0);