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

393 lines
18KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="<?php echo $cfg_soft_lang; ?>">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>增加文章</title>
  7. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="../static/web/font/css/font-awesome.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/jquery.fileupload.css">
  12. <link rel="stylesheet" href="../static/web/css/cropper.min.css">
  13. <script>const cfg_uplitpic_cut = '<?php echo $cfg_uplitpic_cut; ?>';</script>
  14. <script src="../static/web/js/jquery.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="js/main.js"></script>
  19. <script src="js/handlers.js"></script>
  20. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  21. <script src="../static/web/js/cropper.min.js"></script>
  22. <script>
  23. var arctype = 'article';
  24. function checkSubmit() {
  25. if (document.form1.title.value == '') {
  26. ShowMsg('文章标题不能为空');
  27. return false;
  28. }
  29. if (document.form1.typeid.value == 0) {
  30. ShowMsg('请选择档案的主类别');
  31. return false;
  32. }
  33. }
  34. </script>
  35. </head>
  36. <body>
  37. <table width="98%" align="center" cellpadding="0" cellspacing="0" class="mt-3 mb-3">
  38. <tr>
  39. <td width="70%"><i class="fa fa-map"></i> <a href="catalog_do.php?cid=<?php echo $cid?>&channelid=<?php echo $channelid?>&dopost=listArchives">文章列表</a> &gt; 发布文章</td>
  40. <td width="30%" align="right"><?php echo $backurl; ?><a class="btn btn-success btn-sm" href="catalog_main.php">栏目管理</a></td>
  41. </tr>
  42. </table>
  43. <table width="98%" align="center" cellpadding="0" cellspacing="0" id="head1">
  44. <tr>
  45. <td colspan="2">
  46. <table width="900" cellpadding="0" cellspacing="0">
  47. <tr>
  48. <td width="80" height="28" align="center" bgcolor="#fbfce2">常规信息</td>
  49. <td><a href="javascript:;" class="btn btn-success btn-sm" onClick="ShowHide('getone')">单页采集</a></td>
  50. </tr>
  51. </table>
  52. </td>
  53. </tr>
  54. </table>
  55. <table width="98%" align="center" cellpadding="0" cellspacing="0" id="getone" class="table table-borderless" style="<?php if(empty($geturl)) echo 'display:none'; ?>;margin:0">
  56. <form name="getonepage" action="article_add.php" method="get">
  57. <input type="hidden" name="channelid" value="<?php echo $channelid; ?>">
  58. <input type="hidden" name="cid" value="<?php echo $cid; ?>">
  59. <tr>
  60. <td colspan="2">
  61. <table width="100%" cellpadding="0" cellspacing="0">
  62. <tr>
  63. <td width="96">采集单页:</td>
  64. <td width="270" align="center"><input type="text" name="geturl" id="geturl" value="<?php echo $geturl; ?>" style="width:260px"></td>
  65. <td>
  66. <button type="submit" class="btn btn-success btn-sm" name="Submit3">抓取</button>
  67. <button type="button" class="btn btn-success btn-sm" name="setrule" onClick="OpenMyWinCoOne('article_coonepage_rule.php')">规则管理</button>
  68. </td>
  69. </tr>
  70. </table>
  71. </td>
  72. </tr>
  73. </form>
  74. </table>
  75. <form name="form1" action="article_add.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
  76. <input type="hidden" name="channelid" value="<?php echo $channelid?>">
  77. <input type="hidden" name="dopost" value="save">
  78. <table width="98%" align="center" cellpadding="2" cellspacing="2" id="needset" class="biz-border">
  79. <tr>
  80. <td colspan="5" class="bline">
  81. <table width="900" cellspacing="0" cellpadding="0">
  82. <tr>
  83. <td width="90"> 文章标题:</td>
  84. <td width="400"><input type="text" name="title" id="title" value="<?php echo $title; ?>" style="width:390px"></td>
  85. <td width="90"> 简略标题:</td>
  86. <td><input type="text" name="shorttitle" id="shorttitle" style="width:160px"></td>
  87. </tr>
  88. </table>
  89. </td>
  90. </tr>
  91. <tr>
  92. <td colspan="5" class="bline">
  93. <table width="900" cellspacing="0" cellpadding="0">
  94. <tr>
  95. <td width="90"> 自定义属性:</td>
  96. <td align="left">
  97. <?php
  98. $dsql->SetQuery("Select * From `#@__arcatt` order by sortid asc");
  99. $dsql->Execute();
  100. while($trow = $dsql->GetObject())
  101. {
  102. if($trow->att=='j')
  103. echo "<label class='mr-1'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' onclick='ShowUrlTr()'> {$trow->attname}[{$trow->att}]</label>";
  104. else
  105. echo "<label class='mr-1'><input type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label>";
  106. }
  107. ?>
  108. </td>
  109. </tr>
  110. </table>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td colspan="5" class="bline" id="redirecturltr" style="display:none">
  115. <table width="900" cellspacing="0" cellpadding="0">
  116. <tr>
  117. <td width="90"> 跳转网址:</td>
  118. <td><input type="text" name="redirecturl" id="redirecturl" value="" style="width:300px"></td>
  119. </tr>
  120. </table>
  121. </td>
  122. </tr>
  123. <tr>
  124. <td width="100%" colspan="2" class="bline">
  125. <table width="900" cellspacing="0" cellpadding="0">
  126. <tr>
  127. <td width="90"> Tag标签:</td>
  128. <td><input type="text" name="tags"id="tags" value="" onChange="$Obj('keywords').value=this.value;" style="width:300px">(','号分开,单个标签小于12字节)</td>
  129. <td width="60">权重:</td>
  130. <td><input type="text" name="weight" id="weight" value="<?php echo $maxWright['cc']; ?>" style="width:60px">(越小越靠前)</td>
  131. </tr>
  132. </table>
  133. </td>
  134. </tr>
  135. <tr id="pictable">
  136. <td colspan="5" class="bline">
  137. <table width="900" cellspacing="0" cellpadding="0">
  138. <tr>
  139. <td width="90"> 缩略图:</td>
  140. <td>
  141. <input type="text" name="picname" id="picname" style="width:300px">
  142. <label><input type="checkbox" name="ddisremote" value="1" id="ddisremote"> 远程</label>
  143. <span class="btn btn-success btn-sm fileinput-button">上传图片<input type="file" name="files[]" id="iptAddImages"></span>
  144. <button type="button" name="Submit2" onClick="SelectImage('form1.picname','small');" class="btn btn-success btn-sm">选择图片</button>
  145. <button type="button" id="btnClearAll" class="btn btn-success btn-smete">清空</button>
  146. </td>
  147. <td align="center"><img src="../static/web/img/defaultpic.jpg" id="litPic" class="thumbnail"></td>
  148. </tr>
  149. </table>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td colspan="5" class="bline">
  154. <table width="900" cellspacing="0" cellpadding="0">
  155. <tr>
  156. <td width="90"> 来源:</td>
  157. <td width="260">
  158. <input type="text" name="source" id="source" value="<?php echo $source; ?>" style="width:160px">
  159. <button type="button" name="selsource" id="selsource" class="btn btn-success btn-sm">选择</button>
  160. </td>
  161. <td width="60"> 作者:</td>
  162. <td>
  163. <input type="text" name="writer" id="writer" value="<?php echo $writer; ?>" style="width:160px">
  164. <button type="button" name="selwriter" id="selwriter" class="btn btn-success btn-sm">选择</button>
  165. </td>
  166. </tr>
  167. </table>
  168. </td>
  169. </tr>
  170. <tr>
  171. <td colspan="5" class="bline">
  172. <table width="900" cellspacing="0" cellpadding="0">
  173. <tr>
  174. <td width="90"> 发布栏目:</td>
  175. <td width="360">
  176. <span id="typeidct">
  177. <?php
  178. $typeOptions = GetOptionList($cid,$cuserLogin->getUserChannel(),$channelid);
  179. echo "<select name='typeid' id='typeid' style='width:160px'>";
  180. echo "<option value='0'>请选择栏目</option>";
  181. echo $typeOptions;
  182. echo "</select>";
  183. ?>
  184. </span>
  185. <i class='btn btn-sm fa fa-search' style="cursor:pointer" onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid')" title="快捷选择"></i>
  186. <?php
  187. if($cfg_need_typeid2=='Y')
  188. {
  189. echo "<a href='javascript:AddTypeid2();' class='btn btn-success btn-sm'>选择副栏目</a>";
  190. }
  191. ?>
  192. </td>
  193. <td width="90">消费金币:</td>
  194. <td><input type="text" name="money" id="money" value="0" style="width:160px"></td>
  195. </tr>
  196. </table>
  197. </td>
  198. </tr>
  199. <tr id="typeid2tr" style="display:none">
  200. <td colspan="5" class="bline">
  201. <table width="900" cellspacing="0" cellpadding="0">
  202. <tr>
  203. <td width="90"> 副栏目:</td>
  204. <td>
  205. <span id="typeid2ct"></span>
  206. <input type="text" name="typeid2" id="typeid2" value="" style="width:260px">
  207. <i class="btn btn-sm fa fa-search" style="cursor:pointer" onClick="ShowCatMap(event,this,<?php echo $channelid; ?>,'typeid2')" title="选择副栏目"></i>
  208. </td>
  209. </tr>
  210. </table>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td colspan="5" class="bline">
  215. <table width="900" cellspacing="0" cellpadding="0">
  216. <tr>
  217. <td width="90"> 关键词:</td>
  218. <td>
  219. <input type="text" name="keywords" id="keywords" value="<?php echo $keywords; ?>" style="width:360px">
  220. <button type="button" name="Submit" onClick="SelectKeywords('form1.keywords');" class="btn btn-success btn-sm">浏览</button>
  221. </td>
  222. <td>
  223. <label><input type="checkbox" name="autokey" onClick="ShowHide('keywords');" id="autokey" value="1" <?php if($cfg_arc_autokeyword=='Y') echo 'checked="1"'; ?>> 自动获取,手动填写用","分开</label>
  224. </td>
  225. </tr>
  226. </table>
  227. </td>
  228. </tr>
  229. <tr>
  230. <td colspan="5" class="bline">
  231. <table width="900" cellspacing="0" cellpadding="0">
  232. <tr>
  233. <td width="90"> 描述:</td>
  234. <td><textarea name="description" id="description" style="width:360px;height:50px"><?php echo $description; ?></textarea></td>
  235. </tr>
  236. </table>
  237. </td>
  238. </tr>
  239. <tr>
  240. <td width="100%" colspan="2" class="bline">
  241. <table width="900" cellspacing="0" cellpadding="0">
  242. <tr>
  243. <td width="90"> 附加选项:</td>
  244. <td>
  245. <label><input type="checkbox" name="remote" id="remote" value="1" <?php if($cfg_rm_remote=='Y') echo 'checked="1"'; ?>> 下载远程图片和资源</label>
  246. <label><input type="checkbox" name="dellink" id="dellink" value="1" <?php if($cfg_arc_dellink=='Y') echo 'checked="1"'; ?>> 删除非站内链接</label>
  247. <a href="javascript:OpenMyWin('article_allowurl_edit.php')" class="btn btn-success btn-sm">设置</a>
  248. <label><input type="checkbox" name="autolitpic" id="autolitpic" value="1" <?php if($cfg_arc_autopic=='Y') echo 'checked="1"'; ?>> 提取第一个图片为缩略图</label>
  249. <label><input type="checkbox" name="needwatermark" value="1" <?php if($photo_markup=='1') echo "checked"; ?>> 图片是否加水印</label>
  250. </td>
  251. </tr>
  252. </table>
  253. </td>
  254. </tr>
  255. <tr>
  256. <td width="100%" colspan="2" class="bline">
  257. <table width="900" cellspacing="0" cellpadding="0">
  258. <tr>
  259. <td width="90"> 分页方式:</td>
  260. <td>
  261. <label><input type="radio" name="sptype" value="hand" <?php if($cfg_arcautosp=='N') echo "checked='1'"?>> 手动</label>
  262. <label><input type="radio" name="sptype" value="auto" <?php if($cfg_arcautosp=='Y') echo "checked='1'"?>> 自动</label>
  263. 大小:<input name="spsize" type="text" id="spsize" value="<?php echo $cfg_arcautosp_size?>" style="width:60px"> K(分页符为:#p#分页标题#e#)
  264. </td>
  265. </tr>
  266. </table>
  267. </td>
  268. </tr>
  269. <tr>
  270. <td colspan="2"><?php PrintAutoFieldsAdd(stripslashes($cInfos['fieldset']),'autofield'); ?></td>
  271. </tr>
  272. <tr>
  273. <td class="bline"><?php GetEditor("body",$body,450); ?></td>
  274. <td id="mPic" style="display:none"></td>
  275. </tr>
  276. <tr>
  277. <td colspan="4" class="bline">
  278. <table width="900" cellspacing="0" cellpadding="0">
  279. <tr>
  280. <td width="90"> 评论选项:</td>
  281. <td width="260">
  282. <label><input type="radio" name="notpost" value="0" <?php if($cfg_feedback_forbid=='N') echo "checked='1'"; ?>> 允许评论</label>
  283. <label><input type="radio" name="notpost" value="1" <?php if($cfg_feedback_forbid=='Y') echo "checked='1'"; ?>> 禁止评论</label>
  284. </td>
  285. <td width="90">发布选项:</td>
  286. <td>
  287. <label><input type="radio" name="ishtml" value="1" checked="1"> 生成网页</label>
  288. <label><input type="radio" name="ishtml" value="0"> 仅动态浏览</label>
  289. </td>
  290. </tr>
  291. </table>
  292. </td>
  293. </tr>
  294. <tr>
  295. <td colspan="4" class="bline">
  296. <table width="900" cellspacing="0" cellpadding="0">
  297. <tr>
  298. <td width="90"> 文章排序:</td>
  299. <td width="260">
  300. <select name="sortup" id="sortup" style="width:160px">
  301. <option value="0" selected>默认排序</option>
  302. <option value="7">置顶一周</option>
  303. <option value="30">置顶一个月</option>
  304. <option value="90">置顶三个月</option>
  305. <option value="180">置顶半年</option>
  306. <option value="360">置顶一年</option>
  307. </select> </td>
  308. <td width="90">标题颜色:</td>
  309. <td>
  310. <input type="text" name="color" id="color" style="width:160px">
  311. <button type="button" name="modcolor" id="modcolor" class="btn btn-success btn-sm" onClick="ShowColor(event, this)">选取</button>
  312. </td>
  313. </tr>
  314. </table>
  315. </td>
  316. </tr>
  317. <tr>
  318. <td colspan="4" class="bline">
  319. <table width="900" cellspacing="0" cellpadding="0">
  320. <tr>
  321. <td width="90"> 阅读权限:</td>
  322. <td width="260">
  323. <select name="arcrank" id="arcrank" style="width:160px">
  324. <?php
  325. $urank = $cuserLogin->getUserRank();
  326. $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank'");
  327. $dsql->Execute();
  328. while($row = $dsql->GetObject())
  329. {
  330. echo "<option value='".$row->rank."'>".$row->membername."</option>";
  331. }
  332. ?>
  333. </select>
  334. </td>
  335. <td width="90">文件名称:</td>
  336. <td><input type="text" name="filename" id="filename" style="width:160px">(不包括后缀名如.html等)</td>
  337. <td>
  338. <?php
  339. if(isset($cfg_tamplate_rand) && $cfg_tamplate_rand==1)
  340. {
  341. ?>
  342. 随机选择模板:
  343. <select name="templet" id="templet" style="width:120px">
  344. <?php
  345. $rndsel = mt_rand(1, count($cfg_tamplate_arr)) - 1;
  346. foreach($cfg_tamplate_arr as $k=>$v)
  347. {
  348. $v = trim($v);
  349. echo ($k==$rndsel ? "<option value='$v' selected>$v</option>" : "<option value='$v'>$v</option>");
  350. }
  351. ?>
  352. </select>
  353. <?php
  354. } else {
  355. echo "<input type='hidden' name='templet' value=''>";
  356. }
  357. ?>
  358. </td>
  359. </tr>
  360. </table>
  361. </td>
  362. </tr>
  363. <tr>
  364. <td colspan="4" class="bline">
  365. <table width="900" cellspacing="0" cellpadding="0">
  366. <tr>
  367. <td width="90"> 发布时间:</td>
  368. <td width="260">
  369. <?php
  370. $nowtime = GetDateTimeMk(time());
  371. echo "<input type='text' name='pubdate' value='$nowtime'id='pubdate' class='datepicker' style='width:160px'>";
  372. ?>
  373. </td>
  374. <td width="90">浏览次数:</td>
  375. <td><input type="text" name="click" value="<?php echo ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click); ?>" style="width:160px"></td>
  376. </tr>
  377. </table>
  378. </td>
  379. </tr>
  380. </table>
  381. <table width="98%" cellspacing="0" cellpadding="0" align="center" bgcolor="#f8f8f8" class="biz-border border-top-0 mb-3">
  382. <tr>
  383. <td align="center" class="py-2">
  384. <button type="submit" class="btn btn-success">保存</button>
  385. <button type="button" onClick="location.reload();" class="btn btn-success">重置</button>
  386. </td>
  387. </tr>
  388. </table>
  389. </form>
  390. <div id="__tmpbody" style="display:none"></div>
  391. <script>InitPage();</script>
  392. </body>
  393. </html>