<?
# Show Accounts displays all the info about an Account
session_start();
require("quicklyweb.php");
require("security/hybrid.php");
beginDocument($lShowAccounts, $_SESSION['sess_user']);
$db = getDBConnection();
if ($_GET['AccountID']) {
$result = DBquery("SELECT * from Accounts where AccountID=$_GET[AccountID]", $db);
$myrow = DBfetch_array($result);
$pack_id = $myrow["PackageGroupID"];
$result = DBquery("SELECT * from PackageGroup where PackageGroupID=$pack_id", $db);
$pack_row = DBfetch_array($result);
beginPrettyTable("2", $lAccountDetails);
makeStaticField($lAccountID, $myrow["AccountID"]);
makeStaticField($lCustomerID, $myrow["CustomerID"]);
makeStaticField($lUsername, $myrow["Username"]);
makeStaticField($lPassword, $myrow["Password"]);
makeStaticField($lDomain, $myrow["Domain"]);
makeStaticField($lDescription, $pack_row["Description"]);
makeStaticField($lDateOpened, $myrow["DateOpened"]);
makeStaticField($lDateClosed, $myrow["DateClosed"]);
# Gracefully handle the different billing types.
#makeStaticField(
makeStaticField("$lStatus", $myrow["Status"]);
makeStaticField("$lLastBilled", $myrow["LastDateBilled"]);
printf("<form method='POST' action='showprofile.php'><tr><td>");
printf("<input type='hidden' name='CustomerID' value='$_GET[CustomerID]'>");
printf("Go Back </td><td><input type='image' type='submit' value='submit' src='images/logout.png' alt='Go Back'></td></tr></form>");
endPrettyTable();
} else {
beginPrettyTable("2", "$lAccountDetails");
echo $lNoRecords;
endPrettyTable();
}
endDocument();
?>