本文整理汇总了PHP中CModule::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CModule::GetList方法的具体用法?PHP CModule::GetList怎么用?PHP CModule::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModule
的用法示例。
在下文中一共展示了CModule::GetList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Init
function Init()
{
if($this->bInit)
return;
$this->bInit = true;
$module_list = CModule::GetList();
while($module = $module_list->Fetch())
$this->aModules[] = $module["ID"];
}
示例2: GetMessage
</td>
</tr>
</table>
</td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td width="200" class="field-name"><span class="required">*</span>' . GetMessage("SOE_MODULE") . ':</td>
<td width="400">';
if ($bSimpleForm) {
$formTemplate .= '<input type="hidden" name="BASKET_MODULE" id="BASKET_MODULE" value="catalog">' . GetMessage("SOE_MODULE_CATALOG");
} else {
$formTemplate .= '<select name="BASKET_MODULE" onchange="ModuleChange(this.value)" id="BASKET_MODULE">';
$dbModuleList = CModule::GetList();
while ($arModuleList = $dbModuleList->Fetch()) {
$formTemplate .= '<option value="' . $arModuleList["ID"] . '">' . htmlspecialcharsEx($arModuleList["ID"]) . '</option>';
}
$formTemplate .= '</select>';
}
$formTemplate .= '</td>
</tr>
<tr>
<td class="field-name"><span class="required">*</span>' . GetMessage("SOE_PRODUCT_ID") . ':</td>
<td><input id="BASKET_PRODUCT_ID" name="BASKET_PRODUCT_ID" value="" size="5" type="text"> <input disabled="disabled" id="basket_product_button" value="..." onclick="ProductSearchOpen(1)" type="button"></td>
</tr>
<tr>
<td class="field-name"><span class="required">*</span>' . GetMessage("SOE_ITEM_NAME") . ':</td>
<td><input size="40" id="BASKET_NAME" name="BASKET_NAME" type="text" value=""></td>
</tr>
示例3: CheckKernel
function CheckKernel($arParams)
{
$time_start = time();
global $DB;
$arCompare = Array(
"install/components/bitrix/" => "/bitrix/components/bitrix/",
"install/js/" => "/bitrix/js/",
"install/activities/" => "/bitrix/activities/",
);
if(!$_SESSION["BX_CHECKLIST"][$arParams["TEST_ID"]])
$_SESSION["BX_CHECKLIST"][$arParams["TEST_ID"]] = Array();
$NS = &$_SESSION["BX_CHECKLIST"][$arParams["TEST_ID"]];
if ($arParams["STEP"] == false)
{
$NS = Array();
$rsInstalledModules = CModule::GetList();
while ($ar = $rsInstalledModules->Fetch())
{
if (!strpos($ar["ID"],"."))
$NS["MLIST"][] = $ar["ID"];
}
$NS["MNUM"] = 0;
$NS["FILE_LIST"] = Array();
$NS["FILES_COUNT"] = 0;
$NS["MODFILES_COUNT"] = 0;
}
$arError = false;
$module_id = $NS["MLIST"][$NS["MNUM"]];
$module_folder = $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/";
$dbtype = strtolower($DB->type);
if ($module_id == "main")
$ver = SM_VERSION;
else
{
@include($module_folder."install/version.php");
$ver = $arModuleVersion["VERSION"];
}
if (!$ver)
{
$state = Array(
"STATUS" => false,
"MESSAGE" => GetMessage("CL_MODULE_VERSION_ERROR",Array("#module_id#"=>$module_id))."\n"
);
$arError = true;
}
else
{
if(count($NS["FILE_LIST"]) == 0)
{
$sHost = COption::GetOptionString("main","update_site","www.bitrixsoft.com");
$sUrl = "/bitrix/updates/checksum.php";
$sVars = "check_sum=Y&module_id=".$module_id."&ver=".$ver."&dbtype=".$dbtype."&mode=2";
$data = QueryGetData($sHost, 80, $sUrl, $sVars, $errno, $errstr);
$NS["FILE_LIST"] = $result = unserialize(gzinflate($data));
$NS["MODULE_FILES_COUNT"] = count($NS["FILE_LIST"]);
}
else
{
$result = $NS["FILE_LIST"];
}
$arMessage = "";
$arFilesCount = 0;
$arModifiedFilesCount = 0;
$timeout = COption::GetOptionString("main","update_load_timeout","30");
if (is_array($result) && !$result["error"])
{
foreach($result as $file=>$checksum)
{
$arFile = $module_folder.$file;
unset($NS["FILE_LIST"][$file]);
if (!file_exists($arFile))
continue;
$arFilesCount++;
if (md5_file($arFile)!=$checksum)
{
$arMessage.= str_replace(Array("//","\\\\"),Array("/","\\"),$arFile)."\n";
$arModifiedFilesCount++;
}
$arTmpCompare = $arCompare;
foreach ($arTmpCompare as $key=>$value)
if (strpos($file,$key) === 0)
{
$arFile = str_replace($key,$_SERVER["DOCUMENT_ROOT"].$value,$file);
if (file_exists($arFile) && md5_file($arFile)!=$checksum)
{
$arModifiedFilesCount++;
$arMessage.= str_replace(Array("//","\\\\"),Array("/","\\"),$arFile)."\n";
}
$arFilesCount++;
}
if ((time()-$time_start)>=$timeout)
break;
}
if (strlen($arMessage)> 0)
{
$state = Array(
"MESSAGE" => $arMessage,
"STATUS" => false
//.........这里部分代码省略.........
示例4: CheckKernel
function CheckKernel($arParams)
{
$time_start = time();
global $DB;
$arCompare = array("install/components/bitrix/" => "/bitrix/components/bitrix/", "install/js/" => "/bitrix/js/", "install/activities/" => "/bitrix/activities/", "install/admin/" => "/bitrix/admin/", "install/wizards/" => "/bitrix/wizards/");
if (!$_SESSION["BX_CHECKLIST"][$arParams["TEST_ID"]]) {
$_SESSION["BX_CHECKLIST"][$arParams["TEST_ID"]] = array();
}
$NS =& $_SESSION["BX_CHECKLIST"][$arParams["TEST_ID"]];
if ($arParams["STEP"] == false) {
$NS = array();
$rsInstalledModules = CModule::GetList();
while ($ar = $rsInstalledModules->Fetch()) {
if (!strpos($ar["ID"], ".")) {
$NS["MLIST"][] = $ar["ID"];
}
}
$NS["MNUM"] = 0;
$NS["FILE_LIST"] = array();
$NS["FILES_COUNT"] = 0;
$NS["MODFILES_COUNT"] = 0;
}
$arError = false;
$module_id = $NS["MLIST"][$NS["MNUM"]];
$module_folder = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/" . $module_id . "/";
$dbtype = strtolower($DB->type);
if ($module_id == "main") {
$ver = SM_VERSION;
} else {
$arModuleVersion = array();
@(include $module_folder . "install/version.php");
$ver = $arModuleVersion["VERSION"];
}
$arFilesCount = 0;
$arModifiedFilesCount = 0;
$state = array();
$Skip = false;
if (!$ver) {
$state = array("STATUS" => false, "MESSAGE" => GetMessage("CL_MODULE_VERSION_ERROR", array("#module_id#" => $module_id)) . "\n");
$arError = true;
} else {
if (count($NS["FILE_LIST"]) == 0) {
$sHost = COption::GetOptionString("main", "update_site", "www.bitrixsoft.com");
$proxyAddr = COption::GetOptionString("main", "update_site_proxy_addr", "");
$proxyPort = COption::GetOptionString("main", "update_site_proxy_port", "");
$proxyUserName = COption::GetOptionString("main", "update_site_proxy_user", "");
$proxyPassword = COption::GetOptionString("main", "update_site_proxy_pass", "");
$http = new \Bitrix\Main\Web\HttpClient();
$http->setProxy($proxyAddr, $proxyPort, $proxyUserName, $proxyPassword);
$data = $http->get("http://" . $sHost . "/bitrix/updates/checksum.php?check_sum=Y&module_id=" . $module_id . "&ver=" . $ver . "&dbtype=" . $dbtype . "&mode=2");
$NS["FILE_LIST"] = $result = unserialize(gzinflate($data));
$NS["MODULE_FILES_COUNT"] = count($NS["FILE_LIST"]);
} else {
$result = $NS["FILE_LIST"];
}
$arMessage = "";
$timeout = COption::GetOptionString("main", "update_load_timeout", "30");
if (is_array($result) && !$result["error"]) {
foreach ($result as $file => $checksum) {
$arFile = $module_folder . $file;
unset($NS["FILE_LIST"][$file]);
if (!file_exists($arFile)) {
continue;
}
$arFilesCount++;
if (md5_file($arFile) != $checksum) {
$arMessage .= str_replace(array("//", "\\\\"), array("/", "\\"), $arFile) . "\n";
$arModifiedFilesCount++;
}
$arTmpCompare = $arCompare;
foreach ($arTmpCompare as $key => $value) {
if (strpos($file, $key) === 0) {
$arFile = str_replace($key, $_SERVER["DOCUMENT_ROOT"] . $value, $file);
if (!file_exists($arFile) || md5_file($arFile) != $checksum) {
$arModifiedFilesCount++;
$arMessage .= str_replace(array("//", "\\\\"), array("/", "\\"), $arFile) . "\n";
}
$arFilesCount++;
}
}
if (time() - $time_start >= $timeout) {
break;
}
}
if (strlen($arMessage) > 0) {
$state = array("MESSAGE" => $arMessage, "STATUS" => false);
}
} else {
if ($result["error"] != "unknow module id") {
$state["MESSAGE"] = GetMessage("CL_CANT_CHECK", array("#module_id#" => $module_id)) . "\n";
$arError = true;
} else {
$Skip = true;
}
}
}
if ($state["MESSAGE"]) {
$NS["MESSAGE"][$module_id] .= $state["MESSAGE"];
}
if (!$arError && !$Skip) {
//.........这里部分代码省略.........
示例5: ClearVars
ClearVars();
if (!$USER->CanDoOperation('view_groups')) {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
IncludeModuleLangFile(__FILE__);
$modules = COperation::GetAllowedModules();
for ($i = 0, $l = count($modules); $i < $l; $i++) {
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/" . $modules[$i] . "/admin/task_description.php");
}
$strError = "";
$ID = intval($_REQUEST["ID"]);
$COPY_ID = intval($_REQUEST["COPY_ID"]);
if ($COPY_ID > 0) {
$ID = $COPY_ID;
}
$modules = CModule::GetList();
$arModules = array();
while ($mr = $modules->Fetch()) {
$arModules[] = $mr["ID"];
}
$arSites = array();
$rsSites = CSite::GetList($by = "sort", $order = "asc", array("ACTIVE" => "Y"));
while ($arSite = $rsSites->GetNext()) {
$arSites["reference_id"][] = $arSite["ID"];
$arSites["reference"][] = "[" . $arSite["ID"] . "] " . $arSite["NAME"];
}
$USER_COUNT = CUser::GetCount();
$USER_COUNT_MAX = 25;
$arBXGroupPolicy = array("parent" => array("SESSION_TIMEOUT" => "", "SESSION_IP_MASK" => "", "MAX_STORE_NUM" => "", "STORE_IP_MASK" => "", "STORE_TIMEOUT" => "", "CHECKWORD_TIMEOUT" => "", "PASSWORD_LENGTH" => "", "PASSWORD_UPPERCASE" => "N", "PASSWORD_LOWERCASE" => "N", "PASSWORD_DIGITS" => "N", "PASSWORD_PUNCTUATION" => "N", "LOGIN_ATTEMPTS" => ""), "low" => array("SESSION_TIMEOUT" => 30, "SESSION_IP_MASK" => "0.0.0.0", "MAX_STORE_NUM" => 20, "STORE_IP_MASK" => "255.0.0.0", "STORE_TIMEOUT" => 60 * 24 * 93, "CHECKWORD_TIMEOUT" => 60 * 24 * 185, "PASSWORD_LENGTH" => 6, "PASSWORD_UPPERCASE" => "N", "PASSWORD_LOWERCASE" => "N", "PASSWORD_DIGITS" => "N", "PASSWORD_PUNCTUATION" => "N", "LOGIN_ATTEMPTS" => 0), "middle" => array("SESSION_TIMEOUT" => 20, "SESSION_IP_MASK" => "255.255.0.0", "MAX_STORE_NUM" => 10, "STORE_IP_MASK" => "255.255.0.0", "STORE_TIMEOUT" => 60 * 24 * 30, "CHECKWORD_TIMEOUT" => 60 * 24 * 1, "PASSWORD_LENGTH" => 8, "PASSWORD_UPPERCASE" => "Y", "PASSWORD_LOWERCASE" => "Y", "PASSWORD_DIGITS" => "Y", "PASSWORD_PUNCTUATION" => "N", "LOGIN_ATTEMPTS" => 0), "high" => array("SESSION_TIMEOUT" => 15, "SESSION_IP_MASK" => "255.255.255.255", "MAX_STORE_NUM" => 1, "STORE_IP_MASK" => "255.255.255.255", "STORE_TIMEOUT" => 60 * 24 * 3, "CHECKWORD_TIMEOUT" => 60, "PASSWORD_LENGTH" => 10, "PASSWORD_UPPERCASE" => "Y", "PASSWORD_LOWERCASE" => "Y", "PASSWORD_DIGITS" => "Y", "PASSWORD_PUNCTUATION" => "Y", "LOGIN_ATTEMPTS" => 3));
$BX_GROUP_POLICY_CONTROLS = array("SESSION_TIMEOUT" => array("text", 5), "SESSION_IP_MASK" => array("text", 20), "MAX_STORE_NUM" => array("text", 5), "STORE_IP_MASK" => array("text", 20), "STORE_TIMEOUT" => array("text", 5), "CHECKWORD_TIMEOUT" => array("text", 5), "PASSWORD_LENGTH" => array("text", 5), "PASSWORD_UPPERCASE" => array("checkbox", "Y"), "PASSWORD_LOWERCASE" => array("checkbox", "Y"), "PASSWORD_DIGITS" => array("checkbox", "Y"), "PASSWORD_PUNCTUATION" => array("checkbox", "Y"), "LOGIN_ATTEMPTS" => array("text", 5));
$aTabs = array(array("DIV" => "edit1", "TAB" => GetMessage("MAIN_TAB"), "ICON" => "group_edit", "TITLE" => GetMessage("MAIN_TAB_TITLE")), array("DIV" => "edit2", "TAB" => GetMessage("TAB_2"), "ICON" => "group_edit", "TITLE" => GetMessage('MUG_POLICY_TITLE')));
示例6: GetMessage
}
?>
</table>
<?
}
$viewTabControl->End();
}
else
echo GetMessage('RATING_NOT_AVAILABLE');
?>
</td>
</tr>
<?
$tabControl->EndCustomField("RATING_BOX");
$db_opt_res = CModule::GetList();
while ($opt_res = $db_opt_res->Fetch())
{
$mdir = $opt_res["ID"];
if (file_exists($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/".$mdir) && is_dir($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/".$mdir))
{
$ofile = $_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/".$mdir."/options_user_settings.php";
if (file_exists($ofile))
{
$mname = str_replace(".", "_", $mdir);
$tabControl->BeginNextFormTab();
$tabControl->BeginCustomField("MODULE_TAB_".$mname, GetMessage($mname."_TAB"));
include($ofile);
$tabControl->EndCustomField("MODULE_TAB_".$mname);
}
}