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

PHP handler函数代码示例

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

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



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

示例1: html

	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;
		}
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:32,代码来源:express.logic.php


示例2: modify

	public function modify()
	{
		$this->CheckAdminPrivs('article');
		$id = get('id', 'int');
		$article = logic('article')->get_one($id);
		include handler('template')->file('@admin/article_modify');
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:7,代码来源:article.mod.php


示例3: vlist

	public function vlist()
	{
		$this->CheckAdminPrivs('styles');
		$default = ini('styles.default');
		$styles = ui('style')->get_all();
		include handler('template')->file('@admin/styles_list');
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:7,代码来源:styles.mod.php


示例4: Process

	function Process()
	{
		$this->CheckAdminPrivs('refund');
		$id = get('id', 'number');
		$order = logic('order')->GetOne($id);
		if (!$order)
		{
			$this->Messager(__('找不到相关订单!'), '?mod=order');
		}
		$user 	 = user($order['userid'])->get();
		$payment = logic('pay')->SrcOne($order['paytype']);
		$paylog  = logic('pay')->GetLog($order['orderid'], $order['userid']);
		$coupons = logic('coupon')->SrcList($order['userid'], $order['orderid'], TICK_STA_ANY);
		$express = logic('express')->SrcOne($order['expresstype']);
		$address = logic('address')->GetOne($order['addressid']);
		$refund  = logic('refund')->GetOne($order['orderid']);
		$order['ypaymoney'] = ($order['totalprice'] > $order['paymoney']) ? number_format(($order['totalprice'] - $order['paymoney']),2) : 0;
		$order['tpaymoney'] = $order['totalprice'];
		if($order['product']['type'] == 'ticket'){
			$coupo = logic('coupon')->SrcList($order['userid'], $id);
			if($order['productnum'] != count($coupo) && $coupo[0]['mutis'] == 1){
				$order['tpaymoney'] = count($coupo)*$order['productprice'];
				$order['tmsg'] = array(
					'money' => $order['paymoney'],
					'tnum' => $order['productnum'],
					'num' => $order['productnum']-count($coupo)
				);
			}
		}
		include handler('template')->file('@admin/refund_process');
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:31,代码来源:refund.mod.php


示例5: load

    public function load($idx)
    {
		        $map = ini('isearcher.map');
        $fidString = ini('isearcher.idx.'.$idx);
        $fids = explode(',', $fidString);
		        $filter = ini('isearcher.filter');
        $ffsString = ini('isearcher.frc.'.$idx);
        $frcs = explode(',', $ffsString);
				$timev = ini('isearcher.timev');
		$tvString = ini('isearcher.tvs.'.$idx);
		$tvss = explode(',', $tvString);
				$tvinputs = array();
		foreach ($tvss as $tvsk)
		{
			if (isset($_GET['iscp_tvbegin_'.$tvsk]))
			{
				$tvinputs[$tvsk]['begin'] = get('iscp_tvbegin_'.$tvsk, 'txt');
			}
			if (isset($_GET['iscp_tvfinish_'.$tvsk]))
			{
				$tvinputs[$tvsk]['finish'] = get('iscp_tvfinish_'.$tvsk, 'txt');
			}
		}
		$iscp_input_value = ($_GET['iscp_input_value'] ? $_GET['iscp_input_value'] : $_POST['iscp_input_value']);
		        include handler('template')->file('@html/isearcher/index');
    }
开发者ID:pf5512,项目名称:phpstudy,代码行数:26,代码来源:isearcher.ui.php


示例6: inputer

 public function inputer($category)
 {
     $category || $category = 0;
     $category && $master = logic('catalog')->GetOne($category);
     $catalog = logic('catalog')->Navigate(2);
     include handler('template')->file('@html/catalog/inputer');
 }
开发者ID:pf5512,项目名称:phpstudy,代码行数:7,代码来源:catalog.ui.php


示例7: view

	public function view()
	{
		$id = get('id', 'int');
		$article = logic('article')->get_one($id);
		$this->Title = $article['title'];
		include handler('template')->file('article_view');
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:7,代码来源:article.mod.php


示例8: water

	public function water($image_source, $image_dest, $config)
	{
		if ($config['type'] == 'image')
		{
						handler('image')->setSrcImg($image_source);
			handler('image')->setDstImg($image_dest);
			handler('image')->setMaskImg($config['image']);
			handler('image')->setMaskPosition($config['position']);
			handler('image')->createImg(100);
		}
		elseif ($config['type'] == 'text')
		{
			if (ENC_IS_GBK)
			{
								$config['text'] = ENC_G2U($config['text']);
			}
						$config['text'] = mb_convert_encoding($config['text'], 'html-entities', 'UTF-8');
 			$r = array();
						$r[] = handler('image')->setSrcImg($image_source);
			$r[] = handler('image')->setDstImg($image_dest);
			$r[] = handler('image')->setMaskFont(ROOT_PATH.'static/images/watermark/'.$config['font']);
			$r[] = handler('image')->setMaskFontColor('#ffffff');
			$r[] = handler('image')->setMaskFontSize($config['fontsize'] ? $config['fontsize'] : 13);
			$r[] = handler('image')->setMaskWord($config['text']);
			$r[] = handler('image')->setMaskPosition($config['position']);
			$r[] = handler('image')->createImg(100);
		}
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:28,代码来源:image.logic.php


示例9: shut

function shut()
{
    $error = error_get_last();
    if ($error && $error['type'] & E_FATAL) {
        handler($error['type'], $error['message'], $error['file'], $error['line']);
    }
}
开发者ID:VIVEKLUCKY1848,项目名称:generalutils,代码行数:7,代码来源:errorHandler2_20082016.php


示例10: get_all

 public function get_all()
 {
     $tpl_root = handler('template')->TemplateRootPath.'themes/';
     $styles_io = handler('io')->ReadDir($tpl_root);
     $styles_lc = ini('styles.local');
     $styles_lc || $styles_lc = array();
     $styles_ms = $styles_lc;
     foreach ($styles_io as $i => $style_name)
     {
         $style_name = str_replace($tpl_root, '', $style_name);
         if (isset($styles_lc[$style_name]))
         {
             unset($styles_ms[$style_name]);
         }
         else
         {
                             $styles_lc[$style_name] = array(
                 'name' => '新增皮肤',
                 'enabled' => false
             );
         }
     }
     foreach ($styles_ms as $style_name => $style_data)
     {
         $styles_lc[$style_name] = array(
             'name' => $style_data['name'].'[已失效]',
             'enabled' => false
         );
     }
     return $styles_lc;
 }
开发者ID:pf5512,项目名称:phpstudy,代码行数:31,代码来源:style.ui.php


示例11: edit

	public function edit()
	{
		$this->CheckAdminPrivs('privs');
		$action = 'admin.php?mod=privs&code=save';
		unset($privs_list);
		include(CONFIG_PATH . 'admin_privs.php');
		$uid = get('uid', 'int');
		if($uid == '1'){
			$this->Messager("您不能对此管理员的权限进行任何操作");
		}
		$userinfo = dbc(DBCMax)->query('select uid,username,role_id,role_type,privs from '.table('members').' where uid='.$uid)->limit(1)->done();
		if(!$userinfo){
			$this->Messager("该用户不存在");
		}
		if(!in_array($userinfo['role_type'],array('admin','seller'))){
			$this->Messager("您不能设置该用户的后台操作权限");
		}
		if($userinfo && $privs_list && is_array($privs_list)){
			foreach($privs_list as $key => $val){
				if($val['sub_priv_list'] && is_array($val['sub_priv_list'])){
					$sub_privgroup = array();
					foreach($val['sub_priv_list'] as $k => $v){
						if($userinfo['uid'] == '1' || $userinfo['privs'] == 'all' || in_array($v['priv'],explode(',',$userinfo['privs']))){
							$privs_list[$key]['sub_priv_list'][$k]['check'] = ' checked';
						}
						$sub_privgroup[] = $v['priv'];
					}
					$privs_list[$key]['privgroup'] = implode(',',$sub_privgroup);
				}
			}
		}
		include handler('template')->file('@admin/privs_list');
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:33,代码来源:privs.mod.php


示例12: customShutdownHandler

function customShutdownHandler()
{
    $error = error_get_last();
    if ($error && ($error['type'] & 'E_FATAL')) {
        handler($error['type'], $error['message'], $error['file'], $error['line']);
    }
}
开发者ID:jbarentsen,项目名称:drb,代码行数:7,代码来源:init_errorhandler.php


示例13: main

	public function main()
	{
		$this->Title = '下载手机版享更多优惠';
		$android_url = ini('settings.site_url').'/get-last-apk.php';
		$iphone = ini('iphone');
		$iphone_url = $iphone['url'];

		$referer_url = referer('index.php?');
		if(false !== strpos($referer_url, '?')) {
			$referer_url .= '&ignore_jump=1';
		} else {
			$referer_url .= '/ignore_jump-1';
		}

		$user_agent = $_SERVER['HTTP_USER_AGENT'];
		if (stripos($user_agent, 'MicroMessenger') === false) {
						if( false != preg_match("/(iphone|android|mobile)/i",$_SERVER['HTTP_USER_AGENT']) ) {
				include handler('template')->file('downapp_mobile');
			} else {
				include handler('template')->file('downapp');	
			}
		} else {
						include handler('template')->file('downapp_weixin');
		}
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:25,代码来源:downapp.mod.php


示例14: order

    public function order()
    {
        $this->CheckAdminPrivs('cashorder');
		$orderid = get('orderid', 'number');
		if($orderid)
		{
			$order = logic('cash')->GetOne($orderid);
			if($order){
				if($order['status'] =='doing'){
					$action = "?mod=cash&code=order&op=save";
				}
				$order_log = logic('cash')->Getlog($orderid);
			}else{
				$this->Messager('操作错误!');
			}
		}
		else
		{
			$paystatus = get('paystatus');
			if (in_array($paystatus,array('no','yes','doing','error')))
			{
				$where = "status = '{$paystatus}'";
			}
			else
			{
				$where = '1';
			}
			$list = logic('cash')->GetList($where);
		}
        include handler('template')->file('@admin/cash_order');
    }
开发者ID:pf5512,项目名称:phpstudy,代码行数:31,代码来源:cash.mod.php


示例15: login

	function login()
	{
		$this->_fix_failedlogins();

		if(MEMBER_ID < 1)
		{
			$this->Messager("请先在前台进行<a href='index.php?mod=account&code=login'><b>登录</b></a>",null);
		}
		$loginperm = $this->_logincheck();
		if(!$loginperm) {
			$this->Messager("累计 5 次错误尝试,15 分钟内您将不能登录。",null);
		}
		$this->Title="用户登录";
		if ($this->CookieHandler->GetVar('referer')=='')
		{
			$this->CookieHandler->Setvar('referer',referer());
		}
		$action="admin.php?mod=login&code=dologin";

		$question_select=FormHandler::Select('question',ConfigHandler::get('member','question_list'),0);
		$role_type_select=FormHandler::Radio('role_type',ConfigHandler::get('member','role_type_list'),'normal');
		ob_clean();

		include(handler('template')->file("@admin/login"));
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:25,代码来源:login.mod.php


示例16: Main

	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']);
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:28,代码来源:index.mod.php


示例17: load

	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('[email protected]') && ini($pox, array());
			}
			return;
		}
		echo '<!'.'-- widget @ [ '.$area.' ] --'.'>';
		foreach ( $list as $name => $one )
		{
			if (isset($one['enabled']) && $one['enabled'])
			{
				handler('template')->load('@widget/' . $name);
			}
		}
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:30,代码来源:widget.ui.php


示例18: load

 public function load($block)
 {
     $masterFile = handler('template')->TemplateRootPath.'html/ad/'.$block.'.html';
     if (!is_file($masterFile)) return;
     if (!ini('ad.'.$block.'.enabled')) return;
     $cfg = ini('ad.'.$block.'.config');
     include handler('template')->file('@html/ad/'.$block);
 }
开发者ID:pf5512,项目名称:phpstudy,代码行数:8,代码来源:ad.ui.php


示例19: Import

 function Import()
 {
 	$flag = get('flag', 'txt');
     if (!$flag || !ini('alipay.address.import.source.'.$flag)) exit('ERROR: no Import Source');
     $html = logic('address')->import()->linker($flag);
     logic('address')->import()->referer($_SERVER['HTTP_REFERER']);
     include handler('template')->file('@address/import/redirect');
 }
开发者ID:pf5512,项目名称:phpstudy,代码行数:8,代码来源:address.mod.php


示例20: seller_multis

	public function seller_multis($sid, $iids)
	{
		if(false == is_array($iids)) {
			$iids = explode(',', $iids);
		}
		$iids = (array) $iids;
		include handler('template')->file('@html/iimager/'.$this->style.'/seller_multis');
	} 
开发者ID:pf5512,项目名称:phpstudy,代码行数:8,代码来源:iimager.ui.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP handles函数代码示例发布时间:2022-05-15
下一篇:
PHP handle_uploaded_document函数代码示例发布时间: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