Esempio n. 1
0
                                    <li class="clearfix TypeAns_Right">
                                        <div class="TypeConver_Ans clsFloatLeft">
                                            <?php 
        if ($message->message_type != 3) {
            ?>
                                                <div class="TypeConver_Head">
                                                    <p>
                <?php 
            echo $message->name;
            ?>
 <?php 
            echo translate("about");
            ?>
 "<?php 
            echo anchor('rooms/' . $message->list_id, get_list_by_id($message->list_id)->title);
            ?>
"
                                                    </p>
                                                    <!--<?php 
            if ($message->message_type != 6) {
                ?>
                                                        <p><label><?php 
                echo get_user_times($message->checkin, get_user_timezone()) . ' - ' . get_user_times($message->checkout, get_user_timezone());
                ?>
</label><label><?php 
                echo $message->no_quest . ' ' . translate("guest");
                ?>
</label></p>
                <?php 
            }
Esempio n. 2
0
                        echo date("F j, Y", strtotime($checkin)) . ' - ' . date("F j, Y", strtotime($checkout));
                        ?>
)</p>
                                            </div>
                                            <?php 
                    } else {
                        if ($row->is_read == 0) {
                            echo '<strong>';
                        }
                        echo anchor('' . $row->url . '/' . $message_id, $row->message, array("onclick" => "javascript:is_read(" . $row->id . ")"));
                        if ($row->is_read == 0) {
                            echo '</strong>';
                        }
                        ?>
                                            <p><?php 
                        echo substr(get_list_by_id($row->list_id)->title, 0, 10);
                        ?>
</span> <span>(<?php 
                        echo date("F j, Y", strtotime($checkin)) . ' - ' . date("F j, Y", strtotime($checkout));
                        ?>
)</p>
                                            </div>
                                            <?php 
                    }
                }
            }
        }
        if ($row->message_type != 9) {
            ?>

                                            <div class="clsMeg_Off clsFloatRight">
Esempio n. 3
0
 public function review_by_traveller($param = '')
 {
     if ($this->input->post()) {
         $reservation_id = $this->input->post('reservation_id');
         $review = $this->input->post('review');
         $feedback = $this->input->post('feedback');
         $cleanliness = $this->input->post('cleanliness');
         $communication = $this->input->post('communication');
         $accuracy = $this->input->post('accuracy');
         $checkin = $this->input->post('checkin');
         $location = $this->input->post('location');
         $value = $this->input->post('value');
         $updateKey = array('id' => $reservation_id);
         $updateData = array();
         $updateData['status '] = 10;
         $this->Trips_model->update_reservation($updateKey, $updateData);
         $conditions = array('reservation.id' => $reservation_id);
         $row = $this->Trips_model->get_reservation($conditions)->row();
         $username = ucfirst($this->dx_auth->get_username());
         $insertData = array('list_id' => $row->list_id, 'reservation_id' => $reservation_id, 'userby' => $row->userto, 'userto' => $row->userby, 'message' => "{$username} gives the reviews for you.", 'created' => local_to_gmt(), 'message_type ' => 4);
         //$this->Message_model->sentMessage($insertData);
         $insertDataR = array('userby' => $row->userby, 'userto' => $row->userto, 'list_id' => $row->list_id, 'reservation_id' => $reservation_id, 'review' => $review, 'feedback' => $feedback, 'cleanliness' => $cleanliness, 'communication' => $communication, 'accuracy' => $accuracy, 'checkin' => $checkin, 'location' => $location, 'value' => $value, 'created' => local_to_gmt());
         $this->Trips_model->insertReview($insertDataR);
         //Update The Review Cout
         $no_review = get_list_by_id($row->list_id)->review;
         $update_r = $no_review + 1;
         $data = array('review' => $update_r);
         $this->db->where('id', $row->list_id);
         $this->db->update('list', $data);
         $this->session->set_flashdata('flash_message', $this->Common_model->flash_message('success', translate('Your review saved successfully.')));
         redirect('hosting/my_reservation');
     } else {
         if (isset($param)) {
             $reservation_id = $param;
             $conditions = array('reservation.id' => $reservation_id, 'reservation.userby' => $this->dx_auth->get_user_id());
             $result = $this->Trips_model->get_reservation($conditions);
             if ($result->num_rows() == 0) {
                 redirect('info');
             }
             if ($result->row()->status != 9) {
                 redirect('trips/traveler_review/' . $reservation_id);
             }
             $data['reservation_id'] = $param;
             $data['title'] = get_meta_details('Review', 'title');
             $data["meta_keyword"] = get_meta_details('Review', 'meta_keyword');
             $data["meta_description"] = get_meta_details('Review', 'meta_description');
             $data['message_element'] = 'trips/view_review_traveller';
             $this->load->view('template', $data);
         } else {
             redirect('info');
         }
     }
 }
Esempio n. 4
0
                            <tr>
                                <td width="15%"> <p class="View_my_Accept_Bg"><span><?php 
        echo $row->name;
        ?>
</span></p> </td>
                                <td width="30%">
                                    <p> <?php 
        echo get_user_times($row->checkin, get_user_timezone()) . ' - ' . get_user_times($row->checkout, get_user_timezone());
        ?>
 </p> <br />
                                    <p class="clsBold"> <?php 
        echo anchor('rooms/' . $row->list_id, get_list_by_id($row->list_id)->title);
        ?>
 </p> 
                                    <p> <?php 
        echo get_list_by_id($row->list_id)->address;
        ?>
 </p> 
                                </td>
                                <td width="25%">
                                    <p> <img height="50" width="50" alt="image" style="float:left; margin:0 10px 10px 0;" src="<?php 
        echo $this->Gallery->profilepic($row->userby, 2);
        ?>
" />
                                        <span class="clsBold">
                                            <a href="<?php 
        echo site_url('users/profile') . '/' . $row->userby;
        ?>
"><?php 
        echo ucfirst(get_user_by_id($row->userby)->username);
        ?>
Esempio n. 5
0
                        <?php 
if ($result->status != 1) {
    ?>

                            <?php 
}
?>
                        <ul id="details_breakdown_1" class="dashed_table_1 clearfix">
                            <li class="top clearfix">
                                <span class="label"><span class="inner"><span class="checkout_icon" id="icon_cal"></span><?php 
echo translate("Property");
?>
</span></span>
                                <span class="data"><span class="inner"><?php 
echo get_list_by_id($result->list_id)->title;
?>
</span></span>
                            </li>

                            <li class="clearfix">
                                <span class="label"><span class="inner"><span class="checkout_icon" id="icon_cal"></span><?php 
echo translate("Check in");
?>
</span></span>
                                <span class="data"><span class="inner"><?php 
echo date("F j, Y", $result->checkin);
?>
</span></span>
                            </li>
Esempio n. 6
0
 public function ajax_contact()
 {
     $room_id = $this->input->post('room_id');
     $message = $this->input->post('message');
     //Send Message Notification To Host
     $insertData = array('list_id' => $room_id, 'userby' => $this->dx_auth->get_user_id(), 'userto' => get_list_by_id($room_id)->user_id, 'message' => $message, 'created' => local_to_gmt(), 'message_type' => 6);
     $this->Message_model->sentMessage($insertData, 1);
     echo 'Message send successfully';
 }
Esempio n. 7
0
$tmpl = array('table_open' => '<table class="table" border="0" cellpadding="4" cellspacing="0">', 'heading_row_start' => '<tr>', 'heading_row_end' => '</tr>', 'heading_cell_start' => '<th>', 'heading_cell_end' => '</th>', 'row_start' => '<tr>', 'row_end' => '</tr>', 'cell_start' => '<td>', 'cell_end' => '</td>', 'row_alt_start' => '<tr>', 'row_alt_end' => '</tr>', 'cell_alt_start' => '<td>', 'cell_alt_end' => '</td>', 'table_close' => '</table>');
$this->table->set_template($tmpl);
$this->table->set_heading('', translate_admin('S.No'), translate_admin('List Name'), translate_admin('Traveller Name(ID)'), translate_admin('Total Price'), translate_admin('Status'), translate_admin('Is Payed?'), translate_admin('Options'));
if ($result->num_rows() > 0) {
    $i = 1;
    foreach ($result->result() as $row) {
        $query = $this->Users_model->get_user_by_id($row->userby);
        $booker_name = $query->row()->username;
        $query1 = $this->Users_model->get_user_by_id($row->userto);
        $hotelier_name = $query1->row()->username;
        $hotelier_id = $query1->row()->id;
        if ($row->is_payed == 1) {
            $is_payed = translate_admin('Yes');
        } else {
            $is_payed = translate_admin('No');
        }
        $check_list_id = $this->db->where('id', $row->list_id)->get('list');
        if ($check_list_id->num_rows() != 0) {
            $this->table->add_row(form_checkbox('check[]', $row->id), $i, get_list_by_id($row->list_id)->title, $row->username . '(' . $row->userby . ')', $row->currency . ' ' . $row->price, $row->name, $is_payed, anchor(admin_url('payment/details/' . $row->id), translate_admin('View Details')));
            $i++;
        }
    }
} else {
    $this->table->add_row('', translate_admin('There is no reservation yet !'), '');
}
echo $this->table->generate();
echo form_close();
echo $pagination;
?>
</div>
Esempio n. 8
0
    echo translate("Options");
    ?>
 </th>
			</tr>
			
	  <?php 
    foreach ($result->result() as $row) {
        ?>
    <tr>
			 <td> <p class="View_my_Accept_Bg"><span><?php 
        echo $row->name;
        ?>
</span></p> </td>
				<td>
					<p class="clsBold"> <?php 
        echo anchor('travelling/host_details/' . $row->id, get_list_by_id($row->list_id)->address);
        ?>
 </p> 
				</td>
				<td width="22%">
				 <p> <img height="50" width="50" alt="image" style="float:left; margin:0 10px 10px 0;" src="<?php 
        echo $this->Gallery->profilepic($row->userto, 2);
        ?>
" />
					<span class="clsBold"><?php 
        echo ucfirst(get_user_by_id($row->userto)->username);
        ?>
</span></p>
                    <span class="clsMyReser_SendMsg"><a href="<?php 
        echo site_url('trips/send_message/' . $row->userby);
        ?>
Esempio n. 9
0
    $i = 1;
    foreach ($result->result() as $row) {
        $query = $this->Users_model->get_user_by_id($row->userby);
        $booker_name = $query->row()->username;
        $query1 = $this->Users_model->get_user_by_id($row->userto);
        //$hotelier_name = $query1->row()->username;
        //print_r($hotelier_name);
        //$hotelier_id   = $query1->row()->id;
        if ($row->is_payed == 1) {
            $is_payed = translate_admin('Yes');
        } else {
            $is_payed = translate_admin('No');
        }
        $check_list_id = $this->db->where('id', $row->list_id)->get('list');
        if ($check_list_id->num_rows() != 0) {
            $this->table->add_row(form_checkbox('check[]', $row->id) . '&#160;' . $i, get_list_by_id($row->list_id)->title, $row->username . '(' . $row->userby . ')', $row->currency . ' ' . $row->price, $row->name, unix_to_human($row->book_date), anchor(admin_url('payment/details/' . $row->id), translate_admin('View Details')));
            $i++;
        }
    }
} else {
    $this->table->add_row('', translate_admin('There is no reservation yet !'), '');
}
echo $this->table->generate();
echo form_close();
?>
	<script type="text/javascript">
            $(document).ready(function() {
                $('#tableData').paging({limit:15});
            });
        </script>
        <script type="text/javascript">
Esempio n. 10
0
 function paypal_success($id)
 {
     $token = $_GET['token'];
     $payer_id = $_GET['PayerID'];
     // GetExpressCheckoutDetails
     $get_ec_return = $this->paypal_ec->get_ec($token);
     if (isset($get_ec_return['ec_status']) && $get_ec_return['ec_status'] === true) {
         // at this point, you have all of the data for the transaction.
         // you may want to save the data for future action. what's left to
         // do is to collect the money -- you do that by call DoExpressCheckoutPayment
         // via $this->paypal_ec->do_ec();
         //
         // I suggest to save all of the details of the transaction. You get all that
         // in $get_ec_return array
         $ec_details = array('token' => $token, 'payer_id' => $payer_id, 'currency' => $this->session->userdata('currency_code'), 'amount' => $get_ec_return['PAYMENTREQUEST_0_AMT'], 'IPN_URL' => site_url('payments/ipn'), 'type' => 'sale');
         // DoExpressCheckoutPayment
         $do_ec_return = $this->paypal_ec->do_ec($ec_details);
         if (isset($do_ec_return['ec_status']) && $do_ec_return['ec_status'] === true) {
             // at this point, you have collected payment from your customer
             // you may want to process the order now.
             /* echo "<h1>Thank you. We will process your order now.</h1>";
                echo "<pre>";
                echo "\nGetExpressCheckoutDetails Data\n" . print_r($get_ec_return, true);
                echo "\n\nDoExpressCheckoutPayment Data\n" . print_r($do_ec_return, true);
                echo "</pre>";exit; */
             if (isset($do_ec_return['L_SHORTMESSAGE0']) && $do_ec_return['L_SHORTMESSAGE0'] === 'Duplicate Request') {
                 redirect('home');
             }
             $is_payed = $this->db->where('id', $id)->get('reservation')->row()->is_payed;
             if ($is_payed == 0) {
                 $custom = $this->session->userdata('custom');
                 $data = array();
                 $list = array();
                 $data = explode(',', $custom);
                 $list_id = $data[0];
                 $reservation_id = $data[1];
                 $email_id = $data[2];
                 $price = $data[3];
                 $result = $this->Common_model->getTableData('reservation', array('id' => $id))->row();
                 $checkin = $result->checkin;
                 $checkout = $result->checkout;
                 $admin_email = $this->dx_auth->get_site_sadmin();
                 $admin_name = $this->dx_auth->get_site_title();
                 if ($result->status != 1 && $result->status != 2 && $result->status != 4 && $result->status != 5 && $result->status != 6) {
                     $query = $this->Users_model->get_user_by_id($result->userto);
                     $hotelier_name = $query->row()->username;
                     $hotelier_email = $query->row()->email;
                 } else {
                     if ($result->status == 2 || $result->status == 4 || $result->status == 5 || $result->status == 6) {
                         $query = $this->Users_model->get_user_by_id($result->userby);
                         $hotelier_name = $query->row()->username;
                         $hotelier_email = $query->row()->email;
                     } else {
                         $query = $this->Users_model->get_user_by_id($result->userto);
                         $hotelier_name = $query->row()->username;
                         $hotelier_email = $query->row()->email;
                     }
                 }
                 //Reservation Notification To Host
                 $email_name = 'admin_payment';
                 $splVars = array("{site_name}" => $this->dx_auth->get_site_title(), "{payment_type}" => 'PayPal', "{username}" => ucfirst($hotelier_name), "{list_title}" => get_list_by_id($list_id)->title, "{payed_date}" => date("F j, Y", time()), "{pay_id}" => $email_id, "{checkin}" => date("F j, Y", $checkin), "{checkout}" => date("F j, Y", $checkout), "{payed_price}" => $price);
                 //Send Mail
                 $this->Email_model->sendMail($hotelier_email, $admin_email, ucfirst($admin_name), $email_name, $splVars);
                 $this->db->where('id', $id)->update('reservation', array('is_payed' => 1));
                 $data['message_element'] = "administrator/payment/paypal_success";
                 $this->load->view('administrator/admin_template', $data);
             } else {
                 $data['message_element'] = "administrator/payment/paypal_success";
                 $this->load->view('administrator/admin_template', $data);
             }
         } else {
             $this->_error($do_ec_return);
         }
     } else {
         $this->_error($do_ec_return);
     }
 }
Esempio n. 11
0
                        	<div class="TypeConver_Ans clsFloatLeft col-md-10 col-sm-10 col-xs-8">
																									<?php 
        if ($message->message_type != 3) {
            ?>
                            	<div class="TypeConver_Head">
								<p>
								<?php 
            if ($list_staus->num_rows() == 0) {
                echo 'List Deletion';
            } else {
                echo $message->name;
            }
            ?>
 <?php 
            if ($list_staus->num_rows() != 0) {
                echo translate("about") . ' "' . anchor('rooms/' . $message->list_id, get_list_by_id($message->list_id)->title) . '"';
            }
            ?>
																																	</p>
																																	<!--<?php 
            if ($message->message_type != 6) {
                ?>
																																	<p><label><?php 
                echo get_user_times($message->checkin, get_user_timezone()) . ' - ' . get_user_times($message->checkout, get_user_timezone());
                ?>
</label><label><?php 
                echo $message->no_quest . ' ' . translate("guest");
                ?>
</label></p>
																																	<?php 
            }
Esempio n. 12
0
    ?>
 </th>
			</tr>
			</thead>
			
	  <?php 
    foreach ($result->result() as $row) {
        ?>
    <tr>
			 <td> <p class="View_my_Accept_Bg"><span><?php 
        echo $row->name;
        ?>
</span></p> </td>
				<td>
					<p class="clsBold"> <?php 
        echo anchor('rooms/' . $row->list_id, get_list_by_id($row->list_id)->address);
        ?>
 </p> 
				</td>
				<td>
				 <p> <img height="50" width="50" alt="image" style="float:left; margin:0 10px 10px 0;" src="<?php 
        echo $this->Gallery->profilepic($row->userto, 2);
        ?>
" />
					<span class="clsBold">
					<a href="<?php 
        echo site_url('users/profile') . '/' . $row->userto;
        ?>
"><?php 
        echo ucfirst(get_user_by_id($row->userto)->username);
        ?>
Esempio n. 13
0
 function paypal_commission_success($id)
 {
     $accept_pay_result = $this->db->where('id', $id)->get('accept_pay')->row();
     $is_payed = $accept_pay_result->status;
     if ($is_payed == 0) {
         //	echo 'test';exit;
         $custom = $this->session->userdata('custom');
         $data = array();
         $list = array();
         $data = explode(',', $custom);
         $list_id = $data[0];
         $reservation_id = $data[1];
         $email_id = $data[2];
         $price = $data[3];
         $result = $this->Common_model->getTableData('reservation', array('id' => $reservation_id))->row();
         $checkin = $result->checkin;
         $checkout = $result->checkout;
         $admin_email = $this->dx_auth->get_site_sadmin();
         $admin_name = $this->dx_auth->get_site_title();
         $query = $this->Users_model->get_user_by_id($result->userby);
         $traveler_name = $query->row()->username;
         $traveler_email = $query->row()->email;
         $query1 = $this->Users_model->get_user_by_id($result->userto);
         $hotelier_name = $query1->row()->username;
         $hotelier_email = $query1->row()->email;
         $currency_symbol = $this->Common_model->getTableData('currency', array('currency_code' => $accept_pay_result->currency))->row()->currency_symbol;
         $refund_amt = $currency_symbol . $accept_pay_result->amount;
         $conversation = $this->db->where('userto', $result->userto)->where('userby', 1)->order_by('id', 'desc')->get('messages');
         if ($conversation->num_rows() != 0) {
             foreach ($conversation->result() as $row3) {
                 if ($row3->conversation_id != 0) {
                     $conversation_id = $row3->conversation_id;
                 } else {
                     $conversation1 = $this->db->where('userto', 1)->where('userby', $result->userto)->order_by('id', 'desc')->get('messages');
                     if ($conversation1->num_rows() != 0) {
                         foreach ($conversation1->result() as $row2) {
                             if ($row2->conversation_id != 0) {
                                 $conversation_id = $row2->conversation_id;
                             }
                         }
                     } else {
                         $conversation_id = 0;
                     }
                 }
             }
         } else {
             $conversation1 = $this->db->where('userto', 1)->where('userby', $result->userto)->order_by('id', 'desc')->get('messages');
             if ($conversation1->num_rows() != 0) {
                 foreach ($conversation1->result() as $row1) {
                     if ($row1->conversation_id != 0) {
                         $conversation_id = $row1->conversation_id;
                     }
                 }
             } else {
                 $conversation_id = 0;
             }
         }
         $name = '';
         //Reservation Notification To Host
         $host_payout_id = get_userPayout($result->userto)->email;
         $name = $hotelier_name;
         $email_name = 'refund_host_commission';
         $splVars = array("{site_name}" => $this->dx_auth->get_site_title(), "{currency}" => $currency_symbol, "{host_name}" => ucfirst($hotelier_name), "{account}" => "PayPal {$host_payout_id}", "{list_title}" => get_list_by_id($list_id)->title, "{payed_date}" => date("F j, Y", time()), "{refund_amt}" => $refund_amt);
         //Send Mail
         $this->Email_model->sendMail($hotelier_email, $admin_email, ucfirst($admin_name), $email_name, $splVars);
         if (!isset($conversation_id)) {
             $insertData = array('list_id' => $result->list_id, 'reservation_id' => $result->id, 'userby' => 1, 'userto' => $result->userto, 'message' => "Admin refund {$refund_amt} to you for Host reservation accept commission.", 'created' => date('m/d/Y g:i A'), 'message_type ' => 3);
         } else {
             $insertData = array('list_id' => $result->list_id, 'reservation_id' => $result->id, 'conversation_id' => $conversation_id, 'userby' => 1, 'userto' => $result->userto, 'message' => "Admin refund {$refund_amt} to you for Host reservation accept commission.", 'created' => date('m/d/Y g:i A'), 'message_type ' => 3);
         }
         $refund_data['userto'] = $result->userto;
         $this->Message_model->sentMessage($insertData);
         $refund_data['reservation_id'] = $result->id;
         $refund_data['payout_id'] = $this->session->userdata('payout_id');
         $refund_data['created'] = time();
         $refund_data['accept_status'] = 1;
         $this->Common_model->inserTableData('refund', $refund_data);
         $admin_to_email = $this->db->where('id', 1)->get('users')->row()->email;
         //Reservation Notification To Admin
         $email_name = 'refund_host_commission_admin';
         $splVars = array("{name}" => $name, "{traveler_email}" => $traveler_email, "{host_email}" => $hotelier_email, "{site_name}" => $this->dx_auth->get_site_title(), "{currency}" => $currency_symbol, "{account}" => "PayPal {$host_payout_id}", "{host_name}" => ucfirst($hotelier_name), "{list_title}" => get_list_by_id($list_id)->title, "{payed_date}" => date("F j, Y", time()), "{refund_amt}" => $refund_amt);
         //Send Mail
         $this->Email_model->sendMail($admin_to_email, $admin_email, ucfirst($admin_name), $email_name, $splVars);
         $this->db->where('id', $id)->update('accept_pay', array('status' => 1));
         $data['message_element'] = "administrator/payment/paypal_success";
         $this->load->view('administrator/admin_template', $data);
     } else {
         $data['message_element'] = "administrator/payment/paypal_success";
         $this->load->view('administrator/admin_template', $data);
     }
 }