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

41 lines
1.4KB

  1. <?php
  2. /**
  3. * 友情链接类型
  4. *
  5. * @version $id:friendlink_type.php 8:48 2010年7月13日 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. if (empty($dopost)) $dopost = '';
  13. //保存修改
  14. if ($dopost == "save") {
  15. $startID = 1;
  16. $endID = $idend;
  17. for (; $startID <= $endID; $startID++) {
  18. $query = '';
  19. $tid = intval(${'ID_'.$startID});
  20. $pname = HtmlReplace(${'pname_'.$startID},-1);
  21. if (isset(${'check_'.$startID})) {
  22. if ($pname != '') {
  23. $query = "UPDATE `#@__flinktype` SET typename='$pname' WHERE id='$tid' ";
  24. $dsql->ExecuteNoneQuery($query);
  25. }
  26. } else {
  27. $query = "DELETE FROM `#@__flinktype` WHERE id='$tid' ";
  28. $dsql->ExecuteNoneQuery($query);
  29. }
  30. }
  31. //增加新记录
  32. if (isset($check_new) && $pname_new != '') {
  33. $pname_new = HtmlReplace($pname_new, -1);
  34. $query = "INSERT INTO `#@__flinktype` (typename) VALUES ('{$pname_new}');";
  35. $dsql->ExecuteNoneQuery($query);
  36. }
  37. header("Content-Type:text/html; charset={$cfg_soft_lang}");
  38. echo "<script> alert('成功更新友情链接网站分类表'); </script>";
  39. }
  40. include DedeInclude('templets/friendlink_type.htm');
  41. ?>