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


PHP FormHandler::YesNoRadio方法代码示例

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


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

示例1: Main

	function Main()
	{
		$this->CheckAdminPrivs('ucenter');
		if(!is_file(UC_CLIENT_ROOT . './client.php')){
			$this->Messager('Ucenter的客户端文件 <b>' . UC_CLIENT_ROOT . './client.php' . "</b> 不存在,请检查",null);
		}
		if(!is_file(ROOT_PATH . './api/uc.php')){
			$this->Messager('Ucenter的api文件 <b>' . UC_CLIENT_ROOT . './client.php' . "</b> 不存在,请检查",null);
		}
				$ucenter = ConfigHandler::get('ucenter');


		$uc_enable_radio = FormHandler::YesNoRadio('ucenter[enable]',(bool) $ucenter['enable']);

		${"uc_connect_{$ucenter['uc_connect']}_checked"} = " checked ";

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

示例2: Main

	function Main()
	{
		$this->CheckAdminPrivs('robot');
		$config=ConfigHandler::get('robot');

				$order_by=$this->Get['order_by']?$this->Get['order_by']:"today_times";
		$order_type=$this->Get['order_type']?$this->Get['order_type']:"desc";
		$toggle_order_type=$order_type=="desc"?"asc":"desc";
		$$order_by="order_".$order_type;

		include_once(LOGIC_PATH.'robot.logic.php');
		$RobotRogic=new RobotLogic();
		$turnon_radio=FormHandler::YesNoRadio('config[turnon]',(int)$config['turnon'],'','class="radio"');

		if ($config['turnon'])
		{
			$sql="SELECT * FROM ".$RobotRogic->tableName;
			$query=$this->DatabaseHandler->Query($sql,"SKIP_ERROR");
			if($query==false && $this->DatabaseHandler->getlastErrorNo()==ERROR_TABLE_NOT_EXIST)
			{
				$query=$RobotRogic->createTable($RobotRogic->tableName,$RobotRogic->getFieldList(),$sql);
			}
			$robot_list=array();
			$name_list=array();
			while ($row=$query->GetRow())
			{
				$row['link']=preg_replace("/.*?(((((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k):\/\/)|(www\.))([^\[\"'\s\)\(\;]+))|([a-z0-9\_\-.]+@[a-z0-9]+\.[a-z0-9\.]{2,}))*/i","\\1",$row['agent']);
				if(strpos($row['link'],'@')!==false)$row['link']="mailto:".$row['link'];
				if($row['link'] && strpos($row['link'],":")===false)$row['link']="http:/"."/".$row['link'];
				$row['first_visit']=my_date_format($row['first_visit']);
				$row['last_visit']=my_date_format($row['last_visit']);
				if($this->ad)
				{
					$show_ad=isset($config['list'][$row['name']]['show_ad'])
							?(int)$config['list'][$row['name']]['show_ad']:
							1;
					$row['show_ad_radio']=FormHandler::YesNoRadio("config[list][{$row['name']}][show_ad]",$show_ad,'',"class='radio'");
				}
				$row['today_times']=0;
				$name_list[]=$row['name'];
				$row['name']=trim($row['name']);
				$robot_list[$row['name']]=$row;
			}

						if(sizeof($name_list)>=0)
			{
				$names=$this->DatabaseHandler->BuildIn($name_list,"");
				include_once LOGIC_PATH.'robot_log.logic.php';
				$RobotLogLogic=new RobotLogLogic("");
				$sql="SELECT * FROM {$RobotLogLogic->tableName}
				where
					`name` in($names)
					and `date`='{$RobotLogLogic->date}'
				order by times desc";
				$query=$this->DatabaseHandler->Query($sql,"SKIP_ERROR");
				if($query==false && $this->DatabaseHandler->getlastErrorNo()==ERROR_TABLE_NOT_EXIST)
				{
					$query=$RobotRogic->createTable($RobotLogLogic->tableName,$RobotLogLogic->getFieldList(),$sql);
				}
				$today_robot_list=array();
				while ($row=$query->GetRow())
				{
					if(isset($robot_list[$row['name']]))
					$robot_list[$row['name']]['today_times']=$row['times'];
				}
			}

						if(is_array($robot_list) && sizeof($robot_list)>0)
			{
				foreach ($robot_list as $key=>$value)
				{
					$order_by_list[$key]=$value[$order_by];
				}
				array_multisort($order_by_list,constant(strtoupper("sort_".$order_type)),$robot_list);
			}
						if(sizeof($robot_list)>0)
			{
				$robot_ip_list=array();
				$sql="SELECT ip,name from {$RobotRogic->tableName}_ip order by `ip`";
				$query=$this->DatabaseHandler->Query($sql,"SKIP_ERROR");
				if($query!=false)
				{
					while ($row=$query->GetRow())
					{
						$robot_ip_list[$row['name']][]=$row['ip'];
					}
					if(!empty($robot_ip_list))
					{
						foreach ($robot_ip_list as $_robot=>$_ip_list)
						{
							if(sizeof($_ip_list)>5)
							{
								$ip_list=array();
								$ip_list_count=0;
								foreach ($_ip_list as $_ip)
								{
									$ip=substr($_ip,0,strrpos($_ip,".")).".*";
									$ip_list[$ip]=$ip;
									$ip_list_count++;
									if($ip_list_count>10)break;
//.........这里部分代码省略.........
开发者ID:pf5512,项目名称:phpstudy,代码行数:101,代码来源:robot.mod.php

示例3: ModifyFilter

	function ModifyFilter()
	{
		$this->CheckAdminPrivs('filter');
		$filter=ConfigHandler::get('filter');
		$enable_radio=FormHandler::YesNoRadio("filter[enable]",(int)$filter['enable']);

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


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