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


PHP Table::FetchForce方法代码示例

本文整理汇总了PHP中Table::FetchForce方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::FetchForce方法的具体用法?PHP Table::FetchForce怎么用?PHP Table::FetchForce使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


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

示例1: CashIt

 public static function CashIt($order)
 {
     global $login_user_id;
     if (!$order['state'] == 'pay') {
         return 0;
     }
     //update order
     Table::UpdateCache('order', $order['id'], array('state' => 'pay', 'service' => 'cash', 'admin_id' => $login_user_id, 'money' => $order['origin'], 'pay_time' => time()));
     $order = Table::FetchForce('order', $order['id']);
     ZTeam::BuyOne($order);
 }
开发者ID:yunsite,项目名称:hhzuitu,代码行数:11,代码来源:ZOrder.class.php

示例2: BuyOne

 public static function BuyOne($order)
 {
     $order = Table::FetchForce('order', $order['id']);
     $team = Table::FetchForce('team', $order['team_id']);
     $plus = $team['conduser'] == 'Y' ? 1 : $order['quantity'];
     $team['now_number'] += $plus;
     if ($team['max_number'] > 0 && $team['now_number'] >= $team['max_number']) {
         $team['close_time'] = time();
     }
     Table::UpdateCache('team', $team['id'], array('close_time' => $team['close_time'], 'now_number' => array("`now_number` + {$plus}")));
     /* cash flow */
     ZFlow::CreateFromOrder($order);
     /* order : send coupon ? */
     ZCoupon::CheckOrder($order);
     /* order : invite buy */
     ZInvite::CheckInvite($order);
 }
开发者ID:BGCX262,项目名称:zuitu-svn-to-git,代码行数:17,代码来源:ZTeam.class.php

示例3: CashIt

	static public function CashIt($order) {
		global $login_user_id;
		if (! $order['state']=='pay' ) return 0;

		//update order
		Table::UpdateCache('order', $order['id'], array(
					'state' => 'pay',
					'service' => 'cash',
					'admin_id' => $login_user_id,
					'money' => $order['origin'],
					'pay_time' => time(),
					));
                /* cash flow */
		$order = Table::FetchForce('order', $order['id']);
                ZFlow::CreateFromStore($order['user_id'], $order['origin']);
		ZTeam::BuyOne($order);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:17,代码来源:ZOrder.class.php

示例4: CheckOrder

 public static function CheckOrder($order)
 {
     $team = Table::FetchForce('team', $order['team_id']);
     if ($team['now_number'] >= $team['min_number']) {
         //init coupon create;
         if ($team['now_number'] == $team['min_number']) {
             self::TipSuccess($order);
         }
         if ($team['now_number'] - $team['min_number'] < 5) {
             $orders = DB::LimitQuery('order', array('condition' => array('team_id' => $order['team_id'], 'state' => 'pay')));
             foreach ($orders as $order) {
                 self::Create($order);
             }
         } else {
             self::Create($order);
         }
     }
 }
开发者ID:jowino,项目名称:bd786110cact,代码行数:18,代码来源:ZCoupon.class.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('coupon', 'pickup');
     $team = Table::FetchForce('team', $order['team_id']);
     if (!in_array($team['delivery'], $coupon_array)) {
         return;
     }
     if ($team['now_number'] >= $team['min_number']) {
         //init coupon create;
         if ($team['now_number'] - $team['min_number'] < 5) {
             $orders = DB::LimitQuery('order', array('condition' => array('team_id' => $order['team_id'], 'state' => 'pay')));
             foreach ($orders as $order) {
                 self::Create($order);
             }
         } else {
             self::Create($order);
         }
     }
 }
开发者ID:BGCX262,项目名称:zuitu-svn-to-git,代码行数:19,代码来源:ZCoupon.class.php

示例7: BuyOne

 public static function BuyOne($order)
 {
     $order = Table::FetchForce('order', $order['id']);
     $team = Table::FetchForce('team', $order['team_id']);
     $team['now_number'] += $order['quantity'];
     if ($team['max_number'] > 0 && $team['now_number'] >= $team['max_number']) {
         $team['state'] = 'soldout';
         $team['close_time'] = time();
     }
     $table = new Table('team', $team);
     $table->update(array('end_time', 'state', 'now_number'));
     ZFlow::CreateFromOrder($order);
     ZCoupon::CheckOrder($order);
     ZInvite::CheckInvite($order);
     $partner = Table::Fetch('partner', $team['partner_id']);
     $city = Table::Fetch('category', $team['city_id']);
     $user = Table::Fetch('user', $order['user_id']);
     mail_purchase($city, $team, $partner, $order, $user);
 }
