当前位置: 首页>>代码示例>>PHP>>正文


PHP get_price函数代码示例

本文整理汇总了PHP中get_price函数的典型用法代码示例。如果您正苦于以下问题:PHP get_price函数的具体用法?PHP get_price怎么用?PHP get_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_price函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create_recurrent_invoices

function create_recurrent_invoices($customer_id, $branch_id, $order_no, $tmpl_no, $date, $from, $to)
{
    global $Refs;
    $doc = new Cart(ST_SALESORDER, array($order_no));
    get_customer_details_to_order($doc, $customer_id, $branch_id);
    $doc->trans_type = ST_SALESORDER;
    $doc->trans_no = 0;
    $doc->document_date = $date;
    $doc->due_date = get_invoice_duedate($doc->payment, $doc->document_date);
    $doc->reference = $Refs->get_next($doc->trans_type);
    if ($doc->Comments != "") {
        $doc->Comments .= "\n";
    }
    $doc->Comments .= sprintf(_("Recurrent Invoice covers period %s - %s."), $from, add_days($to, -1));
    foreach ($doc->line_items as $line_no => $item) {
        $line =& $doc->line_items[$line_no];
        $line->price = get_price($line->stock_id, $doc->customer_currency, $doc->sales_type, $doc->price_factor, $doc->document_date);
    }
    $cart = $doc;
    $cart->trans_type = ST_SALESINVOICE;
    $cart->reference = $Refs->get_next($cart->trans_type);
    $invno = $cart->write(1);
    if ($invno == -1) {
        display_error(_("The entered reference is already in use."));
        display_footer_exit();
    }
    update_last_sent_recurrent_invoice($tmpl_no, $to);
    return $invno;
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:29,代码来源:create_recurrent_invoices.php

示例2: getHTML

function getHTML($url, &$arr)
{
    $m_url = $url;
    $m_html = file_get_html($m_url);
    $property = "";
    $no_bed = get_no_bed($m_html);
    $no_bath = get_no_bath($m_html);
    $no_car = get_no_car($m_html);
    $address = get_address($m_html);
    $agency = get_agency($m_html);
    $agency_localDir = get_agency_localDir($m_html);
    $first_agent_name = get_first_agent_name($m_html);
    $first_agent_contact = get_first_agent_contact($m_html);
    $listing_type = "";
    $price = get_price($m_html);
    $inspect_time = get_inspect_time($m_html);
    // $inspect_date = get_inspect_date ($m_html);
    // $inspect_hour = get_inspect_hour ($m_html);
    $auction_time = get_auction_time($m_html);
    $auction_date = get_auction_date($m_html);
    $auction_day = get_day($auction_date);
    $auction_hour = get_auction_hour($m_html);
    $auction_inspect_hour = get_auction_inspect_hour($m_html);
    $auction_string = get_auction_string($auction_date, $auction_hour, $auction_inspect_hour);
    $justlisted_string = get_justlisted_string($inspect_time);
    $arr = array('url' => $m_url, 'no_bed' => $no_bed, 'no_bath' => $no_bath, 'no_car' => $no_car, 'address' => $address, 'agency' => $agency, 'agency_localDir' => $agency_localDir, 'first_agent_name' => $first_agent_name, 'first_agent_contact' => $first_agent_contact, 'listing_type' => $listing_type, 'price' => $price, 'inspect_time' => $inspect_time, 'auction_time' => $auction_time, 'auction_date' => $auction_date, 'auction_day' => $auction_day, 'auction_hour' => $auction_hour, 'auction_inspect_hour' => $auction_inspect_hour, 'auction_string' => $auction_string, 'justlisted_string' => $justlisted_string);
    //print_r ($arr);
}
开发者ID:troycaeser,项目名称:WheresMyWallet,代码行数:28,代码来源:getHTMLContents.php

示例3: get_order_total

	function get_order_total(){
		$max=count($_SESSION['cart']);
		$sum=0;
		for($i=0;$i<$max;$i++){
			$prodid=$_SESSION['cart'][$i]['Prodid'];
			$q=$_SESSION['cart'][$i]['Quantity'];
			$price=get_price($prodid);
			$sum+=$price*$q;
		}
		return $sum;
	}
开发者ID:rohitchawla22,项目名称:Website-Ecommerce,代码行数:11,代码来源:functions.php

示例4: get_order_total

function get_order_total()
{
    $max = count($_SESSION['cart']);
    $sum = 0;
    for ($i = 0; $i < $max; $i++) {
        $isbn = $_SESSION['cart'][$i]['productid'];
        $q = $_SESSION['cart'][$i]['qty'];
        $price = get_price($isbn);
        $sum += $price * $q;
    }
    return $sum;
}
开发者ID:gepeng05,项目名称:new-olshop,代码行数:12,代码来源:functions.php

示例5: create

 public function create($product, $product_count, $ticket_count)
 {
     $product = $this->db->get_where('product', array('id' => $product))->row_array();
     if ($product_count > $product['count_max'] || $product_count < $product['count_min']) {
         echo json_encode(array('success' => 0, 'max' => $product['count_max'], 'min' => $product['count_min']));
         return;
     }
     $tickets = array();
     for ($i = 0; $i < $ticket_count; $i++) {
         $number = new_ticket_number($product['id']);
         $price = get_price($product['id'], $this->user['level']);
         $this->db->insert('ticket', array("number" => $number, "create_time" => time(), "credit" => $price * $product_count, "product_id" => $product['id'], "count" => $product_count, "state" => 0, "fulfill_time" => 0, "agent" => $this->user['id']));
         $tickets[] = $number;
     }
     echo json_encode(array('success' => 1, 'tickets' => $tickets));
 }
开发者ID:sdgdsffdsfff,项目名称:raptor,代码行数:16,代码来源:make.php

示例6: print_cart

function print_cart()
{
    global $in_cart;
    if (array_key_exists('игрушка детская велосипед', $in_cart)) {
        if (get_available($in_cart['игрушка детская велосипед']['количество заказано'], $in_cart['игрушка детская велосипед']['осталось на складе']) >= 3) {
            echo '<p>Поздравляем вас с участием в акции, вы купили товар "игрушка детская велосипед" в количестве более 3 штук, и получаете скидку в 30%</p>';
            $in_cart['игрушка детская велосипед']['diskont'] = 'diskont3';
        } else {
            echo 'Купив товар "игрушка детская велосипед" количеством более 3 штук вы получите скидку 30%!';
        }
        $action_profit = get_profit($in_cart['игрушка детская велосипед']['количество заказано'], $in_cart['игрушка детская велосипед']['осталось на складе'], $in_cart['игрушка детская велосипед']['цена']);
    }
    $cart = '<table border="1"><tr>';
    $cart .= '<td>№</td>' . '<td><b>Наименование</b></td>' . '<td><b>Цена</b></td>' . '<td><b>Скидка</b></td>';
    $cart .= '<td><b>В заказе</b></td>' . '<td><b>На складе</b></td>' . '<td><b>Итого со скидкой</b></td></tr>';
    static $total_goods = 0;
    static $total_cost = 0;
    static $count = 0;
    static $total_profit = 0;
    foreach ($in_cart as $key => $val) {
        $item_price = $val['цена'];
        $in_order = $val['количество заказано'];
        $in_stock = $val['осталось на складе'];
        $diskont = get_int($val['diskont']);
        $show_diskont = $diskont > 0 ? $diskont . '0%' : '0%';
        //красивое число скидки в таблице
        $price = get_price($item_price, $diskont, $in_order, $key, $in_stock);
        $cart .= '<tr><td>' . ++$count . '</td>';
        $cart .= '<td>' . $key . '</td>';
        $cart .= '<td>' . $item_price . '</td>';
        $cart .= '<td>' . $show_diskont . '</td>';
        $cart .= '<td>' . $in_order . '</td>';
        $cart .= '<td>' . $in_stock . '</td>';
        $cart .= '<td>' . $price[0] . '</td>';
        $cart .= '</tr>';
        $total_goods += get_available($in_order, $in_stock);
        $total_cost += $price[0];
        $total_profit += $price[1] - $price[0];
    }
    $cart .= '</table>';
    $cart .= $action_profit;
    $cart .= '<table style="border:1px solid gray;background:lightgray"><tr><td>ИТОГО в заказе:</td><td> - ' . $count . ' наименования,<br/>';
    $cart .= '- ' . $total_goods . ' товаров,<br/> - ' . $total_cost . ' сумма к оплате,<br/> - ' . $total_profit . ' сэкономлено на скидках</td></tr></table>';
    return $cart;
}
开发者ID:LEXXiY,项目名称:devschool,代码行数:45,代码来源:dz4.php

示例7: create_job

function create_job($ticket, $values)
{
    $CI =& get_instance();
    $product = $ticket['product'];
    $to = $values['to'];
    $agent = get_user_by_id($ticket['agent']);
    $price = get_price($product['id'], $agent['level']);
    if (!change_credit($agent['id'], -$price, $ticket['number'])) {
        return 'INSUFFICIENT_BALANCE_FROM_AGENT';
    }
    if ($product['cate'] == 4) {
        $this->load->helper('user');
        $user = get_user();
        if (!$user) {
            return 'LOGIN_REQUIRED';
        }
        // hack self business here
        if ($product['subcate'] == 900) {
            // increase balance
            change_credit($user['id'], $product['norm_value'], $ticket['number']);
        }
        if ($product['subcate'] == 910) {
            // upgrade agent
            $from = $product['province'] % 10;
            $to = int($product['province'] / 10);
            if ($user['level'] != $from) {
                return 'INVALID_CURRENT_LEVEL';
            }
            if ($user['parent'] && $user['parent'] != $ticket['agent']) {
                return 'PARENT_CONFLICTED';
            }
            $this->db->update('agent', array('level' => $to, 'parent' => $ticket['agent']), array('name' => $username));
        }
    } else {
        $this->db->insert('job', array('create_time' => time(), 'commit_time' => 0, 'ticket_number' => $ticket['number'], 'to' => $values['to'], 'area' => $values['area'], 'product_id' => $product['id'], 'locking_on' => NULL, 'retried' => 0, 'result' => 0, 'reason' => NULL));
    }
    return 'SUCCESS';
}
开发者ID:sdgdsffdsfff,项目名称:raptor,代码行数:38,代码来源:product_helper.php

示例8: array

//process filtering if set as part of the get request, this modifies the
//auction_set
if (isset($_POST['bottom']) && isset($_POST['top']) && isset($_POST['rating']) && isset($_POST['category']) && isset($_POST['auctionSet']) && isset($_POST['tokenChanged'])) {
    //initialize to empty array
    $auction_set = array();
    if ($_POST['tokenChanged']) {
        //process search form
        $search_token = trim($_POST['token']);
        //process_search_form();//uses GET from inside the body
        //if processed search token is not empty
        if ($search_token) {
            //query database and modify result set with further queries
            $auction_set = query_select_auction_search($search_token);
            for ($i = 0; $i < sizeof($auction_set); $i++) {
                //enrich with price
                $current_price = get_price($auction_set[$i]['auctionId'], $auction_set[$i]['startingPrice']);
                $auction_set[$i]['currentPrice'] = $current_price;
                //once the current price is known, there is no further need for a
                //startingPrice field on the retrieved associative array
                unset($auction_set[$i]['startingPrice']);
                //enrich with rating
                $feedback_array = query_select_user_rating($auction_set[$i]['seller']);
                $auction_set[$i]['stars'] = $feedback_array['stars'];
                $auction_set[$i]['no_of_ratings'] = $feedback_array['occurrences'];
            }
        }
    } else {
        $auction_set = $_POST['auctionSet'];
    }
    $auction_set = process_filter_form($auction_set, $_POST['bottom'], $_POST['top'], $_POST['rating'], $_POST['category']);
    //begin constructing auction set display table, id value used by
开发者ID:marcogreselin,项目名称:auctionbay,代码行数:31,代码来源:generate_auction_list_display.php

示例9: intval

     $t['a1'] = 1;
     $t['p1'] = $t['price'];
     $t['a2'] = $t['a3'] = 0;
     $t['p2'] = $t['p3'] = 0.0;
 }
 $number = intval($v['number']);
 if ($number < $t['a1']) {
     $number = $t['a1'];
 }
 if ($number > $t['amount']) {
     $number = $t['amount'];
 }
 if ($number < 1) {
     $number = 1;
 }
 $price = get_price($number, $t['price'], $t['step']);
 $amount = $number * $price;
 $_note = convert(input_trim($v['note']), 'UTF-8', DT_CHARSET);
 $note = '';
 $t['P1'] = get_nv($t['n1'], $t['v1']);
 $t['P2'] = get_nv($t['n2'], $t['v2']);
 $t['P3'] = get_nv($t['n3'], $t['v3']);
 $t['s1'] = $s1;
 $t['s2'] = $s2;
 $t['s3'] = $s3;
 $t['m1'] = isset($t['P1'][$t['s1']]) ? $t['P1'][$t['s1']] : '';
 $t['m2'] = isset($t['P2'][$t['s2']]) ? $t['P2'][$t['s2']] : '';
 $t['m3'] = isset($t['P3'][$t['s3']]) ? $t['P3'][$t['s3']] : '';
 $t['m1'] = isset($t['P1'][$t['s1']]) ? $t['P1'][$t['s1']] : '';
 $t['m2'] = isset($t['P2'][$t['s2']]) ? $t['P2'][$t['s2']] : '';
 $t['m3'] = isset($t['P3'][$t['s3']]) ? $t['P3'][$t['s3']] : '';
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:cart.php

示例10: details

 public function details($member_id)
 {
     $billing_data = $accounts_list = $paymentslist = array();
     $prev_ob = $months_delayed = $amount = $i = $count_months = 0;
     $payment_status = '';
     $member_data = $this->member_model->get_member($member_id);
     $data['member'] = $member_data;
     $accounts = $this->account_model->get_reading($member_id, Null, 'ASC');
     $data['privileges'] = getPrivileges();
     $initial_ob = get_object_vars(array_pop($member_data));
     $initialize_object = new stdClass();
     $initialize_object->previous_reading = 0;
     $initialize_object->current_reading = 0;
     $initialize_object->date = 0;
     $initialize_object->meter_reading_id = 0;
     $initialize_object->added = '';
     $initialize_object->member_id = $member_id;
     $accounts_list[] = array(0 => $initialize_object);
     foreach ($accounts as $key => $account_read) {
         $accounts_list[$account_read->date][$account_read->meter_reading_id] = $account_read;
     }
     $data['payments'] = $this->payment_model->get_payments($member_id);
     $outsanding_balance = $initial_ob['initial_ob'];
     $listpayments = create_payment_matrix($data['payments']);
     $paymentslist = $listpayments['list'];
     $total_bal_diff = $listpayments['grand_total'] - $outsanding_balance;
     $paymentslist_ids = array_keys($paymentslist);
     if (!empty($accounts_list)) {
         ksort($accounts_list);
         $accounts_list_ids = array_keys($accounts_list);
         foreach ($accounts_list_ids as $count => $bill_period_timestamp) {
             $account = $accounts_list[$bill_period_timestamp];
             $current_reading = $previous_reading = 0;
             $wmm = WMM;
             $paymentD = [];
             foreach ($account as $account_loop) {
                 $current_reading = $current_reading + $account_loop->current_reading;
                 $previous_reading = $previous_reading + $account_loop->previous_reading;
             }
             $consumed_cubic = $current_reading - $previous_reading;
             $amount = get_price($consumed_cubic);
             if ($bill_period_timestamp == 0 && $consumed_cubic == 0) {
                 $wmm = $amount = 0;
             }
             $total_discount = $total_basicpayment = $total_regular_discount = 0;
             $total_adjustment = $total_penalty = $total_wmm = $total_payment = $total_charges = 0;
             $total_current = $amount + $wmm + $outsanding_balance;
             $prev_ob = $outsanding_balance;
             $outsanding_balance = $prev_ob + $amount + $wmm;
             $ob_display = number_format($prev_ob, 2, '.', ',');
             if ($prev_ob < 0) {
                 $ob_display = 'Excess of ' . $prev_ob * -1;
             }
             $due_time = strtotime(date('Y-m-t', $bill_period_timestamp) . ' + 15 days');
             $nextMonth = strtotime(date('Y-m-t', $bill_period_timestamp) . ' + 1 month');
             $billinPeriod = date('M d', $bill_period_timestamp) . ' - ' . date('t', $bill_period_timestamp);
             $billPeriod = $billinPeriod . ', ' . date('Y', $bill_period_timestamp);
             $curr_amount = $amount + $wmm;
             $due_date = date('M j Y', $due_time);
             if ($bill_period_timestamp == 0) {
                 $billinPeriod = "Line Connection";
                 $due_date = '--';
             }
             $isPaymentData = false;
             $date_of_payment = '';
             $billing_data[] = fillBillingData($billinPeriod, $bill_period_timestamp, $member_id, $due_date, $current_reading, $previous_reading, $consumed_cubic, $amount, $wmm, $total_current, $date_of_payment, $isPaymentData, $total_payment, $total_regular_discount, $total_discount, $total_basicpayment, $total_penalty, $total_charges, $total_adjustment, $ob_display, $outsanding_balance);
             $total_bal_diff = $total_bal_diff - $curr_amount;
             $aging_calc = $bill_period_timestamp == 0 ? $outsanding_balance : $outsanding_balance - $prev_ob;
             $current = $bill_period_timestamp;
             $next = $accounts_list_ids[$count + 1];
             if ($bill_period_timestamp == 0) {
                 $valid_payments = array_filter($paymentslist_ids, function ($value) use($current, $next) {
                     return $value < $next;
                 });
             } else {
                 if (!isset($next)) {
                     $valid_payments = array_filter($paymentslist_ids, function ($value) use($current, $next) {
                         return $value >= $current;
                     });
                 } else {
                     $valid_payments = array_filter($paymentslist_ids, function ($value) use($current, $next) {
                         return $value >= $current && $value < $next;
                     });
                 }
             }
             if (empty($valid_payments)) {
                 continue;
             }
             foreach ($valid_payments as $valid_payments_id) {
                 $paymentD[$valid_payments_id] = $paymentslist[$valid_payments_id];
             }
             foreach ($paymentD as $datepaid => $paymentdata) {
                 krsort($paymentdata);
                 foreach ($paymentdata as $key => $paymententry) {
                     $total_discount = !empty($paymententry['discount']) ? $paymententry['discount'] : 0;
                     $total_basicpayment = !empty($paymententry['basic_charge']) ? $paymententry['basic_charge'] : 0;
                     $total_regular_discount = !empty($paymententry['regular_discount']) ? $paymententry['regular_discount'] : 0;
                     $total_adjustment = !empty($paymententry['adjustment']) ? $paymententry['adjustment'] : 0;
                     $total_penalty = !empty($paymententry['penalty']) ? $paymententry['penalty'] : 0;
                     $total_charges = !empty($paymententry['total_charges']) ? $paymententry['total_charges'] : 0;
//.........这里部分代码省略.........
开发者ID:sedfreyatay,项目名称:calamba_water_a,代码行数:101,代码来源:transaction.php

示例11: foreach

     if ($tags) {
         foreach ($data as $k => $v) {
             if (isset($tags[$v['itemid']])) {
                 $r = $tags[$v['itemid']];
                 $r['key'] = $k;
                 $r['s1'] = $v['s1'];
                 $r['s2'] = $v['s2'];
                 $r['s3'] = $v['s3'];
                 $r['a'] = $v['a'];
                 if ($r['a'] > $r['amount']) {
                     $r['a'] = $r['amount'];
                 }
                 if ($r['a'] < $r['a1']) {
                     $r['a'] = $r['a1'];
                 }
                 $r['price'] = get_price($r['a'], $r['price'], $r['step']);
                 $r['m1'] = isset($r['P1'][$r['s1']]) ? $r['P1'][$r['s1']] : '';
                 $r['m2'] = isset($r['P2'][$r['s2']]) ? $r['P2'][$r['s2']] : '';
                 $r['m3'] = isset($r['P3'][$r['s3']]) ? $r['P3'][$r['s3']] : '';
                 $lists[] = $r;
             }
         }
     }
 }
 if ($lists) {
     $address = array();
     $result = $db->query("SELECT * FROM {$DT_PRE}address WHERE username='{$_username}' ORDER BY listorder ASC,itemid ASC LIMIT 30");
     while ($r = $db->fetch_array($result)) {
         if ($r['areaid']) {
             $r['address'] = area_pos($r['areaid'], '') . $r['address'];
         }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:buy.inc.php

示例12: stripslashes

    if ($this->view_it_name) {
        echo stripslashes($row['it_name']) . "\n";
    }
    if ($this->href) {
        echo "</a></div>\n";
    }
    if ($this->view_it_basic && $row['it_basic']) {
        echo "<div class=\"sct_basic\">" . stripslashes($row['it_basic']) . "</div>\n";
    }
    if ($this->view_it_cust_price || $this->view_it_price) {
        echo "<div class=\"sct_cost\">\n";
        if ($this->view_it_cust_price && $row['it_cust_price']) {
            echo "<strike>" . display_price($row['it_cust_price']) . "</strike>\n";
        }
        if ($this->view_it_price) {
            echo display_price(get_price($row), $row['it_tel_inq']) . "\n";
        }
        echo "</div>\n";
    }
    if ($this->view_sns) {
        $sns_top = $this->img_height + 10;
        $sns_url = G5_SHOP_URL . '/item.php?it_id=' . $row['it_id'];
        $sns_title = get_text($row['it_name']) . ' | ' . get_text($config['cf_title']);
        echo "<div class=\"sct_sns\" style=\"top:{$sns_top}px\">";
        echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL . '/img/sns_fb_s.png');
        echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL . '/img/sns_twt_s.png');
        echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL . '/img/sns_goo_s.png');
        echo "</div>\n";
    }
    echo "</li>\n";
}
开发者ID:davis00,项目名称:youngcart,代码行数:31,代码来源:main.50.skin.php

示例13: get_list_trendy

function get_list_trendy($where, $order, $esLayout)
{
    global $es_settings, $wpdb, $wp_query;
    $paged = isset($_GET['page_no']) ? $_GET['page_no'] : 0;
    if (empty($order)) {
        $order = get_order();
    }
    $sql = "SELECT * FROM {$wpdb->prefix}estatik_properties {$where} {$order} LIMIT {$paged}, {$es_settings->no_of_listing}";
    $es_my_listing = $wpdb->get_results($sql);
    if (!empty($es_my_listing)) {
        ?>


    <h1><?php 
        echo $wp_query->post->post_title;
        ?>
</h1>
    <div class="es_my_listing">
        <div class="es_listing_change">
            <?php 
        if ($es_settings->view_first_on_off == 1) {
            include 'es_view_first.php';
        }
        ?>

        </div>

        <ul class="clearfix <?php 
        echo es_get_layout($esLayout);
        ?>
">
        <?php 
        foreach ($es_my_listing as $list) {
            $photo_info = get_images($list->prop_id);
            $image_url = $photo_info[0];
            // $uploaded_images_count = $photo_info[1];
            ?>

            <li class="es_listing_item prop_id-<?php 
            echo $list->prop_id;
            ?>
">
                <a href="<?php 
            echo get_permalink($list->prop_id);
            ?>
"
                   class="es_my_list_in"
                   style="background-image: url(<?php 
            echo $image_url;
            ?>
)">
                </a>

                <div class="es_my_list_title">
                    <h3>
                        <a href="<?php 
            echo get_permalink($list->prop_id);
            ?>
">
                            <?php 
            echo es_excerpt($list->prop_address, 90);
            ?>

                        </a>
                    </h3>
                    <h2><?php 
            echo get_price($list->prop_price);
            ?>
</h2>
                    <div class="description"><?php 
            echo es_excerpt($list->prop_description, 150);
            ?>
</div>
                    <?php 
            show_specs($list, $photo_info[1], 'black');
            ?>


                    <div class="clearfix"></div>
                    <?php 
            show_props($list);
            ?>

                </div>

                <div class="hover">
                    <div class="overlay">
                        <div class="es_my_list_more clearfix">
                            <a href="<?php 
            if ($list->prop_latitude != "" && $list->prop_longitude != "") {
                echo "{$list->prop_latitude}, {$list->prop_longitude}";
            }
            ?>
" class="es_button es_map_view">
                               <?php 
            _e("View on map", 'es-plugin');
            ?>

                            </a>
                            <a href="<?php 
//.........这里部分代码省略.........
开发者ID:ksan5835,项目名称:rankproperties,代码行数:101,代码来源:es_listing_functions.php

示例14: header

<?php

header("Content-Type:application/json");
include "functions.php";
if (!empty($_GET['name'])) {
    $name = $_GET['name'];
    $price = get_price($name);
    if (empty($price)) {
        deliver_response(200, "book not found", NULL);
    } else {
        deliver_response(200, "book found", $name);
    }
} else {
    //throw invalid request
    deliver_response(400, 'Invalid request', null);
}
function deliver_response($status, $status_message, $data)
{
    header("HTTP/1.1 {$status}.{$status_message}");
    $response['status'] = $status;
    $response['status_message'] = $status_message;
    $response['data'] = $data;
    $json_response = json_encode($response);
    echo $json_response;
}
开发者ID:shubhamstrength,项目名称:web-services,代码行数:25,代码来源:index.php

示例15: add_to_cart

 public function add_to_cart($id)
 {
     print_r($_POST);
     if (isset($_POST['qty']) && !empty($_POST['qty'])) {
         $qty = $this->input->post('qty');
     } else {
         $qty = 1;
     }
     $produs = $this->mysql->get_row('products', array('id' => $id));
     $pret = get_price(unserialize($produs['prices']), 10);
     $insert = array('id' => $id, 'qty' => $qty, 'price' => $pret, 'name' => $produs['name_' . $this->lng], 'image' => $produs['photo'], 'parent' => $produs['parent']);
     $this->cart->insert($insert);
     $cart = $this->cart->contents();
     //echo '<pre>';  print_r($insert);     print_r($cart);
     if ($_SERVER['HTTP_REFERER']) {
         $url = $_SERVER['HTTP_REFERER'];
     } else {
         $url = "/" . $this->lng . "/product" . $produs[id];
     }
     if ($_POST['to_cart']) {
         $url = "/" . $this->lng . "/cart";
     }
     redirect($url);
 }
开发者ID:radumargina,项目名称:corden,代码行数:24,代码来源:main.php


注:本文中的get_price函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。