gbook.temp.php
4.35 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
if(!defined('InEmpireCMS'))
{
exit();
}
//位置
$url="$spacename > 留言";
include("header.temp.php");
$viewuid=(int)getcvar('mluserid');
$adminmenu='';
if($viewuid==$userid)
{
$adminmenu="<a href='../member/mspace/gbook.php' target='_blank'>管理留言</a>";
}
?>
<?=$spacegg?>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1">
<tr>
<td height="24" background="template/default/images/bg_title_sider.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>留言板</td>
<td align="right"><?=$adminmenu?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<?php
while($r=$empire->fetch($sql))
{
if($r['uid'])
{
$r['uname']="<b><a href='../space/?userid=$r[uid]' target='_blank'>$r[uname]</a></b>";
}
//管理菜單
$adminlink='';
$ip='';
if($adminmenu)
{
$ip=' IP: '.$r[ip];
$adminlink="[<a href='#ecms' onclick=\"window.open('../member/mspace/ReGbook.php?gid=$r[gid]','','width=600,height=380,scrollbars=yes');\">回復</a>] [<a href='../member/mspace/?enews=DelMemberGbook&gid=$r[gid]' onclick=\"return confirm('確認要刪除?');\">刪除</a>]";
}
$gbuname=$r[uname]." 留言於".$r[addtime].$ip;
//私密
if($r['isprivate'])
{
if($adminmenu||($r[uid]&&$viewuid==$r[uid]))
{
$r['gbtext']="<font color='blue'>[悄悄話] ".$r['gbtext']."</font>";
}
else
{
$r['gbtext']='[悄悄話隱藏]';
}
}
?>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
<td height="23"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76%"><?=$gbuname?></td>
<td width="24%"><div align="right"><?=$adminlink?></div></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" style='word-break:break-all'>
<?=nl2br($r['gbtext'])?>
<?
if($r['retext'])
{
?>
<table border=0 width='100%' cellspacing=1 cellpadding=10 bgcolor='#cccccc'>
<tr>
<td width='100%' bgcolor='#FFFFFF' style='word-break:break-all'>
<?=nl2br($r['retext'])?>
</td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
<br>
<?php
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> <?=$returnpage?></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#96C8F1">
<tr>
<td background="template/default/images/bg_title_sider.gif"><b>添加留言</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<form name="addgbook" method="post" action="../member/mspace/index.php">
<input type="hidden" name="userid" value="<?=$userid?>">
<input type="hidden" name="enews" value="AddMemberGbook">
<tr>
<td width="16%">暱稱:</td>
<td width="84%"><input name="uname" type="text" id="uname" value="<?=RepPostStr(getcvar('mlusername'),1)?>">
私密
<input name="isprivate" type="checkbox" id="isprivate" value="1"></td>
</tr>
<tr>
<td valign="top">內容:</td>
<td><textarea name="gbtext" cols="60" rows="5" id="gbtext"></textarea></td>
</tr>
<tr>
<td>驗證碼:</td>
<td>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="75"><input name="key" type="text" size="10" /></td>
<td width="85"><img src="<?=$public_r[newsurl]?>e/ShowKey/?v=spacegb" name="spacegbKeyImg" id="spacegbKeyImg" onclick="spacegbKeyImg.src='<?=$public_r[newsurl]?>e/ShowKey/?v=spacegb&t='+Math.random()" title="看不清楚,點擊刷新" /></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="發表留言"></td>
</tr>
</form>
</table></td>
</tr>
</table>
<?php
include("footer.temp.php");
?>