国内流行的内容管理系统(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.

236 lines
11KB

  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. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  8. <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  9. <link href="css/base.css" rel="stylesheet" type="text/css" />
  10. <script language="javascript" src="../static/js/jquery.js"></script>
  11. <script src="../static/js/bootstrap.bundle.js"></script>
  12. <script language="javascript" src="js/main.js"></script>
  13. <script language="javascript">
  14. function GetFields() {
  15. var theform = document.form1;
  16. var itemname = theform.itemname.value;
  17. var fieldname = theform.fname.value;
  18. var dtype = theform.dtype.value;
  19. var isnull = theform.isnull.value;
  20. var vdefault = theform.vdefault.value;
  21. var maxlength = theform.maxlength.value;
  22. var vinnertext = theform.vinnertext.value;
  23. var spage = (theform.spage[0].checked ? theform.spage[0].value : theform.spage[1].value);
  24. var sisnull = (isnull == 0 ? "false" : "true");
  25. var autofield = (theform.autofield[0].checked ? theform.autofield[0].value : theform.autofield[1].value);
  26. var islist = (theform.islist.checked ? 1 : 0);
  27. var notsend = (theform.notsend.checked ? 1 : 0);
  28. if (itemname == "") {
  29. ShowMsg("表单提示名称不能为空!");
  30. theform.itemname.focus();
  31. return false;
  32. }
  33. if ((dtype == "radio" || dtype == "select" || dtype == "checkbox") && vdefault == "") {
  34. ShowMsg("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!");
  35. return false;
  36. }
  37. if (spage == "no") spage = "";
  38. revalue = "<field:" + fieldname + " itemname=\"" + itemname + "\" autofield=\"" + autofield + "\" notsend=\"" + notsend + "\" type=\"" + dtype + "\"";
  39. revalue += " isnull=\"" + sisnull + "\" islist=\"" + islist + "\" default=\"" + vdefault + "\" ";
  40. revalue += " maxlength=\"" + maxlength + "\" page=\"" + spage + "\">\r\n" + vinnertext + "</field:" + fieldname + ">\r\n";
  41. document.form1.fieldstring.value = revalue;
  42. return true;
  43. }
  44. </script>
  45. <style type="text/css">
  46. td {
  47. padding: 2px;
  48. padding-left: 6px;
  49. }
  50. .STYLE1 {
  51. color: #FF3300
  52. }
  53. .STYLE2 {
  54. color: #666666
  55. }
  56. .nw {
  57. float: left;
  58. width: 150px;
  59. }
  60. .cls {
  61. clear: both;
  62. }
  63. </style>
  64. </head>
  65. <body topmargin=8>
  66. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="table maintable table-bordered mt-3"
  67. style=" background:#CFCFCF;">
  68. <form name="form1" action="mychannel_field_edit.php" method="post" onSubmit="return GetFields();">
  69. <input type='hidden' name='action' value='save' />
  70. <input type='hidden' name='id' value='<?php echo $id?>' />
  71. <input type='hidden' name='fname' value='<?php echo $fname?>' />
  72. <input type='hidden' name='issystem' value='<?php echo $issystem?>' />
  73. <input type='hidden' name='fieldstring' value='' />
  74. <tr>
  75. <td height="20" colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif">
  76. <table width="98%" border="0" cellspacing="0" cellpadding="0" class="table table-borderless">
  77. <tr>
  78. <td width="30%" style="padding-left:10px;">
  79. <a href="mychannel_main.php"><b>频道管理</b></a> <b>&gt;&gt; 查看/修改字段:</b>
  80. </td>
  81. <td align="right" style="padding-top:6px;">
  82. <button type="button" name="ss1" class="btn btn-secondary btn-sm"
  83. onClick="location='mychannel_edit.php?id=<?php echo $id?>&dopost=edit';">当前模型信息</button>
  84. <button type="button" name="ss12" onClick="location='mychannel_main.php';" class="btn btn-secondary btn-sm">内容模型管理</button>
  85. </td>
  86. </tr>
  87. </table>
  88. </td>
  89. </tr>
  90. <?php if($row['issystem']==1){ ?>
  91. <tr>
  92. <td colspan="2" bgcolor="#FFFFFF">
  93. <span class="STYLE1">您当前操作的字段属于系统模型字段:修改系统模型有风险,请不要随便改动系统模型的字段相关的属性。</span> </td>
  94. </tr>
  95. <?php } ?>
  96. <tr>
  97. <td bgcolor="#FFFFFF"><strong>表单提示文字:</strong><br>
  98. <span class="STYLE2">发布内容时显示的提示文字</span></td>
  99. <td bgcolor="#FFFFFF">
  100. <input name="itemname" type="text" id="itemname" value="<?php echo $ctag->GetAtt('itemname')?>"
  101. class="pubinputs">
  102. *(发布内容时显示的项名字) </td>
  103. </tr>
  104. <tr>
  105. <td width="28%" bgcolor="#FFFFFF"><strong>字段名称:</strong><br>
  106. <span class="STYLE2">只能用英文字母或数字,数据表的真实字段名</span></td>
  107. <td width="72%" bgcolor="#FFFFFF" style="table-layout:fixed;word-break:break-all">
  108. <?php echo $fname?> </td>
  109. </tr>
  110. <tr>
  111. <td bgcolor="#FFFFFF"><strong>字段类型:</strong></td>
  112. <td bgcolor="#FFFFFF">
  113. <label><input name="autofield" type="radio" class="np" value="1" checked="checked"
  114. <?php echo ($ctag->GetAtt('autofield')==1 ? " checked":""); ?> />
  115. 系统自动生成表单字段</label>
  116. <label><input name="autofield" type="radio" class="np" value="0"
  117. <?php echo ( ($ctag->GetAtt('autofield')==''||$ctag->GetAtt('autofield')=='0') ? " checked":""); ?> />
  118. 已经固化在发布表单中字段</label></td>
  119. </tr>
  120. <tr>
  121. <td bgcolor="#FFFFFF"><strong>前台参数:</strong></td>
  122. <td bgcolor="#FFFFFF">
  123. <label><input name="islist" type="checkbox" class="np" id="islist" value="1"
  124. <?php echo ($ctag->GetAtt('islist')==1 ? " checked":""); ?> />
  125. 使字段可以在列表的底层模板中获得(自定义字段默认仅能在文档模板显示,启用此选项将使列表查询变慢,如无必要请不要选择)</label>
  126. <br />
  127. <label><input name="notsend" type="checkbox" class="np" id="notsend" value="1"
  128. <?php echo ($ctag->GetAtt('notsend')==1 ? " checked":""); ?> />
  129. 前台投稿及采集规则禁用本字段</label></td>
  130. </tr>
  131. <tr>
  132. <td bgcolor="#FFFFFF"><strong>数据类型:</strong></td>
  133. <td bgcolor="#FFFFFF">
  134. <select name="dtype" id="type" style="width:200px">
  135. <?php
  136. $dtype = $ctag->GetAtt('type');
  137. if($dtype!='' && isset($fieldtypes[$dtype]))
  138. {
  139. echo " <option value='{$dtype}'>{$fieldtypes[$dtype]}</option>\r\n";
  140. $canchange = true;
  141. }
  142. else
  143. {
  144. echo " <option value='{$dtype}'>系统专用类型</option>\r\n";
  145. $canchange = false;
  146. }
  147. if($canchange)
  148. {
  149. ?>
  150. <option value="text">单行文本(varchar)</option>
  151. <option value="textchar">单行文本(char)</option>
  152. <option value="multitext">多行文本</option>
  153. <option value="htmltext">HTML文本</option>
  154. <option value="textdata">文本保存HTML数据</option>
  155. <option value="int">整数类型</option>
  156. <option value="float">小数类型</option>
  157. <option value="datetime">时间类型</option>
  158. <option value="img">图片</option>
  159. <option value="imgfile">图片(仅网址)</option>
  160. <option value="media">多媒体文件</option>
  161. <option value="addon">附件类型</option>
  162. <option value="select">使用option下拉框</option>
  163. <option value="radio">使用radio选项卡</option>
  164. <option value="checkbox">Checkbox多选框</option>
  165. <option value="stepselect">联动类型</option>
  166. <?php
  167. }
  168. ?>
  169. </select> </td>
  170. </tr>
  171. <tr>
  172. <td bgcolor="#FFFFFF"><strong>内容是否需要分页符:</strong><br />
  173. <span class="STYLE2">如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!</span></td>
  174. <td bgcolor="#FFFFFF">
  175. <input name="isnull" type="hidden" value="1" />
  176. <label><input name="spage" type="radio" value="split"
  177. <?php if($ctag->GetAtt('page')=='split') echo " checked='1' "; ?> class='np' />
  178. 是</label> &nbsp;
  179. <label><input name="spage" type="radio" value="no"
  180. <?php if($ctag->GetAtt('page')=='no'||$ctag->GetAtt('page')=='') echo " checked='1' "; ?> class='np' />
  181. 否</label></td>
  182. </tr>
  183. <tr>
  184. <td bgcolor="#FFFFFF"><strong>默认值:</strong><br>
  185. <span class="STYLE2">
  186. 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。</span></td>
  187. <td bgcolor="#FFFFFF"><textarea name="vdefault" type="text" id="vdefault"
  188. style="width:70%;height:60px"><?php echo $ctag->GetAtt('default'); ?></textarea></td>
  189. </tr>
  190. <tr>
  191. <td bgcolor="#FFFFFF"><strong>最大长度:</strong><br>
  192. <span class="STYLE2"> 文本数据必须填写,大于255为text类型 </span></td>
  193. <td bgcolor="#FFFFFF">
  194. <input name="maxlength" type="text" id="maxlength" value="<?php echo $ctag->GetAtt('maxlength')?>"
  195. style="width:80px;height:24px;padding-top:3px;"></td>
  196. </tr>
  197. <tr>
  198. <td bgcolor="#FFFFFF"><strong>自定义表单HTML:</strong></td>
  199. <td bgcolor="#FFFFFF">
  200. ◆自定义表单HTML用~name~表示提示文字,~form~表示表单元素<br> </td>
  201. </tr>
  202. <tr>
  203. <td align="center" bgcolor="#FFFFFF"><br> </td>
  204. <td bgcolor="#FFFFFF"><textarea name="vinnertext" cols="45" rows="5" id="vinnertext"
  205. style="width:70%; height:120px;"><?php echo $ctag->GetInnerText(); ?></textarea></td>
  206. </tr>
  207. <tr>
  208. <td height="28" colspan="2" bgcolor="#F9FCEF">
  209. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-borderless">
  210. <tr>
  211. <td width="26%" height="45">&nbsp;</td>
  212. <td width="10%"><button type="submit" name="button1" id="button1" class="btn btn-secondary btn-sm">确定</button>
  213. </td>
  214. <td><button type="reset" name="button3" id="button3" class="btn btn-secondary btn-sm">重置</button>
  215. </td>
  216. </tr>
  217. </table>
  218. </td>
  219. </tr>
  220. </form>
  221. </table>
  222. </body>
  223. </html>