ChangeStyle.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. require("../../class/connect.php");
  3. require("../../class/q_functions.php");
  4. require("../../class/db_sql.php");
  5. require "../".LoadLang("pub/fun.php");
  6. require("../class/user.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=1;
  10. eCheckCloseMods('member');//关闭模块
  11. $user=islogin();
  12. $addr=$empire->fetch1("select spacestyleid from {$dbtbpre}enewsmemberadd where userid='$user[userid]' limit 1");
  13. if(empty($addr[spacestyleid]))
  14. {
  15. $addr[spacestyleid]=$public_r['defspacestyleid'];
  16. }
  17. //分页
  18. $page=(int)$_GET['page'];
  19. $page=RepPIntvar($page);
  20. $start=0;
  21. $line=16;//每页显示条数
  22. $page_line=10;//每页显示链接数
  23. $offset=$page*$line;//总偏移量
  24. $query="select styleid,stylename,stylepic,stylesay,isdefault from {$dbtbpre}enewsspacestyle where membergroup='' or (membergroup<>'' and membergroup like '%,".$user[groupid].",%')";
  25. $totalquery="select count(*) as total from {$dbtbpre}enewsspacestyle where membergroup='' or (membergroup<>'' and membergroup like '%,".$user[groupid].",%')";
  26. $num=$empire->gettotal($totalquery);//取得总条数
  27. $query.=" order by styleid limit $offset,$line";
  28. $returnpage=page1($num,$line,$page_line,$start,$page,$search);
  29. //导入模板
  30. require(ECMS_PATH.'e/template/member/mspace/ChangeStyle.php');
  31. db_close();
  32. $empire=null;
  33. ?>