开发者ID:jowino,项目名称:bd786110cact,代码行数:19,代码来源:ZTeam.class.php

示例8: 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

示例9: CheckOrder

 public static function CheckOrder($order)
 {
     $coupon_array = array('thirdpart');
     $team = Table::FetchForce('team', $order['team_id']);
     if (!in_array($team['delivery'], $coupon_array)) {
         return;
     }
     if ($team['now_number'] >= $team['min_number']) {
         //init coupon create;
         $last = $team['conduser'] == 'Y' ? 1 : $order['quantity'];
         $offset = max(5, $last);
         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) {
                 self::Create($order);
             }
         } else {
             self::Create($order);
         }
     }
 }
开发者ID:BGCX262,项目名称:zuituware-svn-to-git,代码行数:21,代码来源:ZThirdpart.class.php

示例10: zuitu_uc_login

function zuitu_uc_login($email, $pass)
{
    if (!function_exists('uc_user_login')) {
        return array();
    }
    if (!defined('UC_API')) {
        return array();
    }
    $isuid = strpos($email, '@') ? 2 : 0;
    if (strtolower(UC_CHARSET) != 'utf-8') {
        $email = mb_convert_encoding($email, UC_CHARSET, 'UTF-8');
    }
    $ucresult = uc_user_login($email, $pass, $isuid, 0);
    $uckey = array('uid', 'username', 'password', 'email', 'duplicate');
    $ucresult = array_combine($uckey, $ucresult);
    $ucresult = zuitu_encode_array($ucresult);
    $ucresult = zuitu_encode_detect($ucresult);
    DB::Query('SET NAMES UTF8;');
    if ($ucresult['uid'] > 0 && $ucresult['email']) {
        $eu = Table::Fetch('user', $ucresult['email'], 'email');
        if ($eu) {
            if ($eu['username'] != $ucresult['username']) {
                $epass = ZUser::GenPassword($ucresult['password']);
                Table::UpdateCache('user', $eu['id'], array('username' => $ucresult['username'], 'password' => $epass));
                return Table::FetchForce('user', $eu['id']);
            }
            return $eu;
        }
        unset($ucresult['uid']);
        unset($ucresult['duplicate']);
        zuitu_encode_array($ucresult);
        zuitu_encode_detect($ucresult);
        $newuser_id = ZUser::Create($ucresult, false);
        if ($newuser_id) {
            return Table::Fetch('user', $newuser_id);
        }
    }
    return array();
}
开发者ID:norain2050,项目名称:zuituware,代码行数:39,代码来源:uc.php

示例11: CheckOrder

	static public function CheckOrder($order) {
		$voucher_array = array('voucher');
		$team = Table::FetchForce('team', $order['team_id']);
		if (!in_array($team['delivery'], $voucher_array)) return;
		if ( $team['now_number'] >= $team['min_number'] ) {
			//init voucher create;
			$last = ($team['conduser']=='Y') ? 1 : $order['quantity'];
			$offset = max(5, $last);
			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) {
					self::Assign($order);
				}
			}
			else{
				self::Assign($order);
			}
		}
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:24,代码来源:ZVoucher.class.php

示例12: require_once

<?php
require_once(dirname(dirname(__FILE__)) . '/app.php');

need_login();
$order_id = $id = strval(intval($_GET['id']));
if(!$order_id || !($order = Table::Fetch('order', $order_id))) {
	die('404 Not Found');
}
if ( $order['user_id'] != $login_user['id']) {
	redirect( WEB_ROOT . "/team.php?id={$order['team_id']}");
}
if ( $order['state']=='unpay') {
	redirect( WEB_ROOT . "/team.php?id={$order['team_id']}");
}

$team = Table::FetchForce('team', $order['team_id']);
$partner = Table::Fetch('partner', $team['partner_id']);
$express = ($team['delivery']=='express');
if ( $express ) { $option_express = Utility::OptionArray(Table::Fetch('category', array('express'), 'zone'), 'id', 'name'); }

if ( $team['delivery'] == 'coupon' ) {
	$cc = array(
			'user_id' => $login_user['id'],
			'team_id' => $order['team_id'],
			'order_id' => $order['id'],
			);
	$coupons = DB::LimitQuery('coupon', array(
				'condition' => $cc,
				));
} else if ( $team['delivery'] == 'voucher' ) {
	$cc = array(
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:view.php

示例13: need_auth

     need_auth('admin');
     $express_id = abs(intval($_GET['eid']));
     $invite = Table::Fetch('invite', $id);
     if (!$invite || $invite['pay'] != 'N') {
         json('非法操作', 'alert');
     }
     if (!$invite['team_id']) {
         json('没有发生购买行为,不能执行返利', 'alert');
     }
     $team = Table::Fetch('team', $invite['team_id']);
     $team_state = team_state($team);
     if (!in_array($team_state, array('success', 'soldout'))) {
         json('只有成功的团购才可以执行邀请返利', 'alert');
     }
     Table::UpdateCache('invite', $id, array('pay' => 'Y', 'admin_id' => $login_user_id));
     $invite = Table::FetchForce('invite', $id);
     ZFlow::CreateFromInvite($invite);
     Session::Set('notice', '邀请返利操作成功');
     json(null, 'refresh');
 } else {
     if ('inviteremove' == $action) {
         need_auth('admin');
         Table::UpdateCache('invite', $id, array('pay' => 'C', 'admin_id' => $login_user_id));
         Session::Set('notice', '不合法邀请记录取消成功!');
         json(null, 'refresh');
     } else {
         if ('subscriberemove' == $action) {
             need_auth('admin');
             $subscribe = Table::Fetch('subscribe', $id);
             if ($subscribe) {
                 ZSubscribe::Unsubscribe($subscribe);
开发者ID:hhdem,项目名称:tuangala_v2,代码行数:31,代码来源:manage.php

示例14: date

                 $v[] = "{$secret}&nbsp;本卡已过期";
                 $v[] = '过期日期:' . date('Y-m-d', $paycard['expire_time']);
             } else {
                 $v[] = "{$secret}&nbsp;该卡有效";
                 $v[] = "金额:{$paycard['value']}元";
                 $v[] = "有效期至&nbsp;{$e}";
             }
         }
     }
     $v = join('<br/>', $v);
     $d = array('html' => $v, 'id' => 'coupon-dialog-display-id');
     json($d, 'updater');
 } else {
     if ($action == 'consume') {
         global $login_user_id;
         $paycard = Table::FetchForce('paycard', $secret);
         if (!$login_user_id) {
             $v[] = "登陆后才能进行充值";
             $v[] = '本次充值失败';
         } else {
             if (!$paycard) {
                 $v[] = "{$secret}&nbsp;充值卡无效";
                 $v[] = '本次充值失败';
             } else {
                 if ($paycard['id'] != $secret) {
                     $v[] = '充值密码不正确';
                     $v[] = '本次充值失败';
                 } else {
                     if ($paycard['expire_time'] < strtotime(date('Y-m-d'))) {
                         $v[] = "{$secret}&nbsp;充值卡已过期";
                         $v[] = '过期时间:' . date('Y-m-d', $paycard['expire_time']);
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:chargecard.php

示例15: strtolower

if (!($order['pay_id'] && (preg_match('#-(\\d+)-(\\d+)-#', $order['pay_id'], $m) && ($m[1] == $order['id'] && $m[2] == $order['quantity'])))) {
    $randid = strtolower(Utility::GenSecret(4, Utility::CHAR_WORD));
    $pay_id = "go-{$order['id']}-{$order['quantity']}-{$randid}";
    Table::UpdateCache('order', $order['id'], array('pay_id' => $pay_id));
    $order['pay_id'] = $pay_id;
}
/* end */
//payed order
if ($order['state'] == 'pay') {
    Session::Set('notice', '本单已支付成功');
    redirect("team.php?id={$order['team_id']}");
}
$team = Table::Fetch('team', $order['team_id']);
if ($login_user['money'] >= $order['origin']) {
    $order['service'] = 'credit';
} else {
    Session::Set('error', '余额不足,请去网页版本先行充值!');
    redirect('index.php');
}
if ($_POST['service'] == 'credit') {
    if ($order['origin'] > $login_user['money']) {
        Table::Delete('order', $order_id);
        redirect('index.php');
    }
    Table::UpdateCache('order', $order_id, array('service' => 'credit', 'money' => 0, 'state' => 'pay', 'credit' => $order['origin'], 'pay_time' => time()));
    $order = Table::FetchForce('order', $order_id);
    ZTeam::BuyOne($order);
    Session::Set('notice', '购买成功');
    redirect("order.php?id={$order_id}");
}
die(include template('wap_pay'));
开发者ID:norain2050,项目名称:zuituware,代码行数:31,代码来源:pay.php


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