123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- <?php
- define('EmpireCMSAdmin','1');
- require("../class/connect.php");
- require("../class/db_sql.php");
- require("../class/functions.php");
- require("../data/dbcache/class.php");
- require("../data/dbcache/MemberLevel.php");
- $link=db_connect();
- $empire=new mysqlquery();
- //验证用户
- $lur=is_login();
- $logininid=$lur['userid'];
- $loginin=$lur['username'];
- $loginrnd=$lur['rnd'];
- $loginlevel=$lur['groupid'];
- $loginadminstyleid=$lur['adminstyleid'];
- //ehash
- $ecms_hashur=hReturnEcmsHashStrAll();
- $id=(int)$_GET['id'];
- $classid=(int)$_GET['classid'];
- if(empty($class_r[$classid][classid])||!$id)
- {
- printerror("ErrorUrl","history.go(-1)");
- }
- //验证权限
- $doselfinfo=CheckLevel($logininid,$loginin,$classid,"news");
- if(!$class_r[$classid][tbname]||!$class_r[$classid][classid])
- {
- printerror("ErrorUrl","history.go(-1)");
- }
- //非终极栏目
- if(!$class_r[$classid]['islast'])
- {
- printerror("AddInfoErrorClassid","history.go(-1)");
- }
- $bclassid=$class_r[$classid][bclassid];
- $fun_r['AdminInfo']='管理信息';
- //模型
- $fieldexp="<!--field--->";
- $recordexp="<!--record-->";
- $tbname=$class_r[$classid][tbname];
- $mid=$class_r[$classid][modid];
- $mr=$empire->fetch1("select enter,tbname from {$dbtbpre}enewsmod where mid='$mid'");
- if(empty($mr['tbname']))
- {
- printerror("ErrorUrl","history.go(-1)");
- }
- $enter=$mr['enter'];
- $savetxtf=$emod_r[$mid]['savetxtf'];
- //导航
- $url=AdminReturnClassLink($classid).' > 查看信息';
- //状态
- $addecmscheck='';
- $ecmscheck=(int)$_GET['ecmscheck'];
- $indexchecked=1;
- if($ecmscheck)
- {
- $addecmscheck='&ecmscheck='.$ecmscheck;
- $indexchecked=0;
- }
- //索引表
- $index_r=$empire->fetch1("select id,classid,checked from {$dbtbpre}ecms_".$tbname."_index where id='$id' limit 1");
- if(!$index_r['id']||$index_r['classid']!=$classid)
- {
- printerror("ErrorUrl","history.go(-1)");
- }
- //主表
- $infotb=ReturnInfoMainTbname($tbname,$index_r['checked']);//返回表
- $r=$empire->fetch1("select * from ".$infotb." where id='$id' limit 1");
- $r[newstime]=date("Y-m-d H:i:s",$r[newstime]);
- //副表
- $infodatatb=ReturnInfoDataTbname($tbname,$index_r['checked'],$r['stb']);//返回副表
- $finfor=$empire->fetch1("select ".ReturnSqlFtextF($mid)." from ".$infodatatb." where id='$id'");
- $r=array_merge($r,$finfor);
- //内容存文本
- if($savetxtf)
- {
- $r[$savetxtf]=GetTxtFieldText($r[$savetxtf]);
- }
- //发布者
- if($r[ismember])
- {
- $username=empty($r[userid])?'游客':"会员:<a href='member/AddMember.php?enews=EditMember&userid=".$r[userid].$ecms_hashur['ehref']."' target='_blank'>".$r[username]."</a>";
- }
- else
- {
- $username="<a href='user/AddUser.php?enews=EditUser&userid=".$r[userid].$ecms_hashur['ehref']."' target='_blank'>".$r[username]."</a>";
- }
- //状态
- $st='';
- if($index_r[checked])//审核
- {
- $st.="[已审核] ";
- }
- else
- {
- $st.="[未审核] ";
- }
- if($r[istop])//置顶
- {
- $st.="[顶".$r[istop]."] ";
- }
- if($r[isgood])//推荐
- {
- $st.="[推".$r[isgood]."] ";
- }
- if($r[firsttitle])//头条
- {
- $st.="[头".$r[firsttitle]."]";
- }
- //标题
- $titleurl=sys_ReturnBqTitleLink($r);
- //$r[title]="<a href='$titleurl' target='_blank'>".DoTitleFont($r[titlefont],$r[title])."</a>";
- //权限
- $group='';
- if($r[groupid])
- {
- $group=$level_r[$r[groupid]][groupname];
- if($r[userfen])
- {
- $group.=" ,扣除点数:".$r[userfen];
- }
- }
- //栏目链接
- $classurl=sys_ReturnBqClassname($r,9);
- $getclassurlr['classid']=$bclassid;
- $bclassurl=sys_ReturnBqClassname($getclassurlr,9);
- $classes="<a href='$bclassurl' target='_blank'>".$class_r[$bclassid][classname]."</a> > <a href='$classurl' target='_blank'>".$class_r[$classid][classname]."</a>";
- //专题
- $zts='';
- if($r[ztid]&&$r[ztid]<>'|')
- {
- $ztr=explode('|',$r[ztid]);
- $count=count($ztr)-1;
- for($i=1;$i<$count;$i++)
- {
- $zturlr[ztid]=$ztr[$i];
- $zturl=sys_ReturnBqZtname($zturlr);
- $zts.="<a href='$zturl' target='_blank'>".$class_zr[$ztr[$i]][ztname]."</a> ";
- }
- }
- //标题分类
- $titletype=$class_tr[$r[ttid]]['tname'];
- //信息状态
- $einfochecked=$index_r['checked'];
- $einfoismember=$r['ismember'];
- //------ 编辑器内容显示 ------
- $seteshoweditorhtml=3;
- $eshoweditorhtml=0;
- if($seteshoweditorhtml)
- {
- if($seteshoweditorhtml==1)//所有
- {
- $eshoweditorhtml=1;
- }
- elseif($seteshoweditorhtml==2)//所有未审核
- {
- if(!$einfochecked)
- {
- $eshoweditorhtml=1;
- }
- }
- elseif($seteshoweditorhtml==3)//所有投稿
- {
- if($einfoismember)
- {
- $eshoweditorhtml=1;
- }
- }
- elseif($seteshoweditorhtml==4)//所有未审核投稿
- {
- if($einfoismember&&!$einfochecked)
- {
- $eshoweditorhtml=1;
- }
- }
- else
- {
- $eshoweditorhtml=1;
- }
- }
- $toshowhtmlbutton=0;
- if($eshoweditorhtml)
- {
- $toshowhtmlbutton=1;
- }
- //------ 编辑器内容显示 ------
- //显示编辑器内容
- $eckshowhtml=(int)$_GET['ckshowhtml'];
- $ethisshowhtml='1'.date("md").$logininid;
- $ethisshowhtml=(int)$ethisshowhtml;
- if($ethisshowhtml==$eckshowhtml)
- {
- $eshoweditorhtml=0;
- }
- //切换地址
- if(!$eckshowhtml)
- {
- $showhtmlbutton='点击可视化模式显示';
- $showhtmlurl='ShowInfo.php?classid='.$r['classid'].'&id='.$r['id'].$addecmscheck.$ecms_hashur['ehref'].'&ckshowhtml='.$ethisshowhtml;
- }
- else
- {
- $showhtmlbutton='点击源码模式显示';
- $showhtmlurl='ShowInfo.php?classid='.$r['classid'].'&id='.$r['id'].$addecmscheck.$ecms_hashur['ehref'];
- }
- ?>
- <!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/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
- <tr>
- <td height="25">位置:<?=$url?></td>
- </tr>
- </table>
- <form name="form1" method="post" action="ecmsinfo.php">
- <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" style="word-wrap: break-word">
- <?=$ecms_hashur['eform']?>
- <tr class="header">
- <td height="25" colspan="2"><div align="center">
- <table width="100%" border="0" cellspacing="1" cellpadding="3">
- <tr>
- <td width="50%"><strong><font color="#FFFFFF">查看信息</font></strong></td>
- <td width="50%"><div align="right">
- <?php
- if($toshowhtmlbutton)
- {
- ?>
- <input name="button" type="button" id="button" value="<?=$showhtmlbutton?>" onclick="self.location.href='<?=$showhtmlurl?>';">
- <?php
- }
- ?>
- </div></td>
- </tr>
- </table>
- </div></td>
- </tr>
- <tr>
- <td width="13%" height="25" bgcolor="#FFFFFF">
- <div align="right"><strong>发布者</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$username?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>发布时间</strong></div></td>
- <td bgcolor="#FFFFFF">增加时间:
- <?=date("Y-m-d H:i:s",$r[truetime])?>
- ,最后修改:
- <?=date("Y-m-d H:i:s",$r[lastdotime])?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>人气</strong></div></td>
- <td bgcolor="#FFFFFF">点击数:
- <?=$r[onclick]?>
- ,评论数:
- <?=$r[plnum]?>
- ,下载数:
- <?=$r[totaldown]?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>信息状态</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$st?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>栏目</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$classes?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>专题</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$zts?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>标题分类</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$titletype?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>关键字</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$r[keyboard]?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>相关信息ID</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$r[keyid]?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>查看权限</strong></div></td>
- <td bgcolor="#FFFFFF">
- <?=$group?> </td>
- </tr>
- <tr>
- <td height="25" bgcolor="#FFFFFF"><div align="right"><strong>页面链接</strong></div></td>
- <td bgcolor="#FFFFFF"><a href="<?=$titleurl?>" target="_blank"><?=$titleurl?></a></td>
- </tr>
- <?php
- $fr=explode($recordexp,$enter);
- $count=count($fr)-1;
- for($i=0;$i<$count;$i++)
- {
- $fr1=explode($fieldexp,$fr[$i]);
- $fname=$fr1[0];
- $f=$fr1[1];
- if($f=="special.field")
- {
- continue;
- }
- ?>
- <tr>
- <td width="13%" height="25" bgcolor="#FFFFFF"><div align="right"> <strong>
- <?=$fname?>
- </strong> </div></td>
- <td width="87%" bgcolor="#FFFFFF">
- <?php
- if(!$eshoweditorhtml)
- {
- ?>
- <?=stripSlashes($r[$f])?>
- <?php
- }
- else
- {
- ?>
- <?=nl2br(eDoRepShowStr(stripSlashes($r[$f]),1))?>
- <?php
- }
- ?>
- </td>
- </tr>
- <?php
- }
- ?>
- <tr class="header">
- <td height="25" colspan="2">
- <div align="right">
- <table width="100%" border="0" cellspacing="1" cellpadding="3">
- <tr>
- <td width="50%"> </td>
- <td width="50%"><div align="right">
- <?php
- if($toshowhtmlbutton)
- {
- ?>
- <input name="button2" type="button" id="button2" value="<?=$showhtmlbutton?>" onclick="self.location.href='<?=$showhtmlurl?>';">
- <?php
- }
- ?>
- </div></td>
- </tr>
- </table>
- </div></td>
- </tr>
- </table>
- </form>
- </body>
- </html>
- <?php
- db_close();
- $empire=null;
- ?>
|