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

49 lines
1.5KB

  1. <?php
  2. /**
  3. * 友情链接类型
  4. *
  5. * @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $
  6. * @package DedeCMS.Administrator
  7. * @copyright Copyright (c) 2007 - 2018, DesDev, Inc.
  8. * @copyright Copyright (c) 2020, DedeBIZ.COM
  9. * @license https://www.dedebiz.com/license/v6
  10. * @link https://www.dedebiz.com
  11. */
  12. require_once(dirname(__FILE__)."/config.php");
  13. if(empty($dopost)) $dopost = '';
  14. //保存更改
  15. if($dopost=="save")
  16. {
  17. $startID = 1;
  18. $endID = $idend;
  19. for(;$startID<=$endID;$startID++)
  20. {
  21. $query = '';
  22. $tid = ${'ID_'.$startID};
  23. $pname = ${'pname_'.$startID};
  24. if(isset(${'check_'.$startID}))
  25. {
  26. if($pname!='')
  27. {
  28. $query = "UPDATE `#@__flinktype` SET typename='$pname' WHERE id='$tid' ";
  29. $dsql->ExecuteNoneQuery($query);
  30. }
  31. }
  32. else
  33. {
  34. $query = "DELETE FROM `#@__flinktype` WHERE id='$tid' ";
  35. $dsql->ExecuteNoneQuery($query);
  36. }
  37. }
  38. //增加新记录
  39. if(isset($check_new) && $pname_new!='')
  40. {
  41. $query = "INSERT INTO `#@__flinktype`(typename) VALUES('{$pname_new}');";
  42. $dsql->ExecuteNoneQuery($query);
  43. }
  44. header("Content-Type: text/html; charset={$cfg_soft_lang}");
  45. echo "<script> alert('成功更新友情链接网站分类表!'); </script>";
  46. }
  47. include DedeInclude('templets/friendlink_type.htm');