Skip to content

Instantly share code, notes, and snippets.

@ss23
Created September 14, 2012 17:57
Show Gist options
  • Save ss23/3723544 to your computer and use it in GitHub Desktop.
Save ss23/3723544 to your computer and use it in GitHub Desktop.
<html>
<head>
<link rel='stylesheet' href='css/styles.css'/>
<title>My Account - Customer Care Centre - Acme Power Co</title>
</head>
<body>
<div id='heading'>
</div>
<div id='menu'>
<a href='index.php'>Home / Login</a> -
<?
if ($_COOKIE['sesh']) {
echo "
<a href='account.php'>My Account</a> -
<a href='support.php'>Contact Support</a> -
<a href='#' onClick='javascript:window.open(\"hours.php?data=ccc\",\"newwin\",\"width=210,height=200\")'>CCC Opening Hours</a> -
<a href='logout.php'>Logout</a>;";
}
else {
header("Location: index.php");
}
?>
</div>
<div id='content'>
<?
$sess = $_COOKIE['sesh'];
mysql_connect('10.200.0.59','ccc','congratulations');
mysql_select_db('custdb');
$res = mysql_query("SELECT userid, custname, custemail, owing FROM custdata AS cd WHERE cd.userid = (SELECT userid FROM ccc_users AS cu WHERE sessionid = '$sess')");
# echo "<table><tr><td>Customer Name</td><td>Customer Email Address</td><td>Amount Owing</td></tr>";
while ($row = mysql_fetch_array($res)) {
# echo "<tr>";
$accno= $row['userid'];
$custname= $row['custname'];
# echo "<td>$custname</td>";
$custemail= $row['custemail'];
# echo "<td>$custemail</td>";
$owing= $row['owing'];
# echo "<td>$owing</td>";
# echo "</tr>";
}
?>
<div id='billz'>
<?
echo "Hi, $custname!<br><br> Have a token: 86a2aeef8813bfa37a354e8997c77388<br><br>";
echo "Please find below your account statement, released 04 November 2011. This account is due to be paid on <b>05 November 2011</b>. Failure to pay this amount before the due date may result in service disruption.<br><br>";
echo "<h3>Account Statement</h3><hr>";
echo "<table><tr><td width=200>Account Number</td><td width=450>Description of Service</td><td>Amount</td></tr></table><hr>";
echo "<table><tr><td width=200>$accno</td><td width=450>Basic Power Service</td><td>$owing</td></tr></table>";
?>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment