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


PHP option_yes函数代码示例

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


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

示例1: run_cron

function run_cron()
{
    global $INI;
    if (option_yes('cronsubscribe')) {
        run_cron_subscribe();
    }
}
开发者ID:norain2050,项目名称:zuituware,代码行数:7,代码来源:cron.php

示例2: current_frontend

function current_frontend()
{
    global $INI;
    $a = array('/index.php' => '首页', '/team/current_list.php' => '团购列表', '/team/index.php' => '往期团购');
    if (option_yes('navseconds')) {
        $a['/team/seconds.php'] = '秒杀抢团';
    }
    if (option_yes('navgoods')) {
        $a['/team/goods.php'] = '热销商品';
    }
    if (option_yes('navpartner')) {
        $a['/partner/index.php'] = '品牌商户';
    }
    $a['/help/tour.php'] = '团购达人';
    $a['/play/puzzle.php'] = '拼图游戏';
    if (option_yes('navforum')) {
        $a['/forum/index.php'] = '讨论区';
    }
    $r = $_SERVER['REQUEST_URI'];
    if (preg_match('#/team#', $r)) {
        $l = '/team/index.php';
    } elseif (preg_match('#/help#', $r)) {
        $l = '/help/tour.php';
    } elseif (preg_match('#/subscribe#', $r)) {
        $l = '/subscribe.php';
    } else {
        $l = '/index.php';
    }
    return current_link(null, $a);
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:30,代码来源:current.php

示例3: rewrite_partner

function rewrite_partner($c)
{
    if (!option_yes('rewritepartner')) {
        return $c;
    }
    global $INI;
    $pre = strval($INI['webroot']);
    $p = "#\"{$pre}/partner\\.php\\?id=(\\d+)\"#i";
    $r = "{$pre}/partner/\$1.html";
    return preg_replace($p, $r, $c);
}
开发者ID:norain2050,项目名称:zuituware,代码行数:11,代码来源:rewrite.php

示例4: current_system_option

function current_system_option($s = null)
{
    global $city;
    if (option_yes('daysign')) {
        $filter = array('a' => '页面设置', 'b' => '地址重写', 'c' => '登录设置', 'd' => '每日签到设置');
    } else {
        $filter = array('a' => '页面设置', 'b' => '地址重写', 'c' => '登录设置');
    }
    $a['/manage/system/option.php'] = '基本选项';
    foreach ($filter as $id => $name) {
        $a["/manage/system/option.php?s={$id}"] = $name;
    }
    $l = '/manage/system/option.php';
    if ($s) {
        $l = "/manage/system/option.php?s={$s}";
    }
    return current_link($l, $a, true);
}
开发者ID:norain2050,项目名称:zuituware,代码行数:18,代码来源:option.php

示例5: BuyOne

	static public function BuyOne($order) {
		$order = Table::FetchForce('order', $order['id']);
		$order_id = abs(intval($order['id']));
		$team_id = abs(intval($order['team_id']));
		$team = Table::FetchForce('team', $order['team_id']);
		$plus = $team['conduser']=='Y' ? 1 : $order['quantity'];
		$team['now_number'] += $plus;

		/* close time */
		if ( $team['max_number']>0 
				&& $team['now_number'] >= $team['max_number'] ) {
			$team['close_time'] = time();
		}

		/* reach time */
		if ( $team['now_number']>=$team['min_number']
			&& $team['reach_time'] == 0 ) {
			$team['reach_time'] = time();
		}

		Table::UpdateCache('team', $team['id'], array(
			'close_time' => $team['close_time'],
			'reach_time' => $team['reach_time'],
			'now_number' => array( "`now_number` + {$plus}", ),
		));
		
		//UPDATE buy_id
		$SQL = "UPDATE `order` o,(SELECT max(buy_id)+1 AS c FROM `order` WHERE state = 'pay' and team_id = '{$team_id}') AS c SET o.buy_id = c.c, o.luky_id = 100000 + floor(rand()*100000) WHERE o.id = '{$order_id}' AND buy_id = 0;";
		DB::Query($SQL);
		/* send sms Immediately  */
		if(option_yes('buycouponsms')) sms_buy($order);
		/* cash flow */
		ZFlow::CreateFromOrder($order);
		/* order : send coupon ? */
		ZCoupon::CheckOrder($order);
		/* order : send voucher ? */
		ZVoucher::CheckOrder($order);
        /* order : send express sms ? */
		ZExpress::CheckOrder($order);
		/* order : invite buy */
		ZInvite::CheckInvite($order);
		
		ZCredit::UpdateFromOrder($order);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:44,代码来源:ZTeam.class.php

示例6: CheckOrder

 public static function CheckOrder($order)
 {
     $coupon_array = array('express');
     $team = Table::FetchForce('team', $order['team_id']);
     if (!in_array($team['delivery'], $coupon_array) || !option_yes('expressbuysms')) {
         return;
     }
     if ($team['now_number'] >= $team['min_number']) {
         //init express sms;
         $last = $team['conduser'] == 'Y' ? 1 : $order['quantity'];
         if ($team['now_number'] - $team['min_number'] < $last) {
             $orders = DB::LimitQuery('order', array('condition' => array('team_id' => $order['team_id'], 'state' => 'pay')));
             foreach ($orders as $order) {
                 sms_express_buy($order);
             }
         } else {
             sms_express_buy($order);
         }
     }
 }
开发者ID:norain2050,项目名称:zuituware,代码行数:20,代码来源:ZExpress.class.php

示例7: if

                            <option value='餐饮美食'>餐饮美食</option>
                            <option value='休闲娱乐'>休闲娱乐</option>
                            <option value='电影/5D'>电影/5D</option>
                            <option value='美容保健'>美容保健</option>
                            <option value='生活服务'>生活服务</option>
                            <option value='旅行/酒店'>旅行/酒店</option>
                            <option value='精品网购'>精品网购</option>

                </select>
                       </div>
                   <div class="field suggest">
                            <label for="feedback-suggest">合作内容</label>
                            <textarea cols="30" rows="5" name="content" id="feedback-suggest" class="f-textarea" require="true" datatype="require" ></textarea> 
                     <span class="qtdl">请输入合作内容 </span>
                        </div>
					<?php if(option_yes('verifyfeedback')){?>
						<?php include template("block_block_captcha");?>
					<?php }?>
                        <div class="clear"></div>
                        <div class="act">
                            <input type="submit" value="好了,提交" name="commit" id="feedback-submit" class="formbutton"/>
                        </div>
                    </form>
				</div>
        </div>
  </div>
</div>



<?php include template("footer");?>
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:feedback_seller.php

示例8: mail_zd

    $wwwlink = mail_zd($email);
    die(include template('account_verify'));
} else {
    if (strpos($secret, '@')) {
        Session::Set('unemail', $secret);
        mail_sign_email($secret);
        redirect(WEB_ROOT . '/account/verify.php');
    }
}
$user = Table::Fetch('user', $secret, 'secret');
if ($user['enable'] == 'Y') {
    Session::Set('error', '你的账户已经验通过,请直接登录!');
    if (isset($_SESSION['user_id'])) {
        unset($_SESSION['user_id']);
        ZLogin::NoRemember();
        ZUser::SynLogout();
    }
    redirect(WEB_ROOT . '/account/login.php');
}
if ($user) {
    if (option_yes('mobilecode')) {
        Table::UpdateCache('user', $user['id'], array('emailable' => 'Y'));
        die(include template('account_signmobile'));
    } else {
        Table::UpdateCache('user', $user['id'], array('emailable' => 'Y', 'enable' => 'Y'));
        Session::Set('notice', '恭喜!你的帐户已经通过Email验证');
        ZLogin::Login($user['id']);
        redirect(get_loginpage(WEB_ROOT . '/index.php'));
    }
}
redirect(WEB_ROOT . '/index.php');
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:verify.php

示例9: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
if ($_POST) {
    $login_user = ZUser::GetLogin($_POST['email'], $_POST['password']);
    if (!$login_user) {
        Session::Set('error', '登录失败');
        redirect(WEB_ROOT . '/account/login.php');
    } else {
        if (option_yes('mobilecode') && $login_user['emailable'] == 'Y' && $login_user['enable'] == 'N') {
            $user['id'] = $login_user['id'];
            Session::Set('error', '请验证手机号');
            die(include template('account_signmobile'));
        } else {
            if (option_yes('emailverify') && $login_user['emailable'] == 'N' && $login_user['enable'] == 'N' && $login_user['secret']) {
                Session::Set('unemail', $_POST['email']);
                redirect(WEB_ROOT . '/account/verify.php');
            } else {
                Session::Set('user_id', $login_user['id']);
                if (abs(intval($_POST['auto_login']))) {
                    ZLogin::Remember($login_user);
                }
                ZUser::SynLogin($login_user['username'], $_POST['password']);
                ZCredit::Login($login_user['id']);
                redirect(get_loginpage(WEB_ROOT . '/index.php'));
            }
        }
    }
}
$currefer = strval($_GET['r']);
if ($currefer) {
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:login.php

示例10: current_help

function current_help($selector='faqs') {

	global $INI;

	$a = array(

		'/help/wzmlt.php' => '玩转' . $INI['system']['abbreviation'],

		'/help/faqs.php' => '常见问题',

		'/help/zuitu.php' => $INI['system']['abbreviation'] . '是什么',

	    '/help/widget.php' => '团购挂件',

    );

    $b = array(

		'/help/wzmlt.php' => '玩转' . $INI['system']['abbreviation'],

		'/help/xfbz.php' => '青年优品承诺',

		'/help/faqs.php' => '常见问题',

		'/help/xszn.php' => '新手指南',

		'/help/rmjc.php' => '入门教程',

        '/help/zflc' => '付款流程演示 ',

	);

    $a = option_yes('widget') ? $a : $b;

	$l = "/help/{$selector}.php";

	return current_link($l, $a, true);

}
开发者ID:noikiy,项目名称:mdwp,代码行数:39,代码来源:current.php

示例11: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
need_login();
need_open(option_yes('navforum'));
$publics = option_category('public');
$id = abs(intval($_GET['id']));
$condition = array('parent_id' => 0);
if ($id && ($public = Table::Fetch('category', $id))) {
    $condition['public_id'] = $id;
} else {
    if ($id) {
        redirect(WEB_ROOT . '/forum/public.php');
    } else {
        $condition[] = 'public_id > 0';
    }
}
$count = Table::Count('topic', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 20);
$topics = DB::LimitQuery('topic', array('condition' => $condition, 'size' => $pagesize, 'offset' => $offset, 'order' => 'ORDER BY head DESC, last_time DESC'));
$user_ids = Utility::GetColumn($topics, 'user_id');
$luser_ids = Utility::GetColumn($topics, 'last_user_id');
$user_ids = array_merge($user_ids, $luser_ids);
$users = Table::Fetch('user', $user_ids);
$public = Table::Fetch('category', $id);
$pagetitle = $public ? "{$public['name']}讨论区" : '公共讨论区';
include template('forum_public');
开发者ID:norain2050,项目名称:zuituware,代码行数:27,代码来源:public.php

示例12: session_start

<?php

@header('Content-Type:text/html;charset=utf-8');
session_start();
include_once 'config.php';
include_once 'weibooauth.php';
$o = new WeiboOAuth(WB_AKEY, WB_SKEY, $_SESSION['keys']['oauth_token'], $_SESSION['keys']['oauth_token_secret']);
$last_key = $o->getAccessToken($_REQUEST['oauth_verifier']);
//获取ACCESSTOKEN
$_SESSION['last_key'] = $last_key;
if (!option_yes('firstsinalogin')) {
    Utility::Redirect(WEB_ROOT . '/thirdpart/sina/auth.php');
}
Utility::Redirect(WEB_ROOT . '/account/sina_bind.php');
开发者ID:norain2050,项目名称:zuituware,代码行数:14,代码来源:callback.php

示例13: team_state

$team = Table::Fetch('team', $order['team_id']);
team_state($team);

if (is_post() && $_POST['paytype'] ) {
	$uarray = array( 'service' => pay_getservice($_POST['paytype']) );
	Table::UpdateCache('order', $order_id, $uarray);
	$order = Table::Fetch('order', $order_id);
	$order['service'] = pay_getservice($_POST['paytype']);
}

if ( $_POST['paytype']!='credit' 
		&& $_POST['service']!='credit' 
		&& $team['team_type']=='seconds' 
		&& ($order['origin']>$login_user['money'])
		&& option_yes('creditseconds')
   ) {
	$need_money = ceil($order['origin'] - $login_user['money']);
	Session::Set('error', "秒杀项目仅可以使用余额付款,您的余额不足,还需要充值{$need_money}元才可以完成秒杀");
	redirect(WEB_ROOT . "/credit/charge.php?money={$need_money}");
}

//peruser buy count
if ($_POST && $team['per_number']>0) {
	$now_count = Table::Count('order', array(
		'user_id' => $login_user_id,
		'team_id' => $team['id'],
		'state' => 'pay',
	), 'quantity');
	$leftnum = ($team['per_number'] - $now_count);
	if ($leftnum <= 0) {
开发者ID:noikiy,项目名称:mdwp,代码行数:30,代码来源:pay.php

示例14: json_encode

if (empty($cp)) {
    echo json_encode($return);
    die;
}
$check_team = Table::Fetch('team', $cp['team_id']);
if (strpos($check_team['store_ids'], '@' . $store_id . '@') === false) {
    echo json_encode($return);
    die;
}
$coupons = DB::LimitQuery('coupon', array('condition' => array('order_id' => $cp['order_id'], 'consume' => 'N')));
if (!empty($coupons)) {
    foreach ($coupons as $one) {
        $coupon = Table::FetchForce('coupon', $one['id']);
        $partner = Table::Fetch('partner', $coupon['partner_id']);
        $team = Table::Fetch('team', $coupon['team_id']);
        $check = option_yes('mycoupon') || $coupon['user_id'] == $login_user_id || $coupon['partner_id'] == abs($_SESSION['partner_id']);
        if (false == $check) {
            $return[$one['id']]['result'] = -1;
        } elseif ($coupon['consume'] == 'Y') {
            $return[$one['id']]['result'] = 2;
        } else {
            if ($coupon['expire_time'] < strtotime(date('Y-m-d'))) {
                $return[$one['id']]['result'] = -2;
            } else {
                ZCoupon::Consume($coupon, $store_id, $partner_id);
                $return[$one['id']]['result'] = 1;
            }
        }
        $return[$one['id']]['coupon'] = Table::FetchForce('coupon', $one['id']);
    }
}
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:superyanzheng.php

示例15:

                   <?php 
if (option_yes('qzonelogin')) {
    ?>
					<p><a href="/thirdpart/qzone/index.php"><img src="/static/css/i/qq.gif" /></a></p>
                   <?php 
}
?>
		           <?php 
if (option_yes('qqlogin')) {
    ?>
				   <p><a href="/thirdpart/qq/index.php"><img src="/static/css/i/qq.png" /></a></p>
				   <?php 
}
?>
				   <?php 
if (option_yes('sinalogin')) {
    ?>
				   <p><a href="/thirdpart/sina/login.php"><img src="/static/css/i/sina_login.png" /></a></p>
				   <?php 
}
?>
				   <?php 
if ($INI['alipay']['alifast'] == 'Y') {
    ?>
				   <p><a href="/alifast/auth_authorize.php"><img src="/static/css/i/btn_login_zfbkj.png" /></a></p>
				   <?php 
}
?>
			    </div>
		    </div>
		    <div class="sbox-bottom"></div>
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:account_signup.php


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