AddClass.php 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. //验证用户
  9. $lur=is_login();
  10. $logininid=$lur['userid'];
  11. $loginin=$lur['username'];
  12. $loginrnd=$lur['rnd'];
  13. $loginlevel=$lur['groupid'];
  14. $loginadminstyleid=$lur['adminstyleid'];
  15. //ehash
  16. $ecms_hashur=hReturnEcmsHashStrAll();
  17. //验证权限
  18. CheckLevel($logininid,$loginin,$classid,"class");
  19. $enews=ehtmlspecialchars($_GET['enews']);
  20. if($_GET['from'])
  21. {
  22. $listclasslink="ListPageClass.php";
  23. }
  24. else
  25. {
  26. $listclasslink="ListClass.php";
  27. }
  28. $url="<a href=".$listclasslink.$ecms_hashur['whehref'].">栏目管理</a>&nbsp;>&nbsp;增加栏目";
  29. $zt="";
  30. $b_ok=1;
  31. $hiddenclass="<script>document.getElementById('smallclass').style.display='none';document.getElementById('smallclasssetinfo').style.display='none';document.getElementById('smallclasssettemp').style.display='none';document.getElementById('smallcgtoinfo').style.display='none';document.getElementById('smallclassbdinfo').style.display='none';</script>";
  32. //初使化数据
  33. $r[myorder]=0;
  34. $r[listorder]="id DESC";
  35. $r[reorder]="newstime DESC";
  36. $islast="";
  37. $filename0=" checked";
  38. $filename1="";
  39. $filename2="";
  40. $openpl0=" checked";
  41. $openpl1="";
  42. $openadd0="";
  43. $openadd1=" checked";
  44. $r[classtype]=".html";
  45. $r[filetype]=".html";
  46. $r[newspath]="Y-m-d";
  47. $r[link_num]="10";
  48. $r[lencord]=25;
  49. $read="";
  50. $r[newline]=10;
  51. $r[hotline]=10;
  52. $r[goodline]=10;
  53. $r[hotplline]=10;
  54. $r[firstline]=10;
  55. $r[maxnum]=0;
  56. $r[addinfofen]=0;
  57. $r[doctime]=0;
  58. $r[down_num]=2;
  59. $r[online_num]=2;
  60. $checked=" checked";
  61. $r['addreinfo']=1;
  62. $defaultbclassid=" selected";
  63. $islist="";
  64. $islast="<input name=islast type=checkbox id=islast onclick='small_class(this.checked)' value='1'>是";
  65. //复制栏目
  66. $docopy=ehtmlspecialchars($_GET['docopy']);
  67. if($docopy&&$enews=="AddClass")
  68. {
  69. $copyclass=1;
  70. }
  71. $ecmsfirstpost=1;
  72. $classid=(int)$_GET['classid'];
  73. if($enews=='EditClass')
  74. {
  75. $filepass=$classid;
  76. }
  77. else
  78. {
  79. $filepass=ReturnTranFilepass();
  80. }
  81. //修改栏目
  82. if($enews=="EditClass"||$copyclass)
  83. {
  84. $ecmsfirstpost=0;
  85. if($copyclass)
  86. {
  87. $thisdo="复制";
  88. }
  89. else
  90. {
  91. $thisdo="修改";
  92. }
  93. $read="";
  94. $r=$empire->fetch1("select * from {$dbtbpre}enewsclass where classid='$classid'");
  95. $addr=$empire->fetch1("select * from {$dbtbpre}enewsclassadd where classid='$classid'");
  96. if(!empty($r[bclassid]))
  97. {$defaultbclassid="";}
  98. $url="<a href=".$listclasslink.$ecms_hashur['whehref'].">管理栏目</a>&nbsp;>&nbsp;".$thisdo."栏目:".$r[classname];
  99. if($r[islist])
  100. {$islist=" checked";}
  101. //修改大栏目
  102. if(!$r[islast])
  103. {
  104. //主栏目
  105. if(empty($r[bclassid]))
  106. {
  107. $b_ok=1;
  108. }
  109. //中级栏目
  110. else
  111. {
  112. $b_ok=1;
  113. }
  114. }
  115. //终级栏目
  116. else
  117. {
  118. $hiddenclass="<script>document.getElementById('bigclasssettemp').style.display='none';document.getElementById('bigclasssetclasstext').style.display='none';</script>";
  119. $b_ok=0;
  120. }
  121. //终级类别
  122. if($r[islast])
  123. {
  124. $islast="<b>是</b>";
  125. $islastcheck=" checked";
  126. }
  127. else
  128. {
  129. $islast="<b>否</b>";
  130. $islastcheck="";
  131. }
  132. $islast.="<input type=hidden name=islast value='".$r[islast]."'>";
  133. if($r[filename]==1)
  134. {
  135. $filename0="";
  136. $filename1=" checked";
  137. $filename2="";
  138. }
  139. elseif($r[filename]==2)
  140. {
  141. $filename0="";
  142. $filename1="";
  143. $filename2=" checked";
  144. }
  145. else
  146. {}
  147. if($r[openpl])
  148. {
  149. $openpl0="";
  150. $openpl1=" checked";
  151. }
  152. if($r[checkpl])
  153. {
  154. $checkpl=" checked";
  155. }
  156. if($r[openadd])
  157. {
  158. $openadd0="";
  159. $openadd1=" checked";
  160. }
  161. else
  162. {
  163. $openadd0=" checked";
  164. $openadd1="";
  165. }
  166. //栏目目录
  167. $mycr=GetPathname($r[classpath]);
  168. $pripath=$mycr[1];
  169. $classpath=$mycr[0];
  170. $read="";
  171. //复制栏目
  172. if($copyclass)
  173. {
  174. $r[classname].="(1)";
  175. $classpath.="1";
  176. $read="";
  177. $islast="<input name=islast type=checkbox id=islast onclick='small_class(this.checked)' value='1'".$islastcheck.">是";
  178. }
  179. if($r[checked])
  180. {$checked=" checked";}
  181. else
  182. {$checked="";}
  183. }
  184. //系统模型
  185. $m_sql=$empire->query("select mid,mname,usemod from {$dbtbpre}enewsmod order by myorder,mid");
  186. while($m_r=$empire->fetch($m_sql))
  187. {
  188. if(empty($m_r[usemod]))
  189. {
  190. if($m_r[mid]==$r[modid])
  191. {$m_d=" selected";}
  192. else
  193. {$m_d="";}
  194. $mod_options.="<option value=".$m_r[mid].$m_d.">".$m_r[mname]."</option>";
  195. }
  196. //列表模板
  197. $listtemp_options.="<option value=0 style='background:#99C4E3'>".$m_r[mname]."</option>";
  198. $dtlisttemp_options.="<option value=0 style='background:#99C4E3'>".$m_r[mname]."</option>";
  199. $lt_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewslisttemp")." where modid='$m_r[mid]'");
  200. while($lt_r=$empire->fetch($lt_sql))
  201. {
  202. //静态
  203. if($lt_r[tempid]==$r[listtempid])
  204. {$lt_d=" selected";}
  205. else
  206. {$lt_d="";}
  207. $listtemp_options.="<option value=".$lt_r[tempid].$lt_d."> |-".$lt_r[tempname]."</option>";
  208. //动态
  209. if($lt_r[tempid]==$r[dtlisttempid])
  210. {$lt_dt=" selected";}
  211. else
  212. {$lt_dt="";}
  213. $dtlisttemp_options.="<option value=".$lt_r[tempid].$lt_dt."> |-".$lt_r[tempname]."</option>";
  214. }
  215. //搜索模板
  216. $searchtemp.="<option value=0 style='background:#99C4E3'>".$m_r[mname]."</option>";
  217. $st_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewssearchtemp")." where modid='$m_r[mid]'");
  218. while($st_r=$empire->fetch($st_sql))
  219. {
  220. if($st_r[tempid]==$r[searchtempid])
  221. {$st_d=" selected";}
  222. else
  223. {$st_d="";}
  224. $searchtemp.="<option value=".$st_r[tempid].$st_d."> |-".$st_r[tempname]."</option>";
  225. }
  226. //内容模板
  227. $newstemp_options.="<option value=0 style='background:#99C4E3'>".$m_r[mname]."</option>";
  228. $nt_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewsnewstemp")." where modid='$m_r[mid]'");
  229. while($nt_r=$empire->fetch($nt_sql))
  230. {
  231. if($nt_r[tempid]==$r[newstempid])
  232. {$nt_d=" selected";}
  233. else
  234. {$nt_d="";}
  235. $newstemp_options.="<option value=".$nt_r[tempid].$nt_d."> |-".$nt_r[tempname]."</option>";
  236. }
  237. }
  238. //栏目
  239. $fcfile="../data/fc/ListEnews.php";
  240. $fcjsfile="../data/fc/cmsclass.js";
  241. if(file_exists($fcjsfile)&&file_exists($fcfile))
  242. {
  243. $options=GetFcfiletext($fcjsfile);
  244. $options=str_replace("<option value='$r[bclassid]'","<option value='$r[bclassid]' selected",$options);
  245. }
  246. else
  247. {
  248. $options=ShowClass_AddClass("",$r[bclassid],0,"|-",0,0);
  249. }
  250. //访问组
  251. $group='';
  252. $vgsql=$empire->query("select vgid,gname from {$dbtbpre}enewsvg order by vgid");
  253. while($vgr=$empire->fetch($vgsql))
  254. {
  255. $vselected='';
  256. $vgid=0-$vgr['vgid'];
  257. if($r['groupid']==$vgid)
  258. {
  259. $vselected=' selected';
  260. }
  261. $group.="<option value=".$vgid."".$vselected.">".$vgr['gname']."</option>";
  262. }
  263. if($group)
  264. {
  265. $group="<option value=''>-- 访问组 --</option>".$group."<option value=''>-- 会员组 --</option>";
  266. }
  267. //会员组
  268. $qgroup='';
  269. $qgbr='';
  270. $qgi=0;
  271. $cgroup='';
  272. $sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  273. while($l_r=$empire->fetch($sql1))
  274. {
  275. if($r[groupid]==$l_r[groupid])
  276. {$select=" selected";}
  277. else
  278. {$select="";}
  279. $group.="<option value=".$l_r[groupid].$select.">".$l_r[groupname]."</option>";
  280. //投稿
  281. $qgi++;
  282. if($qgi%6==0)
  283. {
  284. $qgbr='<br>';
  285. }
  286. else
  287. {
  288. $qgbr='';
  289. }
  290. $qgchecked='';
  291. if(strstr($r[qaddgroupid],','.$l_r[groupid].','))
  292. {
  293. $qgchecked=' checked';
  294. }
  295. $qgroup.="<input type=checkbox name=qaddgroupidck[] value='".$l_r[groupid]."'".$qgchecked.">".$l_r[groupname]."&nbsp;".$qgbr;
  296. //栏目页权限
  297. $cgchecked='';
  298. if(strstr($r[cgroupid],','.$l_r[groupid].','))
  299. {
  300. $cgchecked=' checked';
  301. }
  302. $cgroup.="<input type=checkbox name=cgroupidck[] value='".$l_r[groupid]."'".$cgchecked.">".$l_r[groupname]."&nbsp;".$qgbr;
  303. }
  304. //js模板
  305. $jstempsql=$empire->query("select tempid,tempname from ".GetTemptb("enewsjstemp")." order by tempid");
  306. while($jstempr=$empire->fetch($jstempsql))
  307. {
  308. $select="";
  309. if($r[jstempid]==$jstempr[tempid])
  310. {
  311. $select=" selected";
  312. }
  313. $jstemp.="<option value='".$jstempr[tempid]."'".$select.">".$jstempr[tempname]."</option>";
  314. }
  315. //封面模板
  316. $classtempsql=$empire->query("select tempid,tempname from ".GetTemptb("enewsclasstemp")." order by tempid");
  317. while($classtempr=$empire->fetch($classtempsql))
  318. {
  319. $select="";
  320. if($r[classtempid]==$classtempr[tempid])
  321. {
  322. $select=" selected";
  323. }
  324. $classtemp.="<option value='".$classtempr[tempid]."'".$select.">".$classtempr[tempname]."</option>";
  325. }
  326. //评论模板
  327. $pltempsql=$empire->query("select tempid,tempname from ".GetTemptb("enewspltemp")." order by tempid");
  328. while($pltempr=$empire->fetch($pltempsql))
  329. {
  330. $select="";
  331. if($r[pltempid]==$pltempr[tempid])
  332. {
  333. $select=" selected";
  334. }
  335. $pltemp.="<option value='".$pltempr[tempid]."'".$select.">".$pltempr[tempname]."</option>";
  336. }
  337. //WAP模板
  338. $wapstyles='';
  339. $wapstyle_sql=$empire->query("select styleid,stylename from {$dbtbpre}enewswapstyle order by styleid");
  340. while($wapstyle_r=$empire->fetch($wapstyle_sql))
  341. {
  342. $select="";
  343. if($r[wapstyleid]==$wapstyle_r[styleid])
  344. {
  345. $select=" selected";
  346. }
  347. $wapstyles.="<option value='".$wapstyle_r[styleid]."'".$select.">".$wapstyle_r[stylename]."</option>";
  348. }
  349. //预设投票
  350. $infovotesql=$empire->query("select voteid,ysvotename from {$dbtbpre}enewsvotemod order by voteid desc");
  351. while($infovoter=$empire->fetch($infovotesql))
  352. {
  353. $select="";
  354. if($r[definfovoteid]==$infovoter[voteid])
  355. {
  356. $select=" selected";
  357. }
  358. $definfovote.="<option value='".$infovoter[voteid]."'".$select.">".$infovoter[ysvotename]."</option>";
  359. }
  360. //优化方案
  361. $yh_options='';
  362. $yhsql=$empire->query("select id,yhname from {$dbtbpre}enewsyh order by id");
  363. while($yhr=$empire->fetch($yhsql))
  364. {
  365. $select='';
  366. if($r[yhid]==$yhr[id])
  367. {
  368. $select=' selected';
  369. }
  370. $yh_options.="<option value='".$yhr[id]."'".$select.">".$yhr[yhname]."</option>";
  371. }
  372. //工作流
  373. $workflows='';
  374. $wfsql=$empire->query("select wfid,wfname from {$dbtbpre}enewsworkflow order by myorder,wfid");
  375. while($wfr=$empire->fetch($wfsql))
  376. {
  377. $select='';
  378. if($r[wfid]==$wfr[wfid])
  379. {
  380. $select=' selected';
  381. }
  382. $workflows.="<option value='".$wfr[wfid]."'".$select.">".$wfr[wfname]."</option>";
  383. }
  384. //编辑器
  385. include('ecmseditor/eshoweditor.php');
  386. $loadeditorjs=ECMS_ShowEditorJS('ecmseditor/infoeditor/');
  387. //当前使用的模板组
  388. $thegid=GetDoTempGid();
  389. ?>
  390. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  391. <html>
  392. <head>
  393. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  394. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  395. <link rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" type="text/css">
  396. <link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/tab.winclassic.css" disabled="disabled" />
  397. <title>管理栏目</title>
  398. <!-- the id is not needed. It is used here to be able to change css file at runtime -->
  399. <style type="text/css">
  400. .dynamic-tab-pane-control .tab-page {
  401. width: 98%;
  402. }
  403. .dynamic-tab-pane-control .tab-page .dynamic-tab-pane-control .tab-page {
  404. height: 150px;
  405. }
  406. form {
  407. margin: 0;
  408. padding: 0;
  409. }
  410. /* over ride styles from webfxlayout */
  411. .dynamic-tab-pane-control h2 {
  412. font-size:12px;
  413. font-weight:normal;
  414. text-align: center;
  415. width: auto;
  416. height: 20;
  417. }
  418. .dynamic-tab-pane-control h2 a {
  419. display: inline;
  420. width: auto;
  421. }
  422. .dynamic-tab-pane-control a:hover {
  423. background: transparent;
  424. }
  425. </style>
  426. <?=$loadeditorjs?>
  427. <script type="text/javascript" src="../data/images/tabpane.js"></script> <script type="text/javascript">
  428. function setLinkSrc( sStyle ) {
  429. document.getElementById( "luna-tab-style-sheet" ).disabled = sStyle != "luna";
  430. //document.documentElement.style.background = "";
  431. //document.body.style.background = sStyle == "webfx" ? "white" : "ThreeDFace";
  432. }
  433. function chgBg(obj,color){
  434. if (document.all || document.getElementById)
  435. obj.style.backgroundColor=color;
  436. else if (document.layers)
  437. obj.bgColor=color;
  438. }
  439. setLinkSrc( "luna" );
  440. </script>
  441. <script>
  442. function small_class(mycheck)
  443. {
  444. if(mycheck)
  445. {
  446. document.getElementById('smallclass').style.display="";
  447. document.getElementById('smallclasssetinfo').style.display="";
  448. document.getElementById('smallclasssettemp').style.display="";
  449. document.getElementById('bigclasssettemp').style.display="none";
  450. document.getElementById('bigclasssetclasstext').style.display="none";
  451. document.getElementById('smallcgtoinfo').style.display="";
  452. document.getElementById('smallclassbdinfo').style.display="";
  453. }
  454. else
  455. {
  456. document.getElementById('smallclass').style.display="none";
  457. document.getElementById('smallclasssetinfo').style.display="none";
  458. document.getElementById('smallclasssettemp').style.display="none";
  459. document.getElementById('bigclasssettemp').style.display="";
  460. document.getElementById('bigclasssetclasstext').style.display="";
  461. document.getElementById('smallcgtoinfo').style.display="none";
  462. document.getElementById('smallclassbdinfo').style.display="none";
  463. }
  464. }
  465. function mybclass()
  466. {
  467. bclass=new Array();
  468. bclass[0]=new Array();
  469. bclass[0][0]='';
  470. <?
  471. //-----------类别js数组
  472. $psql=$empire->query("select classid,classpath from {$dbtbpre}enewsclass order by classid");
  473. $i=0;
  474. while($pr=$empire->fetch($psql))
  475. {
  476. ?>
  477. bclass[<?=$pr[classid]?>]=new Array();
  478. bclass[<?=$pr[classid]?>][0]="<?=$pr[classpath]?>/";
  479. <?
  480. }
  481. ?>
  482. }
  483. mybclass();
  484. function changeitem(myfrm)
  485. {var SelectedBigId;
  486. SelectedBigId=myfrm.bclassid.options[myfrm.bclassid.selectedIndex].value;
  487. myfrm.pripath.value=bclass[SelectedBigId][0];
  488. if(myfrm.enews.value=='EditClass')
  489. {
  490. if(!myfrm.ecmsclasstype.value==1)
  491. {
  492. myfrm.classpath.focus();
  493. }
  494. }
  495. else
  496. {
  497. if(!myfrm.ecmsclasstype[1].checked)
  498. {
  499. myfrm.classpath.focus();
  500. }
  501. }
  502. }
  503. //检查
  504. function CheckForm(obj)
  505. {
  506. if(obj.classname.value=="")
  507. {
  508. alert("请输入栏目名称");
  509. return false;
  510. }
  511. if(obj.enews.value=='EditClass')
  512. {
  513. if(obj.ecmsclasstype.value==1)
  514. {
  515. return true;
  516. }
  517. }
  518. else
  519. {
  520. if(obj.ecmsclasstype[1].checked)
  521. {
  522. return true;
  523. }
  524. }
  525. if(obj.classpath.value=="")
  526. {
  527. alert("请输入栏目目录");
  528. return false;
  529. }
  530. //终极栏目
  531. if(<?=$enews=='EditClass'?'obj.islast.value==1':'obj.islast.checked'?>)
  532. {
  533. if(obj.modid.value==0||obj.modid.value=="")
  534. {
  535. alert("请选择所属系统模型");
  536. return false;
  537. }
  538. if(obj.listtempid.value==0)
  539. {
  540. alert("请到“模板选项”选择列表模板");
  541. return false;
  542. }
  543. if(obj.newstempid.value==0)
  544. {
  545. alert("请到“模板选项”选择内容模板");
  546. return false;
  547. }
  548. if(obj.filetype.value=="")
  549. {
  550. alert("请输入信息文件扩展名");
  551. return false;
  552. }
  553. }
  554. //大栏目
  555. else
  556. {
  557. if(obj.islist[1].checked&&obj.listtempid.value==0)//列表式
  558. {
  559. alert("请到“模板选项”选择列表模板");
  560. return false;
  561. }
  562. else if(obj.islist[0].checked&&obj.classtempid.value==0)
  563. {
  564. alert("到“模板选项”选择封面模板");
  565. return false;
  566. }
  567. else if(obj.islist[2].checked&&obj.classtext.value=='')
  568. {
  569. alert("请到“模板选项”设置页面内容");
  570. return false;
  571. }
  572. }
  573. return true;
  574. }
  575. //修改绑定信息
  576. function EditBdInfo(obj){
  577. var infoid=obj.bdinfoid.value;
  578. var r;
  579. r=infoid.split(',');
  580. if(infoid==''||r.length==1)
  581. {
  582. alert('请输入绑定信息ID');
  583. return false;
  584. }
  585. window.open('AddNews.php?<?=$ecms_hashur['ehref']?>&enews=EditNews&classid='+r[0]+'&id='+r[1]);
  586. }
  587. //修改绑定信息
  588. function EditSmallBdInfo(obj){
  589. var infoid=obj.smallbdinfoid.value;
  590. var r;
  591. r=infoid.split(',');
  592. if(infoid==''||r.length==1)
  593. {
  594. alert('请输入绑定信息ID');
  595. return false;
  596. }
  597. window.open('AddNews.php?<?=$ecms_hashur['ehref']?>&enews=EditNews&classid='+r[0]+'&id='+r[1]);
  598. }
  599. </script>
  600. </head>
  601. <body>
  602. <table width="100%" border="0" align="center" cellpadding="6" cellspacing="1">
  603. <tr>
  604. <td>位置:<?=$url?> </td>
  605. </tr>
  606. </table>
  607. <form name="form1" method="post" action="ecmsclass.php" onsubmit="return CheckForm(document.form1);">
  608. <?=$ecms_hashur['form']?>
  609. <div class="tab-pane" id="TabPane1"> <script type="text/javascript">
  610. tb1 = new WebFXTabPane( document.getElementById( "TabPane1" ) );
  611. </script>
  612. <div class="tab-page" id="baseinfo">
  613. <h2 class="tab">&nbsp;<font class=tabcolor>基本属性</font>&nbsp;</h2>
  614. <script type="text/javascript">tb1.addTabPage( document.getElementById( "baseinfo" ) );</script>
  615. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  616. <input type=hidden name=enews value=<?=$enews?>>
  617. <tr class="header">
  618. <td height="30" colspan="2">增加栏目</td>
  619. </tr>
  620. <tr bgcolor="#FFFFFF">
  621. <td width="23%" height="25">栏目名称</td>
  622. <td> <input name="classname" type="text" id="classname" value="<?=$r[classname]?>" size="38">
  623. <?
  624. if($enews=="AddClass")
  625. {
  626. ?>
  627. <input type="button" name="Submit5" value="生成拼音目录" onclick="window.open('GetPinyin.php?hz='+document.form1.classname.value+'&returnform=opener.document.form1.classpath.value<?=$ecms_hashur['href']?>','','width=160,height=100');">
  628. <?
  629. }
  630. ?>
  631. <input name="oldbclassid" type="hidden" id="oldbclassid" value="<?=$r[bclassid]?>">
  632. <input name="classid" type="hidden" id="classid" value="<?=$classid?>">
  633. <input name="oldclassname" type="hidden" id="oldclassname" value="<?=$r[classname]?>">
  634. <input name="oldislast" type="hidden" id="oldislast" value="<?=$r[islast]?>">
  635. <input name="filepass" type="hidden" id="filepass" value="<?=$filepass?>"></td>
  636. </tr>
  637. <tr bgcolor="#FFFFFF">
  638. <td height="25">栏目别名</td>
  639. <td><input name="bname" type="text" id="bname" value="<?=$r[bname]?>" size="38">
  640. <font color="#666666">(为空则与栏目名相同)</font></td>
  641. </tr>
  642. <tr bgcolor="#FFFFFF">
  643. <td height="25" valign="top">所属父栏目</td>
  644. <td><select name="bclassid" size="12" id="bclassid" onchange='javascript:changeitem(document.form1);' style="width:320">
  645. <option value="0"<?=$defaultbclassid?>>根栏目</option>
  646. <?=$options?>
  647. </select> </td>
  648. </tr>
  649. <tr bgcolor="#FFFFFF">
  650. <td height="25">栏目类型</td>
  651. <td>
  652. <?php
  653. $wbclassstyle=' style="display:none"';
  654. $nbclassstyle='';
  655. if($enews=='EditClass')
  656. {
  657. if(empty($r[wburl]))
  658. {
  659. $wbclassstyle=' style="display:none"';
  660. $nbclassstyle='';
  661. echo"<b>内部栏目</b><input type=hidden name=ecmsclasstype value=0>";
  662. }
  663. else
  664. {
  665. $wbclassstyle='';
  666. $nbclassstyle=' style="display:none"';
  667. echo"<b>外部栏目</b><input type=hidden name=ecmsclasstype value=1>";
  668. }
  669. }
  670. else
  671. {
  672. if(empty($r[wburl]))
  673. {
  674. $wbclassstyle=' style="display:none"';
  675. $nbclassstyle='';
  676. }
  677. else
  678. {
  679. $wbclassstyle='';
  680. $nbclassstyle=' style="display:none"';
  681. }
  682. ?>
  683. <input name="ecmsclasstype" type="radio" value="0"<?=empty($r[wburl])?' checked':''?> onclick="wbclass.style.display='none';nbclass.style.display='';">
  684. 内部栏目
  685. <input type="radio" name="ecmsclasstype" value="1"<?=empty($r[wburl])?'':' checked'?> onclick="wbclass.style.display='';nbclass.style.display='none';">
  686. 外部栏目<font color="#666666">(选择后不能修改)</font>
  687. <?php
  688. }
  689. ?> </td>
  690. </tr>
  691. <tbody id="wbclass"<?=$wbclassstyle?>>
  692. <tr bgcolor="#FFFFFF">
  693. <td height="25">&nbsp;</td>
  694. <td>外部栏目链接地址:
  695. <input name="wburl" type="text" id="wburl" value="<?=$r[wburl]?>" size="38">
  696. <input name="oldwburl" type="hidden" id="oldwburl" value="<?=$r[wburl]?>"></td>
  697. </tr>
  698. </tbody>
  699. <tbody id="nbclass"<?=$nbclassstyle?>>
  700. <tr bgcolor="#FFFFFF">
  701. <td height="25">是否终级栏目</td>
  702. <td>
  703. <?=$islast?>
  704. <font color="#FF0000">(终级栏目下才能增加信息)</font></td>
  705. </tr>
  706. <tr bgcolor="#FFFFFF">
  707. <td height="25" valign="top">栏目存放文件夹
  708. <input name="oldclasspath" type="hidden" id="oldclasspath" value="<?=$r[classpath]?>">
  709. <br> <input name="oldcpath" type="hidden" id="oldcpath" value="<?=$classpath?>"></td>
  710. <td><table border="0" cellspacing="1" cellpadding="3">
  711. <tr bgcolor="DBEAF5">
  712. <td>&nbsp;</td>
  713. <td bgcolor="DBEAF5">上层栏目目录</td>
  714. <td>本栏目目录</td>
  715. <td bgcolor="DBEAF5">&nbsp;</td>
  716. </tr>
  717. <tr>
  718. <td><div align="right">根目录/</div></td>
  719. <td><input name="pripath" type="text" id="pripath" value="<?=$pripath?>" size="30"> </td>
  720. <td><input name="classpath" type="text" id="classpath3" value="<?=$classpath?>" size="16"<?=$read?>></td>
  721. <td> <div align="left">
  722. <input type="button" name="Submit3" value="检测目录" onclick="javascript:window.open('ecmscom.php?<?=$ecms_hashur['href']?>&enews=CheckPath&pripath='+document.form1.pripath.value+'&classpath='+document.form1.classpath.value,'','width=100,height=100,top=250,left=450');">
  723. </div></td>
  724. </tr>
  725. </table></td>
  726. </tr>
  727. <tr bgcolor="#FFFFFF">
  728. <td width="23%" height="25">绑定的系统模型</td>
  729. <td width="77%"><select name="modid" id="modid">
  730. <?=$mod_options?>
  731. </select> <input type="button" name="Submit6" value="管理系统模型" onclick="window.open('db/ListTable.php<?=$ecms_hashur['whehref']?>');">
  732. *
  733. <input name="oldmodid" type="hidden" id="oldmodid" value="<?=$r[modid]?>"></td>
  734. </tr>
  735. <tr bgcolor="#FFFFFF">
  736. <td height="25">使用优化方案</td>
  737. <td><select name="yhid" id="yhid">
  738. <option name="0">不使用</option>
  739. <?=$yh_options?>
  740. </select>
  741. <input type="button" name="Submit63" value="管理优化方案" onclick="window.open('db/ListYh.php<?=$ecms_hashur['whehref']?>');"> </td>
  742. </tr>
  743. <tr bgcolor="#FFFFFF">
  744. <td height="25">绑定域名</td>
  745. <td><input name="classurl" type="text" id="classurl" value="<?=$r[classurl]?>" size="38">
  746. <input name="UrlToSmall" type="checkbox" id="UrlToSmall" value="1">
  747. 应用于子栏目<font color="#666666"> (没有绑定,请留空.后面无需加&quot;/&quot;)</font></td>
  748. </tr>
  749. </tbody>
  750. <tr bgcolor="#FFFFFF">
  751. <td height="25">栏目缩略图</td>
  752. <td><input name="classimg" type="text" id="classimg" value="<?=$r[classimg]?>" size="38">
  753. <a onclick="window.open('ecmseditor/FileMain.php?modtype=1&type=1&classid=&doing=2&field=classimg&filepass=<?=$filepass?>&sinfo=1<?=$ecms_hashur['ehref']?>','','width=700,height=550,scrollbars=yes');" title="选择已上传的图片"><img src="../data/images/changeimg.gif" width="22" height="22" border="0" align="absbottom"></a></td>
  754. </tr>
  755. <tr bgcolor="#FFFFFF">
  756. <td height="25" valign="top">页面关键字</td>
  757. <td><input name="classpagekey" type="text" id="classpagekey" value="<?=$r[classpagekey]?>" size="38"></td>
  758. </tr>
  759. <tr bgcolor="#FFFFFF">
  760. <td height="25" valign="top">栏目简介</td>
  761. <td><textarea name="intro" cols="70" rows="8" id="intro"><?=stripSlashes($r[intro])?></textarea></td>
  762. </tr>
  763. <?php
  764. if($enews=='EditClass')
  765. {
  766. ?>
  767. <tr bgcolor="#FFFFFF">
  768. <td height="25">栏目增加时间</td>
  769. <td><?=$r['addtime']?date("Y-m-d",$r['addtime']):'---'?></td>
  770. </tr>
  771. <?php
  772. }
  773. ?>
  774. </table>
  775. </div>
  776. <div class="tab-page" id="changevar">
  777. <h2 class="tab">&nbsp;<font class="tabcolor">选项设置</font>&nbsp;</h2>
  778. <script type="text/javascript">tb1.addTabPage( document.getElementById( "changevar" ) );</script>
  779. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  780. <tr class="header">
  781. <td height="30" colspan="2">栏目选项</td>
  782. </tr>
  783. <tr bgcolor="#FFFFFF">
  784. <td width="23%" height="25">是否显示到导航</td>
  785. <td><input type="radio" name="showclass" value="0"<?=$r[showclass]==0?' checked':''?>>
  786. 显示
  787. <input type="radio" name="showclass" value="1"<?=$r[showclass]==1?' checked':''?>>
  788. 不显示<font color="#666666">(如:导航标签,地图标签)</font></td>
  789. </tr>
  790. <tr bgcolor="#FFFFFF">
  791. <td height="25">显示排序</td>
  792. <td><input name="myorder" type="text" id="myorder" value="<?=$r[myorder]?>">
  793. <font color="#666666">(值越小越前面)</font></td>
  794. </tr>
  795. <tr bgcolor="#FFFFFF">
  796. <td height="25">栏目访问权限</td>
  797. <td>
  798. <?=$cgroup?> </td>
  799. </tr>
  800. <tr bgcolor="#FFFFFF" id="smallcgtoinfo">
  801. <td height="25" valign="top">&nbsp;</td>
  802. <td><input name="cgtoinfo" type="checkbox" id="cgtoinfo" value="1"<?=$r[cgtoinfo]?' checked':''?>>
  803. 访问权限应用于信息<font color="#666666">(选择后信息的查看权限可以不设置)</font></td>
  804. </tr>
  805. <tr bgcolor="#FFFFFF">
  806. <td height="25">开启前台投稿</td>
  807. <td><input type="radio" name="openadd" value="0"<?=$openadd0?>>
  808. 开启
  809. <input type="radio" name="openadd" value="1"<?=$openadd1?>>
  810. 关闭
  811. <input name="oldopenadd" type="hidden" id="oldopenadd" value="<?=$r[openadd]?>"> </td>
  812. </tr>
  813. <tbody id="smallclass">
  814. <tr>
  815. <td>前台投稿设置</td>
  816. <td>&nbsp;</td>
  817. </tr>
  818. <tr bgcolor="#FFFFFF">
  819. <td>验证码</td>
  820. <td height="25"> 开启验证码:
  821. <input name="qaddshowkey" type="checkbox" id="qaddshowkey2" value="1"<?=$r['qaddshowkey']==1?' checked':''?>> </td>
  822. </tr>
  823. <tr bgcolor="#FFFFFF">
  824. <td>投稿权限<font color="#666666">(不选为不限)</font></td>
  825. <td height="25">
  826. <?=$qgroup?> </td>
  827. </tr>
  828. <tr bgcolor="#FFFFFF">
  829. <td>投稿生成列表</td>
  830. <td height="25"><p>
  831. <select name="qaddlist" id="qaddlist">
  832. <option value="0"<?=$r['qaddlist']==0?' selected':''?>>不生成</option>
  833. <option value="1"<?=$r['qaddlist']==1?' selected':''?>>生成当前栏目</option>
  834. <option value="2"<?=$r['qaddlist']==2?' selected':''?>>生成首页</option>
  835. <option value="3"<?=$r['qaddlist']==3?' selected':''?>>生成父栏目</option>
  836. <option value="4"<?=$r['qaddlist']==4?' selected':''?>>生成当前栏目与父栏目</option>
  837. <option value="5"<?=$r['qaddlist']==5?' selected':''?>>生成父栏目与首页</option>
  838. <option value="6"<?=$r['qaddlist']==6?' selected':''?>>生成当前栏目、父栏目与首页</option>
  839. </select>
  840. </p></td>
  841. </tr>
  842. <tr bgcolor="#FFFFFF">
  843. <td>投稿审核</td>
  844. <td height="25"> <input type="radio" name="checkqadd" value="0"<?=$r['checkqadd']==0?' checked':''?>>
  845. 需要审核
  846. <input type="radio" name="checkqadd" value="1"<?=$r['checkqadd']==1?' checked':''?>>
  847. 无需审核</td>
  848. </tr>
  849. <tr bgcolor="#FFFFFF">
  850. <td>发布信息增加</td>
  851. <td height="25"> <input name="addinfofen" type="text" id="addinfofen2" value="<?=$r[addinfofen]?>" size="6">
  852. 点数 <font color="#666666">(不增加请设为0,扣点请设为负数,使用此项需将投稿权限设置为会员以上)</font></td>
  853. </tr>
  854. <tr bgcolor="#FFFFFF">
  855. <td>会员最大发布信息数</td>
  856. <td height="25"><input name="oneinfo" type="text" id="oneinfo" value="<?=$r[oneinfo]?>" size="6">
  857. <font color="#666666">(单个会员最多能发布多少条信息,使用此项需将投稿权限设置为会员以上)</font></td>
  858. </tr>
  859. <tr bgcolor="#FFFFFF">
  860. <td>管理投稿</td>
  861. <td height="25"><strong>
  862. <select name="adminqinfo" id="adminqinfo">
  863. <option value="0"<?=$r['adminqinfo']==0?' selected':''?>>不能管理信息</option>
  864. <option value="1"<?=$r['adminqinfo']==1?' selected':''?>>可管理未审核信息</option>
  865. <option value="2"<?=$r['adminqinfo']==2?' selected':''?>>只可编辑未审核信息</option>
  866. <option value="3"<?=$r['adminqinfo']==3?' selected':''?>>只可删除未审核信息</option>
  867. <option value="4"<?=$r['adminqinfo']==4?' selected':''?>>可管理所有信息</option>
  868. <option value="5"<?=$r['adminqinfo']==5?' selected':''?>>只可编辑所有信息</option>
  869. <option value="6"<?=$r['adminqinfo']==6?' selected':''?>>只可删除所有信息</option>
  870. </select>
  871. <input name="qeditchecked" type="checkbox" id="qeditchecked" value="1"<?=$r['qeditchecked']==1?' checked':''?>>
  872. </strong>编辑信息需要审核</td>
  873. </tr>
  874. <tr>
  875. <td valign="top">后台信息发布设置</td>
  876. <td>&nbsp;</td>
  877. </tr>
  878. <tr bgcolor="#FFFFFF">
  879. <td>增加/编辑信息</td>
  880. <td height="25"> <input name="addreinfo" type="checkbox" id="addreinfo" value="1"<?=$r['addreinfo']==1?' checked':''?>>
  881. 生成内容页;生成列表:
  882. <select name="haddlist" id="haddlist">
  883. <option value="0"<?=$r['haddlist']==0?' selected':''?>>不生成</option>
  884. <option value="1"<?=$r['haddlist']==1?' selected':''?>>生成当前栏目</option>
  885. <option value="2"<?=$r['haddlist']==2?' selected':''?>>生成首页</option>
  886. <option value="3"<?=$r['haddlist']==3?' selected':''?>>生成父栏目</option>
  887. <option value="4"<?=$r['haddlist']==4?' selected':''?>>生成当前栏目与父栏目</option>
  888. <option value="5"<?=$r['haddlist']==5?' selected':''?>>生成父栏目与首页</option>
  889. <option value="6"<?=$r['haddlist']==6?' selected':''?>>生成当前栏目、父栏目与首页</option>
  890. </select></td>
  891. </tr>
  892. <tr bgcolor="#FFFFFF">
  893. <td>&nbsp;</td>
  894. <td height="25"><input name="repreinfo" type="checkbox" id="repreinfo2" value="1"<?=$r[repreinfo]==1?' checked':''?>>
  895. 生成上一篇信息</td>
  896. </tr>
  897. <tr bgcolor="#FFFFFF">
  898. <td>&nbsp;</td>
  899. <td height="25"><input name="sametitle" type="checkbox" id="sametitle" value="1"<?=$r['sametitle']==1?' checked':''?>>
  900. 检测标题重复</td>
  901. </tr>
  902. <tr bgcolor="#FFFFFF">
  903. <td>审核设置</td>
  904. <td height="25"><input name="checked" type="checkbox" id="checked" value="1"<?=$checked?>>
  905. 直接审核</td>
  906. </tr>
  907. <tr bgcolor="#FFFFFF">
  908. <td>使用工作流</td>
  909. <td height="25"><select name="wfid" id="wfid">
  910. <option value="0">不使用工作流</option>
  911. <?=$workflows?>
  912. </select></td>
  913. </tr>
  914. <tr bgcolor="#FFFFFF">
  915. <td height="25">信息预设投票</td>
  916. <td><select name="definfovoteid" id="definfovoteid">
  917. <option value="0">不设置</option>
  918. <?=$definfovote?>
  919. </select> <input type="button" name="Submit622" value="管理预设投票" onclick="window.open('other/ListVoteMod.php<?=$ecms_hashur['whehref']?>');">
  920. <font color="#666666">(增加信息时默认的投票项)</font></td>
  921. </tr>
  922. <tr bgcolor="#FFFFFF">
  923. <td height="25">默认查看信息权限</td>
  924. <td><select name="groupid" id="groupid">
  925. <option value="0">游客</option>
  926. <?=$group?>
  927. </select> <font color="#666666">(增加信息时默认的会员组权限)</font></td>
  928. </tr>
  929. <tr>
  930. <td valign="top">其他设置</td>
  931. <td>&nbsp;</td>
  932. </tr>
  933. <tr bgcolor="#FFFFFF">
  934. <td width="23%" valign="top">评论功能</td>
  935. <td height="25"><input type="radio" name="openpl" value="0"<?=$openpl0?>>
  936. 开启
  937. <input type="radio" name="openpl" value="1"<?=$openpl1?>>
  938. 关闭,评论需要审核:
  939. <input name="checkpl" type="checkbox" id="checkpl2" value="1"<?=$checkpl?>>
  940. 是</td>
  941. </tr>
  942. <tr bgcolor="#FFFFFF">
  943. <td height="25">信息归档</td>
  944. <td>归档大于
  945. <input name="doctime" type="text" id="doctime" value="<?=$r[doctime]?>" size="6">
  946. 天的信息<font color="#666666">(0为不归档)</font></td>
  947. </tr>
  948. <tr>
  949. <td>特殊模型设置</td>
  950. <td>&nbsp;</td>
  951. </tr>
  952. <tr bgcolor="#FFFFFF">
  953. <td width="23%" height="25">下载/影视模型</td>
  954. <td height="25">每行显示
  955. <input name="down_num" type="text" id="link_num3" value="<?=$r[down_num]?>" size="5">
  956. 个下载地址,
  957. <input name="online_num" type="text" id="down_num" value="<?=$r[online_num]?>" size="5">
  958. 个在线观看地址</td>
  959. </tr>
  960. </tbody>
  961. </table>
  962. </div>
  963. <div class="tab-page" id="settemplate">
  964. <h2 class="tab">&nbsp;<font class="tabcolor">模板选项</font>&nbsp;</h2>
  965. <script type="text/javascript">tb1.addTabPage( document.getElementById( "settemplate" ) );</script>
  966. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  967. <tr class="header">
  968. <td height="30" colspan="2">模板设置</td>
  969. </tr>
  970. <tbody id="smallclassbdinfo">
  971. <tr bgcolor="#FFFFFF">
  972. <td height="25">栏目绑定信息</td>
  973. <td height="25">绑定信息ID:
  974. <input name="smallbdinfoid" type="text" id="smallbdinfoid" value="<?=$r[bdinfoid]?>">
  975. <a href="#empirecms" onclick="EditSmallBdInfo(document.form1);">[修改信息]</a> <font color="#666666">(格式:栏目ID,信息ID)</font></td>
  976. </tr>
  977. </tbody>
  978. <tbody id="bigclasssettemp">
  979. <tr bgcolor="#FFFFFF">
  980. <td width="23%" height="25">页面显示模式</td>
  981. <td height="25"> <input type="radio" name="islist" value="0"<?=$r[islist]==0?' checked':''?>>
  982. 封面式
  983. <input type="radio" name="islist" value="1"<?=$r[islist]==1?' checked':''?>>
  984. 列表式
  985. <input type="radio" name="islist" value="2"<?=$r[islist]==2?' checked':''?>>
  986. 页面内容式
  987. <input type="radio" name="islist" value="3"<?=$r[islist]==3?' checked':''?> onclick="bdinfo.style.display='';">
  988. 栏目绑定信息
  989. <input name="oldislist" type="hidden" id="oldislist" value="<?=$r[islist]?>"></td>
  990. </tr>
  991. <tr bgcolor="#FFFFFF">
  992. <td height="25">&nbsp;</td>
  993. <td height="25"><font color="#666666">说明:封面式要选择封面模板、列表式要选择列表模板、内容式要录入页面内容</font></td>
  994. </tr>
  995. <?php
  996. $bdinfostyle=$r[islist]==3?'':' style="display:none"';
  997. ?>
  998. <tr id="bdinfo" bgcolor="#FFFFFF"<?=$bdinfostyle?>>
  999. <td height="25">&nbsp;</td>
  1000. <td height="25">绑定信息ID:
  1001. <input name="bdinfoid" type="text" id="bdinfoid" value="<?=$r[bdinfoid]?>">
  1002. <a href="#empirecms" onclick="EditBdInfo(document.form1);">[修改信息]</a>
  1003. <font color="#666666">(格式:栏目ID,信息ID)</font></td>
  1004. </tr>
  1005. <tr bgcolor="#FFFFFF">
  1006. <td height="25">封面模板</td>
  1007. <td height="25"><select name="classtempid">
  1008. <?=$classtemp?>
  1009. </select> <input type="button" name="Submit6223" value="管理封面模板" onclick="window.open('template/ListClasstemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');"></td>
  1010. </tr>
  1011. </tbody>
  1012. <tr bgcolor="#FFFFFF">
  1013. <td width="23%" height="25">所属列表模板</td>
  1014. <td> 静态:
  1015. <select name="listtempid" id="listtempid">
  1016. <?=$listtemp_options?>
  1017. </select>
  1018. ,动态:
  1019. <select name="dtlisttempid">
  1020. <?=$dtlisttemp_options?>
  1021. </select> <input type="button" name="Submit6222" value="管理列表模板" onclick="window.open('template/ListListtemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');">
  1022. *</td>
  1023. </tr>
  1024. <tbody id="smallclasssettemp">
  1025. <tr bgcolor="#FFFFFF">
  1026. <td height="25">所属内容模板</td>
  1027. <td><select name="newstempid" id="newstempid">
  1028. <?=$newstemp_options?>
  1029. </select> <input type="button" name="Submit62222" value="管理内容模板" onclick="window.open('template/ListNewstemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');">
  1030. *(
  1031. <input name="tobetempinfo" type="checkbox" id="tobetempinfo" value="1">
  1032. 应用于已生成的信息 )</td>
  1033. </tr>
  1034. <tr bgcolor="#FFFFFF">
  1035. <td height="25">所属评论模板</td>
  1036. <td><select name="pltempid" id="pltempid">
  1037. <option value="0">使用默认模板 </option>
  1038. <?=$pltemp?>
  1039. </select> <input type="button" name="Submit62" value="管理评论模板" onclick="window.open('template/ListPltemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');"></td>
  1040. </tr>
  1041. </tbody>
  1042. <tr bgcolor="#FFFFFF">
  1043. <td height="25">搜索模板</td>
  1044. <td><select name="searchtempid" id="searchtempid">
  1045. <option value="0">使用默认模板 </option>
  1046. <?=$searchtemp?>
  1047. </select> <input type="button" name="Submit62" value="管理搜索模板" onclick="window.open('template/ListSearchtemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');"></td>
  1048. </tr>
  1049. <tr bgcolor="#FFFFFF">
  1050. <td height="25">WAP模板</td>
  1051. <td><select name="wapstyleid" id="wapstyleid">
  1052. <option value="0">使用默认模板</option>
  1053. <?=$wapstyles?>
  1054. </select> <input type="button" name="Submit623" value="管理WAP模板" onclick="window.open('other/WapStyle.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');">
  1055. (
  1056. <input name="wapstylesclass" type="checkbox" id="wapstylesclass" value="1">
  1057. 应用于子栏目) </td>
  1058. </tr>
  1059. <tr bgcolor="#FFFFFF">
  1060. <td height="25">WAP页面模式</td>
  1061. <td><select name="wapislist" id="wapislist">
  1062. <option value="0"<?=$r['wapislist']==0?' selected':''?>>列表式</option>
  1063. <option value="1"<?=$r['wapislist']==1?' selected':''?>>封面式</option>
  1064. <option value="2"<?=$r['wapislist']==2?' selected':''?>>页面式</option>
  1065. </select>
  1066. <font color="#666666">(封面式:模板目录要建“cpage.temp.php”模板文件;页面式:模板目录要建“c+栏目ID.php”模板文件,比如c2.php)</font></td>
  1067. </tr>
  1068. <tbody id="bigclasssetclasstext">
  1069. <tr bgcolor="#FFFFFF">
  1070. <td height="25">页面内容<font color="#666666">(支持标签同封面模板)</font></td>
  1071. <td>请将内容<a href="#ecms" onclick="window.clipboardData.setData('Text',document.form1.classtext.value);document.form1.classtext.select()" title="点击复制模板内容"><strong>复制到Dreamweaver(推荐)</strong></a>或者使用<a href="#ecms" onclick="window.open('template/editor.php?getvar=opener.document.form1.classtext.value&returnvar=opener.document.form1.classtext.value&fun=ReturnHtml<?=$ecms_hashur['ehref']?>','editclasstext','width=880,height=600,scrollbars=auto,resizable=yes');"><strong>模板在线编辑</strong></a>进行可视化编辑</td>
  1072. </tr>
  1073. <tr bgcolor="#FFFFFF">
  1074. <td height="25" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  1075. <tr>
  1076. <td width="100%" colspan="2"><textarea name="classtext" cols="80" rows="23" id="classtext" style="WIDTH: 100%"><?=ehtmlspecialchars(stripSlashes($addr[classtext]))?></textarea> </td>
  1077. </tr>
  1078. </table></td>
  1079. </tr>
  1080. </tbody>
  1081. </table>
  1082. </div>
  1083. <div class="tab-page" id="sethtml">
  1084. <h2 class="tab">&nbsp;<font class="tabcolor">生成选项</font>&nbsp;</h2>
  1085. <script type="text/javascript">tb1.addTabPage( document.getElementById( "sethtml" ) );</script>
  1086. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  1087. <tr class="header">
  1088. <td height="30" colspan="2">生成设置</td>
  1089. </tr>
  1090. <tr bgcolor="#FFFFFF">
  1091. <td width="23%" height="25">栏目页模式</td>
  1092. <td><input type="radio" name="listdt" value="0"<?=$r[listdt]==0?' checked':''?>>
  1093. 静态页面
  1094. <input type="radio" name="listdt" value="1"<?=$r[listdt]==1?' checked':''?>>
  1095. 动态页面
  1096. <input name="oldlistdt" type="hidden" id="oldlistdt" value="<?=$r[listdt]?>"></td>
  1097. </tr>
  1098. <tr bgcolor="#FFFFFF">
  1099. <td height="25">内容页模式</td>
  1100. <td><input type="radio" name="showdt" value="0"<?=$r[showdt]==0?' checked':''?>>
  1101. 静态页面
  1102. <input type="radio" name="showdt" value="1"<?=$r[showdt]==1?' checked':''?>>
  1103. 动态生成<font color="#666666">
  1104. <input type="radio" name="showdt" value="2"<?=$r[showdt]==2?' checked':''?>>
  1105. </font>动态页面</td>
  1106. </tr>
  1107. <tr bgcolor="#FFFFFF">
  1108. <td height="25">管理信息排序方式</td>
  1109. <td> <input name="listorder" type="text" id="listorder" value="<?=$r[listorder]?>" size="38">
  1110. <select name="lorderselect" onchange="document.form1.listorder.value=this.value">
  1111. <option value="id DESC"></option>
  1112. <option value="newstime DESC">按发布时间降序排序</option>
  1113. <option value="id DESC">按ID降序排序</option>
  1114. <option value="onclick DESC">按点击率降序排序</option>
  1115. <option value="totaldown DESC">按下载数降序排序</option>
  1116. <option value="plnum DESC">按评论数降序排序</option>
  1117. </select> </td>
  1118. </tr>
  1119. <tr bgcolor="#FFFFFF">
  1120. <td height="25">列表式页面排序方式</td>
  1121. <td> <input name="reorder" type="text" id="reorder" value="<?=$r[reorder]?>" size="38">
  1122. <select name="orderselect" onchange="document.form1.reorder.value=this.value">
  1123. <option value="newstime DESC"></option>
  1124. <option value="newstime DESC">按发布时间降序排序</option>
  1125. <option value="id DESC">按ID降序排序</option>
  1126. <option value="onclick DESC">按点击率降序排序</option>
  1127. <option value="totaldown DESC">按下载数降序排序</option>
  1128. <option value="plnum DESC">按评论数降序排序</option>
  1129. </select> </td>
  1130. </tr>
  1131. <tr bgcolor="#FFFFFF">
  1132. <td height="25">列表式显示附加SQL条件</td>
  1133. <td><input name="addsql" type="text" id="addsql" value="<?=ehtmlspecialchars($r['addsql'])?>" size="38">
  1134. <font color="#666666">(最多255个字符)</font></td>
  1135. </tr>
  1136. <tr bgcolor="#FFFFFF">
  1137. <td height="25">是否生成</td>
  1138. <td><input name="nreclass" type="checkbox" value="1"<?=$r[nreclass]==1?' checked':''?>>
  1139. 不生成栏目页,
  1140. <input name="nreinfo" type="checkbox" value="1"<?=$r[nreinfo]==1?' checked':''?>>
  1141. 不生成内容页,
  1142. <input name="nrejs" type="checkbox" value="1"<?=$r[nrejs]==1?' checked':''?>>
  1143. 不生成JS调用,
  1144. <input name="nottobq" type="checkbox" value="1"<?=$r[nottobq]==1?' checked':''?>>
  1145. 标签不调用</td>
  1146. </tr>
  1147. <tr bgcolor="#FFFFFF">
  1148. <td height="25">栏目文件扩展名</td>
  1149. <td><input name="classtype" type="text" id="classtype" value="<?=$r[classtype]?>" size="38">
  1150. <select name="select" onchange="document.form1.classtype.value=this.value">
  1151. <option value=".html">扩展名</option>
  1152. <option value=".html">.html</option>
  1153. <option value=".htm">.htm</option>
  1154. <option value=".php">.php</option>
  1155. <option value=".shtml">.shtml</option>
  1156. </select> <input name="oldclasstype" type="hidden" id="oldclasstype" value="<?=$r[classtype]?>">
  1157. <font color="#666666">(如.html,.xml,.htm等)</font></td>
  1158. </tr>
  1159. <tr bgcolor="#FFFFFF">
  1160. <td height="25">显示总记录数</td>
  1161. <td> <input name="maxnum" type="text" id="maxnum" value="<?=$r[maxnum]?>" size="38">
  1162. 条<font color="#666666">(0为显示所有记录)</font></td>
  1163. </tr>
  1164. <tr bgcolor="#FFFFFF">
  1165. <td height="25">生成静态页数</td>
  1166. <td><input name="repagenum" type="text" id="repagenum" value="<?=$r[repagenum]?>" size="38">
  1167. 页<font color="#666666">(超过分页采用动态链接,0为不限)</font></td>
  1168. </tr>
  1169. <tr bgcolor="#FFFFFF">
  1170. <td height="25">生成信息每页显示</td>
  1171. <td><input name="lencord" type="text" id="lencord" value="<?=$r[lencord]?>" size="38">
  1172. 条记录
  1173. <input name="oldlencord" type="hidden" id="oldlencord3" value="<?=$r[lencord]?>"></td>
  1174. </tr>
  1175. <tbody id="smallclasssetinfo">
  1176. <tr bgcolor="#FFFFFF">
  1177. <td height="25">相关链接显示</td>
  1178. <td><input name="link_num" type="text" id="link_num" value="<?=$r[link_num]?>" size="38">
  1179. 条记录<font color="#666666">(0为不生成相关链接)</font></td>
  1180. </tr>
  1181. <tr bgcolor="#FFFFFF">
  1182. <td height="26">内容页存放目录</td>
  1183. <td><input type="radio" name="infopath" value="0"<?=$r[ipath]==''?' checked':''?>>
  1184. 栏目目录
  1185. <input type="radio" name="infopath" value="1"<?=$r[ipath]<>''?' checked':''?>>
  1186. 自定义: /
  1187. <input name="ipath" type="text" id="ipath" value="<?=$r[ipath]?>">
  1188. <font color="#666666">(从根目录开始)</font></td>
  1189. </tr>
  1190. <tr bgcolor="#FFFFFF">
  1191. <td height="26">内容页目录存放形式</td>
  1192. <td><input name="newspath" type="text" id="newspath" value="<?=$r[newspath]?>" size="38">
  1193. <select name="select2" onchange="document.form1.newspath.value=this.value">
  1194. <option value="Y-m-d">选择</option>
  1195. <option value="Y-m-d">2005-01-27</option>
  1196. <option value="Y/m-d">2005/01-27</option>
  1197. <option value="Y/m/d">2005/01/27</option>
  1198. <option value="Ymd">20050127</option>
  1199. <option value="">不设置目录</option>
  1200. </select> <font color="#666666">(如Y-m-d,Y/m-d等形式)</font></td>
  1201. </tr>
  1202. <tr bgcolor="#FFFFFF">
  1203. <td height="25">内容页文件命名形式</td>
  1204. <td>[前缀]
  1205. <input name="filename_qz" type="text" id="filename_qz" value="<?=$r[filename_qz]?>" size="15">
  1206. 命名:
  1207. <input type="radio" name="filename" value="0"<?=$r[filename]==0?' checked':''?>>
  1208. <a title="信息ID:1.html">信息ID</a>
  1209. <input type="radio" name="filename" value="1"<?=$r[filename]==1?' checked':''?>>
  1210. <a title="unix时间戳+信息ID:12102462981.html">time()</a>
  1211. <input type="radio" name="filename" value="4"<?=$r[filename]==4?' checked':''?>>
  1212. <a title="日期+信息ID:201210011.html">date()</a>
  1213. <input type="radio" name="filename" value="5"<?=$r[filename]==5?' checked':''?>>
  1214. <a title="各表信息在同一个目录不会重复:1000010000000001.html">公共信息ID</a>
  1215. <input type="radio" name="filename" value="2"<?=$r[filename]==2?' checked':''?>>
  1216. <a title="MD5加密地址:c4ca4238a0b923820dcc509a6f75849b.html">md5()</a>
  1217. <input type="radio" name="filename" value="3"<?=$r[filename]==3?' checked':''?>>
  1218. <a title="信息ID目录:/1/">目录</a></td>
  1219. </tr>
  1220. <tr bgcolor="#FFFFFF">
  1221. <td height="25">内容页文件扩展名</td>
  1222. <td><input name="filetype" type="text" id="filetype" value="<?=$r[filetype]?>" size="38">
  1223. <select name="select3" onchange="document.form1.filetype.value=this.value">
  1224. <option value=".html">扩展名</option>
  1225. <option value=".html">.html</option>
  1226. <option value=".htm">.htm</option>
  1227. <option value=".php">.php</option>
  1228. <option value=".shtml">.shtml</option>
  1229. </select> <font color="#666666">(如.html,.xml,.htm等)</font></td>
  1230. </tr>
  1231. <tr bgcolor="#FFFFFF">
  1232. <td height="25">内容关键字替换</td>
  1233. <td><select name="keycid" id="keycid">
  1234. <option value="0"<?=$r['keycid']==0?' selected':''?>>替换所有</option>
  1235. <option value="-1"<?=$r['keycid']==-1?' selected':''?>>不替换</option>
  1236. <?php
  1237. $keycsql=$empire->query("select classid,classname from {$dbtbpre}enewskeyclass");
  1238. while($keycr=$empire->fetch($keycsql))
  1239. {
  1240. ?>
  1241. <option value="<?=$keycr['classid']?>"<?=$r['keycid']==$keycr['classid']?' selected':''?>><?=$keycr['classname']?></option>
  1242. <?php
  1243. }
  1244. ?>
  1245. </select>
  1246. <input type="button" name="Submit6232" value="管理内容关键字" onclick="window.open('NewsSys/key.php<?=$ecms_hashur['whehref']?>');"></td>
  1247. </tr>
  1248. </tbody>
  1249. </table>
  1250. </div>
  1251. <div class="tab-page" id="setsinglepage">
  1252. <h2 class="tab">&nbsp;<font class="tabcolor">单页内容</font>&nbsp;</h2>
  1253. <script type="text/javascript">tb1.addTabPage( document.getElementById( "setsinglepage" ) );</script>
  1254. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  1255. <tr class="header">
  1256. <td height="30">单页内容设置</td>
  1257. </tr>
  1258. <tr bgcolor="#FFFFFF">
  1259. <td height="25">当栏目是单页面内容时设置,比如:公司简介、联系方式等单页。在模板中调用本内容用:<strong>&lt;?=ReturnClassAddField(0,'eclasspagetext')?&gt;</strong></td>
  1260. </tr>
  1261. <tr bgcolor="#FFFFFF">
  1262. <td height="25"><?=ECMS_ShowEditorVar("eclasspagetext",$ecmsfirstpost==1?"":$addr['eclasspagetext'],"Default","","500","100%")?></td>
  1263. </tr>
  1264. </table>
  1265. </div>
  1266. <div class="tab-page" id="setjs">
  1267. <h2 class="tab">&nbsp;<font class="tabcolor">JS调用设置</font>&nbsp;</h2>
  1268. <script type="text/javascript">tb1.addTabPage( document.getElementById( "setjs" ) );</script>
  1269. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  1270. <tr class="header">
  1271. <td height="30" colspan="2">JS调用相关设置</td>
  1272. </tr>
  1273. <tr bgcolor="#FFFFFF">
  1274. <td height="25">所用JS模板</td>
  1275. <td><select name="jstempid" id="jstempid">
  1276. <?=$jstemp?>
  1277. </select>
  1278. <input type="button" name="Submit62223" value="管理JS模板" onclick="window.open('template/ListJstemp.php?gid=<?=$thegid?><?=$ecms_hashur['ehref']?>');"></td>
  1279. </tr>
  1280. <tr bgcolor="#FFFFFF">
  1281. <td width="23%" height="25">最新信息JS显示</td>
  1282. <td>
  1283. <input name="newline" type="text" id="newline" value="<?=$r[newline]?>" size="38">
  1284. 条记录</td>
  1285. </tr>
  1286. <tr bgcolor="#FFFFFF">
  1287. <td height="25">热门信息JS显示</td>
  1288. <td>
  1289. <input name="hotline" type="text" id="hotline" value="<?=$r[hotline]?>" size="38">
  1290. 条记录</td>
  1291. </tr>
  1292. <tr bgcolor="#FFFFFF">
  1293. <td height="25">推荐信息JS显示</td>
  1294. <td>
  1295. <input name="goodline" type="text" id="goodline" value="<?=$r[goodline]?>" size="38">
  1296. 条记录</td>
  1297. </tr>
  1298. <tr bgcolor="#FFFFFF">
  1299. <td height="25">热门评论信息JS显示</td>
  1300. <td>
  1301. <input name="hotplline" type="text" id="hotplline" value="<?=$r[hotplline]?>" size="38">
  1302. 条记录</td>
  1303. </tr>
  1304. <tr bgcolor="#FFFFFF">
  1305. <td height="25">头条信息JS显示</td>
  1306. <td>
  1307. <input name="firstline" type="text" id="firstline" value="<?=$r[firstline]?>" size="38">
  1308. 条记录</td>
  1309. </tr>
  1310. </table>
  1311. </div>
  1312. <?php
  1313. $classfnum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsclassf");
  1314. if($classfnum)
  1315. {
  1316. ?>
  1317. <div class="tab-page" id="setaddfield">
  1318. <h2 class="tab">&nbsp;<font class="tabcolor">自定义字段设置</font>&nbsp;</h2>
  1319. <script type="text/javascript">tb1.addTabPage( document.getElementById( "setaddfield" ) );</script>
  1320. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  1321. <tr class="header">
  1322. <td width="23%" height="30">自定义字段设置</td>
  1323. <td height="30">&nbsp;</td>
  1324. </tr>
  1325. <?php
  1326. @include('../data/html/classaddform.php');
  1327. ?>
  1328. <tr bgcolor="#FFFFFF">
  1329. <td height="30" colspan="2"><strong>栏目自定义字段调用说明</strong><br>
  1330. 内置调用栏目自定义字段函数:ReturnClassAddField(栏目ID,字段名),栏目ID=0为当前栏目ID。取多个字段内容可用逗号隔开,例子:<br>
  1331. 取得'classtext'字段内容:$value=ReturnClassAddField(0,'classtext'); //$value就是字段内容。<br>
  1332. 取得多个字段内容:$value=ReturnClassAddField(1,'classid,classtext'); //$value['classtext']才是字段内容。</td>
  1333. </tr>
  1334. </table>
  1335. </div>
  1336. <?php
  1337. }
  1338. ?>
  1339. </div>
  1340. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  1341. <tr>
  1342. <td width="100%" height="30"><div align="center"><strong>
  1343. <input type="submit" name="Submit" value="提交">
  1344. &nbsp;&nbsp;<input type="reset" name="Submit2" value="重置">
  1345. <input type=hidden name=from value="<?=ehtmlspecialchars($_GET['from'])?>"></strong></div></td>
  1346. </tr>
  1347. </table>
  1348. </form>
  1349. </body>
  1350. </html>
  1351. <?php
  1352. db_close();
  1353. $empire=null;
  1354. ?>
  1355. <?=$hiddenclass?>