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


PHP option_category函数代码示例

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


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

示例1: current_partner

function current_partner($gid = '0')
{
    $a = array('/partner/index.php' => '所有');
    foreach (option_category('partner') as $id => $name) {
        $a["/partner/index.php?gid={$id}"] = $name;
    }
    $l = "/partner/index.php?gid={$gid}";
    if (!$gid) {
        $l = "/partner/index.php";
    }
    return current_link($l, $a, true);
}
开发者ID:norain2050,项目名称:zuituware,代码行数:12,代码来源:current.php

示例2: current_teamcategory

function current_teamcategory($gid = '0')
{
    global $city;
    $a = array('/team/index.php' => '所有');
    foreach (option_category('group') as $id => $name) {
        $a["/team/index.php?gid={$id}"] = $name;
    }
    $l = "/team/index.php?gid={$gid}";
    if (!$gid) {
        $l = "/team/index.php";
    }
    return current_link($l, $a, true);
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:13,代码来源:index.php

示例3: get_city

function get_city($ip = null)
{
    $cities = option_category('city', false, true);
    $ip = $ip ? $ip : Utility::GetRemoteIP();
    $location = ip_location_youdao($ip);
    if ($location) {
        foreach ($cities as $one) {
            if (FALSE !== strpos($location, $one['name'])) {
                return $one;
            }
        }
    }
    return array();
}
开发者ID:norain2050,项目名称:zuituware,代码行数:14,代码来源:utility.php

示例4: get_city

function get_city($ip = null)
{
    $cities = option_category('city', false, true);
    $ip = $ip ? $ip : Utility::GetRemoteIP();
    $url = "http://open.baidu.com/ipsearch/s?wd={$ip}&tn=baiduip";
    $res = mb_convert_encoding(Utility::HttpRequest($url), 'UTF-8', 'GBK');
    if (preg_match('#来自:<b>(.+)</b>#Ui', $res, $m)) {
        foreach ($cities as $one) {
            if (FALSE !== strpos($m[1], $one['name'])) {
                return $one;
            }
        }
    }
    return array();
}
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:15,代码来源:utility.php

示例5: log_admin

             $clear++;
         } else {
             $unclear++;
         }
     }
     log_admin('system', '清空模板缓存' . $clear . '个');
     json("操作成功,清空缓存文件{$clear}个,未清空{$unclear}个", 'alert');
 } else {
     if ('refundview' == $action) {
         $order = Table::Fetch('order', $id);
         $user = Table::Fetch('user', $order['user_id']);
         $team = Table::Fetch('team', $order['team_id']);
         //find coupons
         $coupons = DB::LimitQuery('coupon', array('condition' => array('order_id' => $order['id'], 'user_id' => $user['id'])));
         if ($team['delivery'] == 'express') {
             $option_express = option_category('express');
             $order['express_name'] = $option_express[$order['express_id']];
         }
         $payservice = array('alipay' => '支付宝', 'tenpay' => '财付通', 'chinabank' => '网银在线', 'credit' => '余额付款', 'cash' => '线下支付', 'yeepay' => '易宝', 'sdopay' => '盛付通', 'cmpay' => '手机支付', 'paypal' => 'Paypal');
         $paystate = array('unpay' => '<font color="green">未付款</font>', 'pay' => '<font color="red">已付款</font>');
         if ($team['delivery'] == 'coupon') {
             $option_refund = array('norefund' => '审核未通过', 'credit' => '退款到账户余额', 'online' => '其他途径已退款');
         } else {
             $option_refund = array('credit' => '退款到账户余额', 'online' => '其他途径已退款');
         }
         $html = render('manage_ajax_dialog_refundview');
         json($html, 'dialog');
     } else {
         if ('refundcheck' == $action) {
             need_auth('admin');
             $rid = strtolower(strval($_GET['rid']));
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:manage.php

示例6: abs

        $table->Set('group_id', abs(intval($_POST['group_id'])));
    }
    Session::Set('notice', '商户级别变更成功');
    redirect(WEB_ROOT . "/manage/partner/index.php");
}
$condition = array();
/* filter */
$ptitle = strval($_GET['ptitle']);
if ($ptitle) {
    $condition[] = "title LIKE '%" . mysql_escape_string($ptitle) . "%'";
}
$group_id = strval($_GET['group_id']);
if ($group_id) {
    $condition['group_id'] = $group_id;
}
$city_id = strval($_GET['city_id']);
if ($group_id) {
    $condition['city_id'] = $city_id;
}
$open = strval($_GET['open']);
if ($open) {
    $condition['open'] = $open;
}
/* filter end */
$count = Table::Count('partner', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$partners = DB::LimitQuery('partner', array('condition' => $condition, 'order' => 'ORDER BY head DESC, id DESC', 'size' => $pagesize, 'offset' => $offset));
$groups = option_category('partner');
$vips = option_category('vip');
$cities = option_category('city');
include template('manage_partner_index');
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:31,代码来源:index.php

示例7: htmlspecialchars

		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>商户</h2>
					<ul class="filter"><li><form method="get">商户名称:<input type="text" name="ptitle" class="h-input" value="<?php 
echo htmlspecialchars($ptitle);
?>
" >&nbsp;<select name="open" class="h-input"><?php 
echo Utility::Option($option_open, $open, '全部秀');
?>
</select>&nbsp;<select name="city_id" class="h-input"><?php 
echo Utility::Option(option_category('city'), $city_id, '全部城市');
?>
</select>&nbsp;<select name="group_id" class="h-input"><?php 
echo Utility::Option(option_category('partner'), $group_id, '全部分类');
?>
</select>&nbsp;<input type="submit" value="筛选" class="formbutton"  style="padding:1px 6px;"/><form></li></ul>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr><th width="40">ID</th><th width="320">名称</th><th width="60">分类</th><th width="120">联系人</th><th width="130">电话号码</th><th width="60">商户秀</th><th width="120">操作</th></tr>
					<?php 
if (is_array($partners)) {
    foreach ($partners as $index => $one) {
        ?>
					<tr <?php 
        echo $index % 2 ? '' : 'class="alt"';
        ?>
 id="team-list-id-<?php 
        echo $one['id'];
开发者ID:yunsite,项目名称:hhzuitu,代码行数:31,代码来源:manage_partner_index.php

示例8: abs

						<div class="field">
							<label>门店展示</label>
							<input type="text" size="30" name="open" id="partner-edit-open" class="number" value="<?php echo $store['open']; ?>" maxLength="1" require="true" datatype="english" style="text-transform:uppercase;" /><span class="inputtip">Y:前台门店展示 N:不参与前台门店展示</span>
						</div>
						<div class="field">
                            <label>排序字段</label>
                            <input type="text" size="10" name="head" value="<?php echo abs(intval($store['head'])); ?>" class="number"/><span class="inputtip">数字大的排的靠前</span>
						</div>
						<div class="field">
							<label>所属商家</label>
							<select name="partner_id" id="partner_select" class="f-input f-hint" style="width:360px;"><?php echo Utility::Option($partners, $store['partner_id'], '------ 请选择商户 ------'); ?></select>
							<input type="text" size="30" name="p_id" id="partner_id" class="partner f-f-input" />
						</div>
						<div class="field">
							<label>城市</label>
							<select name="city_id" class="f-input f-hint" style="width:160px;"><?php echo Utility::Option(option_category('city'), $store['city_id'], '-选择城市-'); ?></select>  行政区  <select name="region" style="float:none; width:160px;" class="f-input f-hint" style="width:160px;"><?php echo Utility::Option(option_category('store'), $store['group_id']); ?></select>
						</div>
                        <div class="field">
                            <label>地图坐标</label>
                            <input type="text" size="30" name="longlat" style="width:300px;cursor:point;" class="f-input f-hint" id="inputlonglat"  value="<?php echo $store['longlat']; ?>" />
                            <span class="inputtip">
                            	<a href="http://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank">查坐标</a>
                            </span>
						</div>
						<div class="wholetip clear"><h3>3、基本信息</h3></div>
                        <div class="field">
                            <label>门店品类</label>
                            <input type="text" size="30" name="type" id="partner-create-homepage" class="f-input f-hint" value="<?php echo $store['type']; ?>"/>
                        </div>
                        <div class="field">
                            <label>门店电话</label>
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:manage_store_create.php

示例9:

                        <div class="field password">
                            <label>登录密码</label>
                            <input type="password" size="30" name="password" id="settings-password" class="f-input" require="true" datatype="require" />
                        </div>
						<div class="field password">
                            <label for="create-password-confirm">确认密码</label>
                            <input type="password" size="30" name="password2" id="create-password" class="f-input" require="true" datatype="compare" compare="settings-password" />
                        </div>
						<div class="wholetip clear"><h3>2、标注信息</h3></div>
						<div class="field">
							<label>城市及分类</label>
							<select name="city_id" class="f-input" style="width:160px;"><?php 
echo Utility::Option(option_category('city'), $partner['city_id'], '-选择城市-');
?>
</select>&nbsp;<select name="group_id" class="f-input" style="width:160px;"><?php 
echo Utility::Option(option_category('partner'), $partner['group_id']);
?>
</select>
						</div>
						<div class="field">
							<label>商家图片</label>
							<input type="file" size="30" name="upload_image" id="partner-create-image" class="f-input" />
							<span class="hint">至少要上传一张商家图片, 高质量的商家图片有利于卖家更详细的了解您.</span>
						</div>
						<div class="field">
							<label>商家图片1</label>
							<input type="file" size="30" name="upload_image1" id="partner-create-image1" class="f-input" />
						</div>
						<div class="field">
							<label>商家图片2</label>
							<input type="file" size="30" name="upload_image2" id="partner-create-image2" class="f-input" />
开发者ID:yunsite,项目名称:hhzuitu,代码行数:31,代码来源:partner_create.php

示例10: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
header('Content-Type: application/xml; charset=UTF-8');
$daytime = strtotime(date('Y-m-d'));
$condition = array('team_type' => 'normal', "begin_time <= {$daytime}", "end_time > {$daytime}", "audit" => 1);
$teams = DB::LimitQuery('team', array('condition' => $condition, 'order' => 'ORDER BY sort_order DESC, id DESC'));
$groups = option_category('group', false, false);
$oa = array();
$si = array('sitename' => $INI['system']['sitename'], 'wwwprefix' => $INI['system']['wwwprefix'], 'imgprefix' => $INI['system']['imgprefix']);
foreach ($teams as $one) {
    $city = Table::Fetch('category', $one['city_id']);
    $group = Table::Fetch('category', $one['group_id']);
    $item = array();
    $item['loc'] = $si['wwwprefix'] . "/team.php?id={$one['id']}";
    $item['data'] = array();
    $item['data']['display'] = array();
    $o = array();
    $o['website'] = $INI['system']['sitename'];
    $o['siteurl'] = $INI['system']['wwwprefix'];
    ($o['city'] = $city['name']) || ($o['city'] = '全国');
    $o['title'] = $one['title'];
    $o['class'] = $groups[$one['group_id']];
    $o['image'] = $si['imgprefix'] . '/static/' . $one['image'];
    $o['startTime'] = $one['begin_time'];
    $o['endTime'] = $one['end_time'];
    $o['value'] = $one['market_price'];
    $o['price'] = $one['team_price'];
    if ($one['market_price'] > 0) {
        $o['rebate'] = moneyit(10 * $one['team_price'] / $one['market_price']);
    } else {
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:31,代码来源:ganji.php

示例11: json

         if ($tcount) {
             json('本类下存在团购项目', 'alert');
         }
     } elseif ($category['zone'] == 'express') {
         $tcount = Table::Count('order', array('express_id' => $id));
         if ($tcount) {
             json('本类下存在订单项目', 'alert');
         }
     } elseif ($category['zone'] == 'public') {
         $tcount = Table::Count('topic', array('public_id' => $id));
         if ($tcount) {
             json('本类下存在讨论区话题', 'alert');
         }
     }
     Table::Delete('category', $id);
     option_category($category['zone']);
     Session::Set('notice', '删除分类成功');
     json(null, 'refresh');
 } else {
     if ('teamcoupon' == $action) {
         need_auth('team');
         $team = Table::Fetch('team', $id);
         team_state($team);
         if ($team['now_number'] < $team['min_number']) {
             json('团购未结束或未达到最低成团人数', 'alert');
         }
         /* all orders */
         $all_orders = DB::LimitQuery('order', array('condition' => array('team_id' => $id, 'state' => 'pay')));
         $all_orders = Utility::AssColumn($all_orders, 'id');
         $all_order_ids = Utility::GetColumn($all_orders, 'id');
         $all_order_ids = array_unique($all_order_ids);
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:31,代码来源:manage.php

示例12: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/app.php';
need_manager();
need_auth('admin');
$id = abs(intval($_REQUEST['id']));
$category = Table::Fetch('category', $id);
$table = new Table('category', $_POST);
$table->letter = strtoupper($table->letter);
$uarray = array('zone', 'ename', 'letter', 'name', 'czone', 'sort_order');
if (!$_POST['name'] || !$_POST['ename'] || !$_POST['letter']) {
    Session::Set('error', '中文名称、英文名称、首字母均不能为空');
    Utility::Redirect(null);
}
if ($category) {
    if ($flag = $table->update($uarray)) {
        Session::Set('notice', '编辑分类成功');
    } else {
        Session::Set('error', '编辑分类失败');
    }
    option_category($category['zone'], true);
} else {
    if ($flag = $table->insert($uarray)) {
        Session::Set('notice', '新建分类成功');
    } else {
        Session::Set('error', '新建分类失败');
    }
}
option_category($table->zone, true);
Utility::Redirect(null);
开发者ID:yunsite,项目名称:hhzuitu,代码行数:30,代码来源:edit.php

示例13: mcurrent_user

	<div class="dashboard" id="dashboard">
		<ul><?php echo mcurrent_user('index'); ?></ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>用户列表
                    <a style="font-size:12px;color:#000000" href="/manage/user/create.php">新建会员</a>
                    </h2>
                    <div class="sect" style="padding:10px 10px;">
						<form action="/manage/user/index.php" method="get">
							用户名:<input type="text" name="uname" class="f-input" style="width:90px" value="<?php echo htmlspecialchars($uname); ?>" >
							邮件:<input type="text" name="like" class="f-input" value="<?php echo htmlspecialchars($like); ?>" >
							<select name="ucity" style="width:110px;"><?php echo Utility::Option(option_category('city'), $ucity, '所有城市'); ?></select>
							<br/>
							手机:<input type="text" name="mobile" class="f-input" value="<?php echo htmlspecialchars($mobile); ?>" >
							购买次数大于<input type="text" name="numbers" class="f-input" value="<?php echo $numbers; ?>" style="width:20px">
							购买金额大于<input type="text" name="prices" class="f-input" value="<?php echo $prices; ?>" style="width:30px">
							余额大于<input type="text" name="havemoney" class="f-input" value="<?php echo $havemoney; ?>" style="width:20px">
							<input type="submit" value="筛选" class="formbutton"  style="padding:1px 6px;"/>
						<form>
					</div>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr><th width="50">ID</th><th width="200">Email/用户名</th><th width="100" nowrap>姓名/城市</th><th width="40">余额</th><th width="40">邮编</th><th width="120">注册IP/注册时间</th></th><th width="90">联系电话</th><th width="130">操作</th></tr>
					<?php if(is_array($users)){foreach($users AS $index=>$one) { ?>
					<tr <?php echo $index%2?'':'class="alt"'; ?> id="team-list-id-<?php echo $one['id']; ?>">
						<td><?php echo $one['id']; ?></td>
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:manage_user_index.php

示例14: array

    }
    $condition = array('service' => $service, 'state' => $state, 'team_id' => $team_id);
    $orders = DB::LimitQuery('order', array('condition' => $condition, 'order' => 'ORDER BY id DESC'));
    if (!$orders) {
        die('-ERR ERR_NO_DATA');
    }
    $team = Table::Fetch('team', $team_id);
    $name = 'order_' . date('Ymd');
    $kn = array('id' => '订单号', 'pay_id' => '支付号', 'service' => '支付方式', 'price' => '单价', 'quantity' => '数量', 'fare' => '运费', 'origin' => '总金额', 'money' => '支付款', 'credit' => '余额付款', 'state' => '支付状态', 'remark' => '备注', 'express' => '快递信息', 'username' => '用户名', 'useremail' => '用户邮箱', 'usermobile' => '用户手机');
    if ($team['delivery'] == 'express') {
        $kn = array_merge($kn, array('realname' => '收件人', 'mobile' => '手机号码', 'zipcode' => '邮政编码', 'address' => '送货地址'));
    }
    $pay = array('alipay' => '支付宝', 'tenpay' => '财付通', 'chinabank' => '网银在线', 'credit' => '余额付款', 'cash' => '现金支付', '' => '其他');
    $state = array('unpay' => '未支付', 'pay' => '已支付');
    $eorders = array();
    $expresses = option_category('express');
    $users = Table::Fetch('user', Utility::GetColumn($orders, 'user_id'));
    foreach ($orders as $one) {
        $oneuser = $users[$one['user_id']];
        $one['username'] = $oneuser['username'];
        $one['useremail'] = $oneuser['email'];
        $one['usermobile'] = $oneuser['mobile'];
        $one['fare'] = $one['delivery'] == 'express' ? $one['fare'] : 0;
        $one['service'] = $pay[$one['service']];
        $one['price'] = $team['market_price'];
        $one['state'] = $state[$one['state']];
        $one['express'] = $one['express_id'] && $one['express_no'] ? $expresses[$one['express_id']] . ":" . $one['express_no'] : "";
        $eorders[] = $one;
    }
    down_xls($eorders, $kn, $name);
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:31,代码来源:downorder.php

示例15: option_hotcategory

function option_hotcategory($zone = 'city', $force = false, $all = false)
{
    $cates = option_category($zone, $force, true);
    $r = array();
    foreach ($cates as $id => $one) {
        if ('Y' == strtoupper($one['display'])) {
            $r[$id] = $one;
        }
    }
    return $all ? $r : Utility::OptionArray($r, 'id', 'name');
}
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:11,代码来源:common.php


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