/////////////////////////////////////////////////////////////////// /////////////////////////////// PROCESS SEARCH //////////////////// /////////////////////////////////////////////////////////////////// if (isset($_GET['submit'])) { $prop_id = $_GET['prop']; $type = $_GET['type']; if (empty($type)) { $err = "Please choose the type of deposit to show"; } elseif (empty($prop_id)) { $err = "Please select property from which to show deposits"; } else { $property = Property::findById($prop_id); switch ($type) { case 1: $deposits = Deposit::findByPropertyId($prop_id); $total_deposits = Deposit::calcDepositsForProperty($prop_id); break; case 2: $deposits = DepositKPLC::findByPropertyId($prop_id); $total_deposits = DepositKPLC::calcDepositsForProperty($prop_id); break; case 3: $deposits = DepositEldowas::findByPropertyId($prop_id); $total_deposits = DepositEldowas::calcDepositsForProperty($prop_id); break; } } } include_layout_template('admin_header.php'); ?>