<?php include '../include/header.php'; if (isset($_REQUEST['item_id'])) { $item_id = $_REQUEST['item_id']; } $allItemdetail = user::mainDetailOfItem($item_id); $countreview = itemClass::countReview($item_id); $reviewResult = itemClass::averageReview($item_id); $featurimage = itemClass::select_featured_image($item_id); $allrow = user::selectItemImages($item_id); $sql = itemClass::allReviewOfItem($item_id); $objPagination = new Ps_Pagination($conn, $sql, 5, 5); $exsql = $objPagination->paginate(); ?> <div id="message"> <?php if (isset($_SESSION['MSG'])) { echo $_SESSION['MSG']; unset($_SESSION['MSG']); } ?> </div> <div class="containersearch"> <!--containertop--> <div class="itemtop"> <div class="back pL20 left"> <a href='<?php echo $URL_SITE; ?>
if (isset($pick) and isset($drop)) { $sql = "select * from user_reservations where item_id='" . $all_item['id'] . "'"; $res = mysql_query($sql); if (mysql_num_rows($res) > 0) { while ($item_resrve_data = mysql_fetch_assoc($res)) { if ($item_resrve_data['issue_date'] > $pick and $item_resrve_data['end_date'] < $drop or $item_resrve_data['issue_date'] < $drop and $item_resrve_data['issue_date'] > $pick) { continue; $continue = 1; } } if (isset($continue) and $continue == 1) { continue; } } } $image_item = itemClass::select_featured_image($all_item['item_id']); $user = user::user_profile($all_item['owner_id']); $reiwe = itemClass::countReview($all_item['item_id']); $lat1 = $location['latitude']; //surfer latitude $lng1 = $location['longitude']; //surfer longitude @($lat2 = $all_item['latitude']); @($lng2 = $all_item['longitude']); $distances[$all_item['id']]['distance'] = distance($lat1, $lng1, $lat2, $lng2, $miles = false); ?> <!--left_1--> <div class="srcpfl"> <div class="cycle"> <img src="<?php
<?php $basedir = dirname(__FILE__) . "../../"; include $basedir . 'include/header.php'; $latest_item = itemClass::select_latest_item(); $feture_image = itemClass::select_featured_image($latest_item['id']); $user = user::user_profile($latest_item['owner_id']); $riew = itemClass::viewReview($latest_item['id']); $riew = mysql_num_rows(mysql_query($riew)); ?> <!--Content Left--> <div class="contentL"> <form id='' method="POST" action ="searchListing.php" > <h2> Rent Anything! </h2> <h4 class="pT15 pB15"> Rent with ease. We'll take care of the details! </h4> <div class="submit"> <input class="need" type="text" name="word" onclick="if(this.value=='What do you need?'){this.value=''}" onblur="if(this.value==''){this.value='What do you need?'}"value="What do you need?" /> <div class="wdth278"> <input class="zip mR20 " type="text" name="zip" onclick="if(this.value=='Zip code'){this.value=''}" onblur="if(this.value==''){this.value='Zip code'}" value="Zip code" /> <input class="search" type="submit" name="search" value="search " /> </div> </div>
<?php if ($total_item > 0) { ?> <table width="100%" border='1'> <tr> <th>Item Image</th> <th>Item Name</th> <th>Price per Day</th> <th>Number of items</th> <th>Actions</th> <th>Added On</th> </tr> <?php while ($all_item = mysql_fetch_assoc($exsql)) { $mainimage = $mainimage = itemClass::select_featured_image($all_item['id']); ?> <tr> <td> <img src="<?php echo $URL_SITE; ?> classes/show_image.php?filename=../images/itemimages/<?php echo $all_item['id']; ?> /<?php echo $mainimage['filename']; ?> &height=100"> </td>
<?php $query = user::displayItems($user_id); $list_of_items_object = new PS_Pagination($conn, $query, 10, 5, "type=reservation"); $list_of_items_res = $list_of_items_object->paginate(); //$sql=user::displayItems($user_id); //$all_items=mysql_query($sql); if (mysql_num_rows($list_of_items_res) == '0') { echo '<em>NO</em> listings so far'; } else { while ($all_user_item = mysql_fetch_assoc($list_of_items_res)) { $res = itemClass::select_featured_image($all_user_item['id']); //feaure image //get details for reservation $item_res = itemClass::to_get_details_of_reserved_item($all_user_item['id']); $item_reserved = itemClass::users_who_rest_item($all_user_item['id']); $item_res_num = mysql_num_rows($item_reserved); ?> <div class="dasbmessagesbdr"> <div class="swappicdiv"> <img src="<?php echo $URL_SITE; ?> /classes/show_image.php?filename=../images/itemimages/<?php echo $all_user_item['id'] . '/' . $res['filename']; ?> &height=60px&width=100px"> </div> <div class="swaprighttxt"> <div class="swaprighttxtL">
?> <div class="dashrentalsdiv"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="15%" height="27" align="left" class="bdrbtmgrey">Status</th> <th width="50%" align="left" class="bdrbtmgrey">Item</th> <th width="20%" align="left" class="bdrbtmgrey">Owner</th> <th width="20%" align="left" class="bdrbtmgrey">Dates</th> <th class="bdrbtmgrey">Options</th> </tr> <?php while ($list_data = mysql_fetch_assoc($list_of_items)) { //print_r($list_data); $details = user::mainDetailOfItem($list_data['item_id']); $res_image = itemClass::select_featured_image($list_data['item_id']); //print_r($res_image); ?> <tr> <td class="bdrbtmgrey"><a href="javascript:;"><?php if ($list_data['item_status'] == 1) { $status = '<img alt="" src="' . $URL_SITE . '/images/declinebtn.gif">'; } if ($list_data['item_status'] == 3) { $status = '<img alt="" src="' . $URL_SITE . '/images/acceptedbtn.gif">'; } if ($list_data['item_status'] == 0) { $status = '<img alt="" src="' . $URL_SITE . '/images/notrespond.gif">'; } ?>