ChangeStyle.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. if(!defined('InEmpireCMS'))
  3. {
  4. exit();
  5. }
  6. ?>
  7. <?php
  8. $temp="<tr><td width='25%' bgcolor='ffffff' align=center><!--list.var1--></td><td width='25%' bgcolor='ffffff' align=center><!--list.var2--></td><td width='25%' bgcolor='ffffff' align=center><!--list.var3--></td><td width='25%' bgcolor='ffffff' align=center><!--list.var4--></td></tr>";
  9. $header="<table width='100%' border='0' cellpadding='3' cellspacing='1' bgcolor='#DBEAF5' align='center'>";
  10. $footer="<tr><td colspan='4' align=center>".$returnpage."</td></tr></table>";
  11. $templist="";
  12. $sql=$empire->query($query);
  13. $b=0;
  14. $ti=0;
  15. $tlistvar=$temp;
  16. while($r=$empire->fetch($sql))
  17. {
  18. $b=1;
  19. $ti++;
  20. if(empty($r[stylepic]))
  21. {
  22. $r[stylepic]="../../data/images/notemp.gif";
  23. }
  24. //当前模板
  25. if($r['styleid']==$addr[spacestyleid])
  26. {
  27. $r[stylename]='<b>'.$r[stylename].'</b>';
  28. }
  29. $var="<a title=\"".$r[stylesay]."\"><img src='$r[stylepic]' width=92 height=100 border=0></a><br><span style='line-height=15pt'>".$r[stylename]."</span><br><span style='line-height=15pt'>[<a href='index.php?enews=ChangeSpaceStyle&styleid=".$r[styleid]."'>选定</a>]</span>";
  30. $tlistvar=str_replace("<!--list.var".$ti."-->",$var,$tlistvar);
  31. if($ti>=4)
  32. {
  33. $templist.=$tlistvar;
  34. $tlistvar=$temp;
  35. $ti=0;
  36. }
  37. }
  38. //模板
  39. if($ti!=0&&$ti<4)
  40. {
  41. $templist.=$tlistvar;
  42. }
  43. $templist=$header.$templist.$footer;
  44. $public_diyr['pagetitle']='选择空间模板';
  45. $url="<a href='../../../'>首页</a>&nbsp;>&nbsp;<a href='../cp/'>会员中心</a>&nbsp;>&nbsp;选择空间模板";
  46. require(ECMS_PATH.'e/template/incfile/header.php');
  47. ?>
  48. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  49. <tr>
  50. <td valign="top"><?=$templist?></td>
  51. </tr>
  52. </table>
  53. <?php
  54. require(ECMS_PATH.'e/template/incfile/footer.php');
  55. ?>