| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/cooperative/sell/ |
Upload File : |
<?
ob_start();
session_start();
if($_SESSION["adminlogin"]=="")
{
header('location:index.php');
exit();
}
//============ Start Session และทำการเรียก Function ติดต่อฐานข้อมูล
require_once('../connect/connect.php');
?>
<html>
<title>..:: ระบบจัดการฐานข้อมูล ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/styles.css" type="text/css">
<div align="center"><br>
<table cellspacing=1 cellpadding=4 width="68%" bgcolor=#cccccc border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="100%" bgcolor="#FFFFFF"> <div align="center"></div>
<table cellspacing=1 cellpadding=4 width="100%" border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="35%" bgcolor="#FFFFFF"> <div align="left"><b><img src="../image/allrowto.gif" width="11" height="11" align="absbottom">
ดูรายงาน</b></div></td>
<td width="22%" align=middle bgcolor="#FFFFFF"> <div align="left">
</div></td>
<td width="43%" bgcolor="#FFFFFF"> <div align="right"><a href="head.php">กลับไปหน้าหลัก</a></div></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<table width="68%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><div align="right"><table cellspacing=1 cellpadding=4 width="93%" bgcolor=#FFFFFF border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="100%" bgcolor="#FFFFFF"> <div align="center"></div>
<table cellspacing=1 cellpadding=4 width="100%" border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="35%" bgcolor="#FFFFFF"> <div align="left"><b>
</b></div></td>
<td width="22%" align=middle bgcolor="#FFFFFF"> <div align="left">
</div></td>
<td width="43%" bgcolor="#FFFFFF"> <div align="right"></div></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</div>
<table width="91%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="get" action="">
<tr>
<td width="20%"><b>รายงานรายได้</b></td>
<td width="80%"><div align="left">เลือกเดือน
<select name="mm" class="txtbox" id="mm">
<?
if($_GET["mm"] == "")
{
$_GET["mm"]=date("m");
}
for($i=1;$i<=12;$i++)
{
if($_GET["mm"]==$i)
{
$sel="selected";
}
else
{
$sel="";
}
?>
<option value="<?=$i;?>" <?=$sel;?>><?=$i;?></option>
<?
}
?>
</select>
ปี
<select name="yy" class="txtbox" id="yy">
<?
if($_GET["yy"] == "")
{
$_GET["yy"]=date("Y");
}
for($i=2005;$i<=2020;$i++)
{
if($_GET["yy"]==$i)
{
$sel="selected";
}
else
{
$sel="";
}
?>
<option value="<?=$i;?>" <?=$sel;?>>
<?=$i;?>
</option>
<?
}
?>
</select>
<input type="submit" class="button" value="ดูรายงาน">
</div></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</form>
</table>
<table cellspacing=1 cellpadding=3 width="93%" bgcolor=#CCCCCC border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td bgcolor="#FFFFFF"><div align="center">ลำดับ</div></td>
<td bgcolor="#FFFFFF"><div align="center">วันที่</div></td>
<td bgcolor="#FFFFFF">หมายเลขสั่งซื้อ</td>
<td bgcolor="#FFFFFF"><div align="center">จำนวน (บาท)</div></td>
</tr>
<?
$i=0;
//=========== เลือกข้อมูลสมาชิก
$sql = "select * From cusorder Where 1 and MONTH(Date)='".$_GET["mm"]."' and YEAR(Date)='".$_GET["yy"]."' and status='2' order by OrderNo desc ";
$query = mysql_query($sql);
While($result= mysql_fetch_array($query)){
$i++;
?>
<tr bgcolor=#e5e5e5>
<td width="61" bgcolor="#FFFFFF"><div align="center">
<?=$i;?>
</div></td>
<td width="88" bgcolor="#FFFFFF"><div align="center">
<?=$result["Date"];?>
</div></td>
<td width="246" bgcolor="#FFFFFF"> <a href="orderdetail.php?OrderNo=<?=$result["OrderNo"];?>" target="_blank">
<?=$result["OrderNo"];?>
</a></td>
<td width="103" bgcolor="#FFFFFF"> <div align="right"></div>
<div align="right">
<?=number_format($result["Total"], 2,'.',',');?>
<?
$total=$total+$result["Total"];
?>
</div></td>
</tr>
<?
}
?>
</tbody>
</table>
<br>
<table cellspacing=1 cellpadding=3 width="93%" bgcolor=#CCCCCC border=0 align="center" height="10">
<tbody>
<tr bgcolor=#e5e5e5>
<td width="384" bgcolor="#FFFFFF"><div align="center">รวม (บาท) </div>
</td>
<td width="98" bgcolor="#FFFFFF">
<div align="right">
<?=number_format($total, 2,'.',',');?>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>