• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_address函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_company_info

/**
 * Returns the string for the company info (address, phone number, fax number)
 *
 * See also corresponding the_company_info() function for displaying the
 * company info.
 *
 * @return string
 */
function get_company_info()
{
    return '
        <div class="company_info" itemscope itemtype="http://schema.org/LocalBusiness">
            <span style="display: none;" itemprop="name">' . get_bloginfo('name') . '</span> ' . '<span style="display: none;" itemprop="description">' . get_bloginfo('description') . '</span> ' . get_address() . get_phone_number(true) . get_fax_number(true) . '
        </div>';
}
开发者ID:hbradleyiii,项目名称:wp_bare_theme,代码行数:15,代码来源:company-info.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: tax_amount

function tax_amount($subtotal)
{
    $shipping_address = get_address($_SESSION['user']['shipAddressID']);
    $state = $shipping_address['state'];
    $state = strtoupper($state);
    switch ($state) {
        case 'CA':
            $tax_rate = 0.09;
            break;
        default:
            $tax_rate = 0;
            break;
    }
    return round($subtotal * $tax_rate, 2);
}
开发者ID:Romrell-Launa,项目名称:CIT336,代码行数:15,代码来源:order_db.php


示例4: foreach

<h1>Shop items</h1>

<?php 
foreach ($shopItems as $id => $item) {
    ?>
    <h2><?php 
    echo h($item['title']);
    ?>
</h2>
    <strong>Price: </strong> <?php 
    echo h($item['price'] / 100), ' ', h($item['currency']);
    ?>
<br />
    <a href="<?php 
    echo get_address('buy.php?id=') . $id;
    ?>
">Buy</a>
<?php 
}
开发者ID:klizas,项目名称:plugin-woocommerce-2.x,代码行数:19,代码来源:list.html.php


示例5: get_address

<h1>Select payment method</h1>
<form action="<?php 
echo get_address('request.php');
?>
" method="post">
    <?php 
foreach ($methods->getCountries() as $country) {
    ?>
        <h2><?php 
    echo h($country->getTitle());
    ?>
</h2>
        <?php 
    foreach ($country->getGroups() as $group) {
        ?>
            <h3><?php 
        echo h($group->getTitle());
        ?>
</h3>
            <?php 
        foreach ($group->getPaymentMethods() as $paymentMethod) {
            ?>
                <?php 
            if ($paymentMethod->getLogoUrl()) {
                ?>
                    <label>
                        <input type="radio" class="radio" name="payment" value="<?php 
                echo h($paymentMethod->getKey());
                ?>
" />
                        <img src="<?php 
开发者ID:klizas,项目名称:plugin-woocommerce-2.x,代码行数:31,代码来源:paymentMethod.html.php


示例6: sendShippingConfirmEmail

function sendShippingConfirmEmail($order_id)
{
    $customer = get_customer(get_customer_id($order_id));
    $customer_name = $customer['firstName'] . ' ' . $customer['lastName'];
    $customer_email = $customer['emailAddress'];
    $order = get_order($order_id);
    $order_date = strtotime($order['orderDate']);
    $order_date = date('M j, Y', $order_date);
    $order_items = get_order_items($order_id);
    $ship_date = date('M j, Y', strtotime($order['shipDate']));
    $shipping_address = get_address($order['shipAddressID']);
    $ship_line1 = $shipping_address['line1'];
    $ship_line2 = $shipping_address['line2'];
    $ship_city = $shipping_address['city'];
    $ship_state = $shipping_address['state'];
    $ship_zip = $shipping_address['zipCode'];
    $ship_phone = $shipping_address['phone'];
    $copyright_date = date("Y");
    set_time_limit(0);
    $messageHTML = <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- the head section -->
<head>
    <title>My Guitar Shop: Shipping Confirmation</title>
    <style>
    /* the styles for the HTML elements */
    body {
        margin-top: 0;
        background-color: rgb(128, 141, 159);
        font-family: Arial, Helvetica, sans-serif;
    }
    h1 {
        font-size: 150%;
        margin: 0;
        padding: .5em 0 .25em;
    }
    h2 {
        font-size: 120%;
        margin: 0;
        padding: .5em 0 .25em;
    }
    h1, h2 {
        color: rgb(205, 163, 94);
    }

    ul {
        margin: 0 0 1em 0;
        padding: 0 0 0 2.5em;
    }
    li {
        margin: 0;
        padding: .25em;
    }
    a {
        color: rgb(69, 85, 106);   
        font-weight: bold;

    }
    a:hover {
        color: blue;
    }
    p {
        margin: 0;
        padding: .25em 0;
    }

    form {
        margin: .5em 0;
        width: 100%;
    }
    label {
        width: 8em;
        padding-right: .5em;
        padding-bottom: .5em;
        text-align: right;
        float: left;
    }
    textarea {
        width: 25em;
        margin-bottom: .5em;
    }
    table {
        border-collapse: collapse;
    }
    td, th {
        margin: 0;
        padding: .15em 0;
    }
    br {
        clear: both;
    }

    /* the styles for the div tags that divide the page into sections */
    #page {
        width: 850px;
        margin: 0 auto;
        background-color: white;
        border: 1px solid rgb(119, 75, 77);
//.........这里部分代码省略.........
开发者ID:hessemanj2100,项目名称:guitar_shop,代码行数:101,代码来源:email.php


示例7: order

 public function order()
 {
     if (!is_login()) {
         $this->error("您还没有登陆", U("User/login"));
     }
     /* 菜单调用*/
     $menu = R('index/menulist');
     $this->assign('categoryq', $menu);
     /* 热词调用*/
     $hotsearch = R("Index/getHotsearch");
     $this->assign('hotsearch', $hotsearch);
     /* uid调用*/
     $uid = D('member')->uid();
     $score = get_score($uid);
     /* 底部分类调用*/
     $menulist = R('Service/AllMenu');
     $this->assign('footermenu', $menulist);
     /* 积分兑换*/
     $ratio = $score / C('RATIO');
     $this->assign('ratio', $ratio);
     $this->assign('uid', $uid);
     /* 创建订单*/
     if (IS_POST) {
         $goodlist = M("shoplist");
         $order = M("order");
         $tag = $this->ordersn();
         //标识号
         for ($i = 0; $i < count($_POST["id"]); $i++) {
             $id = htmlspecialchars($_POST["id"][$i]);
             $num = htmlspecialchars($_POST["num"][$i]);
             $goodlist->goodid = $id;
             $goodlist->status = 1;
             $goodlist->orderid = '';
             $goodlist->parameters = htmlspecialchars($_POST["parameters"][$i]);
             $goodlist->sort = htmlspecialchars($_POST["sort"][$i]);
             $goodlist->num = $num;
             $goodlist->uid = $uid;
             $goodlist->tag = $tag;
             //标识号必须相同
             $goodlist->create_time = NOW_TIME;
             $goodprice = htmlspecialchars($_POST["price"][$i]);
             $goodlist->price = $goodprice;
             $goodtotal = $num * $goodprice;
             $goodlist->total = $goodtotal;
             $goodlist->add();
         }
         $defaultaddress = get_address($uid);
         $this->assign('address', $defaultaddress);
         $a = M("shoplist")->where(" tag='{$tag}'")->select();
         $total = '';
         $num = '';
         foreach ($a as $k => $val) {
             $total += $val['total'];
             $num += $val['num'];
         }
         if ($total < C('LOWWEST')) {
             $trans = C('SHIPMONEY');
         } else {
             $trans = 0;
         }
         $all = $total + $trans;
         $shoplist = M('shoplist')->where("tag='{$tag}'")->select();
         $this->assign('shoplist', $shoplist);
         $this->assign('all', $all);
         $this->assign('num', $num);
         $this->assign('tag', $tag);
         $this->assign('total', $total);
         $this->assign('trans', $trans);
         $this->meta_title = '订单结算';
         $this->display();
     }
 }
开发者ID:a1357479,项目名称:techan,代码行数:72,代码来源:ShopcartController.class.php


示例8: save_data

                $order['status'] = 'done';
                $data['orders'][$orderId] = $order;
                save_data($data);
                echo 'OK';
            }
        } elseif ($response['status'] == 3) {
            $data['orders'][$orderId]['additionalResponse'] = $response;
            save_data($data);
        }
    } catch (Exception $e) {
        echo 'FAIL ' . $e->getMessage();
    }
} else {
    if ('accept' == $answer) {
        try {
            $response = WebToPay::validateAndParseData($get, $config['projectid'], $config['sign_password']);
            if ($response['status'] == 1 || $response['status'] == 2) {
                // You can start providing services when you get confirmation with accept url
                // Be sure to check if this order is not yet confirmed - user can refresh page anytime
                // status 2 means that payment has been got but it's not yet confirmed
                // @todo: get order by $response['orderid'], validate test (!), amount and currency
                echo 'Your payment has been got successfuly, it will be confirmed shortly<br />';
            }
        } catch (Exception $e) {
            echo 'Your payment is not yet confirmed, system error<br />';
        }
        echo template('Thank you for buying<br /><a href="' . get_address('orders.php') . '">Orders</a>');
    } else {
        echo template('<div class="error">Payment rejected.</div>');
    }
}
开发者ID:klizas,项目名称:plugin-woocommerce-2.x,代码行数:31,代码来源:response.php


示例9: draw_shipping_address

function draw_shipping_address($error)
{
    global $_CONF, $_USER, $_TABLES, $LANG_ECOM;
    $current_id = 0;
    $T = new Template($_CONF['path'] . 'plugins/ecommerce/templates');
    $T->set_file(array('user_shipping_address' => 'user_shipping_address.thtml', 'user_shipping_info_box' => 'user_shipping_info_box.thtml'));
    $res = get_default_address($_USER['uid']);
    //No address specified and no default address for the user. Or new address. Load a blank template
    if (!isset($_GET['id']) && DB_numRows($res) <= 0 || $_GET['action'] == "new") {
        $T->set_var('submit_value', 'Add Shipping Address');
        $T->set_var('submit_name', 'add_shipping_address');
        $T->set_var('country', 'US');
        //Make US default country
        $T->set_var('site_url', $PHP_SELF . '?op=shipping_address');
    } else {
        if ($_GET['id'] > 0) {
            //Shipping address was specified
            $current_id = COM_applyFilter($_GET['id']);
            $res = get_address($current_id);
            #
            $address = DB_fetchArray($res);
            //Make sure address belongs to user
            if ($_USER['uid'] != $address['ecom_ship_uid']) {
                echo "This is not your users address.";
                exit;
            }
        } else {
            //Load the default address
            $address = DB_fetchArray($res);
            //res is set on fourth line in this function.
            $current_id = $address['ecom_shipid'];
        }
        $T->set_var('submit_value', 'Update Shipping Address');
        $T->set_var('submit_name', 'update_shipping_address');
        $T->set_var('error', $error);
        $T->set_var('full_name', $address['ecom_ship_fullname']);
        $T->set_var('company', $address['ecom_ship_company']);
        $T->set_var('adress_line1', $address['ecom_ship_street1']);
        $T->set_var('adress_line2', $address['ecom_ship_street2']);
        $T->set_var('city', $address['ecom_ship_city']);
        $T->set_var('state', $address['ecom_ship_state']);
        $T->set_var('zip', $address['ecom_ship_postalcode']);
        $T->set_var('country', $address['ecom_ship_country']);
        $T->set_var('default', $address['ecom_ship_default'] == 1 ? true : false);
        $T->set_var('site_url', $PHP_SELF . '?op=shipping_address&id=' . $address['ecom_shipid']);
        $T->set_var('showDelete', true);
    }
    $T->set_var('new_address_link', 'index.php?op=shipping_address&action=new');
    $T->set_var('msg_1', $LANG_ECOM[1]);
    $T->set_var('msg_27', $LANG_ECOM[27]);
    $T->set_var('msg_28', $LANG_ECOM[28]);
    $T->set_var('msg_29', $LANG_ECOM[29]);
    $T->set_var('msg_30', $LANG_ECOM[30]);
    $T->set_var('msg_31', $LANG_ECOM[31]);
    $T->set_var('msg_151', $LANG_ECOM[151]);
    $T->set_var('msg_152', $LANG_ECOM[152]);
    $T->set_var('msg_153', $LANG_ECOM[153]);
    $T->set_var('msg_154', $LANG_ECOM[154]);
    $T->set_var('msg_155', $LANG_ECOM[155]);
    $T->set_var('msg_156', $LANG_ECOM[156]);
    /*	echo "<SCRIPT  type=\"text/javascript\">initCountry();</SCRIPT>"; //Needed for State & Country */
    //Draw additional address box's
    $res = DB_query("SELECT ecom_shipid, ecom_ship_street1, ecom_ship_street2, ecom_ship_city, ecom_ship_state, ecom_ship_postalcode FROM {$_TABLES['ecom_user_shipping']} WHERE ecom_ship_uid = " . $_USER['uid'] . " AND ecom_shipid != " . $current_id . "");
    while ($address_row = DB_fetchArray($res)) {
        $T->set_var('box_address1', $address_row['ecom_ship_street1']);
        $T->set_var('box_address2', $address_row['ecom_ship_street2']);
        $T->set_var('box_city', $address_row['ecom_ship_city']);
        $T->set_var('box_state', $address_row['ecom_ship_state']);
        $T->set_var('box_zip', $address_row['ecom_ship_postalcode']);
        $T->set_var('url', 'index.php?op=shipping_address&id=' . $address_row['ecom_shipid'] . '');
        $T->set_var('url_delete', 'index.php?op=shipping_address&delete_id=' . $address_row["ecom_shipid"]);
        $T->set_var('showDelete', true);
        $T->set_var('msg_157', $LANG_ECOM[157]);
        $T->set_var('msg_158', $LANG_ECOM[158]);
        $T->set_var('msg_32', $LANG_ECOM[32]);
        $T->parse('user_shipping_info_box', 'user_shipping_info_box', true);
    }
    $T->parse('output', 'user_shipping_address');
    echo $T->finish($T->get_var('output'));
    echo "<SCRIPT  type=\"text/javascript\">initCountry();</SCRIPT>";
    //Needed for State & Country
}
开发者ID:glFusion,项目名称:ecommerce,代码行数:82,代码来源:user_shipping_address.php


示例10: order

 public function order()
 {
     /* 菜单调用*/
     $menu = R('index/menulist');
     $this->assign('categoryq', $menu);
     /* 热词调用*/
     $hotsearch = R("Index/getHotsearch");
     $this->assign('hotsearch', $hotsearch);
     /* uid调用*/
     $user = session('user_auth');
     $uid = $user['uid'];
     $score = get_score($uid);
     /* 积分兑换*/
     $ratio = $score / C('RATIO');
     $this->assign('ratio', $ratio);
     $this->assign('uid', $uid);
     /* 创建订单*/
     if (IS_POST) {
         $order = D("order");
         $goodlist = M("shoplist");
         $makeid = $this->ordersn();
         $order->orderid = $makeid;
         $order->uid = $uid;
         $order->add();
         $orderid = $order->where("orderid='{$makeid}'")->getField('id');
         for ($i = 0; $i < count($_POST["id"]); $i++) {
             $id = $_POST["id"][$i];
             $num = $_POST["num"][$i];
             $goodlist->goodid = $id;
             $goodlist->status = 1;
             $goodlist->orderid = $orderid;
             $goodlist->num = $num;
             $goodlist->time = NOW_TIME;
             $goodprice = get_good_price($id);
             $goodtotal = $num * $goodprice;
             $goodlist->total = $goodtotal;
             $result = $goodlist->add();
         }
         $shoplist = $goodlist->where("orderid='{$orderid}'")->select();
         $this->assign('shoplist', $shoplist);
         $this->assign('uid', $uid);
         $this->assign('orderid', $orderid);
         $msg = get_address($uid);
         $total = $this->getPricetotal($orderid);
         if ($total < C('LOWWEST')) {
             $trans = C('SHIPPRICE');
         } else {
             $trans = 0;
         }
         $all = $total + $trans;
         $allnum = $this->getpriceNum($orderid);
         $this->assign('all', $all);
         $this->assign('allnum', $allnum);
         $this->assign('trans', $trans);
         $this->assign('total', $total);
         $this->assign('address', $msg);
     }
     $this->display();
 }
开发者ID:norain2050,项目名称:yershop,代码行数:59,代码来源:ShopcartController.class.php


示例11: get_settings_option

                    $hotelname = get_settings_option('hotelname', 'general_option');
                    $address = get_post_meta($post->ID, 'address_field', true);
                    if ($alttitle != '' || $alttitle != null) {
                        ?>
		<h1 class="entry-title <?php 
                        echo $address != null || $address != '' ? "no-margin" : null;
                        ?>
"><?php 
                        echo $alttitle;
                        ?>
</h1>
	<?php 
                    } else {
                        ?>
		<h1 class="entry-title <?php 
                        echo $address != null || $address != '' ? "no-margin" : null;
                        ?>
"><?php 
                        the_title($hotelname . ' - ');
                        ?>
</h1>
	<?php 
                    }
                    ?>
	<?php 
                    echo $address ? get_address(array('hotelname' => true, 'telephone' => true, 'telephone1' => true, 'telephone2' => true, 'seperator' => true)) : null;
                }
            }
        }
    }
}
开发者ID:junserrano12,项目名称:basetheme,代码行数:31,代码来源:content-header.php


示例12: add

 /**
  * 生成订单信息
  * 
  */
 public function add()
 {
     if (!is_login()) {
         $this->error("您还没有登陆", U("User/login"));
     }
     /* uid调用*/
     $uid = is_login();
     $score = get_score($uid);
     /* 积分兑换*/
     $ratio = $score / C('RATIO');
     $this->assign('ratio', $ratio);
     $this->assign('uid', $uid);
     /* 创建订单*/
     if (IS_POST) {
         $goodlist = M("shoplist");
         $tag = $this->ordersn();
         //创建支付订单号
         for ($i = 0; $i < count($_POST["id"]); $i++) {
             $id = $_POST["id"][$i];
             $num = $_POST["num"][$i];
             if ($num < 1) {
                 $this->error("无效数量");
             }
             $goodlist->goodid = $id;
             $goodlist->status = 1;
             $goodlist->orderid = '';
             $goodlist->parameters = $_POST["parameters"][$i];
             $goodlist->sort = $_POST["sort"][$i];
             $goodlist->num = $num;
             $goodlist->uid = $uid;
             $goodlist->tag = $tag;
             //标识号必须相同
             $goodlist->create_time = NOW_TIME;
             $goodprice = $_POST["price"][$i];
             $goodlist->price = $goodprice;
             $goodtotal = $num * $goodprice;
             $goodlist->total = $goodtotal;
             $goodlist->add();
         }
         $defaultaddress = get_address($uid);
         $this->assign('address', $defaultaddress);
         $a = M("shoplist")->where(" tag='{$tag}'")->select();
         $total = '';
         $num = '';
         foreach ($a as $k => $val) {
             $total += $val['total'];
             $num += $val['num'];
         }
         if ($total < C('LOWWEST')) {
             $trans = C('SHIPMONEY');
         } else {
             $trans = 0;
         }
         $all = $total + $trans;
         $shoplist = M('shoplist')->where("tag='{$tag}'")->select();
         $this->assign('shoplist', $shoplist);
         $map["pid"] = 0;
         $list = M("area")->where($map)->select();
         $this->assign('list', $list);
         $this->assign('all', $all);
         $this->assign('num', $num);
         $this->assign('tag', $tag);
         $this->assign('total', $total);
         $this->assign('trans', $trans);
         $this->meta_title = '订单结算';
         $this->display('Shopcart/add');
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:72,代码来源:OrderController.class.php


示例13: date

		  <div style="color:red">
		  <p style="text-align:right;color:red;width:100%">小计:<?php 
echo $info["total"];
?>
元 </p> 
		   <p style="text-align:right;color:red;width:100%">申请时间:<?php 
echo date($info["time"], 'Y-m-d H:i:s');
?>
</p> 
		    <p style="text-align:right;color:red;width:100%">收货人:<?php 
echo get_realname($info["total"]);
?>
 </p> 
		  
		    <p style="text-align:right;color:red;width:100%">收货地址:<?php 
echo get_address($info["total"]);
?>
 </p> 
		   <p style="text-align:right;color:red;width:100%">联系电话:<?php 
echo get_cellphone($info["time"]);
?>
</p> </div>

		    <div class="form-item" style="border-top:1px solid #000">
			<?php 
echo get_good_content($info["goodid"]);
?>
			
		</div>
		  </div>
	</div>
开发者ID:norain2050,项目名称:yershop,代码行数:31,代码来源:05d2319e96918e86c7f1b2d2b74e8326.php


示例14: array

<?php

$config = array('sign_password' => '73cdb059d0f29f275a34b370f8e4f900', 'projectid' => 6028, 'test' => 1, 'accepturl' => get_address('response.php?answer=accept'), 'cancelurl' => get_address('response.php?answer=cancel'), 'callbackurl' => get_address('response.php?answer=callback'));
$shopItems = array(array('title' => 'Item A', 'price' => 100, 'currency' => 'LTL'), array('title' => 'Item B', 'price' => 2000, 'currency' => 'EUR'), array('title' => 'Item C', 'price' => 4990, 'currency' => 'LTL'));
开发者ID:klizas,项目名称:plugin-woocommerce-2.x,代码行数:4,代码来源:config.php


示例15: h

<h1>Buy item</h1>

<h2><?php 
echo h($item['title']);
?>
</h2>
<strong>Price: </strong> <?php 
echo h($item['price'] / 100), ' ', h($item['currency']);
?>
<br />

<form action="<?php 
echo get_address('paymentMethod.php');
?>
" method="post">
    <label>Email:* <input name="p_email" /></label>
    <label>Name: <input name="p_firstname" /></label>
    <label>Surname: <input name="p_lastname" /></label>
    <label>Address: <input name="p_street" /></label>
    <label>City: <input name="p_city" /></label>
    <label>State: <input name="p_state" /></label>
    <label>ZIP code: <input name="p_zip" /></label>
    <input type="hidden" name="id" value="<?php 
echo h($id);
?>
" />
    <input type="submit" value="Submit" />
</form>
开发者ID:klizas,项目名称:plugin-woocommerce-2.x,代码行数:28,代码来源:buy.html.php


示例16: addhttp

     $name = NULL;
 }
 /*
 	if (preg_match('/@/',$how_to_apply))
 	{
 		if ($email == '')
 			$email = $how_to_apply;
 		$how_to_apply = NULL;
 	}	
 */
 if (isset($homepage)) {
     $homepage = addhttp($homepage);
 }
 ## CLEANING ADDRESS ##
 if ($address != '') {
     $address_array = get_address($address);
 }
 if ($address_array['country_id'] == '') {
     $address_array['country_id'] = $country_id;
 }
 ## INSERTING EMPLOYER AND AVOIDING SOME DUPLICATES ##
 // Conditions for avoiding duplicates must be tested for more jobs to avoid wrong relations. Maybe we should take them off for now ?
 if ($name != '' || $address != '' && $address != ',  ,') {
     $query = "SELECT id FROM employer WHERE name = '{$name}' AND address = '{$address}' AND country_id = '{$address_array['country_id']}'";
     $employer_id = select_id($query);
     if ($employer_id == '') {
         if ($name != '' && $address_array['formatted_address'] != '') {
             $query = "SELECT id FROM employer WHERE name = '{$name}' AND formatted_address = '{$address_array['formatted_address']}' AND country_id = '{$address_array['country_id']}'";
         }
         $employer_id = select_id($query);
     }
开发者ID:asavagar,项目名称:EU-data-cloud,代码行数:31,代码来源:eures_job_scraper.php


示例17: get_address

<div class="dl_goods_info">
<h2 class="dginfo_h2" ><?php 
echo $info["title"];
?>
</h2>
<p >价格:<span class="dginfo_price">¥<em class="price"><?php 
echo $info["price"];
?>
</em></span></p>
<p >净重:<em class="price"><?php 
echo $info["weight"];
?>
</em>g</p>
<ul class="dginfo_info">
<li>配送地:<?php 
echo get_address($info["uid"]);
?>
</li>
<li style="clear:both; width:100%">
<form action="<?php 
echo U("Shopcart/order");
?>
" name="orderform" id="orform" method="post" onsubmit="return trySubmit()">
<input type="hidden" name="id[]" value="<?php 
echo $info["id"];
?>
"/> 
<p class="num_box">数量:<a href="javascript:void(0)"   onclick="add()" >+</a>  
         <input type="text" class="num" value="1"  name="num[]" /><a onclick="reduce()" id="oneA" href="javascript:void(0)" >-</a></p>
		 
 </form></li>
开发者ID:norain2050,项目名称:yershop,代码行数:31,代码来源:0a19fa9b4a7f23f256fc04046be7f2b6.php


示例18: extract

 $result = $GLOBALS['db']->getRow($sql);
 extract($result);
 //获取客户来源
 $sql = 'SELECT `from` FROM ' . $GLOBALS['ecs']->table('from_where') . ' WHERE from_id=' . $from_where;
 $from_where = $GLOBALS['db']->getOne($sql);
 //获取经济来源
 $sql = 'SELECT income FROM ' . $GLOBALS['ecs']->table('income') . ' WHERE income_id=' . $income;
 $income = $GLOBALS['db']->getOne($sql);
 $sql = 'SELECT zipcode, address, province, city, district FROM ' . $GLOBALS['ecs']->table('user_address') . ' WHERE user_id=' . $user_id;
 $address = $GLOBALS['db']->getRow($sql);
 if ($address['province'] && $address['city']) {
     extract($address);
     $province = get_address($province);
     $city = get_address($city);
     if (!empty($district)) {
         $district = get_address($district);
     } else {
         $district = '';
     }
     $address = $province . $city . $district . $address;
 } else {
     $address = "请到点击<a href='users.php?act=edit&id={$user_id}' title='编辑'><img src='images/icon_edit.gif' alt='编辑' /></a>完善顾客地址信息!";
 }
 switch ($sex) {
     case 1:
         $sex = '男';
         break;
     case 2:
         $sex = '女';
         break;
     case 0:
开发者ID:554119220,项目名称:kjrscrm,代码行数:31,代码来源:users.php


示例19: cart_subtotal

     $subtotal = cart_subtotal();
     $item_count = cart_item_count();
     $item_shipping = 5000;
     $shipping_cost = shipping_cost();
     $shipping_address = get_address($_SESSION['user']['iddiachigiaohang']);
     $state = $shipping_address['quanhuyen'];
     $tax = tax_amount($subtotal);
     // function from order_db.php file
     $total = $subtotal + $tax + $shipping_cost;
     include 'checkout_confirm.php';
     break;
 case 'payment':
     if (cart_product_count() == 0) {
         redirect($app_path . 'cart');
     }
     $billing_address = get_address($_SESSION['user']['iddiachithanhtoan']);
     $bill_line1 = $billing_address['diachi1'];
     $bill_line2 = $billing_address['diachi2'];
     $bill_city = $billing_address['thanhpho'];
     $bill_state = $billing_address['quanhuyen'];
     $bill_zip = $billing_address['mavung'];
     $bill_phone = $billing_address['sodienthoai'];
     include 'checkout_payment.php';
     break;
 case 'process':
     if (cart_product_count() == 0) {
         redirect('Location: ' . $app_path . 'cart');
     }
     $cart = cart_get_items();
     $card_type = intval($_POST['card_type']);
     $card_number = $_POST['card_number'];
开发者ID:pd00996,项目名称:hunghbpd00996,代码行数:31,代码来源:index.php


示例20: showVenueDetails

function showVenueDetails($conn, $vid)
{
    $root = "/venues";
    $latitude = "";
    $longitude = "";
    $name = "";
    $description = "";
    $tag = "";
    $picture = "";
    $result = pg_execute($conn, "get_venues_details", array($vid)) or die("Can't execute get_venues_details: " . pg_last_error());
    if (pg_num_rows($result) == 1) {
        $row = pg_fetch_row($result);
        $latitude = $row[0];
        $longitude = $row[1];
        $name = $row[2];
        $description = $row[3];
        if ($description == "" || $description == null) {
            $description = 'No description available';
        }
        $tag = $row[4];
        $picture = $root . "/" . $row[5];
        $is_secret = false;
        pg_freeresult($result);
    } else {
        pg_freeresult($result);
        $latitude = -62.2184041;
        $longitude = -58.9601368;
        $name = "Secret Venue";
        $description = "No description available";
        $tag = "";
        $picture = $root . "/img/venue/logo/secret.png";
        $is_secret = true;
        echo "<script type='text/javascript'>\n\t\t\tjError('Cannot find venue...<br />',\n\t\t\t\t{\n\t\t\t\t\tonClosed:function()\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.href='" . $root . "/index.php';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\t</script>";
    }
    $food_rating = 0;
    $service_rating = 0;
    $value_rating = 0;
    $atmosphere_rating = 0;
    $total_rating = 0;
    $food_count = 0;
    $service_count = 0;
    $value_count = 0;
    $atmosphere_count = 0;
    $total_count = 0;
    $result = pg_execute($conn, "get_venue_ratings", array($vid)) or die("Can't execute get_venue_ratings: " . pg_last_error());
    if (pg_num_rows($result) == 0) {
        $rating = 'No Ratings Yet!';
    } else {
        if (pg_num_rows($result) == 4) {
            while ($row = pg_fetch_row($result)) {
                if ($row[1] == 1) {
                    $food_rating = round($row[3], 2);
                    $food_count = $row[2];
                } else {
                    if ($row[1] == 2) {
                        $service_rating = round($row[3], 2);
                        $service_count = $row[2];
                    } else {
                        if ($row[1] == 3) {
                            $value_rating = round($row[3], 2);
                            $value_count = $row[2];
                        } else {
                            if ($row[1] == 4) {
                                $atmosphere_rating = round($row[3], 2);
                                $atmosphere_count = $row[2];
                            }
                        }
                    }
                }
            }
            $total_rating = round(($food_rating + $service_rating + $value_rating + $atmosphere_rating) / 4.0, 2);
            if ($food_count == $service_count && $food_count == $value_count && $food_count == $atmosphere_count) {
                $total_count = $food_count;
            }
            pg_freeresult($result);
            $rating = '
			<p>
				<b><i class="fa fa-star fa-lg"></i> Rating: </b>' . $total_rating . '&emsp;&emsp;
				<b>Votes: </b>
				<span class="fa-stack fa-1x">
					<i class="fa fa-circle fa-stack-2x"></i>
					<strong class="fa-stack-1x fa-stack-text fa-inverse">' . $total_count . '</strong>
				</span>
			</p>
			<p style="margin: 6px 0px 10px 40px; line-height: 9px; padding: 0px 0px 10px;">
				<span style="display:box; width:115px; clear:both; float:left;"><b>Food: </b>' . $food_rating . '</span>
				<span style="display:box; width:115px; float:left;"><b>Service: </b>' . $service_rating . '</span>
			</p>
			<p style="margin: 6px 0px 10px 40px; line-height: 9px; padding: 0px 0px 10px;">
				<span style="display:box; width:115px; clear:both; float:left;"><b>Value: </b>' . $value_rating . '</span>
				<span style="display:box; width:115px; float:left;"><b>Atmosphere: </b>' . $atmosphere_rating . '</span>
			</p>';
        }
    }
    $location = get_address($latitude, $longitude);
    echo '
			<!--div class="container"> <!--Container-->
				<div class="tile rounded-border" style="max-width: 1430px;">
						<h2 class="tile-title rounded-border-top" style="line-height:1.0em; padding-top:7px;"><b><i class="fa fa-info-circle fa-2x"></i><span style="font-size:13px; vertical-align:3px;">&nbsp;&nbsp;' . $name . '</span></b></h2> 
						<div class="fb span9 offset1" style="background: url(' . $root . '/img/venue/logo/Coffee-Beans.png) no-repeat;">  <!--Cover-->
//.........这里部分代码省略.........
开发者ID:Jiminho,项目名称:venues,代码行数:101,代码来源:venue.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_adjacent_post函数代码示例发布时间:2022-05-15
下一篇:
PHP get_addon_class函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap