plus_main.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * 插件管理
  4. *
  5. * @version $Id: plus_main.php 1 15:46 2010年7月20日Z tianya $
  6. * @package DedeCMS.Administrator
  7. * @copyright Copyright (c) 2007 - 2010, 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. CheckPurview('sys_plus');
  13. require_once(DEDEINC."/datalistcp.class.php");
  14. setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
  15. $sql = "SELECT aid,plusname,writer,isshow FROM #@__plus ORDER BY aid ASC";
  16. $dlist = new DataListCP();
  17. $dlist->SetTemplet(DEDEADMIN."/templets/plus_main.htm");
  18. $dlist->SetSource($sql);
  19. $dlist->display();
  20. function GetSta($sta,$id,$title)
  21. {
  22. if($sta==1)
  23. {
  24. return " &nbsp; <a href='plus_edit.php?dopost=edit&aid=$id'><u>修改</u></a> &nbsp; 启用 &gt; <a href='plus_edit.php?dopost=hide&aid=$id'><u>禁用</u></a> &nbsp; <a href='plus_edit.php?dopost=delete&aid=$id&title=".urlencode($title)."'><u>删除</u></a>";
  25. }
  26. else
  27. {
  28. return " &nbsp; <a href='plus_edit.php?aid=$id'><u>修改</u></a> &nbsp; 禁用 &gt; <a href='plus_edit.php?dopost=show&aid=$id'><u>启用</u></a> &nbsp; <a href='plus_edit.php?dopost=delete&aid=$id&title=".urlencode($title)."'><u>册除</u></a>";
  29. }
  30. }
  31. function GetLink($aid)
  32. {
  33. global $dsql;
  34. $row = $dsql->GetOne("SELECT menustring FROM `#@__plus` WHERE aid='{$aid}' ");
  35. $link = preg_replace('/^(.*)(link=\'([^\']*)\')(.*)$/i', '${3}', $row['menustring']);
  36. return $link;
  37. }