本文整理汇总了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";
}
示例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