mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2026-09-03 02:11:38 -04:00
Puts stat files in their own directory to make things cleaner; deletes *zip
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
require_once('../Connections/YBDB.php');
|
||||
require_once('../Connections/database_functions.php');
|
||||
$page_individual_history_log = INDIVIDUAL_HISTORY_LOG;
|
||||
|
||||
switch ($_GET['error']) {
|
||||
case 'no_shop':
|
||||
$error_message = 'ERROR: A Shop at this location for today does not exist: Start New Shop';
|
||||
break;
|
||||
case 'new_error_message': //this is a sample error message. insert error case here
|
||||
$error_message = '';
|
||||
break;
|
||||
default:
|
||||
$error_message = 'Total Hours';
|
||||
break;
|
||||
}
|
||||
|
||||
mysql_select_db($database_YBDB, $YBDB);
|
||||
$query_Recordset1 = "SELECT t.shop_id as ShopID, date_format(t.date,'%m/%d/%Y') as ShopDate, dayname(t.date) as Day, ROUND(sum(t.amount),2) as Total, count(t.transaction_id) as CountOfTrans
|
||||
FROM transaction_log t
|
||||
GROUP BY t.shop_id, date_format(t.date,'%m/%d/%Y')
|
||||
ORDER BY t.date DESC, t.shop_id DESC;";
|
||||
$Recordset1 = mysql_query($query_Recordset1, $YBDB) or die(mysql_error());
|
||||
//$row_Recordset1 = mysql_fetch_assoc($Recordset1); //Wait to fetch until do loop
|
||||
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
|
||||
|
||||
?>
|
||||
|
||||
<?php include("include_header.html"); ?>
|
||||
|
||||
<table>
|
||||
<tr valign="top">
|
||||
<td align="left"><span class="yb_heading3red">Shop Transaction Totals</span> | <a href="stats.php">Back to Stats Page </a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="1" cellpadding="1" cellspacing="0">
|
||||
|
||||
<tr valign="top" bgcolor="#99CC33" class="yb_standardCENTER">
|
||||
<td width="100" height="35">Date</td>
|
||||
<td width="100" height="35">ShopID</td>
|
||||
<td width="100">Day</td>
|
||||
<td width="100">Total</td>
|
||||
<td width="100">Count of Transactions</td>
|
||||
</tr>
|
||||
<form method="post" name="FormUpdate_<?php echo $row_Recordset1['shop_id']; ?>" action="<?php echo $editFormAction; ?>">
|
||||
<?php while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)) { //do {
|
||||
if(1 == 2) {?>
|
||||
<tr valign="bottom" bgcolor="#CCCC33">
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<input type="hidden" name="MM_insert" value="FormEdit">
|
||||
<input type="hidden" name="shop_id" value="<?php echo $row_Recordset1['shop_id']; ?>">
|
||||
</form>
|
||||
<?php } else { // end if EDIT RECORD ?>
|
||||
<tr>
|
||||
<td><?php echo $row_Recordset1['ShopDate']; ?></td>
|
||||
<td><?php echo $row_Recordset1['ShopID']; ?></td>
|
||||
<td valign="middle"><?php echo $row_Recordset1['Day']; ?></td>
|
||||
<td><?php echo "$"; if(is_null($row_Recordset1['Total'])) echo 0.00; else echo $row_Recordset1['Total'];?></td>
|
||||
<td><?php echo $row_Recordset1['CountOfTrans']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end if EDIT RECORD
|
||||
} // end WHILE count of recordset ?>
|
||||
</table> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php include("include_footer.html"); ?>
|
||||
<?php
|
||||
mysql_free_result($Recordset1);
|
||||
?>
|
||||
Reference in New Issue
Block a user