|
|
|
ใครพอทราบรายงานยอดขายกับรายงานการสั่งซื้อ ของการขายสินค้าออนไลน์บ้างครับ |
|
|
|
|
|
|
|
ครับ มันไม่ต่างอะไรกับการดึงข้อมูลมาแสดงเลยครับ เพียงแต่เพิ่มเงื่อนไข WHERE ในส่วนของ SQL ที่จะดึงข้อมูลใดมาแสดงบ้างครับ
Ref : PHP MySQL List Record
|
|
|
|
|
Date :
2009-01-26 07:19:31 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มันเป็นกราฟนะค่ะ ดัดแปลงเอาค่ะ
<?
@session_start();
require_once ('check_session.php');
?>
<html>
<head>
<title>Furniture Center</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url(images/bg_home.gif);
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #FF9933;
}
a:active {
text-decoration: none;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
.style26 {font-size: 20px}
-->
</style></head>
<body text="#000000" leftmargin="0" rightmargin="0">
<table width="950" height="99" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FAB07D" valign="top">
<tr>
<td width="100%" height="99" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th align="left" valign="top" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="78%" align="left" valign="top" scope="col"><?php require_once"include/head.php";?></th>
<th width="22%" background="images/head_02.gif" scope="col"> </th>
</tr>
</table> </th>
</tr>
<tr>
<td height="23"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="17%" height="63" align="left" valign="top" scope="col"><?
if ('admin'==$_SESSION["user_type"]){
require_once"include/menu.php";
}
if ('staff'==$_SESSION["user_type"]){
require_once"include/menustaff.php";
}
if ('manager'==$_SESSION["user_type"]){
require_once"include/menumanager.php";
}
if ('member'==$_SESSION["user_type"]){
require_once"include/right.php";
}
?></th>
<th width="83%" align="center" valign="top" scope="col"><table width="100%" height="4" border="0" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"></th>
</tr>
</table>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD><IMG SRC="images/table_01.gif" WIDTH=23 HEIGHT=22 ALT=""></TD>
<TD background="images/table_02.gif" WIDTH=100% HEIGHT=22 ALT=""></TD>
<TD><IMG SRC="images/table_03.gif" WIDTH=23 HEIGHT=22 ALT=""></TD>
</TR>
<TR>
<TD background="images/table_07.gif" WIDTH=23 ALT=""></TD>
<TD background="images/table_08.gif" WIDTH=100% ALT=""><div align="center" class="style26">รายงานสรุปยอดการสั่งซื้อ</div>
<center>
</center></TD>
<TD background="images/table_09.gif" WIDTH=23 ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="images/table_10.gif" WIDTH=23 HEIGHT=27 ALT=""></TD>
<TD background="images/table_11.gif" WIDTH=100% HEIGHT=27 ALT=""></TD>
<TD><IMG SRC="images/table_12.gif" WIDTH=23 HEIGHT=27 ALT=""></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD><IMG SRC="images/table_01.gif" WIDTH=23 HEIGHT=22 ALT=""></TD>
<TD background="images/table_02.gif" WIDTH=100% HEIGHT=22 ALT=""></TD>
<TD><IMG SRC="images/table_03.gif" WIDTH=23 HEIGHT=22 ALT=""></TD>
</TR>
<TR>
<TD background="images/table_07.gif" WIDTH=23 ALT=""></TD>
<TD WIDTH=100% align="center" background="images/table_08.gif" ALT=""><form name="form1" method="post" action="">
<select name="Month">
<option value="0" selected>เลือกเดือนที่ต้องการ</option>
<option value="01">มกราคม</option>
<option value="02">กุมภาพันธ์</option>
<option value="03">มีนาคม</option>
<option value="04">เมษายน</option>
<option value="05">พฤษภาคม</option>
<option value="06">มิถุนายน</option>
<option value="07">กรกฎาคม</option>
<option value="08">สิงหาคม</option>
<option value="09">กันยายน</option>
<option value="10">ตุลาคม</option>
<option value="11">พฤศจิกายน</option>
<option value="12">ธันวาคม</option>
</select>
<input type="submit" name="Submit" value="แสดงรายการ" />
</form>
<?
require_once ('conf.php');
include("include/FusionCharts.php");
$strXML = "<chart caption='แสดงรายงาน' lineThickness='2' showValues='1' formatNumberScale='0' anchorRadius='2' divLineAlpha='20' divLineColor='CC3300' divLineIsDashed='1' showAlternateHGridColor='1' alternateHGridColor='666666' shadowAlpha='40' labelStep='1' numvdivlines='5' chartRightMargin='35' bgColor='FFFFFF,CC3300' bgAngle='270' bgAlpha='10,10'>
<categories >
<category label='1' />
<category label='2' />
<category label='3' />
<category label='4' />
<category label='5' />
<category label='6' />
<category label='7' />
<category label='8' />
<category label='9' />
<category label='10' />
<category label='11' />
<category label='12' />
<category label='13' />
<category label='14' />
<category label='15' />
<category label='16' />
<category label='17' />
<category label='18' />
<category label='19' />
<category label='20' />
<category label='21' />
<category label='22' />
<category label='23' />
<category label='24' />
<category label='25' />
<category label='26' />
<category label='27' />
<category label='28' />
<category label='29' />
<category label='30' />
<category label='31' />
</categories>";
if($Month)
$mm = $Month;
else
$mm = date("n");
$strXML .= "<dataset seriesName='$getmmonth[$Month1]' color='1D8BD1' anchorBorderColor='1D8BD1' anchorBgColor='1D8BD1'>";
for($i=1;$i<=31;$i++) {
$sumb=0;
$num=str_pad($i,2,"0",STR_PAD_LEFT);
$oneinput = "2010-".$mm."-".$num;
$secondinput = "2010-".$mm."-".$num;
$rs=mysql_query("select SUM(price) AS priceTotal from receipt where timeorder >= '".$oneinput." 00:00:00' AND timeorder <'".$secondinput." 23:59:59'");
$arr = mysql_fetch_assoc($rs);
if(!$arr[priceTotal])
$strXML .= "<set value='0' />";
else
$strXML .= "<set value='".$arr[priceTotal]."' />";
}
$strXML .= "</dataset>";
$strXML .= "<styles>
<definition>
<style name='CaptionFont' type='font' size='12'/>
</definition>
<application>
<apply toObject='CAPTION' styles='CaptionFont' />
<apply toObject='SUBCAPTION' styles='CaptionFont' />
</application>
</styles>
</chart>";
echo renderChartHTML("include/Charts/MSLine.swf", "", $strXML, "myNext", 700, 400, false);
ECHO "<BR /> <BR />";
?>
</TD>
<TD background="images/table_09.gif" WIDTH=23 ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="images/table_10.gif" WIDTH=23 HEIGHT=27 ALT=""></TD>
<TD background="images/table_11.gif" WIDTH=100% HEIGHT=27 ALT=""></TD>
<TD><IMG SRC="images/table_12.gif" WIDTH=23 HEIGHT=27 ALT=""></TD>
</TR>
</TABLE>
</th>
</tr>
</table>
</td>
</tr>
<tr>
<td><p> </p>
</td>
</tr>
</table>
<table align="center" bgcolor="ffffff" border="0" cellpadding="0" cellspacing="0" width="100%" height="20">
</table>
</table>
</body>
</html>[b][/b]
|
|
|
|
|
Date :
2010-07-22 09:58:02 |
By :
NOKZA |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|