国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

article_coonepage_rule.php 4.1KB

2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. /**
  3. * 文档规则采集
  4. *
  5. * @version $id:article_coonepage_rule.php 14:12 2010年7月12日 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="90">网站名称:</td>
  60. <td width="270"><input type="text" name="title" id="title" class="biz-input-md" value="<?php echo $row['title'];?>"></td>
  61. </tr>
  62. <tr>
  63. <td>原内容编码:</td>
  64. <td colspan="2">
  65. <label><input type="radio" name="lang" value="utf-8" <?php echo ($row['lang'] == 'utf-8' ? 'checked="checked"' : '');?>> UTF-8</label>
  66. <label><input type="radio" name="lang" value="gb2312" <?php echo ($row['lang'] == 'gb2312' ? 'checked="checked"' : '');?>> GB2312/GBK</label>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>用作文档来源:</td>
  71. <td colspan="2">
  72. <label><input type="radio" name="issource" value="0" <?php echo ($row['issource'] == 0 ? 'checked="checked"' : '');?>> 否</label>
  73. <label><input type="radio" name="issource" value="1" <?php echo ($row['issource'] == 1 ? 'checked="checked"' : '');?>> 是</label>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>网站网址:</td>
  78. <td colspan="2"><input type="text" name="url" id="url" value="<?php echo $row['url'];?>" class="biz-input-md"></td>
  79. </tr>
  80. <tr>
  81. <td></td>
  82. <td colspan="2">
  83. 使用不带http及任何附加目录的网址<br>
  84. 如:news.dedebiz.com
  85. </td>
  86. </tr>
  87. <tr>
  88. <td>采集规则:</td>
  89. <td colspan="2">仅针对文档内容,格式:前面HTML{@body}后面HMTL</td>
  90. </tr>
  91. <tr>
  92. <td></td>
  93. <td colspan="2"><textarea name="rule" class="biz-textarea"><?php echo $row['rule'];?></textarea></td>
  94. </tr>
  95. <tr>
  96. <td></td>
  97. <td colspan="2">
  98. <button class="btn btn-success btn-sm" type="submit" name="Submit">保存</button>
  99. <button class="btn btn-success btn-sm" type="button" name="Submit2" onclick="javascript:CloseEditNode();">关闭</button>
  100. </td>
  101. </tr>
  102. </table>
  103. </form>
  104. <?php
  105. exit();
  106. } //loadedit
  107. /*---------------
  108. function _ShowLoad(){ }
  109. -------------*/
  110. $sql = "";
  111. $sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC";
  112. $dlist = new DataListCP();
  113. $dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm");
  114. $dlist->SetSource($sql);
  115. $dlist->Display();
  116. ?>