国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

393 lines
16KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>更改内容模型</title>
  6. <style type="text/css">
  7. <!--
  8. body { background-image: url(images/allbg.gif); }
  9. .STYLE2 { color: #666666; }
  10. -->
  11. </style>
  12. <script language="javascript">
  13. <!--
  14. function Nav() {
  15. if(window.navigator.userAgent.indexOf("MSIE")>=1) return 'IE';
  16. else if(window.navigator.userAgent.indexOf("Firefox")>=1) return 'FF';
  17. else return "OT";
  18. }
  19. function $Obj(objname) {
  20. return document.getElementById(objname);
  21. }
  22. function ShowHide2(objname) {
  23. var obj = $Obj(objname);
  24. if(obj.style.display != 'block'){ obj.style.display = 'block' }
  25. else{ obj.style.display = 'none'; }
  26. }
  27. //删除
  28. function DelNote(gourl) {
  29. if(!window.confirm("你确认要删除这个字段么!")){ return false; }
  30. location.href=gourl;
  31. }
  32. function ShowObj(objname) {
  33. var obj = document.getElementById(objname);
  34. if(Nav()=='IE') {obj.style.display = "block";obj.style.display = "block";}
  35. else obj.style.display = "table";
  36. }
  37. function HideObj(objname) {
  38. var obj = document.getElementById(objname);
  39. obj.style.display = "none";
  40. }
  41. function ShowItem1() {
  42. ShowObj('head1'); ShowObj('needset');
  43. HideObj('head2'); HideObj('adset');
  44. }
  45. function ShowItem2() {
  46. ShowObj('head2'); ShowObj('adset');
  47. HideObj('head1'); HideObj('needset');
  48. }
  49. -->
  50. </script>
  51. <link href="css/base.css" rel="stylesheet" type="text/css">
  52. </head>
  53. <body topmargin="8">
  54. <form name="form1" action="mychannel_edit.php" method="post">
  55. <input type='hidden' name='id' value='<?php echo $id?>'>
  56. <input type='hidden' name='dopost' value='save'>
  57. <input type='hidden' name='issystem' value='<?php echo $row['issystem']; ?>'>
  58. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" style="margin-bottom:8px;">
  59. <tr>
  60. <td height="28" colspan="2" background="images/tbg.gif" style="padding-left:10px;">
  61. <a href="mychannel_main.php"><b>内容模型管理</b></a>
  62. <b> &gt; 更改内容模型:</b>
  63. </td>
  64. </tr>
  65. </table>
  66. <table width="98%" border="0" cellspacing="0" id="head1" cellpadding="0" align="center" style="display:block">
  67. <tr>
  68. <td colspan="2">
  69. <table border="0" cellpadding="0" cellspacing="0">
  70. <tr>
  71. <td width="84" height="24" align="center" background="images/itemnote1.gif">&nbsp;基本设置&nbsp;</td>
  72. <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem2()"><u>字段管理</u></a>&nbsp;</td>
  73. </tr>
  74. </table>
  75. </td>
  76. </tr>
  77. </table>
  78. <table width="98%" border="0" cellspacing="0" id="head2" cellpadding="0" style="display:none" align="center">
  79. <tr>
  80. <td colspan="2">
  81. <table border="0" cellpadding="0" cellspacing="0">
  82. <tr>
  83. <td width="84" height="24" align="center" background="images/itemnote2.gif" bgcolor="#F2F7DF"><a href="#" onClick="ShowItem1()"><u>基本设置</u></a>&nbsp;</td>
  84. <td width="84" align="center" background="images/itemnote1.gif">字段管理&nbsp;</td>
  85. </tr>
  86. </table>
  87. </td>
  88. </tr>
  89. </table>
  90. <table width="98%" id='needset' border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#cfcfcf" style="display:block">
  91. <?php
  92. if($row['issystem'] == 1)
  93. {
  94. ?>
  95. <tr>
  96. <td colspan="2" bgcolor="#FFFFFF" style="color:red"> 您目前所展开的是系统模型,系统模型一般对发布程序和管理程序已经固化,如果您胡乱更改系统模型将会导致使用这种内容类型的频道可能崩溃。 </td>
  97. </tr>
  98. <?php
  99. }
  100. ?>
  101. <tr>
  102. <td bgcolor="#FFFFFF"><b>模型性质</b><br />
  103. <span class="STYLE2" id="help5">如果为<u>系统模型</u>将禁止删除,此选项不可更改,对于独立模型,系统强制创建字段aid、栏目ID、发布时间、文档标题。</span></td>
  104. <td bgcolor="#FFFFFF">
  105. <?php
  106. if($row['issystem']==0) echo "自动模型";
  107. else if($row['issystem']==1) echo "系统模型";
  108. else if($row['issystem']==-1) echo "独立模型";
  109. ?>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td width="35%" bgcolor="#FFFFFF"><b>频道ID</b><br />
  114. <span class="STYLE2" id='help1'>数字,创建后不可更改,并具有唯一性。</span></td>
  115. <td width="65%" bgcolor="#FFFFFF">
  116. <?php echo $row['id']; ?> </td>
  117. </tr>
  118. <tr>
  119. <td bgcolor="#FFFFFF"><b>名字标识</b><br />
  120. <span class="STYLE2" id="help2">与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 “default/article_名字标识.htm”,列表模板、封面模板类推。 </span></td>
  121. <td bgcolor="#FFFFFF">
  122. <?php echo $row['nid']; ?> </td>
  123. </tr>
  124. <tr>
  125. <td bgcolor="#FFFFFF"><b>频道名称</b><br />
  126. <span class="STYLE2" id="help3">频道的中文名称,在后台管理,前台发布等均使用此名字。</span></td>
  127. <td bgcolor="#FFFFFF"><input name="typename" type="text" id="typename" value="<?php echo $row['typename']; ?>" class="pubinputs" /></td>
  128. </tr>
  129. <tr>
  130. <td bgcolor="#FFFFFF"><b>附加表</b><br />
  131. <span class="STYLE2" id="help4">频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。</span></td>
  132. <td bgcolor="#FFFFFF"><input name="addtable" type="text" id="addtable" value="<?php echo $row['addtable']; ?>" class="pubinputs" />
  133. ( #@__ 是表示数据表前缀)</td>
  134. </tr>
  135. <tr>
  136. <td bgcolor="#FFFFFF"><strong>是否支持会员投稿</strong></td>
  137. <td bgcolor="#FFFFFF">
  138. <input name="issend" type="radio" class="np" value="0"<?php if($row['issend']==0) echo " checked='1' "; ?> />
  139. 不支持
  140. <input type="radio" name="issend" class="np" value="1"<?php if($row['issend']==1) echo " checked='1' "; ?> />
  141. 支持 </td>
  142. </tr>
  143. <tr>
  144. <td bgcolor="#FFFFFF"><strong>会员许可投稿级别</strong></td>
  145. <td bgcolor="#FFFFFF">
  146. <select name="sendrank" id="sendrank" style="width:120px">
  147. <option value='0'>游客</option>
  148. <?php
  149. $urank = $cuserLogin->getUserRank();
  150. $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank' And rank>=10");
  151. $dsql->Execute();
  152. while($row2 = $dsql->GetObject())
  153. {
  154. if($row2->rank==$row['sendrank']) echo " <option value='".$row2->rank."' selected>".$row2->membername."</option>\r\n";
  155. else echo " <option value='".$row2->rank."'>".$row2->membername."</option>\r\n";
  156. }
  157. ?>
  158. </select> </td>
  159. </tr>
  160. <tr>
  161. <td bgcolor="#FFFFFF"><strong>许可投稿会员组</strong></td>
  162. <td bgcolor="#FFFFFF">
  163. <?php
  164. $dsql->SetQuery("Select * from `#@__member_model`");
  165. $dsql->Execute();
  166. while($row3 = $dsql->GetObject())
  167. {
  168. echo "<input name='usertype' class='np' type='radio' value=".$row3->name." />".$row3->name."\r\n";
  169. }
  170. ?>
  171. <input name="usertype" class="np" type="radio" value=""<?php if($row['usertype']=='') echo " checked='1' ";?> />
  172. 不限 </td>
  173. </tr>
  174. <tr>
  175. <td bgcolor="#FFFFFF"><strong>会员稿件默认状态</strong></td>
  176. <td bgcolor="#FFFFFF">
  177. <input name="arcsta" class="np" type="radio" value="-1"<?php if($row['arcsta']==-1) echo " checked='1' ";?>>
  178. 未审核
  179. <input name="arcsta" class="np" type="radio" value="0"<?php if($row['arcsta']==0) echo " checked='1' ";?>>
  180. 已审核(自动生成HTML)
  181. <input name="arcsta" class="np" type="radio" value="1"<?php if($row['arcsta']==1) echo " checked='1' ";?>>
  182. 已审核(仅使用动态文档)</td>
  183. </tr>
  184. <tr>
  185. <td bgcolor="#FFFFFF"><strong>档案发布程序</strong></td>
  186. <td bgcolor="#FFFFFF"><input name="addcon" type="text" id="addcon" value="<?php echo $row['addcon']; ?>" class="pubinputs" /></td>
  187. </tr>
  188. <tr>
  189. <td bgcolor="#FFFFFF"><strong>档案修改程序</strong></td>
  190. <td bgcolor="#FFFFFF"><input name="editcon" type="text" id="editcon" value="<?php echo $row['editcon']; ?>" class="pubinputs" /></td>
  191. </tr>
  192. <tr>
  193. <td bgcolor="#FFFFFF"><strong>档案管理程序</strong></td>
  194. <td bgcolor="#FFFFFF"><input name="mancon" type="text" id="mancon" value="<?php echo $row['mancon']; ?>" class="pubinputs" /></td>
  195. </tr>
  196. <tr>
  197. <td bgcolor="#FFFFFF"><strong>前台会员发布程序</strong></td>
  198. <td bgcolor="#FFFFFF"><input name="useraddcon" type="text" id="useraddcon" value="<?php echo $row['useraddcon']; ?>" class="pubinputs" /></td>
  199. </tr>
  200. <tr>
  201. <td bgcolor="#FFFFFF"><strong>前台会员修改程序</strong></td>
  202. <td bgcolor="#FFFFFF"><input name="usereditcon" type="text" id="usereditcon" value="<?php echo $row['usereditcon']; ?>" class="pubinputs" /></td>
  203. </tr>
  204. <tr>
  205. <td bgcolor="#FFFFFF"><strong>前台会员管理程序</strong></td>
  206. <td bgcolor="#FFFFFF"><input name="usermancon" type="text" id="usermancon" value="<?php echo $row['usermancon']; ?>" class="pubinputs" /></td>
  207. </tr>
  208. <tr>
  209. <td bgcolor="#FFFFFF"><strong>列表附加字段</strong><br />
  210. <span class="STYLE2" id="help6">用&quot;,&quot;分开,可以在列表模板{dede:list}{/dede:list}中用[field:name /]调用</span></td>
  211. <td bgcolor="#FFFFFF">
  212. <input name="listfields" type="text" id="listfields" size="50" value="<?php echo $row['listfields']; ?>" class="pubinputs" style="width:80%;" /> </td>
  213. </tr>
  214. <tr>
  215. <td bgcolor="#FFFFFF"><b>投稿标题使用名称</b></td>
  216. <td bgcolor="#FFFFFF">
  217. <input name="titlename" type="text" id="titlename" value="<?php echo $row['titlename']; ?>" class="pubinputs" /> </td>
  218. </tr>
  219. <tr>
  220. <td bgcolor="#FFFFFF">
  221. <strong>投稿是否使用摘要</strong>
  222. <br/>
  223. <span class="STYLE2">如果不使用主表(独立模型),缩略图设置同。</span>
  224. </td>
  225. <td bgcolor="#FFFFFF">
  226. <input name="needdes" type="radio" class="np" value="1"<?php if($row['needdes']==1) echo " checked='1'"; ?> />
  227. 使用
  228. <input name="needdes" type="radio" class="np" value="0"<?php if($row['needdes']==0) echo " checked='1'"; ?> />
  229. 不使用 </td>
  230. </tr>
  231. <tr>
  232. <td bgcolor="#FFFFFF"><strong>投稿是否使用缩图</strong></td>
  233. <td bgcolor="#FFFFFF">
  234. <input name="needpic" type="radio" class="np" value="1"<?php if($row['needpic']==1) echo " checked='1'"; ?> />
  235. 使用
  236. <input name="needpic" type="radio" class="np" value="0"<?php if($row['needpic']==0) echo " checked='1'"; ?> />
  237. 不使用 </td>
  238. </tr>
  239. <tr>
  240. <td bgcolor="#FFFFFF"><b>默认栏目ID</b><br />
  241. <span class="STYLE2" id="help8">与投稿是唯一性结合可以用模型设计自定义表单</span> </td>
  242. <td bgcolor="#FFFFFF">
  243. <input name="dfcid" type="text" id="dfcid" value="<?php echo $row['dfcid']; ?>" class="pubinputs" style="width:80px" /></td>
  244. </tr>
  245. <tr>
  246. <td bgcolor="#FFFFFF"><b>投稿具有唯一性</b><br />
  247. <span class="STYLE2" id="help9">如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单</span> </td>
  248. <td bgcolor="#FFFFFF">
  249. <input name="onlyone" type="radio" class="np" value="1" <?php if($row['onlyone']==1) echo " checked='1'"; ?> />
  250. <input name="onlyone" type="radio" class="np" value="0" <?php if($row['onlyone']==0) echo " checked='1'"; ?> />
  251. 不是 </td>
  252. </tr>
  253. </table>
  254. <table width="98%" id='adset' border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" style='display:none'>
  255. <tr>
  256. <td height="28" bgcolor="#ffffff"><strong>模型字段配置(可视化模式)</strong></td>
  257. <td bgcolor="#ffffff">
  258. <input name="fset" type="button" id="fset" value="添加新字段" onClick="location.href='mychannel_field_add.php?id=<?php echo $id; ?>'" class="coolbg np" /> </td>
  259. </tr>
  260. <tr>
  261. <td colspan='2' bgcolor="#FFFFFF" style="padding:6px">
  262. <table width="100%" border="0" cellpadding="1" cellspacing="1" align="center" style="background:#cfcfcf;">
  263. <tr align="center" bgcolor="#FBFCE2" height="24">
  264. <td width="28%">表单提示文字</td>
  265. <td width="18%">数据字段名</td>
  266. <td width="20%">数据类型</td>
  267. <td width="18%">表单类型</td>
  268. <td>维护</td>
  269. </tr>
  270. <?php
  271. if($row['issystem']==-1)
  272. {
  273. ?>
  274. <tr bgcolor="#ffffff" height="24">
  275. <td colspan='5'>aid 和 typeid 是强制使用字段,这里不列出。</td>
  276. </tr>
  277. <?php
  278. }
  279. else
  280. {
  281. ?>
  282. <tr bgcolor="#ffffff" height="24">
  283. <td colspan='5'>下面列出的字段是附加表的字段,除此外,它还包含主表dede_archives的所有字段</td>
  284. </tr>
  285. <?php
  286. }
  287. $ds = file(DEDEADMIN."/inc/fieldtype.txt");
  288. foreach($ds as $d){
  289. $dds = explode(',',trim($d));
  290. $fieldtypes[$dds[0]] = $dds[1];
  291. }
  292. $fieldset = $row['fieldset'];
  293. $dtp = new DedeTagParse();
  294. $dtp->SetNameSpace("field","<",">");
  295. $dtp->LoadSource($fieldset);
  296. if(is_array($dtp->CTags)){
  297. foreach($dtp->CTags as $ctag)
  298. {
  299. ?> <tr align="center" bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="24">
  300. <td>
  301. <?php
  302. $itname = $ctag->GetAtt('itemname');
  303. if($itname=='') echo "没指定";
  304. else echo $itname;
  305. ?> </td>
  306. <td>
  307. <?php echo $ctag->GetTagName(); ?> </td>
  308. <td>
  309. <?php
  310. $ft = $ctag->GetAtt('type');
  311. if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
  312. else echo "系统专用类型";
  313. ?> </td>
  314. <td>
  315. <?php
  316. $ft = $ctag->GetAtt('autofield');
  317. if($ft=='' || $ft==0) {
  318. echo "固化字段";
  319. }
  320. else {
  321. echo "自动表单";
  322. }
  323. ?>
  324. </td>
  325. <td>
  326. <?php
  327. if($ft==1)
  328. {
  329. ?>
  330. <a href='mychannel_field_edit.php?id=<?php echo $id; ?>&fname=<?php echo $ctag->GetTagName(); ?>&issystem=<?php echo $row['issystem']; ?>'><img src='images/gtk-edit.png' alt='更改' title='更改' /></a>
  331. <?php if($row['issystem']!=1){ ?>
  332. | <a href='#' onClick='javascript:DelNote("mychannel_field_edit.php?id=<?php echo $id; ?>&fname=<?php echo $ctag->GetTagName(); ?>&action=delete");'><img src='images/gtk-del.png' alt='删除' title='删除' /></a>
  333. <?php } ?>
  334. <?php
  335. }
  336. else
  337. {
  338. echo "禁止修改";
  339. }
  340. ?>
  341. </td>
  342. </tr>
  343. <?php
  344. }}
  345. ?>
  346. </table>
  347. </td>
  348. </tr>
  349. <tr>
  350. <td height="24" width="35%" bgcolor="#FFFFFF">
  351. <strong>模型字段配置(文本模式) </strong><br />
  352. 修改配置文本可调整字段顺序,但不会更改字段属性!
  353. </td>
  354. <td width="65%" bgcolor="#FFFFFF">
  355. <textarea name="fieldset" style="width:99%;height:300px" rows="10" id="fieldset"><?php echo $row['fieldset']; ?></textarea>
  356. </td>
  357. </tr>
  358. </table>
  359. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" id='' style='margin-top:6px'>
  360. <tr bgcolor="#F9FCEF">
  361. <td height="36" colspan="2">
  362. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  363. <tr>
  364. <td width="26%">&nbsp;</td>
  365. <td width="15%"><input name="imageField" class="np" type="image" src="images/button_ok.gif" width="60" height="22" border="0" /></td>
  366. <td width="59%"><img src="images/button_back.gif" width="60" height="22" onClick="location='mychannel_main.php';" style="cursor:pointer" /></td>
  367. </tr>
  368. </table>
  369. </td>
  370. </tr>
  371. </table>
  372. </form>
  373. <?php
  374. if(!empty($openfield))
  375. {
  376. echo "<script language='javascript'>ShowItem2();</script>";
  377. }
  378. ?>
  379. </body>
  380. </html>