Example #1
0
 function setRentRequest($item_id, $owner, $picdate, $dropdate)
 {
     $date1 = itemClass::ChangeDate($picdate);
     $date2 = itemClass::ChangeDate($dropdate);
     $message = $_POST['comment'];
     $sql = "insert into user_reservations set issue_date='" . $date1 . "',end_date='" . $date2 . "',item_id='" . $item_id . "', user_id='" . $_SESSION['user']['id'] . "',item_status='0',owner_id='" . $owner . "' ";
     $result = mysql_query($sql) or die(mysql_error());
     $requestid = mysql_insert_id();
     $sql = "insert into inbox  set receiver_id='" . $owner . "',subject='rent request',content='" . $message . "',item_id='" . $item_id . "',sender_id='" . @$_SESSION['user']['id'] . "',date=now(),reservation_id='" . $requestid . "',read_status='0'";
     $result = mysql_query($sql) or die(mysql_error());
     return $result;
 }
Example #2
0
<?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;
?>
Example #3
0
							 </div>						 
					  </div>
				</div>
				
		  </div>    
		</body>';
        $subject = 'A renter wants to rent your item in Spark Swap';
        mail_to_all_user($receivename, $receivermail, $fromname, $fromemail, $mailbody, $subject);
        // sends mail to user who did checked for new items mail function
        $_SESSION['msg'] = '19';
        header('location:' . $URL_SITE . 'front/home.php');
    }
}
$allItemdetail = user::mainDetailOfItem($item_id);
// details of item
$feature_image = itemClass::select_featured_image($item_id);
//feture image of item
$res = user::select_settings_for_user($allItemdetail['owner_id']);
//settigs of item owner
$owner_settings = mysql_fetch_assoc($res);
//print_r($owner_settings);
$user_detail = user::user_profile($_SESSION['user']['id']);
$phoneRequired = 0;
// check wherter to show phone nbr varification
if ($owner_settings['persona_desc'] == 0) {
    $descriptionClass = '';
} else {
    $descriptionClass = 'required';
}
if ($owner_settings['phone'] == 1 or $owner_settings['profile'] == 1) {
    if ($user_detail['varified_phone'] == $owner_settings['phone']) {
Example #4
0
            $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 
        echo $URL_SITE;
        ?>
Example #5
0
	<?php 
include '../include/header.php';
if (!isset($_SESSION['user'])) {
    header("location:" . $URL_SITE . "front/login.php");
}
if (isset($_GET['item_id'])) {
    $item_id = $_GET['item_id'];
    $id = $_GET['id'];
}
$rentitemdetail = user::mainDetailOfItem($item_id);
$featurimage = itemClass::select_featured_image($item_id);
$check = itemClass::checkDetail($id);
if ($check['item_status'] == 1) {
    ?>
			<table>

	<tr>
	<td>
	<?php 
    echo '';
    ?>
	</td>
	<td>
	<img class="itemdetailsL" src="<?php 
    echo $URL_SITE;
    ?>
/classes/show_image.php?filename=../images/itemimages/<?php 
    echo $item_id;
    ?>
/<?php 
    echo $featurimage['filename'];
Example #6
0
<?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>
Example #7
0
}
?>

		<?php 
if ($_GET['type'] == 'reviewby') {
    $user_id = $_SESSION['user']['id'];
    $byyouexsql = user::reviewsByYoupagi($user_id);
    $objPagination = new Ps_Pagination($conn, $byyouexsql, 5, 5, "type=reviewby");
    $newexsql = $objPagination->paginate();
    if (mysql_num_rows($newexsql) > 0) {
        ?>
				
				    <div id="reviewby">
					  <?php 
        while ($row = mysql_fetch_assoc($newexsql)) {
            $reviewResult = itemClass::averageReview($row['item_id']);
            $user = user::user_profile($row['user_id']);
            ?>
						<div class="wdthpercent100">
						<div class="reviewoverall">
						<h3>Overall</h3>
						<ul class="reviewstarover">
						<?php 
            for ($i = 1; $i <= $reviewResult['overall']; $i++) {
                ?>
						<li> <img src="../images/star_2.png" /> </li>
						<?php 
            }
            for ($j = $i; $j <= 5; $j++) {
                ?>
						<li> <img src="../images/star_gry_2.png" /> </li>
Example #8
0
    $item_id = $_GET['item_id'];
    $reservationid = $_GET['id'];
    $msg_id = $_GET['msg_id'];
}
$update = user::update_message($msg_id);
$check = itemClass::checkDetail($_GET['id']);
$msg_detail_res = inbox::select_msg_by_id($_GET['msg_id']);
$msg_detail = mysql_fetch_assoc($msg_detail_res);
$renter_detail = user::user_profile($msg_detail['sender_id']);
// renter profile
//echo "<pre>";print_r($msg_detail);echo "</pre>";
$rentitemdetail = user::mainDetailOfItem($item_id);
// Details of item
$featurimage = itemClass::select_featured_image($item_id);
// select image of item
$dates = itemClass::renter_praposal_date($item_id, $renter_detail['id']);
// to check date by renter
if ($dates['newissuedate'] != '0000-00-00') {
    $start = strtotime($dates['newissuedate']);
    // if  dates were changed by owner
    $end = strtotime($dates['newienddate']);
} else {
    $start = strtotime($dates['issue_date']);
    // if no dates were changed by owner
    $end = strtotime($dates['end_date']);
}
?>


<!--Content-->
<div id="container pB10">
Example #9
0
<?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">
Example #10
0
	<?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>
		 
Example #11
0
		southWest.lng() + lngSpan * Math.random());
		map.addOverlay(new GMarker(point));
		map.setCenter(point, 15);


		}
		}

		</script>

		</div>
	<!--/ to show map -->
	<!-- to show calender -->
	<div style="display:none" id="calender">
		<?php 
$item_detail = itemClass::collect_booking_dates($item_id);
$disable_dates_all = '';
while ($row = mysql_fetch_assoc($item_detail)) {
    //print_r($row);
    if ($row['newissuedate'] !== '0000-00-00') {
        $startDate = $row['newissuedate'];
        $endDate = $row['newienddate'];
    } else {
        $startDate = $row['issue_date'];
        $endDate = $row['end_date'];
    }
    $date = getDatesBetween2Dates($startDate, $endDate);
    foreach ($date as $allDate) {
        //print_r($allDate);die;
        $disable_dates_all .= '[';
        $disable_dates_all .= $allDate;
Example #12
0
        ?>

				<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">';
            }
            ?>
Example #13
0
$sql = user::selectFavourite($user_id);
$objPagination = new Ps_Pagination($conn, $sql, 5, 5);
$exsql = $objPagination->paginate();
$total_item = mysql_num_rows($exsql);
?>
	

<?php 
if ($total_item) {
    ?>
<table width="100%">
<?php 
    while ($list_data = mysql_fetch_assoc($exsql)) {
        //print_r($list_data);
        $res = itemClass::select_featured_image($list_data['id']);
        $item_reserve_res = itemClass::to_get_details_of_reserved_item($list_data['id']);
        ?>
		<tr class="mT5">
			<td>


			<img src="<?php 
        echo $URL_SITE;
        ?>
/classes/show_image.php?filename=../images/itemimages/<?php 
        echo $list_data['id'] . '/' . $res['filename'];
        ?>
&height=60px&width=100px"?>
			</td>

Example #14
0
 function payment_dtatils($item_id, $owner)
 {
     @($payout_email = $_POST['payout_email']);
     @($payout_type = $_POST['payout_type']);
     @($name_on_account = $_POST['name_on_account']);
     @($account_type = $_POST['account_type']);
     @($routing_number = $_POST['routing_number']);
     @($account_number = $_POST['account_number']);
     @($name_on_check = $_POST['name_on_check']);
     @($address_1 = $_POST['address_1']);
     @($address_2 = $_POST['address_2']);
     @($city = $_POST['city']);
     @($state = $_POST['state']);
     @($zip_code = $_POST['zip_code']);
     @($country = $_POST['country']);
     @($desciption_renter = $_POST['desciption_renter']);
     @($phonenumber = $_POST['phonenumber']);
     @($pay = $_POST['total_price']);
     @($droop_date = $_POST['drop_up']);
     @($pick_up = $_POST['pick_up']);
     @($pickup_date = substr($pick_up, 0, 10));
     @($drop_date = substr($droop_date, 0, 10));
     $sql = "insert into user_transactions\tset\towner_id='" . $owner . "',payer_id='" . $_SESSION['user']['id'] . "',phonenumber='" . $phonenumber . "',\titem_id='" . $item_id . "',desciption_renter='" . $desciption_renter . "',name_on_check='" . $name_on_check . "',address_1='" . $address_1 . "',address_2='" . $address_2 . "',city='" . $city . "',state='" . $state . "',zip_code='" . $zip_code . "',country='" . $country . "',payout_email='" . $payout_email . "',payout_type='" . $payout_type . "',name_on_account='" . $name_on_account . "',\taccount_type='" . $account_type . "',routing_number='" . $routing_number . "',account_number='" . $account_number . "',pay='" . $pay . "',payment_date=now()";
     itemClass::setRentRequest($item_id, $owner, $pickup_date, $drop_date);
     $res = mysql_query($sql);
     return mysql_insert_id();
 }
Example #15
0
<?php

$res = itemClass::to_get_detail_upcoming_items_for_user($user_id);
if (mysql_num_rows($res) > 0) {
    while ($list_data = mysql_fetch_assoc($res)) {
        ?>
<tr class="mT5">
	<td>

	<img src="<?php 
        echo $URL_SITE;
        ?>
/classes/show_image.php?filename=../images/itemimages/<?php 
        echo $list_data['id'] . '/' . $res['filename'];
        ?>
&height=60px&width=100px"?>
	</td>


	<td>
	<?php 
        echo 'Posted: ' . date('d/m/Y', strtotime($list_data['created_on']));
        ?>
	</td>


	<td>
	<?php 
        echo $list_data['item_name'] . '<br/>" ' . $list_data['item_subtitle'] . ' "' . $list_data['item_description'];
        ?>
	</td>