include '../includes/global.php';
/*error_reporting(E_ALL);
ini_set('display_errors', '1');*/
dbconn();
loggedinorreturn();
if (get_user_class() < UC_ADMINISTRATOR)
stderr("Error", "Access denied.");
stdhead("Administration");
$sort=$_GET["sort"];
echo 'sort: ' . $sort . '
';
$type=($_GET["type"]=="asc"?"asc":"desc");
echo 'type: ' . $type . '
';
switch($sort){
case 1:$orderby="ORDER BY id ".$type;break;
case 2:$orderby="ORDER BY IA ".$type;break;
case 3:$orderby="ORDER BY claim_no ".$type;break;
case 4:$orderby="ORDER BY date_received ".$type;break;
case 5:$orderby="ORDER BY IVCV ".$type;break;
default:$orderby = "ORDER BY status, date_received";break;
}
$type=($_GET[type]=="asc"?"desc":"asc");
$addparam = "";
$addparam.="type=$type";
$query = "SELECT * FROM claims WHERE status = 'pending' $orderby";
echo 'query: ' . $query . '
';
//$res = mysql_query("SELECT * FROM claims WHERE status = 'pending' ORDER BY status, date_received") or sqlerr();
$res = mysql_query($query) or sqlerr();
$num = mysql_num_rows($res);
?>
| TS File Number | I/A | Claim Number | Date Rcvd | IV / CV | Vehicle Owner | Vehicle Type | Description | Status of Assignment |
|---|---|---|---|---|---|---|---|---|
| ">TS= $arr["id"]; ?> | = $arr["IA"]; ?> | = $arr["claim_no"]; ?> | = $month . '/' . $day . '/' . $year; ?> | = $arr["IVCV"]; ?> | //Need either cliamant or insured name here depending on IV or CV $IVCV = $arr["IVCV"]; //echo $IVCV . ' - '; if ($IVCV == "IV") { echo $arr["insured_name"]; } elseif ($IVCV == "CV") { echo $arr["claimant_name"]; } ?> | = $vechicle_type; ?> | = $arr["description"]; ?> | //Need last note from notes table for this claim $res2 = mysql_query("SELECT note from notes where claim_id = '" . $arr["id"] . "' ORDER BY note_date DESC LIMIT 0,1 ") or mysql_error(); while ($arr2 = mysql_fetch_assoc($res2)) { echo $arr2["note"]; } ?> |
$res = mysql_query("SELECT * FROM claims WHERE status = 'complete' ORDER BY status, date_received") or sqlerr(); $num = mysql_num_rows($res); stdfoot(); ?>