AddNews.php 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. require("../data/dbcache/class.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. $enews=ehtmlspecialchars($_GET['enews']);
  19. $classid=(int)$_GET['classid'];
  20. if(empty($class_r[$classid][classid]))
  21. {
  22. printerror("ErrorUrl","history.go(-1)");
  23. }
  24. //验证权限
  25. $doselfinfo=CheckLevel($logininid,$loginin,$classid,"news");
  26. if(!$class_r[$classid][tbname]||!$class_r[$classid][classid])
  27. {
  28. printerror("ErrorUrl","history.go(-1)");
  29. }
  30. //非终极栏目
  31. if(!$class_r[$classid]['islast'])
  32. {
  33. printerror("AddInfoErrorClassid","history.go(-1)");
  34. }
  35. $fun_r['AdminInfo']='管理信息';
  36. $bclassid=$class_r[$classid][bclassid];
  37. $id=(int)$_GET['id'];
  38. //附件验证码
  39. if($enews=="AddNews")
  40. {
  41. if(!$doselfinfo['doaddinfo'])//增加权限
  42. {
  43. printerror("NotAddInfoLevel","history.go(-1)");
  44. }
  45. $filepass=time();
  46. $word='增加信息';
  47. $ecmsfirstpost=1;
  48. }
  49. else
  50. {
  51. if(!$doselfinfo['doeditinfo'])//编辑权限
  52. {
  53. printerror("NotEditInfoLevel","history.go(-1)");
  54. }
  55. $filepass=$id;
  56. $word='修改信息';
  57. $ecmsfirstpost=0;
  58. }
  59. //审核
  60. $ecmscheck=(int)$_GET['ecmscheck'];
  61. $addecmscheck='';
  62. $indexchecked=1;
  63. if($ecmscheck)
  64. {
  65. $addecmscheck='&ecmscheck='.$ecmscheck;
  66. $indexchecked=0;
  67. }
  68. //模型
  69. $modid=$class_r[$classid][modid];
  70. $enter=$emod_r[$modid]['enter'];
  71. //导航
  72. $url=AdminReturnClassLink($classid).'&nbsp;>&nbsp;'.$word;
  73. //访问组
  74. $ygroup='';
  75. $vgsql=$empire->query("select vgid,gname from {$dbtbpre}enewsvg order by vgid");
  76. while($vgr=$empire->fetch($vgsql))
  77. {
  78. $ygroup.="<option value=-".$vgr['vgid'].">".$vgr['gname']."</option>";
  79. }
  80. if($ygroup)
  81. {
  82. $ygroup="<option value=''>--- 访问组 ---</option>".$ygroup."<option value=''>--- 会员组 ---</option>";
  83. }
  84. //会员组
  85. $sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  86. while($l_r=$empire->fetch($sql1))
  87. {
  88. $ygroup.="<option value=".$l_r[groupid].">".$l_r[groupname]."</option>";
  89. }
  90. if($enews=="AddNews")
  91. {
  92. $group=str_replace(" value=".$class_r[$classid][groupid].">"," value=".$class_r[$classid][groupid]." selected>",$ygroup);
  93. }
  94. //初始化数据
  95. $r=array();
  96. $newstime=time();
  97. $r[newstime]=date("Y-m-d H:i:s");
  98. $todaytime=$r[newstime];
  99. $r[checked]=$class_r[$classid][checked];
  100. $r[newspath]=date($class_r[$classid][newspath]);
  101. $r[onclick]=0;
  102. $r[userfen]=0;
  103. $titlefontb="";
  104. $titlefonti="";
  105. $titlefonts="";
  106. $voteeditnum=8;
  107. $voter[width]=500;
  108. $voter[height]=300;
  109. $voter[dotime]='0000-00-00';
  110. $r[dokey]=1;
  111. $titleurl='';
  112. if($public_r['onclickrnd'])
  113. {
  114. $onclick_rndr=explode(',',$public_r['onclickrnd']);
  115. $r[onclick]=rand(intval($onclick_rndr[0]),intval($onclick_rndr[1]));
  116. $r[totaldown]=$r[onclick];
  117. }
  118. else
  119. {
  120. $r[totaldown]=0;
  121. $r[onclick]=0;
  122. }
  123. //----------- 特殊模型初始化 -----------
  124. //下载地址前缀
  125. if(strstr($enter,',downpath,')||strstr($enter,',onlinepath,'))
  126. {
  127. $downurlqz="";
  128. $newdownqz="";
  129. $downsql=$empire->query("select urlname,url,urlid from {$dbtbpre}enewsdownurlqz order by urlid");
  130. while($downr=$empire->fetch($downsql))
  131. {
  132. $downurlqz.="<option value='".$downr[url]."'>".$downr[urlname]."</option>";
  133. $newdownqz.="<option value='".$downr[urlid]."'>".$downr[urlname]."</option>";
  134. }
  135. }
  136. //html编辑器
  137. $loadeditorjs='';
  138. if($emod_r[$modid]['editorf']&&$emod_r[$modid]['editorf']!=',')
  139. {
  140. include('ecmseditor/eshoweditor.php');
  141. $loadeditorjs=ECMS_ShowEditorJS('ecmseditor/infoeditor/');
  142. }
  143. //预设投票
  144. if($enews=="AddNews")
  145. {
  146. $infoclassr=$empire->fetch1("select definfovoteid from {$dbtbpre}enewsclass where classid='$classid'");
  147. $definfovoteid=0;
  148. if($infoclassr['definfovoteid'])
  149. {
  150. $definfovoteid=$infoclassr['definfovoteid'];
  151. }
  152. elseif($emod_r[$modid]['definfovoteid'])
  153. {
  154. $definfovoteid=$emod_r[$modid]['definfovoteid'];
  155. }
  156. if($definfovoteid)
  157. {
  158. //投票
  159. $voter=$empire->fetch1("select * from {$dbtbpre}enewsvotemod where voteid='$definfovoteid'");
  160. if($voter['voteid']&&$voter[votetext])
  161. {
  162. $d_record=explode("\r\n",$voter[votetext]);
  163. for($i=0;$i<count($d_record);$i++)
  164. {
  165. $j=$i+1;
  166. $d_field=explode("::::::",$d_record[$i]);
  167. $allvote.="<tr><td width='9%'><div align=center>".$j."</div></td><td width='65%'><input name=vote_name[] type=text value='".$d_field[0]."' size=30></td><td width='26%'><input name=vote_num[] type=text value='".$d_field[1]."' size=6></td></tr>";
  168. }
  169. $voteeditnum=$j;
  170. $allvote="<table width='100%' border=0 cellspacing=1 cellpadding=3>".$allvote."</table>";
  171. }
  172. }
  173. }
  174. //-----------------------------------------修改信息
  175. if($enews=="EditNews")
  176. {
  177. //索引表
  178. $index_r=$empire->fetch1("select id,classid,checked from {$dbtbpre}ecms_".$class_r[$classid][tbname]."_index where id='$id' limit 1");
  179. if(!$index_r['id']||$index_r['classid']!=$classid)
  180. {
  181. printerror("ErrorUrl","history.go(-1)");
  182. }
  183. //返回表
  184. $infotb=ReturnInfoMainTbname($class_r[$classid][tbname],$index_r['checked']);
  185. //主表
  186. $r=$empire->fetch1("select * from ".$infotb." where id='$id' limit 1");
  187. //签发表
  188. if($r[isqf])
  189. {
  190. $wfinfor=$empire->fetch1("select tstatus,checktno from {$dbtbpre}enewswfinfo where id='$id' and classid='$classid' limit 1");
  191. }
  192. //只能编辑自己的信息
  193. if($doselfinfo['doselfinfo']&&($r[userid]<>$logininid||$r[ismember]))
  194. {
  195. printerror("NotDoSelfinfo","history.go(-1)");
  196. }
  197. //已审核信息不可修改
  198. if($doselfinfo['docheckedit']&&$index_r['checked'])
  199. {
  200. printerror("NotEditCheckInfoLevel","history.go(-1)");
  201. }
  202. //返回表信息
  203. $infodatatb=ReturnInfoDataTbname($class_r[$classid][tbname],$index_r['checked'],$r['stb']);
  204. //副表
  205. $finfor=$empire->fetch1("select ".ReturnSqlFtextF($modid)." from ".$infodatatb." where id='$id' limit 1");
  206. $r=array_merge($r,$finfor);
  207. //时间
  208. $r['checked']=$index_r['checked'];
  209. $newstime=$r['newstime'];
  210. $r['newstime']=date("Y-m-d H:i:s",$r['newstime']);
  211. //链接地址
  212. $titleurl=$r['titleurl'];
  213. if(!$r['isurl'])
  214. {
  215. $r['titleurl']='';
  216. }
  217. //会员组
  218. $group=str_replace(" value=".$r[groupid].">"," value=".$r[groupid]." selected>",$ygroup);
  219. //内容存文本
  220. $savetxtf=$emod_r[$modid]['savetxtf'];
  221. $newstext_url='';
  222. if($savetxtf)
  223. {
  224. $newstext_url=$r[$savetxtf];
  225. $r[$savetxtf]=GetTxtFieldText($r[$savetxtf]);
  226. }
  227. //标题属性
  228. if(strstr($r[titlefont],','))
  229. {
  230. $tfontr=explode(',',$r[titlefont]);
  231. $r[titlecolor]=$tfontr[0];
  232. $r[titlefont]=$tfontr[1];
  233. }
  234. if(strstr($r[titlefont],"b|"))
  235. {
  236. $titlefontb=" checked";
  237. }
  238. if(strstr($r[titlefont],"i|"))
  239. {
  240. $titlefonti=" checked";
  241. }
  242. if(strstr($r[titlefont],"s|"))
  243. {
  244. $titlefonts=" checked";
  245. }
  246. //投票
  247. $pubid=ReturnInfoPubid($classid,$id);
  248. $voter=$empire->fetch1("select * from {$dbtbpre}enewsinfovote where pubid='$pubid' limit 1");
  249. if($voter['id']&&$voter[votetext])
  250. {
  251. $d_record=explode("\r\n",$voter[votetext]);
  252. for($i=0;$i<count($d_record);$i++)
  253. {
  254. $j=$i+1;
  255. $d_field=explode("::::::",$d_record[$i]);
  256. $allvote.="<tr><td width='9%'><div align=center>".$j."</div></td><td width='65%'><input name=vote_name[] type=text value='".$d_field[0]."' size=30></td><td width='26%'><input name=vote_num[] type=text value='".$d_field[1]."' size=6><input type=hidden name=vote_id[] value=".$j."><input type=checkbox name=delvote_id[] value=".$j.">删除</td></tr>";
  257. }
  258. $voteeditnum=$j;
  259. $allvote="<table width='100%' border=0 cellspacing=1 cellpadding=3>".$allvote."</table>";
  260. }
  261. }
  262. //标题分类
  263. $cttidswhere='';
  264. $tts='';
  265. $caddr=$empire->fetch1("select ttids from {$dbtbpre}enewsclassadd where classid='$classid'");
  266. if($caddr['ttids']!='-')
  267. {
  268. if($caddr['ttids']&&$caddr['ttids']!=',')
  269. {
  270. $cttidswhere=' and typeid in ('.substr($caddr['ttids'],1,-1).')';
  271. }
  272. $ttsql=$empire->query("select typeid,tname from {$dbtbpre}enewsinfotype where mid='$modid'".$cttidswhere." order by myorder");
  273. while($ttr=$empire->fetch($ttsql))
  274. {
  275. $select='';
  276. if($ttr[typeid]==$r[ttid])
  277. {
  278. $select=' selected';
  279. }
  280. $tts.="<option value='$ttr[typeid]'".$select.">$ttr[tname]</option>";
  281. }
  282. }
  283. //内容模板
  284. $t_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewsnewstemp")." order by modid,tempid");
  285. while($nt=$empire->fetch($t_sql))
  286. {
  287. if($nt[tempid]==$r[newstempid])
  288. {
  289. $select=" selected";
  290. }
  291. else
  292. {
  293. $select="";
  294. }
  295. $newstemp.="<option value=".$nt[tempid].$select.">".$nt[tempname]."</option>";
  296. }
  297. //模板
  298. $votetemp="";
  299. $vtsql=$empire->query("select tempid,tempname from ".GetTemptb("enewsvotetemp")." order by tempid");
  300. while($vtr=$empire->fetch($vtsql))
  301. {
  302. if($voter[tempid]==$vtr[tempid])
  303. {
  304. $select=" selected";
  305. }
  306. else
  307. {
  308. $select="";
  309. }
  310. $votetemp.="<option value='".$vtr[tempid]."'".$select.">".$vtr[tempname]."</option>";
  311. }
  312. //同时发布
  313. if(empty($voter['copyids'])||$voter['copyids']=='1')
  314. {
  315. $copyclassidshowiframe='<IFRAME frameBorder="0" id="showclassnav" name="showclassnav" scrolling="no" src="ShowClassNav.php?ecms=1'.$ecms_hashur['ehref'].'" style="HEIGHT:0;VISIBILITY:inherit;WIDTH:0;Z-INDEX:1"></IFRAME>';
  316. $copyclassids='<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  317. <tr>
  318. <td>同时发布到以下栏目: <input type="checkbox" name="copyinfotitleurl" value="1">采用索引链接</td>
  319. </tr>
  320. <tr>
  321. <td height="25" bgcolor="#FFFFFF" id="copyinfoshowclassnav"></td>
  322. </tr>
  323. </table>';
  324. }
  325. else
  326. {
  327. $copyclassidshowiframe='';
  328. $copyclassids='<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  329. <tr>
  330. <td>同时发布到以下栏目:</td>
  331. </tr>
  332. <tr>
  333. <td height="25" bgcolor="#FFFFFF" id="copyinfoshowclassnav">本信息已同步发布到其他栏目,信息ID:<br>'.$voter[copyids].'</td>
  334. </tr>
  335. </table>';
  336. }
  337. //表单文件
  338. $modfile="../data/html/".$modid.".php";
  339. //栏目链接
  340. $getcurlr['classid']=$classid;
  341. $classurl=sys_ReturnBqClassname($getcurlr,9);
  342. //当前使用的模板组
  343. $thegid=GetDoTempGid();
  344. $phpmyself=urlencode(eReturnSelfPage(1));
  345. //返回头条和推荐级别名称
  346. $ftnr=ReturnFirsttitleNameList($r['firsttitle'],$r['isgood']);
  347. //信息状态
  348. $einfochecked=$index_r['checked'];
  349. $einfoismember=$r['ismember'];
  350. //------ 编辑器内容显示 ------
  351. $seteshoweditorhtml=3;
  352. $eshoweditorhtml=0;
  353. if($seteshoweditorhtml&&$r['id'])
  354. {
  355. if($seteshoweditorhtml==1)//所有
  356. {
  357. $eshoweditorhtml=1;
  358. }
  359. elseif($seteshoweditorhtml==2)//所有未审核
  360. {
  361. if(!$einfochecked)
  362. {
  363. $eshoweditorhtml=1;
  364. }
  365. }
  366. elseif($seteshoweditorhtml==3)//所有投稿
  367. {
  368. if($einfoismember)
  369. {
  370. $eshoweditorhtml=1;
  371. }
  372. }
  373. elseif($seteshoweditorhtml==4)//所有未审核投稿
  374. {
  375. if($einfoismember&&!$einfochecked)
  376. {
  377. $eshoweditorhtml=1;
  378. }
  379. }
  380. else
  381. {
  382. $eshoweditorhtml=1;
  383. }
  384. }
  385. //------ 编辑器内容显示 ------
  386. ?>
  387. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  388. <html>
  389. <head>
  390. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  391. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  392. <title><?=$word?></title>
  393. <link rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" type="text/css">
  394. <link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/tab.winclassic.css" disabled="disabled" />
  395. <!-- the id is not needed. It is used here to be able to change css file at runtime -->
  396. <style type="text/css">
  397. .dynamic-tab-pane-control .tab-page {
  398. width: 98%;
  399. }
  400. .dynamic-tab-pane-control .tab-page .dynamic-tab-pane-control .tab-page {
  401. height: 150px;
  402. }
  403. form {
  404. margin: 0;
  405. padding: 0;
  406. }
  407. /* over ride styles from webfxlayout */
  408. .dynamic-tab-pane-control h2 {
  409. font-size:12px;
  410. font-weight:normal;
  411. text-align: center;
  412. width: auto;
  413. height: 20;
  414. }
  415. .dynamic-tab-pane-control h2 a {
  416. display: inline;
  417. width: auto;
  418. }
  419. .dynamic-tab-pane-control a:hover {
  420. background: transparent;
  421. }
  422. </style>
  423. <script type="text/javascript" src="../data/images/tabpane.js"></script> <script type="text/javascript">
  424. function setLinkSrc( sStyle ) {
  425. document.getElementById( "luna-tab-style-sheet" ).disabled = sStyle != "luna";
  426. //document.documentElement.style.background = "";
  427. //document.body.style.background = sStyle == "webfx" ? "white" : "ThreeDFace";
  428. }
  429. function chgBg(obj,color){
  430. if (document.all || document.getElementById)
  431. obj.style.backgroundColor=color;
  432. else if (document.layers)
  433. obj.bgColor=color;
  434. }
  435. setLinkSrc( "luna" );
  436. </script>
  437. <script>
  438. function dovoteadd(){
  439. var i;
  440. var str="";
  441. var oldi=0;
  442. var j=0;
  443. oldi=parseInt(document.add.v_editnum.value);
  444. for(i=1;i<=document.add.v_vote_num.value;i++)
  445. {
  446. j=i+oldi;
  447. str=str+"<tr><td width='9%' height=20> <div align=center>"+j+"</div></td><td width='65%'> <div align=center><input type=text name=vote_name[] size=30></div></td><td width='26%'> <div align=center><input type=text name=vote_num[] value=0 size=6></div></td></tr>";
  448. }
  449. document.getElementById('addvote').innerHTML="<table width='100%' border=0 cellspacing=1 cellpadding=3>"+str+"</table>";
  450. }
  451. function doSpChangeFile(name,url,filesize,filetype,idvar){
  452. document.getElementById(idvar).value=url;
  453. if(document.add.filetype!=null)
  454. {
  455. if(document.add.filetype.value=='')
  456. {
  457. document.add.filetype.value=filetype;
  458. }
  459. }
  460. if(document.add.filesize!=null)
  461. {
  462. if(document.add.filesize.value=='')
  463. {
  464. document.add.filesize.value=filesize;
  465. }
  466. }
  467. }
  468. function SpOpenChFile(type,field){
  469. window.open('ecmseditor/FileMain.php?<?=$ecms_hashur['ehref']?>&classid=<?=$classid?>&infoid=<?=$id?><?=$addecmscheck?>&filepass=<?=$filepass?>&type='+type+'&sinfo=1&tranfrom=2&field='+field,'','width=700,height=550,scrollbars=yes');
  470. }
  471. //上传多附件时,图集
  472. function eTranMoreForMorepic(htmlstr,fnum){
  473. var morepicdiv=document.getElementById("defmorepicid").innerHTML;
  474. var thismorepicnum=parseInt(document.add.morepicnum.value);
  475. var enews="<?=$enews?>";
  476. if(enews=='AddNews')
  477. {
  478. if(document.add.havetmpic.value==0)
  479. {
  480. document.getElementById("defmorepicid").innerHTML+=htmlstr;
  481. document.add.morepicnum.value=thismorepicnum+fnum;
  482. }
  483. else
  484. {
  485. document.getElementById("defmorepicid").innerHTML+=htmlstr;
  486. document.add.morepicnum.value=thismorepicnum+fnum;
  487. }
  488. }
  489. else
  490. {
  491. document.getElementById("defmorepicid").innerHTML+=htmlstr;
  492. document.add.morepicnum.value=thismorepicnum+fnum;
  493. }
  494. document.getElementById("addpicdown").innerHTML="";
  495. document.add.havetmpic.value=1;
  496. }
  497. </script>
  498. <script type="text/javascript" src="ecmseditor/js/jstime/WdatePicker.js"></script>
  499. <script type="text/javascript" src="ecmseditor/js/jscolor/jscolor.js"></script>
  500. <script src="../data/html/postinfo.js"></script>
  501. <script>
  502. function bs(){
  503. var f=document.add;
  504. if(f.title.value.length==0){alert("标题还没写");f.title.focus();return false;}
  505. }
  506. function foreColor(){
  507. if(!Error()) return;
  508. var arr = showModalDialog("../data/html/selcolor.html", "", "dialogWidth:296px; dialogHeight:280px; status:0");
  509. if (arr != null) document.add.titlecolor.value=arr;
  510. else document.add.titlecolor.focus();
  511. }
  512. function FieldChangeColor(obj){
  513. if(!Error()) return;
  514. var arr = showModalDialog("../data/html/selcolor.html", "", "dialogWidth:296px; dialogHeight:280px; status:0");
  515. if (arr != null) obj.value=arr;
  516. else obj.focus();
  517. }
  518. </script>
  519. <?=$loadeditorjs?>
  520. </head>
  521. <body bgcolor="#FFFFFF" text="#000000" onload="document.add.title.focus();">
  522. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  523. <tr>
  524. <td width="55%" height="25">位置:
  525. <?=$url?>
  526. </td>
  527. <td width="45%"><div align="right">
  528. <?php
  529. if($enews=='EditNews'&&$r['eckuid'])
  530. {
  531. $eckuid=(int)$r['eckuid'];
  532. $eckuser_r=$empire->fetch1("select username,wname from {$dbtbpre}enewsuser where userid='$eckuid'");
  533. if($eckuser_r['username'])
  534. {
  535. ?>
  536. [审核人UID:<b><?=$eckuid?></b>,审核人UNAME:<b><?=$eckuser_r['username']?></b>]&nbsp;&nbsp;&nbsp;
  537. <?php
  538. }
  539. }
  540. ?>
  541. <?=$enews=='EditNews'?'[<a href="user/ListDolog.php?classid='.$classid.'&id='.$id.$ecms_hashur['ehref'].'" target="_blank">查看本信息操作日志</a>]':''?>
  542. </div></td>
  543. </tr>
  544. </table>
  545. <table width="100%" border="0" cellspacing="1" cellpadding="3" class="tableborder">
  546. <form name="searchinfo" method="GET" action="ListNews.php">
  547. <?=$ecms_hashur['eform']?>
  548. <tr>
  549. <td width="42%" title="增加信息后使用本操作将信息显示到前台"> <select name="dore">
  550. <option value="1">刷新当前栏目</option>
  551. <option value="2">刷新首页</option>
  552. <option value="3">刷新父栏目</option>
  553. <option value="4">刷新当前栏目与父栏目</option>
  554. <option value="5">刷新父栏目与首页</option>
  555. <option value="6" selected>刷新当前栏目、父栏目与首页</option>
  556. </select> <input type="button" name="Submit12" value="提交" onclick="self.location.href='ecmsinfo.php?<?=$ecms_hashur['href']?>&enews=AddInfoToReHtml<?=$addecmscheck?>&classid=<?=$classid?>&dore='+document.searchinfo.dore.value;">
  557. </td>
  558. <td width="58%"><div align="right">[<font color="#ffffff"><a href=../../ target=_blank>预览首页</a></font>]
  559. [<font color="#ffffff"><a href="<?=$classurl?>" target=_blank>预览栏目</a></font>]
  560. [<font color="#ffffff"><a href="file/ListFile.php?type=9&classid=<?=$classid?><?=$ecms_hashur['ehref']?>">附件管理</a></font>]
  561. [<a href="AddClass.php?enews=EditClass&classid=<?=$classid?><?=$ecms_hashur['ehref']?>">栏目设置</a>]
  562. [<a href="ecmschtml.php?enews=ReAllNewsJs&from=<?=$phpmyself?><?=$ecms_hashur['ehref']?>">刷新所有信息JS</a>]
  563. </div></td>
  564. </tr>
  565. </form>
  566. <?php
  567. if($enews=='EditNews')
  568. {
  569. ?>
  570. <form name="doinfoform" method="post" action="ecmsinfo.php" onsubmit="return confirm('确认要执行此操作?');">
  571. <?=$ecms_hashur['form']?>
  572. <tr bgcolor="#FFFFFF">
  573. <td height="32" colspan="2"> <div align="right">原因:
  574. <input name="causetext" type="text" id="causetext">
  575. <input type="submit" name="Submit3" value="审核通过" onclick="document.doinfoform.doing.value='2';">
  576. <input type="submit" name="Submit32" value="取消审核" onclick="document.doinfoform.doing.value='3';">
  577. <input type="submit" name="Submit33" value="删除" onclick="document.doinfoform.doing.value='1';">
  578. <font color="#666666">(不填原因表示不通知会员)</font>
  579. <input name="enews" type="hidden" id="enews" value="DoInfoAndSendNotice">
  580. <input name="bclassid" type="hidden" id="bclassid" value="<?=$bclassid?>">
  581. <input name="classid" type="hidden" id="classid" value="<?=$classid?>">
  582. <input name="id" type="hidden" id="id" value="<?=$id?>">
  583. <input name="ecmsfrom" type="hidden" id="ecmsfrom" value="<?=RepPostStrUrl($_SERVER['HTTP_REFERER'])?>">
  584. <input name="doing" type="hidden" id="doing">
  585. <input name="ecmscheck" type="hidden" id="ecmscheck" value="<?=$ecmscheck?>">
  586. </div></td>
  587. </tr>
  588. </form>
  589. <?php
  590. }
  591. ?>
  592. </table>
  593. <br>
  594. <form name="add" method="post" enctype="multipart/form-data" action="ecmsinfo.php" onsubmit="return EmpireCMSInfoPostFun(document.add,'<?=$modid?>');">
  595. <?=$ecms_hashur['form']?>
  596. <div class="tab-pane" id="TabPane1">
  597. <script type="text/javascript">
  598. tb1 = new WebFXTabPane( document.getElementById( "TabPane1" ) );
  599. </script>
  600. <div class="tab-page" id="baseinfo">
  601. <h2 class="tab">&nbsp;<font class=tabcolor>基本信息</font>&nbsp;</h2>
  602. <script type="text/javascript">tb1.addTabPage( document.getElementById( "baseinfo" ) );</script>
  603. <table width="100%" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  604. <tr class="header">
  605. <td width="16%" height="25">
  606. <div align="left"><?=$word?></div>
  607. </td>
  608. <td>
  609. <input type="submit" name="addnews2" value="提交"> <input type="reset" name="Submit23" value="重置">
  610. <input type=hidden value=<?=$enews?> name=enews> <input type=hidden value=<?=$classid?> name=classid>
  611. <input type=hidden value=<?=$bclassid?> name=bclassid> <input name=id type=hidden value=<?=$id?>>
  612. <input type=hidden value="<?=$filepass?>" name=filepass> <input type=hidden value="<?=$r[username]?>" name=username>
  613. <input name="oldfilename" type="hidden" value="<?=$r[filename]?>">
  614. <input name="oldgroupid" type="hidden" value="<?=$r[groupid]?>">
  615. <input name="oldchecked" type="hidden" value="<?=$r[checked]?>">
  616. <input name="newstext_url" type="hidden" value="<?=$newstext_url?>">
  617. <input name="ecmsfrom" type="hidden" value="<?=RepPostStrUrl($_SERVER['HTTP_REFERER'])?>">
  618. <input name="ecmsnfrom" type="hidden" value="<?=RepPostStrUrl($_GET['ecmsnfrom'])?>">
  619. <input name="fstb" type="hidden" value="<?=$r[fstb]?>">
  620. <input name="oldttid" type="hidden" value="<?=$r[ttid]?>">
  621. <input name="ecmscheck" type="hidden" id="ecmscheck" value="<?=$ecmscheck?>">
  622. <input name="ztids" type="hidden" id="ztids">
  623. <input name="zcids" type="hidden" id="zcids">
  624. <input name="oldztids" type="hidden" id="oldztids">
  625. <input name="oldzcids" type="hidden" id="oldzcids">
  626. <input type="hidden" name="havetmpic" value="0"></td>
  627. </tr>
  628. </table>
  629. <?php
  630. include($modfile);
  631. ?>
  632. </div>
  633. <div class="tab-page" id="spsetting">
  634. <h2 class="tab">&nbsp;<font class=tabcolor>选项设置</font>&nbsp;</h2>
  635. <script type="text/javascript">tb1.addTabPage( document.getElementById( "spsetting" ) );</script>
  636. <table width=100% align=center cellpadding=3 cellspacing=1 class="tableborder">
  637. <tr><td class=header>选项设置</td></tr>
  638. <tr>
  639. <td bgcolor='#ffffff'>
  640. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  641. <tr>
  642. <td height="25" bgcolor="#FFFFFF">置顶级别:
  643. <select name="istop">
  644. <option value="0"<?=$r[istop]==0?' selected':''?>>不置顶</option>
  645. <option value="1"<?=$r[istop]==1?' selected':''?>>一级置顶</option>
  646. <option value="2"<?=$r[istop]==2?' selected':''?>>二级置顶</option>
  647. <option value="3"<?=$r[istop]==3?' selected':''?>>三级置顶</option>
  648. <option value="4"<?=$r[istop]==4?' selected':''?>>四级置顶</option>
  649. <option value="5"<?=$r[istop]==5?' selected':''?>>五级置顶</option>
  650. <option value="6"<?=$r[istop]==6?' selected':''?>>六级置顶</option>
  651. <option value="7"<?=$r[istop]==7?' selected':''?>>七级置顶</option>
  652. <option value="8"<?=$r[istop]==8?' selected':''?>>八级置顶</option>
  653. <option value="9"<?=$r[istop]==9?' selected':''?>>九级置顶</option>
  654. </select>
  655. 内容模板:
  656. <select name="newstempid">
  657. <option value="0"<?=$r[newstempid]==0?' selected':''?>>使用默认模板</option>
  658. <?=$newstemp?>
  659. </select> <input type="button" name="Submit62222" value="管理内容模板" onclick="window.open('template/ListNewstemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');">
  660. </td>
  661. </tr>
  662. <tr>
  663. <td height="25" bgcolor="#FFFFFF">权限设置:
  664. <select name="groupid">
  665. <option value="0">游客</option>
  666. <?=$group?>
  667. </select>
  668. 查看扣除点数:
  669. <input name="userfen" type="text" value="<?=$r[userfen]?>" size="6">
  670. ,
  671. <input type=checkbox name=closepl value=1<?=$r[closepl]==1?" checked":""?>>
  672. 关闭评论 </td>
  673. </tr>
  674. <tr>
  675. <td height="25" bgcolor="#FFFFFF">点击数&nbsp;&nbsp;&nbsp;:
  676. <input name="onclick" type="text" id="onclick" value="<?=$r[onclick]?>">
  677. 下载数&nbsp;&nbsp;&nbsp;:
  678. <input name="totaldown" type="text" id="totaldown" value="<?=$r[totaldown]?>"></td>
  679. </tr>
  680. <tr>
  681. <td height="25" bgcolor="#FFFFFF"> 文件名&nbsp;&nbsp;&nbsp;:
  682. <input name="newspath" type="text" id="newspath" value="<?=$r[newspath]?>"<?=$doselfinfo['doinfofile']?'':' readonly'?>>
  683. /
  684. <input name="filename" type="text" value="<?=$r[filename]?>"<?=$doselfinfo['doinfofile']?'':' readonly'?>>
  685. <font color="#666666">(日期目录/文件名)</font></td>
  686. </tr>
  687. <?php
  688. if(strstr($public_r['usetags'],','.$modid.','))
  689. {
  690. $infotag_readonly='';
  691. $infotag_copykeyboard='&nbsp;&nbsp;<input type="button" name="Submit3" value="复制关键字" onclick="document.add.infotags.value=document.add.keyboard.value;">';
  692. if(strstr($public_r['chtags'],','.$modid.','))
  693. {
  694. $infotag_readonly=' readonly';
  695. $infotag_copykeyboard='&nbsp;&nbsp;<input type="button" name="Submit3" value="清除选择" onclick="if(confirm(\'确认要清除已选TAGS?\')){document.add.infotags.value=\'\';}">';
  696. }
  697. ?>
  698. <tr>
  699. <td height="25" bgcolor="#FFFFFF">TAGS&nbsp;&nbsp;&nbsp;&nbsp;:
  700. <input name="infotags" type="text" id="infotags" value="<?=$r[infotags]?>" size="32"<?=$infotag_readonly?>>
  701. <input type="button" name="Submit" value="选择" onclick="window.open('tags/ChangeTags.php?form=add&field=infotags<?=$ecms_hashur['ehref']?>','','width=700,height=550,scrollbars=yes');">
  702. <?=$infotag_copykeyboard?>
  703. <input name="oldinfotags" type="hidden" id="oldinfotags" value="<?=$r[infotags]?>">
  704. <font color="#333333">(多个用&quot;,&quot;逗号格开)</font></td>
  705. </tr>
  706. <?php
  707. }
  708. ?>
  709. <?php
  710. if($class_r[$classid]['link_num'])
  711. {
  712. ?>
  713. <tr>
  714. <td height="25" bgcolor="#FFFFFF">相关链接:
  715. <input type="radio" name="info_diyotherlink" value="0"<?=$voter[diyotherlink]==0?' checked':''?>>
  716. 按关键字查询
  717. <input type="radio" name="info_diyotherlink" value="1"<?=$voter[diyotherlink]==1?' checked':''?>>
  718. <a href="#empirecms" title="查看和增加的相关链接" onclick="if(document.getElementsByName('info_diyotherlink')[1].checked==true){window.open('info/OtherLink.php?<?=$ecms_hashur['ehref']?>&classid=<?=$classid?>&id=<?=$id?>&enews=<?=$enews?>&form=add&field=info_keyid&keyid='+document.add.info_keyid.value+'&keyboard='+document.add.keyboard.value+'&title='+document.add.title.value,'','width=780,height=550,scrollbars=yes,resizable=yes');}else{alert('请先选择手动相关链接');}">手动相关链接</a>
  719. <input name="info_keyid" type="hidden" id="info_keyid" value="<?=$r[keyid]?>"></td>
  720. </tr>
  721. <?php
  722. }
  723. ?>
  724. </table>
  725. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  726. <tr>
  727. <td>所属专题</td>
  728. </tr>
  729. <tr>
  730. <td height="25" bgcolor="#FFFFFF"><a href="#empirecms" onclick="window.open('special/PushToZt.php?sinfo=1&classid=<?=$classid?>&id=<?=$id?><?=$ecms_hashur['ehref']?>','PushToZt','width=360,height=500,scrollbars=yes,left=300,top=150,resizable=yes');">点击选择信息所属专题</a></td>
  731. </tr>
  732. </table>
  733. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  734. <tr>
  735. <td>定时发布</td>
  736. </tr>
  737. <tr>
  738. <td height="25" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  739. <tr>
  740. <td>上线时间: <input name="info_infouptime" type="text" id="info_infouptime" value="<?=$voter[infouptime]?date('Y-m-d H:i:s',$voter[infouptime]):''?>" size="28" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss'})">
  741. [<a href="#empirecms" onclick="document.add.info_infouptime.value='<?=$todaytime?>'">当前时间</a>]</td>
  742. </tr>
  743. <tr>
  744. <td>下线时间: <input name="info_infodowntime" type="text" id="info_infodowntime" value="<?=$voter[infodowntime]?date('Y-m-d H:i:s',$voter[infodowntime]):''?>" size="28" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss'})">
  745. [<a href="#empirecms" onclick="document.add.info_infodowntime.value='<?=$todaytime?>'">当前时间</a>]</td>
  746. </tr>
  747. </table></td>
  748. </tr>
  749. </table>
  750. <?php
  751. if($wfinfor[checktno]==101)
  752. {
  753. ?>
  754. <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  755. <tr>
  756. <td>信息送审</td>
  757. </tr>
  758. <tr>
  759. <td height="25" bgcolor="#FFFFFF"><input name="reworkflow" type="checkbox" value="1">
  760. 重新送审<font color="#333333">(信息被返工后,修改后可选择重新送审)</font> </td>
  761. </tr>
  762. </table>
  763. <?php
  764. }
  765. ?>
  766. <?=$copyclassids?>
  767. </td>
  768. </tr>
  769. </table>
  770. </div>
  771. <div class="tab-page" id="votesetting">
  772. <h2 class="tab">&nbsp;<font class=tabcolor>投票设置</font>&nbsp;</h2>
  773. <script type="text/javascript">tb1.addTabPage( document.getElementById( "votesetting" ) );</script>
  774. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  775. <tr class="header">
  776. <td height="25" colspan="2">投票设置</td>
  777. </tr>
  778. <tr bgcolor="#FFFFFF">
  779. <td width="21%" height="25">主题标题</td>
  780. <td width="79%" height="25"> <input name="vote_title" type="text" size="60" value="<?=$voter[title]?>">
  781. </td>
  782. </tr>
  783. <tr bgcolor="#FFFFFF">
  784. <td height="25" valign="top">投票项目</td>
  785. <td height="25">
  786. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  787. <tr>
  788. <td>
  789. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  790. <tr bgcolor="#DBEAF5">
  791. <td width="9%" height="20"> <div align="center">编号</div></td>
  792. <td width="65%"> <div align="center">项目名称</div></td>
  793. <td width="26%"> <div align="center">投票数</div></td>
  794. </tr>
  795. </table>
  796. <?php
  797. if(($voter['id']&&$voter[votetext])||$definfovoteid)
  798. {
  799. echo"$allvote";
  800. }
  801. else
  802. {
  803. ?>
  804. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  805. <tr>
  806. <td height="24" width="9%"> <div align="center">1</div></td>
  807. <td height="24" width="65%"> <div align="center">
  808. <input name="vote_name[]" type="text" size="30">
  809. </div></td>
  810. <td height="24" width="26%"> <div align="center">
  811. <input name="vote_num[]" type="text" value="0" size="6">
  812. </div></td>
  813. </tr>
  814. <tr>
  815. <td height="24"> <div align="center">2</div></td>
  816. <td height="24"> <div align="center">
  817. <input name="vote_name[]" type="text" size="30">
  818. </div></td>
  819. <td height="24"> <div align="center">
  820. <input name="vote_num[]" type="text" value="0" size="6">
  821. </div></td>
  822. </tr>
  823. <tr>
  824. <td height="24"> <div align="center">3</div></td>
  825. <td height="24"> <div align="center">
  826. <input name="vote_name[]" type="text" size="30">
  827. </div></td>
  828. <td height="24"> <div align="center">
  829. <input name="vote_num[]" type="text" value="0" size="6">
  830. </div></td>
  831. </tr>
  832. <tr>
  833. <td height="24"> <div align="center">4</div></td>
  834. <td height="24"> <div align="center">
  835. <input name="vote_name[]" type="text" size="30">
  836. </div></td>
  837. <td height="24"> <div align="center">
  838. <input name="vote_num[]" type="text" value="0" size="6">
  839. </div></td>
  840. </tr>
  841. <tr>
  842. <td height="24"> <div align="center">5</div></td>
  843. <td height="24"> <div align="center">
  844. <input name="vote_name[]" type="text" size="30">
  845. </div></td>
  846. <td height="24"> <div align="center">
  847. <input name="vote_num[]" type="text" value="0" size="6">
  848. </div></td>
  849. </tr>
  850. <tr>
  851. <td height="24"> <div align="center">6</div></td>
  852. <td height="24"> <div align="center">
  853. <input name="vote_name[]" type="text" size="30">
  854. </div></td>
  855. <td height="24"> <div align="center">
  856. <input name="vote_num[]" type="text" value="0" size="6">
  857. </div></td>
  858. </tr>
  859. <tr>
  860. <td height="24"> <div align="center">7</div></td>
  861. <td height="24"> <div align="center">
  862. <input name="vote_name[]" type="text" size="30">
  863. </div></td>
  864. <td height="24"> <div align="center">
  865. <input name="vote_num[]" type="text" value="0" size="6">
  866. </div></td>
  867. </tr>
  868. <tr>
  869. <td height="24"> <div align="center">8</div></td>
  870. <td height="24"> <div align="center">
  871. <input name="vote_name[]" type="text" size="30">
  872. </div></td>
  873. <td height="24"> <div align="center">
  874. <input name="vote_num[]" type="text" value="0" size="6">
  875. </div></td>
  876. </tr>
  877. </table>
  878. <?php
  879. }
  880. ?>
  881. </td>
  882. </tr>
  883. <tr>
  884. <td>投票扩展数量:
  885. <input name="v_vote_num" type="text" value="1" size="6"> <input type="button" name="Submit52" value="输出地址" onclick="javascript:dovoteadd();">
  886. <input name="v_editnum" type="hidden" value="<?=$voteeditnum?>">
  887. </td>
  888. </tr>
  889. <tr>
  890. <td id="addvote"></td>
  891. </tr>
  892. </table></td>
  893. </tr>
  894. <tr bgcolor="#FFFFFF">
  895. <td height="25">投票类型</td>
  896. <td height="25"><input name="vote_class" type="radio" value="0"<?=$voter['voteclass']==0?' checked':''?>>
  897. 单选
  898. <input type="radio" name="vote_class" value="1"<?=$voter['voteclass']==1?' checked':''?>>
  899. 多选</td>
  900. </tr>
  901. <tr bgcolor="#FFFFFF">
  902. <td height="25">限制IP</td>
  903. <td height="25"><input type="radio" name="dovote_ip" value="0"<?=$voter['doip']==0?' checked':''?>>
  904. 不限制
  905. <input name="dovote_ip" type="radio" value="1"<?=$voter['doip']==1?' checked':''?>>
  906. 限制(限制后同一IP只能投一次票)</td>
  907. </tr>
  908. <tr bgcolor="#FFFFFF">
  909. <td height="25">过期时间</td>
  910. <td height="25"> <input name="vote_olddotime" type=hidden value="<?=$voter[dotime]?>">
  911. <input name="vote_dotime" type="text" value="<?=$voter[dotime]?>" size="12" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd'})">
  912. (超过此期限,将不能投票,0000-00-00为不限制)</td>
  913. </tr>
  914. <tr bgcolor="#FFFFFF">
  915. <td height="25">查看投票窗口</td>
  916. <td height="25">宽度:
  917. <input name="vote_width" type="text" value="<?=$voter[width]?>" size="6">
  918. 高度:
  919. <input name="vote_height" type="text" value="<?=$voter[height]?>" size="6"></td>
  920. </tr>
  921. <tr bgcolor="#FFFFFF">
  922. <td height="25">选择模板</td>
  923. <td height="25"><select name="vote_tempid">
  924. <?=$votetemp?>
  925. </select> <input type="button" name="Submit62223" value="管理投票模板" onclick="window.open('template/ListVotetemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');">
  926. </td>
  927. </tr>
  928. </table>
  929. </div>
  930. </div>
  931. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  932. <tr>
  933. <td width="16%">&nbsp;</td>
  934. <td><input type="submit" name="addnews" value=" 提 交 "> &nbsp;&nbsp;&nbsp;<input type="reset" name="Submit2" value="重置"></td>
  935. </tr>
  936. </table>
  937. </form>
  938. <?=$copyclassidshowiframe?>
  939. </body>
  940. </html>
  941. <?php
  942. db_close();
  943. $empire=null;
  944. ?>