Files
cs157AOnlineBanking/f8l_exception/admin_home.php

86 lines
2.0 KiB
PHP
Raw Normal View History

2014-11-14 15:41:00 -08:00
<?php
include 'includes/inc_header.php';
2014-11-16 18:06:09 -08:00
include 'includes/inc_adminFunctions.php';
2014-11-14 15:41:00 -08:00
echo <<<_END
<!-- F8L Exception Online Bank | Admin Home -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>F8L Exception Online Bank | Admin Home</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel = 'stylesheet' href='styles.css' type='text/css'></link>
</head>
<body>
<h1>Admin Home</h1>
<hr />
_END;
echo <<<_END
<form action="admin_home.php" method="post">
<select name="view">
<option value=""></option>
<option value="lowBalance">Low Balance Account</option>
<option value="increaseLimit">Increase Credit Limit</option>
<option value="offerCredit">Offer Credit</option>
</select>
<input type="submit" value="View">
</form>
_END;
if (isset($_POST['view'])){
2014-11-16 18:06:09 -08:00
2014-11-14 15:41:00 -08:00
if ($_POST['view'] == 'lowBalance'){
2014-11-16 18:06:09 -08:00
echo <<<_END
2014-11-16 23:34:19 -08:00
<h2 class='tabletitle'>LOW BALANCE</h2>
2014-11-16 18:06:09 -08:00
<table>
<tr>
<th>Username</th>
<th>Account Type</th>
<th>Balance</th>
</tr>
_END;
viewLowBalance();
2014-11-14 15:41:00 -08:00
} elseif ($_POST['view'] == 'increaseLimit'){
2014-11-16 23:34:19 -08:00
echo <<<_END
<h2 class='tabletitle'>INCREASE CREDIT CARD LIMIT</h2>
<table>
<tr>
<th>Username</th>
<th>Max Limit</th>
<th>Balance</th>
<th>Account Type</th>
2014-11-16 23:34:19 -08:00
</tr>
_END;
increaseLimit();
2014-11-14 15:41:00 -08:00
} elseif ($_POST['view'] == 'offerCredit'){
2014-11-16 23:34:19 -08:00
echo <<<_END
<h2 class='tabletitle'>OFFER CREDIT CARD</h2>
<table>
<tr>
<th>Username</th>
<th>Balance</th>
</tr>
_END;
offerCredit();
2014-11-14 15:41:00 -08:00
}
2014-11-16 18:06:09 -08:00
echo <<<_END
</table>
_END;
2014-11-14 15:41:00 -08:00
}
function viewLowBalance(){
2014-11-16 18:06:09 -08:00
lowBalance();
}
function increaseLimit(){
increaseCCLimit();
2014-11-14 15:41:00 -08:00
}
2014-11-16 23:34:19 -08:00
function offerCredit(){
offerCC();
}
2014-11-14 15:41:00 -08:00
?>