Example #1
0
	function load( $area = '' )
	{
		if ($area == '')
		{
			$area = str_replace('.', '_', mocod());
		}
		$pox = 'widget.'.$area.'.blocks';
		$list = ini($pox);
		if ( false === $list )
		{
			if (substr($area, 0, 5) == 'html_')
			{
								$html = logic('html')->query(substr($area, 5));
				ini('widget.'.$area, array('name' => $html['title'], 'blocks' => array()));
			}
			else
			{
				ini('widget.~@config.listener.enabled') && ini($pox, array());
			}
			return;
		}
		echo '<!'.'-- widget @ [ '.$area.' ] --'.'>';
		foreach ( $list as $name => $one )
		{
			if (isset($one['enabled']) && $one['enabled'])
			{
				handler('template')->load('@widget/' . $name);
			}
		}
	}
Example #2
0
	function Main()
	{
		$clientUser = get('u', 'int');
		if ( $clientUser != '' )
		{
			handler('cookie')->setVar('finderid', $clientUser);
			handler('cookie')->setVar('findtime', time());
		}

		$data = logic('product')->display();
				if (!$data && get('page', 'int') == 0)
		{
			header('Location: '.rewrite('?mod=subscribe&code=mail'));
			exit;
		}
		$product = $data['product'];
		$this->Title = $data['mutiView'] ? '' : $product['name'];
		$data['mutiView'] || mocod('product.view');
		$data['mutiView'] || productCurrentView($product);
				$favorited = logic('favorite')->get_one($product['id']);
				if(INDEX_DEFAULT === true && ini('settings.template_path') == 'meituan'){
			$new_product = logic('product')->GetNewList(10, true);
			if(empty($new_product)) {
				$new_product = logic('product')->GetNewList(10);
			}
		}
		include handler('template')->file($data['file']);
	}
Example #3
0
	function html( $data )
	{
		switch (mocod())
		{
			case 'buy.checkout':
				if ($data['type'] != 'stuff') return;
				handler('template')->load('@html/express_selector');
				break;
			case 'buy.order':
				if ($data['product']['type'] != 'stuff') return;
				$EID = $data['expresstype'];
				if(!$EID){
					$express_list = logic('express')->GetList($data['addressid'], $data['productid']);
					if($express_list){
						foreach($express_list as $key => $val){
							if($data['product']['weightsrc'] <= $val['firstunit']){
								$express_list[$key]['price'] = $val['firstprice'];
							}else{
								$express_list[$key]['price'] = $val['firstprice'] + ceil(($data['product']['weightsrc']-$val['firstunit'])/$val['continueunit'])*$val['continueprice'];
							}
							$express_list[$key]['unit1'] = ($val['firstunit'] >= 1000) ? 'kg' : 'g';
							$express_list[$key]['firstunit'] *= ($express_list[$key]['unit1'] == 'kg') ? 0.001 : 1;
							$express_list[$key]['unit2'] = ($val['continueunit'] >= 1000) ? 'kg' : 'g';
							$express_list[$key]['continueunit'] *= ($express_list[$key]['unit2'] == 'kg') ? 0.001 : 1;
						}
					}
					$ordertprice = $data['totalprice'];
				}
				include handler('template')->file('@html/express_displayer');
				break;
		}
	}
Example #4
0
	public function create($id, $data)
	{
		$name = TUANGOU_STR . '券已生成,号码:'.$data['number'];
		$extra  = '用户ID:'.$data['uid'].',';
		$extra .= '产品编号:'.$data['productid'].',';
		$extra .= '订单编号:'.$data['orderid'].',';
		$extra .= '包含份数:'.$data['mutis'].'<br/>';
		$extra .= '通过 <b>'.(mocod() == 'coupon.add' ? '管理员手动生成' : '系统自动生成').'</b>,';
		$extra .= '生成 <b>'.($id > 0 ? '成功' : '失败').'</b>';
		$this->zlogCreate($data['number'], $name, $extra);
	}
Example #5
0
	function html( $data )
	{
		switch (mocod())
		{
			case 'buy.checkout':
				if ( $data['type'] != 'stuff' ) return;
				handler('template')->load('@html/address_selector');
				break;
			case 'buy.order':
				if ( $data['product']['type'] != 'stuff' ) return;
				$addressID = $data['addressid'];
				include handler('template')->file('@html/address_displayer');
				break;
		}
	}
Example #6
0
	public function html( $data )
	{
		switch (mocod())
		{
			case 'buy.order':
				$pay_money = $data['price_of_total'];
				$product_type = $data['product']['type'];
				$product_id = $data['product']['id'];
				include handler('template')->file('@html/pay_selector');
				break;
			case 'recharge.order':
				$pay_money = $data['money'];
				$product_type = 'recharge';
				include handler('template')->file('@html/pay_selector');
				break;
		}
	}
Example #7
0
    public function Linker(&$sql)
    {
        $swd = get('search','string');
        if ($swd)
        {
            list($key, $wd) = explode(':', $swd);
                                            }
        else
        {
            $key = false;
            $wd = false;
        }
        $ssrc = get('ssrc', 'txt');
        if ($ssrc)
		{
			$map = ini('isearcher.map.'.$ssrc);
		}
		else
		{
			$map = false;
		}
		$mocod = str_replace('.', '_', mocod());
		if ($key && $wd && $map)
		{
			$parser = '_lnk_of_'.$mocod;
			$this->$parser($sql, $key, $wd, $map);
		}
		$this->timev_invades($sql, $mocod, array(
			'order_vlist' => 'o.',
			'coupon_vlist' => 't.',
            'recharge_order' => '',
			'seller_order' => 'o.',
			'seller_ticket' => 't.',
			'salecount_product' => 'o.',
			'salecount_payment' => 'o.',
			'salecount_user' => 'o.',
			'salecount_fund' => 'o.'
		));
    }
Example #8
0
	public function html($data)
	{
		switch (mocod())
		{
			case 'buy.checkout':
								$pro_attrs = $this->get($data['id']);
				$pro_attrs && include handler('template')->file('attrs_selector');
				break;
			case 'buy.order':
								$ord_attrs = $this->snapshot($data['orderid']);
				$ord_attrs && include handler('template')->file('attrs_displayer');
				break;
		}
	}
Example #9
0
<!doctype html>
<html>
<head>
<?='<base h'.'ref="'.ini('settings.site_url').'/" />'?>
<meta http-equiv="Content-Type" content="text/html; charset=<?=ini("settings.charset")?>" />
<meta http-equiv="X-UA-Compatible" content="Chrome=1,IE=edge" />
<title><? echo ($this->Title != '') ? $this->Title.' - ' : (ini('cplace.cnpre.enabled') ? (logic('misc')->City('name').ini('settings.tuangou_str').' - ') : ''); ?><?=ini("settings.site_name")?><?=$this->Config['page_title']?></title>
<meta name="Keywords" content="<?=ini('settings.'.(mocod()=='index.main'?'index_':'').'meta_keywords')?>" />
<meta name="Description" content="<?=ini('settings.'.(mocod()=='index.main'?'index_':'').'meta_description')?>
<? if($__p = productCurrentView()) { ?>
,<? echo strip_tags($__p['intro']); ?>
<? } ?>
" />
<script type="text/javascript">
var thisSiteURL = '<?=ini("settings.site_url")?>/';
var tuangou_str = '<?=ini("settings.tuangou_str")?>';
</script>
<link rel="shortcut icon" href="favicon.ico" />
<?=ui('loader')->css('main')?>
<?=ui('loader')->js('@jquery')?>
<?=ui('loader')->js('@common')?>
<?=ui('loader')->css('meituan')?>
<?=ui('style')->loadCSS()?>
<?=ui('loader')->js('jquery.menu-aim')?>
<script>
//   $(window).resize(function(){
//         var Bwidth = $(window).width();
//		 if (Bwidth < 1024){
//				$(".exp").addClass("r980");
//		 }else{$(".exp").removeClass("r980");}
//     });