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

413 lines
19KB

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