<!-- 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 }
</tr> <?php } } else { ?> <div class="table" id="s_tx" style="text-align:center;"> No Send transation found! </div> <?php } ?> </table> <?php } if (!empty($_POST["Username"])) { echo Username($con, $session); } if (!empty($_POST["Vali_orbitcoin_address"])) { $orb_address_for_vali = Clean(mysqli_real_escape_string($con, $_POST["Vali_orbitcoin_address"])); echo Is_validate_address($coin, $orb_address_for_vali); } if (!empty($_POST["orbitcoin_send_payment_password"])) { $user_input_pass_in_send_payment = Clean(mysqli_real_escape_string($con, sha1($_POST["orbitcoin_send_payment_password"]))); echo chk_user_pass_during_send_payment($con, $user_input_pass_in_send_payment, $session); } if (!empty($_POST["Check_amount"])) { $chk_amount = Clean(mysqli_real_escape_string($con, $_POST["Check_amount"])); echo chk_amount($con, $coin, $chk_amount, $session); } if (isset($_POST["orb_address"])) { if (!empty($_POST["orb_address"])) {
echo "<div class=\"magentry\">"; if (!ereg("0000",$entry[time])) $date=strftime("%d.%m.%Y", strtotime($entry[time])); else $date=strftime("%d.%m.%Y", strtotime($entry[time_input])); $preview=$entry[id]; echo "<h2><a href=\"http://$language.liberty.li/magazine/?id=$entry[id]&q=".ereg_replace(" ","+",$entry[title])."\" style=\"border:none;\">"; ?> <?php echo $entry[title]; ?> </a></h2> <? echo "<div class=\"magauthor\">"; echo $date.", "; if (ereg("MSIE",$_SERVER['HTTP_USER_AGENT'])) $authorlink="http://$language.liberty.li/user/".urlencode(Username($entry[userid])); else $authorlink="http://$language.liberty.li/user/".Username($entry[userid]); if (Username($entry[userid])&&Username($entry[userid])==$entry[author]&&$entry[type]!="quotes") echo "<a href=\"$authorlink\">$entry[author]</a>"; elseif (Username($entry[userid])&&Username($entry[userid])!=$entry[author]&&$entry[type]!="quotes") echo "$entry[author] (<a href=\"$authorlink\">".Username($entry[userid])."</a>)"; else echo "(<a href=\"$authorlink\">".Username($entry[userid])."</a>)"; echo "</div>"; ?> <? if ($entry[text]) { echo "<div id=\"item\" >"; echo stripslashes($entry[text]); } if ($entry[asin]&&ereg("amazon",$entry[shop])) { ?> <div align="right"><a href="http://www.amazon.<?php echo $amazon; ?> /exec/obidos/ASIN/<?php
function PrintEnquiryForStaff($enq) { $house = GetHouseByID($enq->HouseID); $usr = GetUserByUsername(Username()); echo "<div class='EnquireItem'>\n\t\t\t\t<div id='Username' class='TextLine'> {$enq->Username} </div>\n\t\t\t\t<div id='Misc'>\n\t\t\t\t\t<div class='TextLine'> {$enq->Time} </div>\n\t\t\t\t\t<div class='TextLine'> <a href='HouseDisplay.php?HouseID={$house->ID}'> {$house->Address} </a> </div>\n\t\t\t\t</div>\n\t\t\t\t<div id='body' class='TextLine'> {$enq->Body} </div>\n\t\t\t\t<input type='button' onclick=\"alert('Email Customer: ' + '{$usr->Email}')\" value='Reply'>\n\t\t\t\t<input type='button' onclick=\"location.href='Actions.php?Action=DeleteEnq&EnqID={$enq->ID}'\" value='Delete'>\n\t\t\t</div>"; }
<textarea name='InquireText' cols='70' rows='5'></textarea> <?php if (LoggedIn()) { echo "<input type='submit' value='Submit Enquiry'>"; } else { echo "<h3> Please Login to Submit Enquiry"; } ?> </form> <?php } ?> </div> <?php if (LoggedIn()) { if (!CheckApplication(Username(), $house->ID)) { ?> <div class="EnquireBox"> <h2> Apply For Property </h2> <!-- Application form --> <form action="Actions.php" method="get"> <input type="hidden" name="Action" value="LeaseApplication"> <input type="hidden" name="HouseID" value="<?php echo $house->ID; ?> "> <div class="InputLine"> <label>Lease Start Date</label> <input type="date" name="BookingDate"> </div> <div class="InputLine"> <label>Lease Duration</label> <select name="Duration"> <option value="3"> 3 Months </option> <option value="6"> 6 Months </option>
<?php //Shows properties that current staff member is managing include "SiteBanner.php"; include_once "DaveLib.php"; echo "<div id='PopList'>\n\t\t\t\t<h1> Your Assigned Houses </h1>\n\t\t\t\t<div class='HouseList'>"; //get houses by staff username $myhouses = GetManagerHouses(Username()); //print houses PrintHouses($myhouses); if (count($myhouses) == 0) { echo "<h1>You currenty aren't assigned to any houses</h1>"; } echo "</div></div></body></HTML>";
function ShowBooking($Booking, $Manager) { $date = $Booking->GetStringDate(); $usr = GetUserByUsername($Booking->HostUsername); echo "<div class='BookingEntry'> \n\t\t<h3> {$date} </h3>\n\t\t<h4> Manager Name: {$usr->Name} </h4>\n\t\t<h4> Manager Phone: {$usr->PhoneNumber} </h4>\n\t\t<form action='Actions.php' method='get'>\n\t\t<input type='hidden' name='BookingID' value='{$Booking->ID}'>\n\t\t<input type='hidden' name='HouseID' value='{$Booking->HouseID}'> "; if (LoggedIn()) { if ($Manager) { echo "<input type='submit' value='Delete'>\n\t\t\t\t<input type='hidden' name='Action' value='DeleteBooking'></form></div>"; } else { if (CheckBooking($Booking->ID, Username())) { echo "<input type='submit' value='Unregister'>\n\t\t\t\t\t<input type='hidden' name='Action' value='UnregisterBooking'></form></div>"; } else { echo "<input type='submit' value='Register'>\n\t\t\t\t\t<input type='hidden' name='Action' value='RegisterBooking'></form></div>"; } } } else { echo "<h4> Please Login to Register for Open House</h4> </form></div>"; } }
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}"); } }
?> <div class="ProfilePage"> <h1> Profile Page </h1> <div class="UserDetails"> <?php $user = GetUserByUsername(Username()); echo "<div class='InputLine'> <div class='boldlabel'> Username: </div> {$user->Username} </div>"; echo "<div class='InputLine'> <div class='boldlabel'> Name: </div>{$user->Name} </div>"; echo "<div class='InputLine'> <div class='boldlabel'> Email: </div>{$user->Email} </div>"; echo "<div class='InputLine'> <div class='boldlabel'> Phone Number: </div> {$user->PhoneNumber} </div>"; ?> </div> <?php //Show user applications if (!IsManager()) { echo "<h2> Current Applications </h2>"; $apps = GetUserApplications(Username()); foreach ($apps as $app) { ShowUserApplication($app); } if (count($apps) == 0) { echo "<h3> You haven't applied to any properties </h3>"; } } ?> </div> </body> </html>
<div class="HomePage"> <h1>Staff Home</h1> <div class="StaffHome"> <h2> Upcoming Bookings </h2> <?php //returns all bookings for current staff member $userbookings = GetManagerBookings(Username()); echo "<div id='PopList'>\n\t\t\t<div class='HouseList'>"; if (count($userbookings) == 0) { echo "<h2> You have no upcoming open house bookings </h2>"; } //prints user bookings foreach ($userbookings as $booking) { $datestring = $booking->GetStringDate(); echo "<h2> {$datestring} </h2>"; $house = GetHouseByID($booking->HouseID); PrintHouse($house); } echo "</div></div>"; ?> <h2> Recent Enquiries </h2> <div class="EnquireList"> <?php //Show enquires with this username ShowManagerEnquires(Username()); ?> </div> </div> </div> </body> </html>