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

44 lines
1.4KB

  1. <?php
  2. /**
  3. * 友情链接类型
  4. *
  5. * @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2020, 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 = ${'ID_' . $startID};
  20. $pname = ${'pname_' . $startID};
  21. if (isset(${'check_' . $startID})) {
  22. if ($pname != '') {
  23. $query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' ";
  24. $dsql->ExecuteNoneQuery($query);
  25. }
  26. } else {
  27. $query = "DELETE FROM `#@__myadtype` WHERE id='$tid' ";
  28. $dsql->ExecuteNoneQuery($query);
  29. }
  30. }
  31. //增加新记录
  32. if (isset($check_new) && $pname_new != '') {
  33. $query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');";
  34. $dsql->ExecuteNoneQuery($query);
  35. }
  36. header("Content-Type: text/html; charset={$cfg_soft_lang}");
  37. ShowMsg("成功更新广告分类列表!", 'adtype_main.php');
  38. exit;
  39. }
  40. include DedeInclude('templets/adtype_main.htm');