<!-- n8498415 Jayden Whiley --> <!-- Manage property form --> <?php if (IsStaff()) { ?> <div class="EnquireBox"> <?php if (CheckManager(Username(), $house->ID)) { echo "<h2> You Manage This property </h2>"; } else { echo "<h2> Manage this property </h2>"; } ?> <form action="Actions.php" method="get"> <input type="hidden" name="Action" value="ManageProperty"> <input type="hidden" name="HouseID" value="<?php echo $house->ID; ?> "> <input type="submit" value="Manage Property"> </form> </div> <?php }
<?php include './admin/config.php'; include './admin/db_connection.php'; $_SESSION['job'] = $_REQUEST['jobref']; $_SESSION['qty'] = $_REQUEST['quantity']; $user_id = $_SESSION['sohorepro_companyid']; $id_user = $_SESSION['sohorepro_userid']; $shipping_address = ShippingAddress($user_id); $primary_shipping = PrimaryShipping($user_id); $user_manager = CheckManager($id_user); if ($_GET['redirect'] == 'serivce_recipient') { ?> <script>setTimeout("location.href=\'add_recipients.php?address_ste=1\'", 1000);</script> <?php } if ($_GET['delete_id']) { $delete_id = $_GET['delete_id']; $sql = "DELETE FROM sohorepro_address WHERE id = " . $delete_id . " "; $sql_result = mysql_query($sql); if ($sql_result) { $result = "success"; } else { $result = "failure"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
$id = $_GET['id']; $_SESSION['job'] = $_REQUEST['jobref']; $_SESSION['qty'] = $_REQUEST['quantity']; $user_id = $_SESSION['sohorepro_userid']; $id_user = $_SESSION['sohorepro_companyid']; $company_id = company_id($user_id); $editAddress = editAddressServices($id); $user_manager = CheckManager($user_id); $state_all = StateAll(); if ($_REQUEST['edit_address'] == '1') { extract($_POST); $sql = "UPDATE sohorepro_address_service SET comp_id = '". $company_id ."', company_name = '". $comp ."', address_1 = '". $add1 ."',
<?php include './admin/config.php'; include './admin/db_connection.php'; $_SESSION['job'] = $_REQUEST['jobref']; $_SESSION['qty'] = $_REQUEST['quantity']; $user_id = $_SESSION['sohorepro_companyid']; $id_user = $_SESSION['sohorepro_userid']; $shipping_address = ShippingAddressService($user_id); $primary_shipping = PrimaryShipping($user_id); $user_manager = CheckManager($id_user); if($_GET['redirect'] == 'serivce_recipient'){ ?> <script>setTimeout("location.href=\'add_recipients.php?address_ste=1\'", 1000);</script> <?php } if ($_GET['delete_id']) { $delete_id = $_GET['delete_id']; $sql = "DELETE FROM sohorepro_address_service WHERE id = " . $delete_id . " "; $sql_result = mysql_query($sql); if ($sql_result) { $result = "success"; } else { $result = "failure"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php include './admin/config.php'; include './admin/db_connection.php'; $id = $_GET['id']; $_SESSION['job'] = $_REQUEST['jobref']; $_SESSION['qty'] = $_REQUEST['quantity']; $user_id = $_SESSION['sohorepro_userid']; $id_user = $_SESSION['sohorepro_companyid']; $company_id = company_id($user_id); $editAddress = editAddressServices($id); $user_manager = CheckManager($user_id); $state_all = StateAll(); if ($_REQUEST['edit_address'] == '1') { extract($_POST); $sql = "UPDATE sohorepro_address_service SET comp_id = '". $company_id ."', company_name = '". $comp ."', address_1 = '". $add1 ."', address_2 = '". $add2 . "', address_3 = '". $add3 . "', city = '". $city ."', state = '". $state."', zip = '". $zip ."', zip_ext = '" . $zipext."', phone = '". $phone ."', extension = '". $ext ."', attention_to = '". $attention."' WHERE id = '".$id."' "; $sql_result = mysql_query($sql); if(($user_manager == '1') && ($editAddress[0]['type'] == '1')) {
if (CheckList($UserValues)) { $booking = GetList($UserValues); $enq = $booking[0]; DeleteEnquiry($enq); header("Location: index.php"); } } //Cancel Application (user) if ($Action == "CancelApp") { $UserValues = ['AppID']; if (CheckList($UserValues)) { $booking = GetList($UserValues); $app = $booking[0]; DeleteApplication($app); header("Location: Profile.php"); } } //Become property manager (Staff) if ($Action == "ManageProperty") { $UserValues = ['HouseID']; if (CheckList($UserValues)) { $booking = GetList($UserValues); $houseid = $booking[0]; if (CheckManager(Username(), $houseid)) { UnmanageProperty(Username(), $houseid); } else { ManageProperty(Username(), $houseid); } header("Location: HouseDisplay.php?HouseID={$houseid}"); } }