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


PHP JComponentHelper::_Load方法代码示例

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


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

示例1: diagnostics_module


//.........这里部分代码省略.........
			    }
			    $output .= "Connection Method: $connected<br/><br/>";
			    $output .= "Connection Grade: $grade<br/><br/>";
			    $output .= "Remote IP: $client_ip<br/><br/>";
			    $output .= "Remote Host: $client_host<br/><br/>";

				$output .= $this->EndModule();
				$output .= $this->ModuleStart("1", "50", "", "Server Info", "user", TRUE);
				/****************************************/
				$output .= "PHP version: $php_ver<br/><br/>";
				if($curl){
					$output .= "cURL: enabled<br/><br/>";
				} else {
					$output .= "cURL: disabled<br/><br/>";
				}
				if($fopen){
					$output .= "fopen: enabled<br/><br/>";
				} else {
					$output .= "fopen: disabled<br/><br/>";
				}
				$output .= "Document Root: $docRoot<br/><br/>";
				$output .= "Absolute File Path: $file<br/><br/>";

		        $output .= $this->EndModule();
		        $output .= '                        <div style="clear:both;"></div>'."\n";
		        $output .= '                    </div>'."\n";
		        $output .= '                </div>'."\n";
		        $output .= '                <div class="s5_bblack_bl"></div>'."\n";
		        $output .= '                <div class="s5_bblack_bm"></div>'."\n";
		        $output .= '                <div class="s5_bblack_br"></div>'."\n";
		        $output .= '                <div style="clear:both;"></div>'."\n";
		        $output .= '                <div class="s5_leftshadow"></div>'."\n";
		        $output .= '                <div class="s5_rightshadow"></div>'."\n";
		        $output .= '            </div>'."\n";
		        $output .= '            <!-- End Bottom Modules -->'."\n";
		        $output .= '            <div style="clear:both;"></div>'."\n";
			}
            //CMS specific diagnostics
            {
            	if(!defined('DS')){define( 'DS', DIRECTORY_SEPARATOR );}
				if(!defined('JPATH_BASE')){define('JPATH_BASE', $_SERVER['DOCUMENT_ROOT']);}
				$jFile1 = JPATH_BASE .DS.'includes'.DS.'defines.php';
				$jFile2 = JPATH_BASE .DS.'includes'.DS.'framework.php';
				
				if($this->is_joomla() && file_exists($jFile1) && file_exists($jFile2)){
					
					define( '_JEXEC', 1 );
					include ( $jFile1 );
					include ( $jFile2 );
					
					$this->mainframe =& JFactory::getApplication('site');
					
	                $output .= '        <!-- Adverts -->';
	                $output .= '        <div class="s5_wrap" >';
	                $output .= '            <div class="s5_w_modwrap">';
	                $output .= '                <div class="s5_backmiddlemiddle2">';
	                $output .= $this->ModuleStart("1", "100", "", "Component Diagnosis", "advert", TRUE);

					//check components for bridges
	                $components = JComponentHelper::_Load();
	                $unprotected = array();
	                foreach($components as $com){
						if(substr_count(strtolower($com->name),'bridge')){
							array_push($unprotected,$com->name);
						}
	                }
	                if(count($unprotected)>0 && substr_count($this->account->acct_type,'sj')){
						//show which components and recommend...
						$output .= "Component Scan complete! We detected <b>possible vulnerabilities</b> with the following:<br/><br/>\n";
						foreach($unprotected as $name){
							$output .= "Component: <b>$name</b> is a bridge<br/>\n";
						}
						$output .= "<br/>This means that the components listed \"bridge\" 3rd-party software with Joomla, and SecureJoomla does not protect software that is run outside of Joomla (or that can be accessed outside of Joomla). We recommend that you either upgrade to SecureLive Max, Server Edition, or discontinue use of the 3rd party software that is bridged into Joomla.";
	                } elseif(substr_count($this->account->acct_type,'slm')){
						$output .= "Component Scan complete! You are using SecureLive Server-Edition, so all of your components are currently being protected by SecureLive.\n";
	                } else {
						//say they all passed
						$output .= "Component Scan complete! We did not find any bridges, so all of your components are currently being protected by SecureLive.\n";
	                }

	                $output .= $this->EndModule();
	                $output .= '            <div style="clear:both;"></div>'."\n";
	                $output .= '        </div>'."\n";
	                $output .= '    </div>'."\n";
	                $output .= '    <div class="s5_w_modbl"></div>'."\n";
	                $output .= '    <div class="s5_w_modbm"></div>'."\n";
	                $output .= '    <div class="s5_w_modbr"></div>'."\n";
	                $output .= '    <div style="clear:both;"></div>'."\n";
	                $output .= '    <div class="s5_leftshadow" ></div>'."\n";
	                $output .= '    <div class="s5_rightshadow" ></div>'."\n";
	                $output .= '    <!-- End Adverts -->'."\n";
	                $output .= '    <div style="clear:both;"></div>'."\n";
	                
	                global $sl_admin;
					$sl_admin = $this;
	                
	            }
            }
			return "DONE*sl^module#message*$output";
		}
开发者ID:realfluid,项目名称:umbaugh,代码行数:101,代码来源:sl_admin.php

示例2: array

			if ($sl_timer > 1 && $sl_timer < 2.5){
				array_push($warnings, "Connection speed from your server to SecureLive's server is in fair condition, the response times should be investigated.");
				$cmsscore += .5;
			}
			if ($sl_timer > 2.5 && $sl_timer < 4){
				array_push($warnings, "Connection speed from your server to SecureLive's server is in poor condition, the response times should be investigated.");
				$cmsscore += 3.5;
			}
			if ($sl_timer > 4){
				array_push($warnings, "Connection speed from your server to SecureLive's server is in very poor condition, there is a problem and should be investigated.");
				$cmsscore += 9.5;
			}

			# Bridge Components installed and Joomla version
			if(substr_count($this->account->acct_type,'slm') == false){
			    $components = JComponentHelper::_Load();
			    $unprotected = array();
			    foreach($components as $com){
					if(substr_count(strtolower($com->name),'bridge')){
						$cmsscore += 4.5;
						array_push($warnings, "<b>".$com->name."</b> is a bridge. Bridged software such as Forums, Galleries or other software that is not installed with the Joomla framework is not protected outside of Joomla. These scripts can be ran independantly from outside of Joomla and SecureLive does not protect these programs. You may change your version of SecureLive to SecureLive Server Edition to protect these types of programs. <a href='#' onclick='sl_gateway.open(\"help\",\"&id=bridge_warn\");return false;'>What do I do?</a>");
					}
			    }
			}
		}
	}

	/**
	* Display the results in a nice rounded card with a score
	*
	* @var float
开发者ID:realfluid,项目名称:umbaugh,代码行数:31,代码来源:sl_scorecard.php


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