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

  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 - 2019, DesDev, Inc.
  8. * @license http://help.dedecms.com/usersguide/license.html
  9. * @link http://www.dedecms.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. if(empty($dopost)) $dopost = '';
  13. //保存更改
  14. if($dopost=="save")
  15. {
  16. $startID = 1;
  17. $endID = $idend;
  18. for(;$startID<=$endID;$startID++)
  19. {
  20. $query = '';
  21. $tid = ${'ID_'.$startID};
  22. $pname = ${'pname_'.$startID};
  23. if(isset(${'check_'.$startID}))
  24. {
  25. if($pname!='')
  26. {
  27. $query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' ";
  28. $dsql->ExecuteNoneQuery($query);
  29. }
  30. }
  31. else
  32. {
  33. $query = "DELETE FROM `#@__myadtype` WHERE id='$tid' ";
  34. $dsql->ExecuteNoneQuery($query);
  35. }
  36. }
  37. //增加新记录
  38. if(isset($check_new) && $pname_new!='')
  39. {
  40. $query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');";
  41. $dsql->ExecuteNoneQuery($query);
  42. }
  43. header("Content-Type: text/html; charset={$cfg_soft_lang}");
  44. ShowMsg("成功更新广告分类列表!", 'adtype_main.php');
  45. exit;
  46. }
  47. include DedeInclude('templets/adtype_main.htm');