AddFeedbackF.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"feedbackf");
  20. $enews=ehtmlspecialchars($_GET['enews']);
  21. $url="<a href=feedback.php".$ecms_hashur['whehref'].">管理信息反馈</a>&nbsp;>&nbsp;<a href=FeedbackClass.php".$ecms_hashur['whehref'].">信息反馈分类管理</a>&nbsp;>&nbsp;<a href=ListFeedbackF.php".$ecms_hashur['whehref'].">反馈字段管理</a>&nbsp;>&nbsp;新建字段";
  22. $r[myorder]=0;
  23. //修改字段
  24. if($enews=="EditFeedbackF")
  25. {
  26. $fid=(int)$_GET['fid'];
  27. $url="<a href=feedback.php".$ecms_hashur['whehref'].">管理信息反馈</a>&nbsp;>&nbsp;<a href=FeedbackClass.php".$ecms_hashur['whehref'].">信息反馈分类管理</a>&nbsp;>&nbsp;<a href=ListFeedbackF.php".$ecms_hashur['whehref'].">反馈字段管理</a>&nbsp;>&nbsp;修改字段";
  28. $r=$empire->fetch1("select * from {$dbtbpre}enewsfeedbackf where fid='$fid'");
  29. if(!$r[fid])
  30. {
  31. printerror("ErrorUrl","history.go(-1)");
  32. }
  33. $oftype="type".$r[ftype];
  34. $$oftype=" selected";
  35. $ofform="form".$r[fform];
  36. $$ofform=" selected";
  37. }
  38. db_close();
  39. $empire=null;
  40. ?>
  41. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  42. <html>
  43. <head>
  44. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  45. <title>新建字段</title>
  46. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  47. </head>
  48. <body>
  49. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  50. <tr>
  51. <td>位置:<?=$url?></td>
  52. </tr>
  53. </table>
  54. <form name="form1" method="post" action="ListFeedbackF.php">
  55. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  56. <?=$ecms_hashur['form']?>
  57. <tr>
  58. <td height="25" colspan="2" class="header">增加/修改字段
  59. <input name="fid" type="hidden" id="fid" value="<?=$fid?>"> <input name="enews" type="hidden" id="enews" value="<?=$enews?>">
  60. <input name="oldfform" type="hidden" id="oldfform" value="<?=$r[fform]?>">
  61. <input name="oldf" type="hidden" id="oldf" value="<?=$r[f]?>"> <input name="oldfformsize" type="hidden" id="oldfformsize" value="<?=$r[fformsize]?>"></td>
  62. </tr>
  63. <tr bgcolor="#FFFFFF">
  64. <td width="25%" height="25">字段名</td>
  65. <td width="75%" height="25"><input name="f" type="text" id="f" value="<?=$r[f]?>">
  66. <font color="#666666">(比如:&quot;title&quot;)</font></td>
  67. </tr>
  68. <tr bgcolor="#FFFFFF">
  69. <td height="25">字段标识</td>
  70. <td height="25"><input name="fname" type="text" id="fname" value="<?=$r[fname]?>">
  71. <font color="#666666">(比如:&quot;标题&quot;)</font></td>
  72. </tr>
  73. <tr bgcolor="#FFFFFF">
  74. <td height="25">字段类型</td>
  75. <td height="25"><select name="ftype" id="select">
  76. <option value="VARCHAR"<?=$typeVARCHAR?>>字符型0-255字节(VARCHAR)</option>
  77. <option value="TEXT"<?=$typeTEXT?>>小型字符型(TEXT)</option>
  78. <option value="MEDIUMTEXT"<?=$typeMEDIUMTEXT?>>中型字符型(MEDIUMTEXT)</option>
  79. <option value="LONGTEXT"<?=$typeLONGTEXT?>>大型字符型(LONGTEXT)</option>
  80. <option value="TINYINT"<?=$typeTINYINT?>>小数值型(TINYINT)</option>
  81. <option value="SMALLINT"<?=$typeSMALLINT?>>中数值型(SMALLINT)</option>
  82. <option value="INT"<?=$typeINT?>>大数值型(INT)</option>
  83. <option value="BIGINT"<?=$typeBIGINT?>>超大数值型(BIGINT)</option>
  84. <option value="FLOAT"<?=$typeFLOAT?>>数值浮点型(FLOAT)</option>
  85. <option value="DOUBLE"<?=$typeDOUBLE?>>数值双精度型(DOUBLE)</option>
  86. </select>
  87. 字段长度
  88. <input name="flen" type="text" id="flen" value="<?=$r[flen]?>" size="6">
  89. </td>
  90. </tr>
  91. <tr bgcolor="#FFFFFF">
  92. <td rowspan="2">输入表单显示元素</td>
  93. <td height="25"><select name="fform" id="fform">
  94. <option value="text"<?=$formtext?>>单行文本框(text)</option>
  95. <option value="password"<?=$formpassword?>>密码框(password)</option>
  96. <option value="select"<?=$formselect?>>下拉框(select)</option>
  97. <option value="radio"<?=$formradio?>>单选框(radio)</option>
  98. <option value="checkbox"<?=$formcheckbox?>>复选框(checkbox)</option>
  99. <option value="textarea"<?=$formtextarea?>>多行文本框(textarea)</option>
  100. <option value="file"<?=$formfile?>>附件(file)</option>
  101. </select>
  102. 元素长度
  103. <input name="fformsize" type="text" id="fformsize" value="<?=$r[fformsize]?>" size="12">
  104. <font color="#666666">(空为按默认)</font> </td>
  105. </tr>
  106. <tr bgcolor="#FFFFFF">
  107. <td height="25"><font color="#666666">说明:长度如果是“多行文本框”,长度与行数用逗号格开,如“60,6”.</font></td>
  108. </tr>
  109. <tr bgcolor="#FFFFFF">
  110. <td height="25" valign="top">初始值<br>
  111. <font color="#666666"><span id="defvaldiv">(多个值用&quot;回车&quot;格开;<br>
  112. 默认选项后面加::default)</span></font></td>
  113. <td height="25"><textarea name="fvalue" cols="65" rows="8" id="fvalue" style="WIDTH: 100%"><?=str_replace("|","\r\n",$r[fvalue])?></textarea></td>
  114. </tr>
  115. <tr bgcolor="#FFFFFF">
  116. <td height="25">显示顺序</td>
  117. <td height="25"><input name="myorder" type="text" id="myorder" value="<?=$r[myorder]?>" size="6">
  118. <font color="#666666">(数字越小越前面)</font></td>
  119. </tr>
  120. <tr bgcolor="#FFFFFF">
  121. <td height="25" valign="top">注释:</td>
  122. <td height="25"><textarea name="fzs" cols="65" rows="10" id="fzs" style="WIDTH: 100%"><?=stripSlashes($r[fzs])?></textarea></td>
  123. </tr>
  124. <tr bgcolor="#FFFFFF">
  125. <td height="25">&nbsp;</td>
  126. <td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
  127. </tr>
  128. </table>
  129. </form>
  130. </body>
  131. </html>