国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

433 lines
18KB

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