?? fullmessage.php
字號:
<?
session_start();
//檢查是否是授權的管理
if(!session_is_registered("manager"))
{
Header("HTTP/1.0 401 Unauthorized");
exit();
}
//連接數據庫,取得相應訂單號對應的全部信息
$connect=mysql_connect("127.0.0.1","root","root");
mysql_select_db("ebusiness");
//如果JOB參數的值為delete的話,執行刪除的操作
if($job="delete")
{
$query="delete form EOrder where OrderID=".$OrderID;
if(mysql_query($query))
{
header("Location:ordermanage.php");
exit();
}
}
//如果JOB參數的值為update的話,執行更新操作
if($job="update")
{
$query="update EOrder set IsSent='".$issent."'where OrderID=".$OrderID;
mysql_query($query);
}
$query="select * from EOrder where OrderID=".$OrderID;
$result=mysql_query($query);
$count=1;
$message[0]=0;
while($obj=mysql_fetch_object($result))
{
$message[$count]=$obj;
$message[0]++;
$count++;
}
mysql_close($connect);
//下面是輸出HTML:
?>
<html>
<head>
<title>訂單詳細信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.css1 {font-family:"宋體"; font-size:9pt; font-style: normal; line-height: normal
font-weight: normal; color:#000000}
-->
</style>
</head>
<body bgcolor="#ffffff">
<table width="760" border="0" cellspacing="0" cellpadding="0" class="css1">
<tr>
<td width="100" height="59"><img src="pic/logo.gif" width="100" height="60"></td>
<td width="468" height="59"><img src="pic/banner.gif" width="468" border="0"></td>
<td width="192" height="59"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#66ccff">您現在的位置:訂單詳細信息</td>
<td width="192"> </td>
</tr>
<tr>
<td colspan="3" height="13">
</tr>
<center>
<form method="post" action="">
<?
echo'<p>訂單號:'.$message[1]->OrderID.'</p>';
if($message[1]->UserID==0)
{
$user="非注冊用戶";
}
else
{
$user="注冊用戶";
}
echo'<p>用戶ID:'.$message[1]->UserID.'('.$user.')</p>';
echo'<p>聯系電話:'.$message[1]->Tel.'</p>';
echo'<p>創建時間:'.$message[1]->OrderDate.'</p>';
echo'<p><a href=fullmessage.php?job=delete&OrderID='.$mesage[1]->OrderID.'>刪除本訂單</a></p>';
echo'<p>是否發貨:';
if($message[1]->IsSent=="n")
{
echo'<select name="issent" size="1">
<option value="y">是</option>
<option value="n" selected>否</option>
</select>';
else
echo'<select name="issent" size="1">
<option value="y" selected>是</option>
<option value="n">否</option>
</select>';
echo'</p>
<table width="700" border="1" cellspacing="2" cellpadding="0" class="css1"
bordercolorlight="#ccccff" bordercolordark="#6666ff">
<tr align="center">
<td width="140">商品名</td>
<td width="140">商品ID</td>
<td width="140">單價</td>
<td width="140">數量</td>
<td width="140">總計</td>
</tr>';
$total=0;
for($i=1;$i<=$message[0];$i++)
{
echo'<tr align="center">';
echo'<td width="140">'.$message[$i]->ProductName.'</td>';
echo'<td width="140">'.$message[$i]->ProductID.'</td>';
echo'<td width="140">'.$message[$i]->Price.'</td>';
echo'<td width="140">'.$message[$i]->Quantity.'</td>';
echo'<td width="140">'.$message[$i]->Sun.'</td>';
$total+=$message[$i]->Sum;
echo'</tr>';
}
echo'</table>';
echo'<p>總計:'.$total.'元';
echo'<input type="hidden" name="job" value="update">';
echo'<input type="hidden" name="OrderID" value="'.$message[1]->OrderID.'">';
echo'<input type="submit" name="Submit" value="更新">';
echo'</form>';
?>
</center>
</td>
</tr>
<tr>
<td colspan="3" bgcolor="#0000ff"> </td>
<tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -