All pastes #977425 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-04-08 20:39 UTC
rendered paste body
function invoice_manager(){
if (!isset($_SESSION['loggedin'])) die('<meta http-equiv="refresh" content="0;URL=index.php?act=login">');
$displayname = $_SESSION['displayname'];
$username = $_SESSION['username'];
include"template/top.php" ;
echo ('<style type="text/css">
.style17 {color: #FFFFFF}
</style>

<fieldset><legend><strong><span class="style17">Last 30 Service Reports</span></strong></legend><br><table width="100%" border="0" cellspacing="0" cellpadding="5">
  ') ;
$query="SELECT * FROM `invoices_web` WHERE `username` = '$username' ORDER BY inv_date DESC";
$result=mysql_query($query) or die(mysql_error());
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$crow++;
$row_color = (((1&$crow)) ? "#666666" : "#999999");
$invoice_no = stripslashes(mysql_result($result,$i,"invoice_no"));
$inv_date = htmlentities(mysql_result($result,$i,"inv_date"));
$inv_amount = htmlentities(mysql_result($result,$i,"inv_amount"));
$amount_paid = htmlentities(mysql_result($result,$i,"amount_paid"));
$display = 'onclick="window.location=\'invoices.php?act='.$invoice_no.'\';" onmouseover="this.style.cursor=\'hand\';"' ;
echo('<tr bgcolor="'.$row_color.'" onmouseover="this.bgColor = \'#E68A00\'" onmouseout="this.bgColor = \''.$row_color.'\'">
<td><strong>Invoice Number: </strong>'.$invoice_no.' | <strong>Invoice Date: </strong>'.$inv_date.' | <strong>Invoice Amount: </strong>$'.$inv_amount.'<br />
<strong>Status: </strong> ');
if ($amount_paid == $inv_amount) ( echo 'Paid'; ) else ( echo 'Unpaid'; )
echo ('</tr>');
$i++;
}
echo ('</table></fieldset>') ;
include"template/bottum.php" ;
}