ChangeStyle.php
1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
if(!defined('InEmpireCMS'))
{
exit();
}
?>
<?php
$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>";
$header="<table width='100%' border='0' cellpadding='3' cellspacing='1' bgcolor='#DBEAF5' align='center'>";
$footer="<tr><td colspan='4' align=center>".$returnpage."</td></tr></table>";
$templist="";
$sql=$empire->query($query);
$b=0;
$ti=0;
$tlistvar=$temp;
while($r=$empire->fetch($sql))
{
$b=1;
$ti++;
if(empty($r[stylepic]))
{
$r[stylepic]="../../data/images/notemp.gif";
}
//當前模板
if($r['styleid']==$addr[spacestyleid])
{
$r[stylename]='<b>'.$r[stylename].'</b>';
}
$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>";
$tlistvar=str_replace("<!--list.var".$ti."-->",$var,$tlistvar);
if($ti>=4)
{
$templist.=$tlistvar;
$tlistvar=$temp;
$ti=0;
}
}
//模板
if($ti!=0&&$ti<4)
{
$templist.=$tlistvar;
}
$templist=$header.$templist.$footer;
$public_diyr['pagetitle']='選擇空間模板';
$url="<a href='../../../'>首頁</a> > <a href='../cp/'>會員中心</a> > 選擇空間模板";
require(ECMS_PATH.'e/template/incfile/header.php');
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><?=$templist?></td>
</tr>
</table>
<?php
require(ECMS_PATH.'e/template/incfile/footer.php');
?>