Exemplo n.º 1
0
        $tenant = new Tenant();
        $tenant->setPropertyId($prop_id);
        $tenant->setRoomId($room_id);
        $tenant->setFirstName($fname);
        $tenant->setLastName($lname);
        $tenant->setPhoneNumber($phone);
        $tenant->setNationalIdNumber($id_num);
        if (!empty($email)) {
            $tenant->setEmail($email);
        }
        if (!empty($business)) {
            $tenant->setBusinessName($business);
        }
        $tenant->setDateJoined($joined);
        #echo var_dump($tenant);
        if ($tenant->createNewTenant($room_id)) {
            $session->message("Tenant added");
            redirect_to("tenants.php");
        } else {
            $err = "An error occured preventing the tenant from being added. Try again later";
        }
    }
} else {
    // Form not submitted
    $err = "";
}
include_layout_template("admin_header.php");
?>

	<div id="container">
	<h3>Actions</h3>