国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

369 líneas
17KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>发布软件文档</title>
  7. <link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/web/css/admin.css">
  10. <link rel="stylesheet" href="/static/web/css/daterangepicker.css">
  11. <link rel="stylesheet" href="/static/web/css/cropper.min.css">
  12. <script>const cfg_uplitpic_cut = '<?php echo $cfg_uplitpic_cut;?>';</script>
  13. <script src="/static/web/js/jquery.min.js"></script>
  14. <script src="/static/web/js/bootstrap.min.js"></script>
  15. <script src="/static/web/js/webajax.js"></script>
  16. <script src="/static/web/js/moment.min.js"></script>
  17. <script src="/static/web/js/daterangepicker.js"></script>
  18. <script src="/static/web/js/cropper.min.js"></script>
  19. <script src="/static/web/js/admin.main.js"></script>
  20. <script>
  21. var startNum = 2;
  22. function MakeUpload() {
  23. var upfield = document.getElementById("uploadfield");
  24. var endNum = parseInt(document.form1.picnum.value) + startNum;
  25. if (endNum > 30) endNum = 30;
  26. for (startNum; startNum <= endNum; startNum++) {
  27. upfield.innerHTML += "<div class='my-2'><label>软件网址" + startNum + ":<input type='text' name='softurl" + startNum + "' class='admin-input-lg'></label> <label>下载名称" + startNum + ":<input type='text' name='servermsg" + startNum + "' value='服务器" + startNum + "' class='admin-input-sm'></label> <button type='button' name='sel1' id='sel1' onclick=\"SelectSoft('form1.softurl" + startNum + "')\" class='btn btn-success btn-sm'>选择</button></div>";
  28. }
  29. }
  30. function ShowHideAddr() {
  31. document.getElementById('morelink').style.display = (document.getElementById('morelink').style.display == 'block' ? 'none' : 'block');
  32. document.getElementById('morelink').style.height = '100%';
  33. document.getElementById('btsh3').value = (document.getElementById('morelink').style.display == 'block' ? '隐藏网址' : '显示网址');
  34. }
  35. </script>
  36. </head>
  37. <body>
  38. <div class="container-fluid">
  39. <ol class="breadcrumb">
  40. <li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
  41. <li class="breadcrumb-item"><a href="catalog_do.php?cid=<?php echo $cid?>&channelid=<?php echo $channelid?>&dopost=listArchives">文档列表</a></li>
  42. <li class="breadcrumb-item active">发布软件文档</li>
  43. </ol>
  44. <div class="card shadow-sm">
  45. <div class="card-header">发布软件文档</div>
  46. <div class="card-body">
  47. <form name="form1" action="soft_add.php" method="post" enctype="multipart/form-data">
  48. <input type="hidden" name="dopost" value="save">
  49. <input type="hidden" name="channelid" value="<?php echo $channelid?>">
  50. <input type="hidden" name="cid" value="<?php echo $cid;?>">
  51. <div class="table-responsive">
  52. <table class="table table-borderless">
  53. <tbody>
  54. <tr>
  55. <td width="160">软件标题</td>
  56. <td width="650"><input type="text" name="title" id="title" class="admin-input-lg" required></td>
  57. <td width="160">简略标题</td>
  58. <td><input type="text" name="shorttitle" id="shorttitle" class="admin-input-sm"></td>
  59. </tr>
  60. <tr>
  61. <td>自定义属性</td>
  62. <td colspan="3">
  63. <?php
  64. $dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
  65. $dsql->Execute();
  66. while($trow = $dsql->GetObject())
  67. {
  68. if ($trow->att=='j')
  69. echo "<label><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' onclick='ShowUrlTr()'> {$trow->attname}[{$trow->att}]</label> ";
  70. else
  71. echo "<label><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> ";
  72. }
  73. ?>
  74. </td>
  75. </tr>
  76. <tr id="redirecturltr" style="display:none">
  77. <td>跳转网址</td>
  78. <td colspan="3"><input type="text" name="redirecturl" id="redirecturl" class="admin-input-lg"></td>
  79. </tr>
  80. <tr>
  81. <td>标签</td>
  82. <td><input type="text" name="tags" id="tags" onChange="$Obj('keywords').value=this.value;" class="admin-input-lg">(英文逗号隔开,如:DedeBIZ,得德)</td>
  83. <td>权重</td>
  84. <td><input type="text" name="weight" id="weight" value="<?php echo $maxWright['cc'];?>" class="admin-input-sm">(越小越靠前)</td>
  85. </tr>
  86. <tr id="pictable">
  87. <td>缩略图</td>
  88. <td colspan="3">
  89. <input type="text" name="picname" id="picname" class="admin-input-lg">
  90. <label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程图片</label>
  91. <span class="btn btn-success btn-sm opt-button">上传<input type="file" name="files[]" id="iptAddImages"></span>
  92. <button type="button" onclick="SelectImage('form1.picname','');" class="btn btn-success btn-sm">选择</button>
  93. <button type="button" id="btnClearAll" class="btn btn-success btn-sm">清空</button>
  94. <img src="/static/web/img/thumbnail.jpg" id="litPic" class="thumbnail-md ml-3">
  95. </td>
  96. </tr>
  97. <tr>
  98. <td>来源</td>
  99. <td>
  100. <input type="text" name="source" id="source" class="admin-input-sm">
  101. <button type="button" name="selsource" id="selsource" class="btn btn-success btn-sm">选择</button>
  102. </td>
  103. <td>编辑</td>
  104. <td>
  105. <input type="text" name="writer" id="writer" class="admin-input-sm">
  106. <button type="button" name="selwriter" id="selwriter" class="btn btn-success btn-sm">选择</button>
  107. </td>
  108. </tr>
  109. <tr>
  110. <td>发布栏目</td>
  111. <td>
  112. <span id="typeidct">
  113. <?php
  114. $typeOptions = GetOptionList($cid,$cuserLogin->getUserChannel(),$channelid);
  115. echo "<select name='typeid' id='typeid' class='admin-input-sm'>";
  116. echo "<option value='0'>请选择文档栏目</option>";
  117. echo $typeOptions;
  118. echo "</select>";
  119. ?>
  120. </span>
  121. <a href="javascript:ShowCatMap(event,this,<?php echo $channelid;?>,'typeid');" class="btn btn-success btn-sm">选择</a>
  122. <?php if ($cfg_need_typeid2=='Y') {echo "<a href='javascript:AddTypeid2();' class='btn btn-success btn-sm'>副栏目</a>";}?>
  123. </td>
  124. <td>金币</td>
  125. <td><input type="text" name="needmoney" id="needmoney" value="<?php echo $softconfig['dfywboy'];?>" class="admin-input-sm"></td>
  126. </tr>
  127. <tr id="typeid2tr" style="display:none">
  128. <td>副栏目</td>
  129. <td colspan="3">
  130. <span id="typeid2ct"></span>
  131. <input type="text" name="typeid2" id="typeid2" class="admin-input-sm">
  132. <a href="javascript:ShowCatMap(event,this,<?php echo $channelid;?>,'typeid2');" class="btn btn-success btn-sm">选择</a>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td>关键词</td>
  137. <td colspan="3">
  138. <input type="text" name="keywords" id="keywords" class="admin-input-lg">
  139. <label><input type="checkbox" name="autokey" onclick="ShowHide('keywords');" id="autokey" value="1" <?php if ($cfg_arc_autokeyword=='Y') echo 'checked';?>> 自动获取</label>
  140. <button type="button" class="btn btn-success btn-sm" onclick="SelectKeywords('form1.keywords');">选择</button>
  141. </td>
  142. </tr>
  143. <tr>
  144. <td>描述</td>
  145. <td colspan="3"><textarea name="description" id="description" class="admin-textarea-sm"></textarea></td>
  146. </tr>
  147. <tr>
  148. <td>附加选项</td>
  149. <td colspan="3">
  150. <label><input type="checkbox" name="remote" id="remote" value="1" <?php if ($cfg_rm_remote=='Y') echo 'checked';?>> 下载远程图片和资源</label>
  151. <label><input type="checkbox" name="dellink" id="dellink" value="1" <?php if ($cfg_arc_dellink=='Y') echo 'checked';?>> 删除非站内链接</label>
  152. <a href="javascript:OpenMyWin('article_allowurl_edit.php');">[配置]</a>
  153. <label><input type="checkbox" name="autolitpic" id="autolitpic" value="1" <?php if ($cfg_arc_autopic=='Y') echo 'checked';?>> 提取第一个图片为缩略图</label>
  154. </td>
  155. </tr>
  156. <tr>
  157. <td>运行环境</td>
  158. <td><input type="text" name="os" value="win7,win10,win11" class="admin-input-lg"></td>
  159. <td>文件类型</td>
  160. <td>
  161. <select name="filetype" id="filetype" class="admin-input-sm">
  162. <option value=".exe" selected>.exe</option>
  163. <option value=".zip">.zip</option>
  164. <option value=".rar">.rar</option>
  165. <option value=".iso">.iso</option>
  166. <option value=".gz">.gz</option>
  167. <option value="其它">其它</option>
  168. </select>
  169. </td>
  170. </tr>
  171. <tr>
  172. <td>软件等级</td>
  173. <td>
  174. <select name="softrank" id="softrank" class="admin-input-sm">
  175. <option value="1">一星</option>
  176. <option value="2">二星</option>
  177. <option value="3" selected>三星 </option>
  178. <option value="4">四星</option>
  179. <option value="5">五星</option>
  180. </select>
  181. </td>
  182. <td>软件属性</td>
  183. <td>
  184. <select name="softtype" id="softtype" class="admin-input-sm">
  185. <option value="国产软件" selected>国产软件</option>
  186. <option value="国外软件">国外软件</option>
  187. <option value="汉化补丁">汉化补丁</option>
  188. </select>
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>界面语言</td>
  193. <td>
  194. <select name="language" id="language" class="admin-input-sm">
  195. <option value="简体中文" selected>简体中文</option>
  196. <option value="英文软件">英文软件</option>
  197. <option value="繁体中文">繁体中文</option>
  198. <option value="其它类型">其它类型</option>
  199. </select>
  200. </td>
  201. <td>授权方式</td>
  202. <td>
  203. <select name="accredit" id="accredit" class="admin-input-sm">
  204. <option value="共享软件" selected>共享软件</option>
  205. <option value="免费软件">免费软件</option>
  206. <option value="开源软件">开源软件</option>
  207. <option value="商业软件">商业软件</option>
  208. <option value="破解软件">破解软件</option>
  209. <option value="游戏外挂">游戏外挂</option>
  210. </select>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td>官方网址</td>
  215. <td><input type="text" name="officialUrl" id="officialUrl" class="admin-input-lg" placeholder="请输入演示网址http开头"></td>
  216. <td>演示网址</td>
  217. <td><input type="text" name="officialDemo" id="officialDemo" class="admin-input-lg" placeholder="请填写演示网址"></td>
  218. </tr>
  219. <tr>
  220. <td>软件大小</td>
  221. <td>
  222. <input type="text" name="softsize" id="softsize" class="admin-input-sm">
  223. <select name="unit" id="unit">
  224. <option value="MB" selected>MB</option>
  225. <option value="KB">KB</option>
  226. <option value="GB">GB</option>
  227. </select>
  228. <label><input type="checkbox" name="autosize" id="autosize" value="1" checked> 自动获取</label>
  229. </td>
  230. <td>需会员权限</td>
  231. <td>
  232. <select name="daccess" id="daccess" class="admin-input-sm">
  233. <?php
  234. $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank` >= 0 ");
  235. $dsql->Execute();
  236. while($row = $dsql->GetArray())
  237. {
  238. if ($row['rank']==0) $row['membername'] = "不限会员";
  239. if ($row['rank'] == $softconfig['dfrank']) echo "<option value='{$row['rank']}' selected>{$row['membername']}</option>";
  240. else echo "<option value='{$row['rank']}'>{$row['membername']}</option>";
  241. }
  242. ?>
  243. </select>
  244. <a href="soft_config.php" class="btn btn-success btn-sm">软件下载设置</a>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td>本地上传</td>
  249. <td>
  250. <input type="text" name="softurl1" id="softurl1" class="admin-input-lg">
  251. <button type="button" name="sel1" id="sel1" class="btn btn-success btn-sm" onclick="SelectSoft('form1.softurl1')">选择</button>
  252. </td>
  253. <td>下载名称</td>
  254. <td><input type="text" name="servermsg1" id="servermsg1" value="本地下载" class="admin-input-sm"></td>
  255. </tr>
  256. <tr>
  257. <td>链接上传</td>
  258. <td colspan="3">
  259. <input type="text" name="picnum" id="picnum" value="5" class="admin-input-sm">
  260. <button type="button" class="btn btn-success btn-sm" onclick="MakeUpload();">添加网址</button>
  261. <button type="button" class="btn btn-success btn-sm" onclick="ShowHideAddr();">隐藏网址</button>
  262. <div id="morelink">
  263. <div id="uploadfield"></div>
  264. </div>
  265. </td>
  266. </tr>
  267. <?php if ($softconfig['moresitedo'] == 0 && trim($softconfig['sites']) != '') {?>
  268. <tr>
  269. <td>镜像上传</td>
  270. <td colspan="3">
  271. <?php
  272. $sites = explode("\n", $softconfig['sites']);
  273. $startNum = 2;
  274. foreach($sites as $site)
  275. {
  276. $site = trim($site);
  277. if (empty($site)) continue;
  278. list($siteurl, $sitename) = explode('|', $site);
  279. $siteurl = trim($siteurl);
  280. $sitename = trim($sitename);
  281. ?>
  282. <div class="my-2">
  283. <input type="hidden" name="forconfig<?php echo $startNum;?>" value="1">
  284. <label>镜像域名:<input type="text" name="softurlfirst<?php echo $startNum;?>" class="admin-input-lg" value="<?php echo $siteurl;?>"></label>
  285. <label>镜像目录:<input type="text" name="softurl<?php echo $startNum;?>" class="admin-input-sm"></label>
  286. <label>镜像名称:<input type="text" name="servermsg<?php echo $startNum;?>" class="admin-input-sm" value="<?php echo $sitename;?>"></label>
  287. <label><input type="checkbox" name="need<?php echo $startNum;?>" value="1"> 启用</label>
  288. </div>
  289. <?php
  290. $startNum++;
  291. }
  292. echo "<script>startNum = $startNum;</script>";
  293. ?>
  294. </td>
  295. </tr>
  296. <?php }?>
  297. <?php PrintAutoFieldsAdd($cInfos['fieldset'],'autofield');?>
  298. <tr>
  299. <td colspan="4"><?php GetEditor('body','',350,'Small');?></td>
  300. </tr>
  301. <tr>
  302. <td>评论选项</td>
  303. <td>
  304. <label><input type="radio" name="notpost" value="0" <?php if ($cfg_feedback_forbid=='N') echo 'checked';?>> 允许评论</label>
  305. <label><input type="radio" name="notpost" value="1" <?php if ($cfg_feedback_forbid=='Y') echo 'checked';?>> 禁止评论</label>
  306. </td>
  307. <td>发布选项</td>
  308. <td>
  309. <label><input type="radio" name="ishtml" value="1" checked> 静态浏览</label>
  310. <label><input type="radio" name="ishtml" value="0"> 动态浏览</label>
  311. </td>
  312. </tr>
  313. <tr>
  314. <td>文档排序</td>
  315. <td>
  316. <select name="sortup" id="sortup" class="admin-input-sm">
  317. <option value="0" selected>默认排序</option>
  318. <option value="7">置顶一周</option>
  319. <option value="30">置顶一个月</option>
  320. <option value="90">置顶三个月</option>
  321. <option value="180">置顶半年</option>
  322. <option value="360">置顶一年</option>
  323. </select>
  324. </td>
  325. <td>标题颜色</td>
  326. <td>
  327. <input type="text" name="color" id="color" class="admin-input-sm">
  328. <button type="button" name="modcolor" id="modcolor" class="btn btn-success btn-sm" onclick="ShowColor(event,this)">选择</button>
  329. </td>
  330. </tr>
  331. <tr>
  332. <td>浏览权限</td>
  333. <td>
  334. <select name="arcrank" id="arcrank" class="admin-input-sm">
  335. <option value="0">已审核状态</option>
  336. <option value="-1">待审核状态</option>
  337. </select>
  338. <span>(暂不支持静态)</span>
  339. </td>
  340. <td>文件名称</td>
  341. <td><input type="text" name="filename" id="filename" class="admin-input-sm">(不包括文件扩展名)</td>
  342. </tr>
  343. <tr>
  344. <td>发布时间</td>
  345. <td>
  346. <?php
  347. $nowtime = GetDateTimeMk(time());
  348. echo "<input type='text' name='pubdate' value='$nowtime' id='pubdate' class='datepicker admin-input-sm'>";
  349. ?>
  350. </td>
  351. <td>浏览次数</td>
  352. <td><input type="text" name="click" value="<?php echo ($cfg_arc_click=='-1' ? mt_rand(1000, 6000):$cfg_arc_click);?>" class="admin-input-sm"></td>
  353. </tr>
  354. <tr>
  355. <td colspan="4" align="center">
  356. <button type="submit" class="btn btn-success btn-sm">保存</button>
  357. <button type="reset" class="btn btn-outline-success btn-sm">重置</button>
  358. </td>
  359. </tr>
  360. </tbody>
  361. </table>
  362. </div>
  363. </form>
  364. </div>
  365. </div>
  366. </div>
  367. <script>InitPage();</script>
  368. </body>
  369. </html>