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

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