本文整理汇总了PHP中get_currency_code函数 的典型用法代码示例。如果您正苦于以下问题:PHP get_currency_code函数的具体用法?PHP get_currency_code怎么用?PHP get_currency_code使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_currency_code函数 的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_currency_symbol
<p> <span><?php
if ($list_staus->num_rows() == 0) {
echo 'List Deletion';
} else {
echo $row->name;
}
?>
</span>
<?php
if (isset($topay) && $topay != '' && $paid != 1) {
if ($hostpaid != 1 && $guestpaid != 1) {
// $topay = get_currency_value2($currency,$topay);
?>
<br>
<span><?php
echo get_currency_symbol($row->list_id) . get_currency_value_lys($currency, get_currency_code(), $topay);
?>
</span>
<?php
}
}
?>
</p>
</div>
<?php
}
?>
</li>
<?php
}
} else {
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:31, 代码来源:view_dashboard.php
示例2: get_currency_symbol1
<a style="background-image:url(<?php
echo $image;
?>
);background-size: cover;" class="media-photo media-cover wishlist-bg-img" href="/rooms/281390">
</a>
<div class="panel-overlay-bottom-left panel-overlay-label panel-overlay-listing-label">
<sup class="h6 text-contrast" style="font-size: 14px;"><?php
echo get_currency_symbol1();
?>
</sup>
<span class="h3 price-amount" style="font-size: 24px;"><?php
echo get_currency_value1($row->list_id, $row->price);
?>
</span>
<sup class="h6 text-contrast" style="font-size: 14px;"><?php
echo get_currency_code();
?>
</sup>
</div>
<div class="panel-overlay-top-right wl-social-connection-panel">
<span class="rich-toggle wish_list_button wishlist-button not_saved">
<label for="">
<?php
$wishlist_user_check = $this->Common_model->getTableData('user_wishlist', array('list_id' => $row->list_id, 'user_id' => $this->dx_auth->get_user_id()));
if (!$this->dx_auth->is_logged_in()) {
?>
<img class="search_heart_normal search_heart" id="<?php
echo $row->list_id;
?>
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:31, 代码来源:view_wishlist_inner.php
示例3: ajax_refresh_subtotal
//.........这里部分代码省略.........
$per_night = round($perDay, 2);
if ($differNights > 0) {
$addAmount = $differNights * $per_night;
$finalAmount = $Wprice + $addAmount;
}
$price = $finalAmount;
//Additional guests
if ($data['guests'] > $guests) {
$diff_days = $data['guests'] - $guests;
$price = $price + $days * $xprice->addguests * $diff_days;
$extra_guest = 1;
$extra_guest_price = $xprice->addguests * $diff_days;
}
}
}
if ($days >= 30) {
if (!empty($Mprice)) {
$finalAmount = $Mprice;
$differNights = $days - 30;
$perDay = $Mprice / 30;
$per_night = round($perDay, 2);
if ($differNights > 0) {
$addAmount = $differNights * $per_night;
$finalAmount = $Mprice + $addAmount;
}
$price = $finalAmount;
//Additional guests
if ($data['guests'] > $guests) {
$diff_days = $data['guests'] - $guests;
$price = $price + $days * $xprice->addguests * $diff_days;
$extra_guest = 1;
$extra_guest_price = $xprice->addguests * $diff_days;
}
}
}
if ($row->is_premium == 1) {
if ($row->is_fixed == 1) {
$fix = $row->fixed_amount;
$amt = $price + $fix;
$data['commission'] = $fix;
$Fprice = $amt;
} else {
$per = $row->percentage_amount;
$camt = floatval($price * $per / 100);
$amt = $price + $camt;
$data['commission'] = $camt;
$Fprice = $amt;
}
if ($Wprice == 0) {
$data['Wprice'] = $price * 7;
} else {
$data['Wprice'] = $Wprice;
}
if ($Mprice == 0) {
$data['Mprice'] = $price * 30;
} else {
$data['Mprice'] = $Mprice;
}
}
$xprice = $this->Common_model->getTableData('list', array('id' => $id))->row();
if ($cleaning != 0) {
$price = $price + $cleaning;
}
if ($security != 0) {
$price = $price + $security;
}
$data['price'] = $price;
}
}
$query = $this->db->query("SELECT id,list_id FROM `calendar` WHERE `list_id` = '" . $id . "' AND (`booked_days` = '" . get_gmt_time(strtotime($checkin)) . "' OR `booked_days` = '" . get_gmt_time(strtotime($checkout)) . "') GROUP BY `list_id`");
$rows = $query->num_rows();
$daysexist = $this->db->query("SELECT id,list_id,booked_days FROM `calendar` WHERE `list_id` = '" . $id . "' AND (`booked_days` >= '" . get_gmt_time(strtotime($checkin)) . "' AND `booked_days` <= '" . get_gmt_time(strtotime($checkout)) . "') GROUP BY `list_id`");
$rowsexist = $daysexist->num_rows();
if ($rowsexist > 0) {
if (isset($extra_guest)) {
if ($extra_guest == 1) {
echo '{"available":false,"extra_guest":1,"extra_guest_price":"' . get_currency_symbol($id) . get_currency_value1($id, $extra_guest_price) . '","total_price":' . $data['price'] . ',"reason_message":"Those dates are not available"}';
}
} else {
echo '{"available":false,"total_price":' . $data['price'] . ',"reason_message":"Those dates are not available"}';
}
} else {
if ($data['guests'] > $capacity) {
echo '{"available":false,"total_price":' . $data['price'] . ',"reason_message":"' . $capacity . ' guest(s) only allowed"}';
} else {
$this->session->set_userdata("total_price_'" . $id . "'_'" . $this->dx_auth->get_user_id() . "'", $data['price']);
$staggered_price = "";
if ($days >= 30) {
$staggered_price = ',"staggered_price":"' . get_currency_symbol($id) . get_currency_value1($id, $data['price']) . '","staggered":false';
}
if (isset($extra_guest)) {
if ($extra_guest == 1) {
echo '{"service_fee":"' . get_currency_symbol($id) . get_currency_value_lys($row->currency, get_currency_code(), $data['commission']) . '","extra_guest_price":"' . get_currency_symbol($id) . get_currency_value1($id, $extra_guest_price) . '","extra_guest":1,"reason_message":"","price_per_night":"' . get_currency_symbol($id) . get_currency_value1($id, $per_night) . '","nights":' . $days . ',"available":true,"can_instant_book":false,"total_price":"' . get_currency_symbol($id) . get_currency_value1($id, $data['price']) . '"' . $staggered_price . '}';
}
} else {
echo '{"service_fee":"' . get_currency_symbol($id) . get_currency_value_lys($row->currency, get_currency_code(), $data['commission']) . '","reason_message":"","price_per_night":"' . get_currency_symbol($id) . get_currency_value1($id, $per_night) . '","nights":' . $days . ',"available":true,"can_instant_book":false,"total_price":"' . get_currency_symbol($id) . get_currency_value1($id, $data['price']) . '"' . $staggered_price . '}';
}
}
}
}
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:101, 代码来源:rooms.php
示例4: ajax_get_results
//.........这里部分代码省略.........
}
if ($sort == 2) {
$order = "ORDER BY price ASC";
} else {
if ($sort == 3) {
$order = "ORDER BY price DESC";
} else {
if ($sort == 4) {
$order = "ORDER BY id DESC";
} else {
$order = "ORDER BY id ASC";
}
}
}
$query_status = $this->db->where($condition)->get('list');
if ($query_status->num_rows() != 0) {
foreach ($query_status->result() as $row_status) {
$result_status = $this->db->where('id', $row_status->id)->get('lys_status');
if ($result_status->num_rows() != 0) {
$result_status = $result_status->row();
$total = $result_status->calendar + $result_status->price + $result_status->overview + $result_status->photo + $result_status->address + $result_status->listing;
if ($total != 6) {
$condition .= " AND (`id` != '" . $row_status->id . "')";
}
}
}
}
if ($min == '' && $max == '') {
} else {
$query_price = $this->db->where($condition)->get('list');
if ($query_price->num_rows() != 0) {
foreach ($query_price->result() as $row_price) {
$check_price = get_currency_value1($row_price->id, $row_price->price);
$max = get_currency_value_lys(get_currency_code(), 'USD', $max);
if ($max == 10000) {
$max = $max * 1000000000;
$max = get_currency_value1($row_price->id, $max);
} else {
$max = get_currency_value_lys('USD', get_currency_code(), $max);
}
//echo $max. ' - '.$check_price;exit;
if ($this->input->get('new_search')) {
if ($check_price <= $max && $check_price >= $min) {
} else {
$condition .= " AND (`id` != '" . $row_price->id . "')";
}
} else {
if ($check_price <= $max || $check_price >= $min) {
} else {
$condition .= " AND (`id` != '" . $row_price->id . "')";
}
}
}
}
}
//My ShortLists
if ($search_view == 2) {
$constraint = "";
$shortlists = $this->db->where('id', $this->dx_auth->get_user_id())->get('users')->row()->shortlist;
$my_lists = explode(',', $shortlists);
$i = 1;
foreach ($my_lists as $list) {
if ($i == count($my_lists)) {
$OR = "";
} else {
$OR = " OR ";
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:67, 代码来源:search.php
示例5: get_currency_symbol
?>
</div>
<div class="line_reg" style="z-index:<?php
echo $j;
?>
;" id="square_<?php
echo $i;
?>
"> <span class="startcap"></span> <span class="content"></span> <span class="endcap"><b><?php
echo get_currency_symbol($list_id) . get_currency_value1($list_id, $price);
?>
</b></span> </div>
<!--Edit calender --->
<?php
echo get_currency_symbol($list_id) . get_currency_value_lys($listcurrency, get_currency_code(), $price);
?>
</b></span> </div>
<!--edit calender -->
</div>
</div>
<?php
}
?>
<?php
$day_count++;
$day_nextmonth++;
$i++;
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:31, 代码来源:view_calendar_single.php
示例6: translate
</span> </p>
<div class="clear"></div>
</div>
<div id="payment_method_2c" class="payment_method_content<?php
echo $show2C;
?>
">
<h2><?php
echo translate("Credit Card");
?>
</h2>
<div class="currency_alert"><?php
echo translate("This payment transacts in");
?>
<?php
echo get_currency_symbol1() . get_currency_code();
?>
. <?php
echo translate("Your total charge is");
?>
<?php
echo get_currency_symbol1() . $amt;
?>
.</div>
<div class="two_c_explanation col-md-2 col-sm-5 col-xs-5"></div>
<p class="payment_method_explanation col-md-10 col-sm-7 col-xs-7"> <span class="paypallogo"><?php
echo translate("Instructions:");
?>
</span> <br>
<?php
echo translate("After clicking 'Book it' you will be redirected to Braintree to complete payment.");
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:31, 代码来源:view_listPay.php
示例7: modify_calendar
public function modify_calendar()
{
if ($this->dx_auth->is_logged_in() || $this->facebook_lib->logged_in()) {
/* $from = $this->input->post('from');
$to = $this->input->post('to');
$amount = $this->input->post('amount');
$min_currency= round(get_currency_value_lys($from,$to,$amount)); echo $min_currency; */
//Seasonal Price
$availability = $this->input->post('availability');
$pricevalue = $this->input->post('seasonal_price');
$id = $this->input->post('hosting_id');
echo $id;
$cur_code = $this->db->where('id', $id)->from('list')->get()->row()->currency;
$cur_val = $this->db->where('currency_code', $cur_code)->from('currency_converter')->get()->row()->currency_value;
$currency_value = round($cur_val * 10);
$currency_maxvalue = $currency_value * 1000;
echo $currency_maxvalue;
if ($availability == "Available" && $pricevalue != "" && $pricevalue >= $currency_value && $pricevalue <= $currency_maxvalue) {
$month = $this->input->get('month', TRUE);
$year = $this->input->get('year', TRUE);
$startdate = $this->input->post('starting_date');
$starttime = get_gmt_time(strtotime($startdate));
$enddate = $this->input->post('stopping_date');
$endtime = get_gmt_time(strtotime($enddate));
$pdata = array('list_id' => $this->input->post('hosting_id'), 'price' => $this->input->post('seasonal_price'), 'start_date' => $starttime, 'end_date' => $endtime, 'currency' => $cur_code);
// print_r($pdata);
// echo $pricevalue;echo $availability;
$update = 0;
$query = $this->Common_model->getTableData('seasonalprice', array('list_id' => $pdata['list_id']));
$res = $query->result_array();
$count = 1;
foreach ($res as $row) {
$from = $row['start_date'];
$to = $row['end_date'];
if ($starttime == $from && $endtime == $to) {
$condition = array('list_id' => $pdata['list_id'], 'start_date' => $from, 'end_date' => $to);
$updatedata = array('price' => $pdata['price']);
$this->Common_model->updateTableData('seasonalprice', NULL, $condition, $updatedata);
$update = 1;
} else {
if ($starttime == $from && $endtime == $from) {
//update
$starttime_update = get_gmt_time(strtotime('+1 day', $starttime));
$condition = array('list_id' => $pdata['list_id'], 'start_date' => $from, 'end_date' => $to);
$updatedata = array('start_date' => $starttime_update);
$this->Common_model->updateTableData('seasonalprice', NULL, $condition, $updatedata);
//insert
$insertdata1 = array('list_id' => $this->input->post('hosting_id'), 'price' => $this->input->post('seasonal_price'), 'start_date' => $starttime, 'end_date' => $endtime, 'currency' => get_currency_code());
$this->db->insert('seasonalprice', $insertdata1);
$update = 1;
} else {
if ($starttime == $to && $endtime == $to) {
//update
$endtime_update = get_gmt_time(strtotime('-1 day', $endtime));
$condition = array('list_id' => $pdata['list_id'], 'start_date' => $from, 'end_date' => $to);
$updatedata = array('end_date' => $endtime_update);
$this->Common_model->updateTableData('seasonalprice', NULL, $condition, $updatedata);
//insert
$insertdata1 = array('list_id' => $this->input->post('hosting_id'), 'price' => $this->input->post('seasonal_price'), 'start_date' => $starttime, 'end_date' => $endtime, 'currency' => get_currency_code());
$this->db->insert('seasonalprice', $insertdata1);
$update = 1;
} else {
if ($starttime > $from && $starttime < $to && ($endtime > $from && $endtime < $to)) {
//update
$endtime_update = get_gmt_time(strtotime('+1 day', $endtime));
$condition = array('list_id' => $pdata['list_id'], 'start_date' => $from, 'end_date' => $to);
$updatedata = array('start_date' => $endtime_update);
$this->Common_model->updateTableData('seasonalprice', NULL, $condition, $updatedata);
//insert 1
$starttime_update = get_gmt_time(strtotime('-1 day', $starttime));
$insertdata1 = array('list_id' => $this->input->post('hosting_id'), 'price' => $row['price'], 'start_date' => $row['start_date'], 'end_date' => $starttime_update, 'currency' => get_currency_code());
$this->db->insert('seasonalprice', $insertdata1);
//insert 2
$insertdata1 = array('list_id' => $this->input->post('hosting_id'), 'price' => $this->input->post('seasonal_price'), 'start_date' => $starttime, 'end_date' => $endtime, 'currency' => get_currency_code());
$this->db->insert('seasonalprice', $insertdata1);
$update = 1;
} else {
if ($starttime <= $from && $starttime < $to && ($endtime > $from && $endtime < $to) || $starttime < $from && $starttime < $to && $endtime == $from) {
//update
$endtime_update = get_gmt_time(strtotime('+1 day', $endtime));
$condition = array('list_id' => $pdata['list_id'], 'start_date' => $from, 'end_date' => $to);
$updatedata = array('start_date' => $endtime_update);
$this->Common_model->updateTableData('seasonalprice', NULL, $condition, $updatedata);
//insert 1
$insertdata1 = array('list_id' => $this->input->post('hosting_id'), 'price' => $this->input->post('seasonal_price'), 'start_date' => $starttime, 'end_date' => $endtime, 'currency' => get_currency_code());
$this->db->insert('seasonalprice', $insertdata1);
$update = 1;
} else {
if ($starttime > $from && $starttime < $to && ($endtime > $from && $endtime >= $to) || $starttime == $to && ($endtime > $from && $endtime > $to)) {
//update
$starttime_update = get_gmt_time(strtotime('-1 day', $starttime));
$condition = array('list_id' => $pdata['list_id'], 'start_date' => $from, 'end_date' => $to);
$updatedata = array('end_date' => $starttime_update);
$this->Common_model->updateTableData('seasonalprice', NULL, $condition, $updatedata);
//insert 1
$insertdata1 = array('list_id' => $this->input->post('hosting_id'), 'price' => $this->input->post('seasonal_price'), 'start_date' => $starttime, 'end_date' => $endtime, 'currency' => get_currency_code());
$this->db->insert('seasonalprice', $insertdata1);
$update = 1;
} else {
if ($starttime < $from && $starttime < $to && ($endtime > $from && $endtime > $to) || $starttime == $from && $endtime > $to & $startime < $to || $starttime < $from && $starttime < $to && $endtime == $to) {
//.........这里部分代码省略.........
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:101, 代码来源:calendar.php
示例8: braintree_success
public function braintree_success()
{
$result = Braintree_Transaction::sale(array('amount' => get_currency_value_lys(get_currency_code(), 'USD', $this->session->userdata('list_commission')), "paymentMethodNonce" => $_POST['payment_method_nonce'], 'options' => array('submitForSettlement' => true)));
$transaction = $result->transaction;
/*
if($result->success == 1)
{
if($result->message == "Amount must be greater than zero.")
{
$this->session->set_flashdata('flash_message', $this->Common_model->flash_message('error',$result->message));
redirect('rooms/'.$this->input->post('custom',true), "refresh");
}
*/
if (!$this->dx_auth->is_logged_in() || !$this->facebook_lib->logged_in()) {
//$this->session->set_flashdata('flash_message', $this->Common_model->flash_message('error',translate('Session expired, please try again.')));
//redirect('users/signin');
}
if ($transaction->status == "authorized" || $transaction->status == "submitted_for_settlement") {
$listId = $this->input->post('custom', true);
$condition = array('id' => $listId);
$data['status'] = 1;
$data['list_pay'] = 1;
$data['is_enable'] = 1;
$data['payment'] = 1;
$this->Common_model->updateTableData('list', NULL, $condition, $data);
if (!$this->dx_auth->is_logged_in() || !$this->facebook_lib->logged_in()) {
//$this->session->set_flashdata('flash_message', $this->Common_model->flash_message('error',translate('Session expired, please try again.')));
//redirect('users/signin');
}
$query_user = $this->Common_model->getTableData('users', array('id' => $this->dx_auth->get_user_id()))->row();
$username = $query_user->username;
$insertData = array('list_id' => $listId, 'conversation_id' => $listId, 'userby' => $this->dx_auth->get_user_id(), 'userto' => 1, 'message' => "{$username} created a new list.", 'created' => time(), 'message_type ' => 10);
$this->Message_model->sentMessage($insertData);
$host_email = $query_user->email;
$admin_email = $this->dx_auth->get_site_sadmin();
$admin_name = $this->dx_auth->get_site_title();
$admin_to_email = $this->Common_model->getTableData('users', array('id' => 1))->row()->email;
$query_list = $this->Common_model->getTableData('list', array('id' => $listId))->row();
$currency = $query_list->currency;
$price = $query_list->price;
$title = $query_list->title;
$link = base_url() . 'rooms/' . $listId;
$email_name = 'list_create_host';
$splVars = array("{host_name}" => $username, "{price}" => $currency . $price, "{link}" => $link, "{list_title}" => $title, "{site_name}" => $this->dx_auth->get_site_title());
$this->Email_model->sendMail($host_email, $admin_email, ucfirst($admin_name), $email_name, $splVars);
$email_name = 'list_create_admin';
$splVars = array("{host_name}" => $username, "{price}" => $currency . $price, "{link}" => $link, "{list_title}" => $title, "{site_name}" => $this->dx_auth->get_site_title());
$this->Email_model->sendMail($admin_to_email, $admin_email, ucfirst($admin_name), $email_name, $splVars);
$data_listpay['list_id'] = $listId;
$data_listpay['amount'] = $this->session->userdata('list_commission');
$data_listpay['currency'] = get_currency_code();
$data_listpay['created'] = time();
$this->db->insert('list_pay', $data_listpay);
$data['title'] = "Payment Success !";
$data['message_element'] = "payments/paypal_success";
$this->load->view('template', $data);
//redirect('rooms/edit/'.$listId, 'refresh');
//$this->session->set_flashdata('flash_message', $this->Common_model->flash_message('success',translate('Rooms added successfully.')));
//redirect('rooms/'.$listId, 'refresh');
} else {
$data['title'] = "Payment Cancelled !";
$data['message_element'] = "payments/paypal_cancel";
$this->load->view('template', $data);
}
/* }
else {
$data['title']="Payment Cancelled !";
$data['message_element'] = "payments/paypal_cancel";
$this->load->view('template',$data);
}
*/
}
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:72, 代码来源:listpay.php
示例9: braintree_success
function braintree_success()
{
$result = Braintree_Transaction::sale(array('amount' => get_currency_value_lys(get_currency_code(), 'USD', $this->session->userdata('subtotal')), "paymentMethodNonce" => $_POST['payment_method_nonce'], 'options' => array('submitForSettlement' => true)));
$transaction = $result->transaction;
if ($transaction->status == "authorized" || $transaction->status == "submitted_for_settlement") {
$custom = $this->session->userdata('custom');
$data = array();
$list = array();
$data = explode('@', $custom);
$contact_key = $data[9];
$list['list_id'] = $data[0];
$list['userby'] = $data[1];
$query1 = $this->Common_model->getTableData('list', array('id' => $list['list_id']));
$buyer_id = $query1->row()->user_id;
$list['userto'] = $buyer_id;
$list['checkin'] = $data[2];
$list['checkout'] = $data[3];
$list['no_quest'] = $data[4];
$date1 = new DateTime(date('Y-m-d H:i:s', $list['checkin']));
$date2 = new DateTime(date('Y-m-d H:i:s', $list['checkout']));
$interval = $date1->diff($date2);
if ($interval->days >= 28) {
$list['policy'] = 5;
} else {
$list['policy'] = $query1->row()->cancellation_policy;
}
$amt = $data[14];
$list['transaction_id'] = "{$transaction->id}";
$list['price'] = $this->session->userdata('subtotal');
$currency = $data[15];
$list['payment_id'] = 2;
$list['credit_type'] = 1;
$is_travelCretids = $data[5];
$user_travel_cretids = $data[6];
$list['currency'] = get_currency_code();
if ($currency != 'USD') {
$list['admin_commission'] = $data[8];
$list['cleaning'] = $data[10];
$list['security'] = $data[11];
$list['topay'] = $amt - $data[8];
} else {
$list['admin_commission'] = $data[8];
$list['cleaning'] = $data[10];
$list['security'] = $data[11];
$list['topay'] = $amt - $data[8];
}
$list['guest_count'] = $data[13];
if ($list['no_quest'] > $list['guest_count']) {
if ($currency != 'USD') {
$list['extra_guest_price'] = $data[12];
} else {
$list['extra_guest_price'] = $data[12];
}
}
if ($this->session->userdata('contact_key') != '') {
$updateKey = array('contact_key' => $this->session->userdata('contact_key'));
$updateData = array();
$list['contacts_offer'] = $this->session->userdata('contacts_offer');
$updateData['status'] = 10;
$this->Contacts_model->update_contact($updateKey, $updateData);
}
if ($contact_key != "None") {
$list['status'] = 1;
$this->db->select_max('group_id');
$group_id = $this->db->get('calendar')->row()->group_id;
if (empty($group_id)) {
echo $countJ = 0;
} else {
$countJ = $group_id;
}
$insertData['list_id'] = $list['list_id'];
$insertData['group_id'] = $countJ + 1;
$insertData['availability'] = 'Booked';
$insertData['booked_using'] = 'Other';
$checkin = date('m/d/Y', $list['checkin']);
$checkout = date('m/d/Y', $list['checkout']);
$days = getDaysInBetween($checkin, $checkout);
$count = count($days);
$i = 1;
foreach ($days as $val) {
if ($count == 1) {
$insertData['style'] = 'single';
} else {
if ($count > 1) {
if ($i == 1) {
$insertData['style'] = 'left';
} else {
if ($count == $i) {
$insertData['notes'] = '';
$insertData['style'] = 'right';
} else {
$insertData['notes'] = '';
$insertData['style'] = 'both';
}
}
}
}
$insertData['booked_days'] = $val;
$this->Trips_model->insert_calendar($insertData);
$i++;
//.........这里部分代码省略.........
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:101, 代码来源:payments.php
示例10: list_success
public function list_success()
{
//echo $payment_status = $this->input->post('payment_status',true);
//exit;
$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' => get_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 ($this->input->post('payment_status', true) == 'Completed') {
$listId = $this->input->post('custom', true);
$condition = array('id' => $listId);
$data['status'] = 1;
$data['list_pay'] = 1;
$data['is_enable'] = 1;
$this->Common_model->updateTableData('list', NULL, $condition, $data);
//redirect('rooms/edit/'.$listId, 'refresh');
$this->session->set_flashdata('flash_message', $this->Common_model->flash_message('success', translate('Rooms added successfully.')));
redirect('rooms/' . $listId, 'refresh');
} else {
if ($this->input->post('payment_status', true) == '') {
$listId = $this->uri->segment('3');
$condition = array('id' => $listId);
$data['status'] = 1;
$data['list_pay'] = 1;
$data['is_enable'] = 1;
$this->Common_model->updateTableData('list', NULL, $condition, $data);
//redirect('rooms/edit/'.$listId, 'refresh');
$this->session->set_flashdata('flash_message', $this->Common_model->flash_message('success', translate('Rooms added successfully.')));
redirect('rooms/' . $listId, 'refresh');
} else {
//echo $this->input->post('payment_status',true);
//exit;
//redirect('home/addlist','refresh');
redirect('rooms/new', 'refresh');
}
}
} else {
$this->_error($do_ec_return);
}
} else {
$this->_error($do_ec_return);
}
}
开发者ID:empotix, 项目名称:travelo, 代码行数:62, 代码来源:listpay.php
示例11: get_currency_symbol
</span></span>
<span class="data col-md-8 col-sm-7 col-xs-12"><span class="inner"><?php
echo get_currency_symbol($result->list_id) . get_currency_value_lys($result->currency, get_currency_code(), $subtotal);
if ($result->contacts_offer == 1) {
$special_offer = '(Special offer used.)';
} else {
$special_offer = '';
}
?>
<!--<li class="clearfix">
<span class="label"><span class="inner"><span class="checkout_icon" id="icon_cal"></span><?php
echo translate("Total Payout");
?>
</span></span>
<span class="data"><span class="inner"><?php
echo get_currency_symbol($result->list_id) . get_currency_value_lys($result->currency, get_currency_code(), $subtotal) . $special_offer;
?>
-->
<?php
if ($result->coupon == 1) {
echo ' (Coupon code used)';
}
?>
</span></span>
</li>
<li class="clearfix bottom">
<span class="label col-md-4 col-sm-5 col-xs-12" style="padding:10px 10px 0 10px;" ><span class="inner"><span class="checkout_icon" id="icon_cal"></span>
<?php
if ($result->status == 1) {
?>
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:31, 代码来源:request.php
示例12: paypal_success
function paypal_success()
{
$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' => get_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');
}
$custom = $this->session->userdata('custom');
$data = array();
$list = array();
$data = explode('@', $custom);
$contact_key = $data[9];
$list['list_id'] = $data[0];
$list['userby'] = $data[1];
$query1 = $this->Common_model->getTableData('list', array('id' => $list['list_id']));
$buyer_id = $query1->row()->user_id;
$list['userto'] = $buyer_id;
$list['checkin'] = $data[2];
$list['checkout'] = $data[3];
$list['no_quest'] = $data[4];
$amt = $do_ec_return['PAYMENTINFO_0_AMT'];
$list['price'] = $amt;
$currency = $do_ec_return['PAYMENTINFO_0_CURRENCYCODE'];
$list['payment_id'] = 2;
$list['credit_type'] = 1;
$list['transaction_id'] = 0;
$is_travelCretids = $data[5];
$user_travel_cretids = $data[6];
$list['topay'] = $amt - $data[8];
$list['currency'] = $query1->row()->currency;
$list['admin_commission'] = $data[8];
$list['cleaning'] = $data[10];
$list['security'] = $data[11];
$list['extra_guest_price'] = $data[12];
$list['guest_count'] = $data[13];
if ($contact_key != "None") {
$list['status'] = 1;
$this->db->select_max('group_id');
$group_id = $this->db->get('calendar')->row()->group_id;
if (empty($group_id)) {
echo $countJ = 0;
} else {
$countJ = $group_id;
}
$insertData['list_id'] = $list['list_id'];
$insertData['group_id'] = $countJ + 1;
$insertData['availability'] = 'Booked';
$insertData['booked_using'] = 'Other';
$checkin = date('m/d/Y', $list['checkin']);
$checkout = date('m/d/Y', $list['checkout']);
$days = getDaysInBetween($checkin, $checkout);
$count = count($days);
$i = 1;
foreach ($days as $val) {
if ($count == 1) {
$insertData['style'] = 'single';
} else {
if ($count > 1) {
if ($i == 1) {
$insertData['style'] = 'left';
} else {
if ($count == $i) {
$insertData['notes'] = '';
$insertData['style'] = 'right';
} else {
$insertData['notes'] = '';
$insertData['style'] = 'both';
}
}
}
}
$insertData['booked_days'] = $val;
$this->Trips_model->insert_calendar($insertData);
$i++;
}
} else {
$list['status'] = 1;
}
if ($list['price'] > 75) {
//.........这里部分代码省略.........
开发者ID:empotix, 项目名称:travelo, 代码行数:101, 代码来源:payments.php
示例13: array
?>
" />
</p>
<?php
$currency_symbol = $this->Common_model->getTableData('currency', array('currency_code' => get_currency_code()))->row()->currency_symbol;
?>
<p align="center"><b>Price <?php
echo $currency_symbol;
?>
:</b>
<input type="text" id="price_special" name="price_special" value="<?php
echo get_currency_value_lys($result->currency, get_currency_code(), $subtotal);
?>
" /></p>
<input type="hidden" id="price_original" name="price_original" value="<?php
echo get_currency_value_lys($result->currency, get_currency_code(), $price_original);
?>
" /></p>
<p align="center">Enter the price for the reservation including all additional costs</p>
<p></p>
<p><?php
echo translate("Optional message") . "...";
?>
</p>
<p><textarea class="comment_contact" name="comment_special" id="comment_special"></textarea></p>
<p>
<input type="button" class="accept_button" name="offered" value="<?php
echo "Send message";
?>
" onclick="javascript:req_action('special');" />
开发者ID:BersnardC, 项目名称:DROPINN, 代码行数:31, 代码来源:request.php
janboddez/share-on-mastodon: Easily share WordPress posts on Mastodon.
阅读:431| 2022-08-17
“一盔一带”安全守护行动,让不少人意识到戴头盔对于安全骑行的重要性。头盔有多少种
阅读:639| 2022-07-30
道的笔顺怎么写?道的笔顺笔画顺序是什么?中国练字网了解到好多人在学习中会遇到道的笔
阅读:927| 2022-11-06
marktext/marktext:
阅读:546| 2022-08-15
正版2021年北京高新技术企业人才引进落户政策、办理的要求、所须要的材料。那么2021年
阅读:317| 2022-11-06
Stream对象,又称流式对象,是TStream、THandleStream、TFileStream、TMemoryStream、
阅读:620| 2022-07-18
mml-book/mml-book.github.io: Companion webpage to the book Mathematics For Machi
阅读:354| 2022-08-18
localizely/flutter-intl-plugin-sample-app: Flutter app localization sample with
阅读:331| 2022-08-16
ddevault/Craft.Net: (Unmaintained, see TrueCraft) Minecraft server, client, and
阅读:641| 2022-08-16
异地火车票是指 :(1)联程票:(2)返程票 。 联程票为:旅客在本站购买,需在全国各大
阅读:259| 2022-11-06
请发表评论