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

185 lines
8.3KB

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