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

article_coonepage_rule.php 4.4KB

преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /**
  3. * 文档规则采集
  4. *
  5. * @version $Id: article_coonepage_rule.php 1 14:12 2010年7月12日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. require_once(DEDEINC."/datalistcp.class.php");
  13. setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
  14. if (empty($action)) $action = '';
  15. /*------
  16. function _AddNote(){ }
  17. -------*/
  18. if ($action == 'add') {
  19. $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' ");
  20. if (is_array($row)) {
  21. echo "系统已经存在这个网址的条目";
  22. } else {
  23. $query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); ";
  24. $dsql->ExecuteNonequery($query);
  25. echo $dsql->GetError();
  26. }
  27. }
  28. /*------
  29. function _DelNote(){ }
  30. -------*/
  31. else if ($action == 'del') {
  32. if (!preg_match("#,#", $ids)) {
  33. $query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' ";
  34. } else {
  35. $query = "DELETE FROM `#@__co_onepage` WHERE id IN($ids) ";
  36. }
  37. $dsql->ExecuteNonequery($query);
  38. }
  39. /*------
  40. function _EditNote(){ }
  41. -------*/
  42. else if ($action == 'editsave') {
  43. $query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' ";
  44. $dsql->ExecuteNonequery($query);
  45. echo $dsql->GetError();
  46. }
  47. /*------
  48. function _EditNoteLoad(){ }
  49. -------*/
  50. else if ($action == 'editload') {
  51. $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' ");
  52. AjaxHead();
  53. ?>
  54. <form name='addform' action='article_coonepage_rule.php' method='post'>
  55. <input type='hidden' name='id' value='<?php echo $id; ?>' />
  56. <input type='hidden' name='action' value='editsave' />
  57. <table width="430" cellspacing="0" cellpadding="0">
  58. <tr>
  59. <td width="102" height="30">网站名称:</td>
  60. <td width="302"><input name="title" type="text" id="title" style="width:200px" value="<?php echo $row['title']; ?>" /></td>
  61. <td width="26" align="center"><a href="javascript:CloseEditNode()" class="mr-3"><img src="../static/web/img/close.gif"></a></td>
  62. </tr>
  63. <tr>
  64. <td height="30">原内容编码:</td>
  65. <td colspan="2">
  66. <label><input type="radio" name="lang" value="utf-8" <?php echo ($row['lang'] == 'utf-8' ? ' checked="checked" ' : ''); ?> />
  67. UTF-8</label>
  68. <label><input type="radio" name="lang" value="gb2312" <?php echo ($row['lang'] == 'gb2312' ? ' checked="checked" ' : ''); ?> />
  69. GB2312/GBK</label>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td height="30">用作文章来源:</td>
  74. <td colspan="2">
  75. <label><input type="radio" name="issource" value="0" <?php echo ($row['issource'] == 0 ? ' checked="checked" ' : ''); ?> />
  76. 否</label>
  77. <label><input name="issource" type="radio" value="1" <?php echo ($row['issource'] == 1 ? ' checked="checked" ' : ''); ?> />
  78. 是</label>
  79. </td>
  80. </tr>
  81. <tr>
  82. <td height="30">网站网址:</td>
  83. <td colspan="2">
  84. <input name="url" type="text" id="url" value="<?php echo $row['url']; ?>" style="width:200px" />
  85. </td>
  86. </tr>
  87. <tr>
  88. <td height="30"></td>
  89. <td colspan="2">
  90. 使用不带http及任何附加目录的网址<br>
  91. 如:news.dedebiz.com
  92. </td>
  93. </tr>
  94. <tr>
  95. <td height="30">采集规则:</td>
  96. <td colspan="2">仅针对文章内容,格式:前面HTML{@body}后面HMTL</td>
  97. </tr>
  98. <tr>
  99. <td height="90"></td>
  100. <td colspan="2"><textarea name="rule" style="width:300px;height:80px"><?php echo $row['rule']; ?></textarea></td>
  101. </tr>
  102. <tr>
  103. <td height="30"></td>
  104. <td colspan="2"><button class="btn btn-success btn-sm" type="submit" name="Submit" value="">保存规则</button>
  105. <button type="reset" class="btn btn-success btn-sm" name="Submit2">重置</button></td>
  106. </tr>
  107. </table>
  108. </form>
  109. <?php
  110. exit();
  111. } //loadedit
  112. /*---------------
  113. function _ShowLoad(){ }
  114. -------------*/
  115. $sql = "";
  116. $sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC";
  117. $dlist = new DataListCP();
  118. $dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm");
  119. $dlist->SetSource($sql);
  120. $dlist->Display();