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

174 lines
7.9KB

  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. <link href="css/base.css" rel="stylesheet" type="text/css" />
  7. <script language="javascript">
  8. function GetFields()
  9. {
  10. var theform = document.form1;
  11. var itemname = theform.itemname.value;
  12. var fieldname = theform.fname.value;
  13. var dtype = theform.dtype.value;
  14. var isnull = theform.isnull.value;
  15. var vdefault = theform.vdefault.value;
  16. var maxlength = theform.maxlength.value;
  17. var vinnertext = theform.vinnertext.value;
  18. var spage = (theform.spage[0].checked ? theform.spage[0].value : theform.spage[1].value);
  19. var sisnull = (isnull==0 ? "false" : "true");
  20. if(itemname=="")
  21. {
  22. alert("表单提示名称不能为空!");
  23. theform.itemname.focus();
  24. return false;
  25. }
  26. if((dtype=="radio"||dtype=="select"||dtype=="checkbox") && vdefault=="")
  27. {
  28. alert("你选择的select或radio、checkbox类型,必须默认值设置选择的项目(用逗号[,]分开)!");
  29. return false;
  30. }
  31. if(spage=="no") spage = "";
  32. revalue = "<field:"+fieldname+" itemname=\""+itemname+"\" autofield=\"1\" type=\""+dtype+"\"";
  33. revalue += " isnull=\""+sisnull+"\" default=\""+vdefault+"\" ";
  34. revalue += " maxlength=\""+maxlength+"\" page=\""+spage+"\">\r\n"+vinnertext+"</field:"+fieldname+">\r\n";
  35. document.form1.fieldstring.value = revalue;
  36. return true;
  37. }
  38. </script>
  39. <style type="text/css">
  40. <!--
  41. td{ padding:2px; padding-left:6px; }
  42. .STYLE1 {color: #FF3300}
  43. .STYLE2 {color: #666666}
  44. .nw { float:left; width:150px; }
  45. .cls { clear:both; }
  46. -->
  47. </style>
  48. </head>
  49. <body topmargin=8 background='images/allbg.gif'>
  50. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style=" background:#CFCFCF;">
  51. <form name="form1" action="diy_field_edit.php" method="post" onSubmit="return GetFields();">
  52. <input type='hidden' name='action' value='save'>
  53. <input type='hidden' name='diyid' value='<?php echo $diyid?>'>
  54. <input type='hidden' name='fname' value='<?php echo $fname?>'>
  55. <input type='hidden' name='issystem' value='<?php echo $issystem?>'>
  56. <input type='hidden' name='fieldstring' value=''>
  57. <tr>
  58. <td height="20" colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif">
  59. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  60. <tr>
  61. <td width="30%" style="padding-left:10px;"><b><a href="diy_main.php">自定义表单管理</a> &gt;&gt; 修改字段:</b> </td>
  62. <td align="right" style="padding-top:6px;">
  63. <input type="button" name="ss1" value="当前表单信息" onClick="location='diy_edit.php?diyid=<?php echo $diyid; ?>&dopost=edit';" class="nbt"/>
  64. </td>
  65. </tr>
  66. </table> </td>
  67. </tr>
  68. <tr>
  69. <td bgcolor="#FFFFFF"><strong>表单提示文字:</strong><br>
  70. <span class="STYLE2">发布内容时显示的提示文字</span></td>
  71. <td bgcolor="#FFFFFF">
  72. <input name="itemname" type="text" id="itemname" value="<?php echo $ctag->GetAtt('itemname')?>" class="pubinputs">
  73. *(发布内容时显示的项名字) </td>
  74. </tr>
  75. <tr>
  76. <td width="28%" bgcolor="#FFFFFF"><strong>字段名称:</strong><br>
  77. <span class="STYLE2">只能用英文字母或数字,数据表的真实字段名</span></td>
  78. <td width="72%" bgcolor="#FFFFFF" style="table-layout:fixed;word-break:break-all">
  79. <?php echo $fname?> </td>
  80. </tr>
  81. <tr>
  82. <td bgcolor="#FFFFFF"><strong>数据类型:</strong></td>
  83. <td bgcolor="#FFFFFF">
  84. <select name="dtype" id="type" style="width:200px">
  85. <?php
  86. $dtype = $ctag->GetAtt('type');
  87. if($dtype!='' && isset($fieldtypes[$dtype]))
  88. {
  89. echo " <option value='{$dtype}'>{$fieldtypes[$dtype]}</option>\r\n";
  90. $canchange = true;
  91. }
  92. else
  93. {
  94. echo " <option value='{$dtype}'>系统专用类型</option>\r\n";
  95. $canchange = false;
  96. }
  97. if($canchange)
  98. {
  99. ?>
  100. <option value="text">单行文本(varchar)</option>
  101. <option value="textchar">单行文本(char)</option>
  102. <option value="multitext">多行文本</option>
  103. <option value="htmltext">HTML文本</option>
  104. <option value="int">整数类型</option>
  105. <option value="float">小数类型</option>
  106. <option value="datetime">时间类型</option>
  107. <option value="img">图片</option>
  108. <option value="addon">附件类型</option>
  109. <option value="select">使用option下拉框</option>
  110. <option value="radio">使用radio选项卡</option>
  111. <option value="checkbox">Checkbox多选框</option>
  112. <?php
  113. }
  114. ?>
  115. </select>
  116. <!--
  117. //取消的类型
  118. option value="textdata">文本保存HTML数据</option>
  119. <option value="imgfile">图片(仅网址)</option>
  120. <option value="media">多媒体文件</option>
  121. <option value="stepselect">联动类型</option-->
  122. </td>
  123. </tr>
  124. <tr>
  125. <td bgcolor="#FFFFFF"><strong>内容是否需要分页符:</strong><br/>
  126. <span class="STYLE2">如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!</span></td>
  127. <td bgcolor="#FFFFFF">
  128. <input name="isnull" type="hidden" value="1" />
  129. <input name="spage" type="radio" value="split"<?php if($ctag->GetAtt('page')=='split') echo " checked='1' "; ?> class='np' />
  130. 是 &nbsp;
  131. <input name="spage" type="radio" value="no"<?php if($ctag->GetAtt('page')=='no'||$ctag->GetAtt('page')=='') echo " checked='1' "; ?> class='np' />
  132. 否 </td>
  133. </tr>
  134. <tr>
  135. <td bgcolor="#FFFFFF"><strong>默认值:</strong><br>
  136. <span class="STYLE2"> 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。</span></td>
  137. <td bgcolor="#FFFFFF"><textarea name="vdefault" type="text" id="vdefault" style="width:70%;height:60px"><?php echo $ctag->GetAtt('default'); ?></textarea></td>
  138. </tr>
  139. <tr>
  140. <td bgcolor="#FFFFFF"><strong>最大长度:</strong><br>
  141. <span class="STYLE2"> 文本数据必须填写,大于255为text类型 </span></td>
  142. <td bgcolor="#FFFFFF">
  143. <input name="maxlength" type="text" id="maxlength" value="<?php echo $ctag->GetAtt('maxlength')?>" style="width:80px;padding-top:3px;"></td>
  144. </tr>
  145. <tr>
  146. <td bgcolor="#FFFFFF" style="padding-left:10px;"><strong>自定义表单HTML:</strong></td>
  147. <td bgcolor="#FFFFFF">
  148. ◆自定义表单HTML用~name~表示提示文字,~form~表示表单元素<br> </td>
  149. </tr>
  150. <tr>
  151. <td align="center" bgcolor="#FFFFFF"><br> </td>
  152. <td bgcolor="#FFFFFF"><textarea name="vinnertext" cols="45" rows="5" id="vinnertext" style="width:70%; height:120px;"><?php echo $ctag->GetInnerText(); ?></textarea></td>
  153. </tr>
  154. <tr>
  155. <td height="28" colspan="2" bgcolor="#F9FCEF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  156. <tr>
  157. <td width="26%" height="45">&nbsp;</td>
  158. <td width="10%"><input type="submit" name="button1" id="button1" value="确定" class="coolbg np" />
  159. </td>
  160. <td><input type="reset" name="button3" id="button3" value="重置" class="coolbg np" />
  161. </td>
  162. </tr>
  163. </table></td>
  164. </tr>
  165. </form>
  166. </table>
  167. </body>
  168. </html>