?? edit.php
字號:
<?
/** 檢查權限 ************************/
$gotopagerank = "admin";
require_once(dirname(__FILE__)."/config.php");
if($cuserLogin->getUserRank()==-1)
{
showMsg("對不起,你沒有權限!",-1);
exit();
}
if(!empty($_COOKIE['GUEST_BOOK_MOVE'])) $GUEST_BOOK_MOVE = $_COOKIE['GUEST_BOOK_MOVE'];
else $GUEST_BOOK_MOVE = "index.php";
//////////////////////////////////
$dsql = new DedeSql();
$ID = ereg_replace("[^0-9]","",$ID);
if(empty($job)) $job="view";
if($job=="del")
{
$dsql->SetQuery("Delete From #@__guestbook where ID='$ID'");
$dsql->ExecuteNoneQuery();
$dsql->Close();
ShowMsg("成功刪除一條留言!",$GUEST_BOOK_MOVE);
exit();
}
else if($job=="check")
{
$dsql->SetQuery("update #@__guestbook set ischeck=1 where ID='$ID'");
$dsql->ExecuteNoneQuery();
$dsql->Close();
ShowMsg("成功審核一條留言!",$GUEST_BOOK_MOVE);
exit();
}
else if($job=="editok")
{
$remsg = trim($remsg);
if($remsg!=""){
$remsg = trimMsg($remsg,1);
$remsg = cn_substr($remsg,2000);
$msg = $msg."<br><font color=red>管理員回復:$remsg</font>";
}
$ID = ereg_replace("[^0-9]","",$ID);
$dsql->SetQuery("update #@__guestbook set msg='$msg' where ID='$ID'");
$dsql->ExecuteNoneQuery();
$dsql->Close();
ShowMsg("成功更改或回復一條留言!",$GUEST_BOOK_MOVE);
exit();
}
$dsql->SetQuery("select * from #@__guestbook where ID='$ID'");
$dsql->Execute();
$row = $dsql->GetObject();
?>
<html>
<head>
<title>管理留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet href="images/css.css" type="text/css">
</head>
<body topmargin="2" >
<center>
<table border="0" cellspacing="0" cellpadding="0" width='760'>
<tr>
<td height="20"><img src="images/dedebanner.gif" width="760" height="70"></td>
</tr>
<tr>
<td height="0"></td>
</tr>
</table>
<table border='0' cellpadding='0' cellspacing='0' width='760' background='images/bottop.gif' align='center'>
<tr>
<td width="25%" height="20"> </td>
<td width="25%" height='5'>
<td width="35%" align='right'><img src='images/quote.gif' border=0 height=16 width=16></td>
<td width="15%"> <a href="#write"><b>管理留言</b></a></td>
</tr></table>
<table width="760" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#ABD82C">
<form method="post" action="edit.php">
<input type="hidden" name="ID" value="<?=$ID?>">
<input type="hidden" name="job" value="editok">
<tr bgcolor="#ffffff">
<td width="10%" align="center" nowrap><font color="#FF0000">*</font>你的姓名:</td>
<td width="40%"><?=$row->uname?></td>
<td width="9%" align="center" nowrap>OICQ號碼:</td>
<td width="41%"><?=$row->qq?></td>
</tr>
<tr bgcolor="#ffffff">
<td align="center" nowrap width="10%"> 電子郵件:</td>
<td width="40%"><?=$row->email?></td>
<td width="9%" align="center" nowrap height="12">個人主頁:</td>
<td width="41%" height="12"><?=$row->homepage?></td>
</tr>
<tr bgcolor="#ffffff">
<td align="center" nowrap width="10%">
<font color="#FF0000">*</font>留言內容:<br>(1000字內)
</td>
<td height="2" colspan="3" align="left"><textarea name="msg" cols="80" rows="6" class="textarea"><?=$row->msg?></textarea></td>
</tr>
<tr bgcolor="#ffffff">
<td align="center" nowrap>回復留言:<br>
(1000字內)</td>
<td colspan="3" nowrap><textarea name="remsg" cols="80" rows="6" class="textarea"></textarea></td>
</tr>
<tr bgcolor="#ffffff">
<td align="center" nowrap colspan="4">
<input maxlength="1000" type="submit" name="Submit" value=" 保 存 " class="btn">
<input type="reset" name="Submit2" value="取 消" class="btn">
</td>
</tr>
</form>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40" align="center"><a href="http://www.dedecms.com" target="_blank">Power by DedeCms 織夢內容管理系統</a></td>
</tr>
</table>
</center>
<?
$dsql->Close();
?>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -