2.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <?php
  2. if(!defined('InEmpireCMS'))
  3. {
  4. exit();
  5. }
  6. ?><script>
  7. function AddFj(str)
  8. {var r;
  9. var a;
  10. a=document.add.softfj.value;
  11. r=a.split(str);
  12. if(r.length!=1)
  13. {return true;}
  14. document.add.softfj.value+="/"+str;
  15. }
  16. function DelFj(str)
  17. {
  18. var a;
  19. a=document.add.softfj.value;
  20. document.add.softfj.value=a.replace("/"+str,"");
  21. }
  22. </script>
  23. <table width=100% align=center cellpadding=3 cellspacing=1 class="tableborder">
  24. <tr>
  25. <td width=16% height=25 bgcolor=ffffff>软件名称(*)</td>
  26. <td bgcolor=ffffff><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DBEAF5">
  27. <tr>
  28. <td height="25" bgcolor="#FFFFFF">
  29. <?=$tts?"<select name='ttid'><option value='0'>标题分类</option>$tts</select>":""?>
  30. <input type=text name=title value="<?=ehtmlspecialchars(stripSlashes($r[title]))?>" size="60">
  31. <input type="button" name="button" value="图文" onclick="document.add.title.value=document.add.title.value+'(图文)';">
  32. </td>
  33. </tr>
  34. <tr>
  35. <td height="25" bgcolor="#FFFFFF">属性:
  36. <input name="titlefont[b]" type="checkbox" value="b"<?=$titlefontb?>>粗体
  37. <input name="titlefont[i]" type="checkbox" value="i"<?=$titlefonti?>>斜体
  38. <input name="titlefont[s]" type="checkbox" value="s"<?=$titlefonts?>>删除线
  39. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;颜色: <input name="titlecolor" type="text" value="<?=stripSlashes($r[titlecolor])?>" size="10" class="color">
  40. </td>
  41. </tr>
  42. </table>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td width='16%' height=25 bgcolor='ffffff'>特殊属性</td>
  47. <td bgcolor='ffffff'>
  48. <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DBEAF5">
  49. <tr>
  50. <td height="25" bgcolor="#FFFFFF">信息属性:
  51. <input name="checked" type="checkbox" value="1"<?=$r[checked]?' checked':''?>>
  52. 审核 &nbsp;&nbsp; 推荐
  53. <select name="isgood" id="isgood">
  54. <option value="0">不推荐</option>
  55. <?=$ftnr['igname']?>
  56. </select>
  57. &nbsp;&nbsp; 头条
  58. <select name="firsttitle" id="firsttitle">
  59. <option value="0">非头条</option>
  60. <?=$ftnr['ftname']?>
  61. </select></td>
  62. </tr>
  63. <tr>
  64. <td height="25" bgcolor="#FFFFFF">关键字&nbsp;&nbsp;&nbsp;:
  65. <input name="keyboard" type="text" size="52" value="<?=stripSlashes($r[keyboard])?>">
  66. <font color="#666666">(多个请用&quot;,&quot;隔开)</font></td>
  67. </tr>
  68. <tr>
  69. <td height="25" bgcolor="#FFFFFF">外部链接:
  70. <input name="titleurl" type="text" value="<?=stripSlashes($r[titleurl])?>" size="52">
  71. <font color="#666666">(填写后信息连接地址将为此链接)</font></td>
  72. </tr>
  73. </table>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td width=16% height=25 bgcolor=ffffff>发布时间</td>
  78. <td bgcolor=ffffff><input name="newstime" type="text" value="<?=$r[newstime]?>" size="28" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss'})"><input type=button name=button value="设为当前时间" onclick="document.add.newstime.value='<?=$todaytime?>'">
  79. </td>
  80. </tr>
  81. <tr>
  82. <td width=16% height=25 bgcolor=ffffff>软件预览图</td>
  83. <td bgcolor=ffffff><input name="titlepic" type="text" id="titlepic" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[titlepic]))?>" size="45">
  84. <a onclick="window.open('ecmseditor/FileMain.php?type=1&classid=<?=$classid?>&infoid=<?=$id?>&filepass=<?=$filepass?>&sinfo=1&doing=1&field=titlepic<?=$ecms_hashur[ehref]?>','','width=700,height=550,scrollbars=yes');" title="选择已上传的图片"><img src="../data/images/changeimg.gif" border="0" align="absbottom"></a>
  85. </td>
  86. </tr>
  87. <tr>
  88. <td width=16% height=25 bgcolor=ffffff>软件作者</td>
  89. <td bgcolor=ffffff><input name="softwriter" type="text" id="softwriter" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[softwriter]))?>" size="60">
  90. </td>
  91. </tr>
  92. <tr>
  93. <td width=16% height=25 bgcolor=ffffff>厂商主页</td>
  94. <td bgcolor=ffffff><input name="homepage" type="text" id="homepage" value="<?=$ecmsfirstpost==1?"http://":ehtmlspecialchars(stripSlashes($r[homepage]))?>" size="60">
  95. </td>
  96. </tr>
  97. <tr>
  98. <td width=16% height=25 bgcolor=ffffff>系统演示</td>
  99. <td bgcolor=ffffff><input name="demo" type="text" id="demo" value="<?=$ecmsfirstpost==1?"http://":ehtmlspecialchars(stripSlashes($r[demo]))?>" size="60">
  100. </td>
  101. </tr>
  102. <tr>
  103. <td width=16% height=25 bgcolor=ffffff>运行环境</td>
  104. <td bgcolor=ffffff><input name="softfj" type="text" id="softfj" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[softfj]))?>" size="60">
  105. </td>
  106. </tr>
  107. <tr>
  108. <td height=25 bgcolor=ffffff>&nbsp;</td>
  109. <td bgcolor=ffffff><input type=checkbox name=check value='Win9X/Me' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  110. Win9X/Me&nbsp; <input type=checkbox name=check value='WinNT/2000/XP' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  111. WinNT/2000/XP&nbsp; <input type=checkbox name=check value='Unix' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  112. Unix&nbsp; <input type=checkbox name=check value='Linux' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  113. Linux&nbsp; <input type=checkbox name=check value='DOS' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  114. DOS&nbsp; <input type=checkbox name=check value='MAC OS' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  115. MAC OS&nbsp; <input type=checkbox name=check value='Other' onclick="if(this.checked){AddFj(this.value);}else{DelFj(this.value);}">
  116. Other</td>
  117. </tr>
  118. <tr>
  119. <td width=16% height=25 bgcolor=ffffff>软件属性</td>
  120. <td bgcolor=ffffff>软件语言:<select name="language" id="language"><option value="简体中文"<?=$r[language]=="简体中文"?' selected':''?>>简体中文</option><option value="繁体中文"<?=$r[language]=="繁体中文"?' selected':''?>>繁体中文</option><option value="英文"<?=$r[language]=="英文"?' selected':''?>>英文</option><option value="多国语言"<?=$r[language]=="多国语言"?' selected':''?>>多国语言</option></select>,软件类型:<select name="softtype" id="softtype"><option value="国产软件"<?=$r[softtype]=="国产软件"?' selected':''?>>国产软件</option><option value="汉化软件"<?=$r[softtype]=="汉化软件"?' selected':''?>>汉化软件</option><option value="国外软件"<?=$r[softtype]=="国外软件"?' selected':''?>>国外软件</option></select>,授权形式:<select name="softsq" id="softsq"><option value="共享软件"<?=$r[softsq]=="共享软件"?' selected':''?>>共享软件</option><option value="免费软件"<?=$r[softsq]=="免费软件"?' selected':''?>>免费软件</option><option value="自由软件"<?=$r[softsq]=="自由软件"?' selected':''?>>自由软件</option><option value="试用软件"<?=$r[softsq]=="试用软件"?' selected':''?>>试用软件</option><option value="演示软件"<?=$r[softsq]=="演示软件"?' selected':''?>>演示软件</option><option value="商业软件"<?=$r[softsq]=="商业软件"?' selected':''?>>商业软件</option></select>,软件评价:<select name="star" id="star"><option value="1"<?=$r[star]=="1"?' selected':''?>>1星</option><option value="2"<?=$r[star]=="2"||$ecmsfirstpost==1?' selected':''?>>2星</option><option value="3"<?=$r[star]=="3"?' selected':''?>>3星</option><option value="4"<?=$r[star]=="4"?' selected':''?>>4星</option><option value="5"<?=$r[star]=="5"?' selected':''?>>5星</option></select></td>
  121. </tr>
  122. <tr>
  123. <td width=16% height=25 bgcolor=ffffff>文件</td>
  124. <td bgcolor=ffffff>文件类型:<input name="filetype" type="text" id="filetype" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[filetype]))?>" size="">
  125. <select name="select2" onchange="document.add.filetype.value=this.value">
  126. <option value="">类型</option>
  127. <option value=".zip">.zip</option>
  128. <option value=".rar">.rar</option>
  129. <option value=".exe">.exe</option>
  130. </select>,文件大小:<input name="filesize" type="text" id="filesize" value="<?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[filesize]))?>" size="">
  131. <select name="select" onchange="document.add.filesize.value+=this.value">
  132. <option value="">单位</option>
  133. <option value=" MB">MB</option>
  134. <option value=" KB">KB</option>
  135. <option value=" GB">GB</option>
  136. <option value=" BYTES">BYTES</option>
  137. </select></td>
  138. </tr>
  139. <tr>
  140. <td width=16% height=25 bgcolor=ffffff>下载地址(*)</td>
  141. <td bgcolor=ffffff><script>
  142. function doadd()
  143. {var i;
  144. var str="";
  145. var oldi=0;
  146. var j=0;
  147. oldi=parseInt(document.add.editnum.value);
  148. for(i=1;i<=document.add.downnum.value;i++)
  149. {
  150. j=i+oldi;
  151. str=str+"<tr><td width=7%> <div align=center>"+j+"</div></td><td width=19%><div align=left><input name=downname[] type=text id=downname[] value=下载地址"+j+" size=17></div></td><td width=40%><input name=downpath[] type=text size=36 id=downpath"+j+" ondblclick=SpOpenChFile(0,'downpath"+j+"')><select name=thedownqz[]><option value=''>--地址前缀--</option><?=$newdownqz?></select></td><td width=21%><div align=center><select name=downuser[] id=select><option value=0>游客</option><?=$ygroup?></select></div></td><td width=13%><div align=center><input name=fen[] type=text id=fen[] value=0 size=6></div></td></tr>";
  152. }
  153. document.getElementById("adddown").innerHTML="<table width='100%' border=0 cellspacing=1 cellpadding=3>"+str+"</table>";
  154. }
  155. </script>
  156. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  157. <tr>
  158. <td height="25">下载地址前缀&nbsp;:
  159. <input name="downurl_qz" type="text" size="32">
  160. <select name="changeurl_qz" onchange="document.add.downurl_qz.value=document.add.changeurl_qz.value">
  161. <option value="" selected>选择前缀</option>
  162. <?=$downurlqz?>
  163. </select>
  164. </td>
  165. </tr>
  166. <tr>
  167. <td height="25">选择/上传附件:
  168. <input name="changedown_url" id="changedown_url" type="text" size="32">
  169. <input type="button" name="Submit" value="选择" onclick="window.open('ecmseditor/FileMain.php?type=0&classid=<?=$classid?>&infoid=<?=$id?>&filepass=<?=$filepass?>&sinfo=1&doing=1&field=changedown_url<?=$ecms_hashur[ehref]?>','','width=700,height=550,scrollbars=yes');">&nbsp;
  170. <input type="button" name="Submit" value="复制" onclick="document.getElementById('changedown_url').focus();document.getElementById('changedown_url').select();clipboardData.setData('text',document.getElementById('changedown_url').value);"></td>
  171. </tr>
  172. <tr>
  173. <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DBEAF5">
  174. <tr>
  175. <td width="7%"> <div align="center">编号</div></td>
  176. <td width="19%"><div align="left">下载名称</div></td>
  177. <td width="40%">下载地址 <font color="#666666">(双击选择)</font></td>
  178. <td width="21%"> <div align="center">权限</div></td>
  179. <td width="13%"> <div align="center">点数</div></td>
  180. </tr>
  181. </table></td>
  182. </tr>
  183. <tr>
  184. <td>
  185. <?php
  186. if($ecmsfirstpost==1)
  187. {
  188. ?>
  189. <table width='100%' border=0 cellspacing=1 cellpadding=3>
  190. <?php
  191. $editnum=3;
  192. for($pathi=1;$pathi<=$editnum;$pathi++)
  193. {
  194. ?>
  195. <tr>
  196. <td width='7%'> <div align=center><?=$pathi?></div></td>
  197. <td width='19%'> <div align=left>
  198. <input name=downname[] type=text value='下载地址<?=$pathi?>' size=17>
  199. </div></td>
  200. <td width='40%'>
  201. <input name=downpath[] type=text size=36 id='downpath<?=$pathi?>' ondblclick="SpOpenChFile(0,'downpath<?=$pathi?>');">
  202. <select name=thedownqz[]><option value=''>--地址前缀--</option><?=$newdownqz?></select>
  203. </td>
  204. <td width='21%'><div align=center>
  205. <select name=downuser[]>
  206. <option value=0>游客</option>
  207. <?=$ygroup?>
  208. </select>
  209. </div></td>
  210. <td width='13%'> <div align=center>
  211. <input name=fen[] type=text value=0 size=6>
  212. </div></td>
  213. </tr>
  214. <?php
  215. }
  216. ?>
  217. </table>
  218. <?php
  219. }
  220. else
  221. {
  222. $editnum=0;
  223. $downloadpath="";
  224. if($r[downpath])
  225. {
  226. $r[downpath]=stripSlashes($r[downpath]);
  227. //下载地址
  228. $j=0;
  229. $d_record=explode("\r\n",$r[downpath]);
  230. for($i=0;$i<count($d_record);$i++)
  231. {
  232. $j=$i+1;
  233. $d_field=explode("::::::",$d_record[$i]);
  234. //权限
  235. $tgroup=str_replace(" value=".$d_field[2].">"," value=".$d_field[2]." selected>",$ygroup);
  236. //地址前缀
  237. $tnewdownqz=str_replace(" value='".$d_field[4]."'>"," value='".$d_field[4]."' selected>",$newdownqz);
  238. $downloadpath.="<tr><td width='7%'><div align=center>".$j."</div></td><td width='19%'><div align=left><input name=downname[] type=text id=downname[] value='".$d_field[0]."' size=17></div></td><td width='40%'><input name=downpath[] type=text id=downpath".$j." value='".$d_field[1]."' size=36 ondblclick=\"SpOpenChFile(0,'downpath".$j."');\"><select name=thedownqz[]><option value=''>--地址前缀--</option>".$tnewdownqz."</select><input type=hidden name=pathid[] value=".$j."><input type=checkbox name=delpathid[] value=".$j.">删</td><td width='21%'><div align=center><select name=downuser[] id=select><option value=0>游客</option>".$tgroup."</select></div></td><td width='13%'><div align=center><input name=fen[] type=text id=fen[] value='".$d_field[3]."' size=6></div></td></tr>";
  239. }
  240. $editnum=$j;
  241. $downloadpath="<table width='100%' border=0 cellspacing=1 cellpadding=3>".$downloadpath."</table>";
  242. }
  243. echo $downloadpath;
  244. }
  245. ?>
  246. </td>
  247. </tr>
  248. <tr>
  249. <td height="25">下载地址扩展数量: <input name="editnum" type="hidden" id="editnum" value="<?=$editnum?>">
  250. <input name="downnum" type="text" id="downnum" value="1" size="6"> <input type="button" name="Submit5" value="输出地址" onclick="javascript:doadd();"></td>
  251. </tr>
  252. <tr>
  253. <td id=adddown></td>
  254. </tr>
  255. </table>
  256. </td>
  257. </tr>
  258. <tr>
  259. <td width=16% height=25 bgcolor=ffffff>软件简介(*)</td>
  260. <td bgcolor=ffffff><textarea name="softsay" cols="80" rows="10" id="softsay"><?=$ecmsfirstpost==1?"":ehtmlspecialchars(stripSlashes($r[softsay]))?></textarea>
  261. </td>
  262. </tr>
  263. </table>