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


PHP CSite::GetTemplateList方法代码示例

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


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

示例1: InstallFiles

 function InstallFiles()
 {
     if ($_ENV['COMPUTERNAME'] != 'BX') {
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/js", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js", true, true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
         CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/im/install/activities', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/activities', true, true);
         CopyDirFiles($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/im/install/admin', $_SERVER['DOCUMENT_ROOT'] . '/bitrix/admin', true, true);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/templates", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates", True, True);
         CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/im/install/public", $_SERVER["DOCUMENT_ROOT"] . "/", True, True);
         $default_site_id = CSite::GetDefSite();
         if ($default_site_id) {
             $arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('/desktop_app/')", "TEMPLATE" => "desktop_app");
             $arFields = array("TEMPLATE" => array());
             $dbTemplates = CSite::GetTemplateList($default_site_id);
             $desktopAppFound = false;
             while ($template = $dbTemplates->Fetch()) {
                 if ($template["TEMPLATE"] == "desktop_app") {
                     $desktopAppFound = true;
                     $template = $arAppTempalate;
                 }
                 $arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
             }
             if (!$desktopAppFound) {
                 $arFields["TEMPLATE"][] = $arAppTempalate;
             }
             $obSite = new CSite();
             $arFields["LID"] = $default_site_id;
             $obSite->Update($default_site_id, $arFields);
         }
         $GLOBALS["APPLICATION"]->SetFileAccessPermission('/desktop_app/', array("*" => "R"));
     }
     return true;
 }
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:33,代码来源:index.php

示例2: InstallFiles

 function InstallFiles($site_dir = "/", $default_site_id = false)
 {
     CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/eshopapp/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
     CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/eshopapp/install/templates/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/", true, true);
     if (!$default_site_id) {
         $default_site_id = CSite::GetDefSite();
     }
     if ($default_site_id) {
         $arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('" . $site_dir . "eshop_app/')", "TEMPLATE" => "eshop_app");
         $arFields = array("TEMPLATE" => array());
         $dbTemplates = CSite::GetTemplateList($default_site_id);
         $eshopAppFound = false;
         while ($template = $dbTemplates->Fetch()) {
             if ($template["TEMPLATE"] == "eshop_app") {
                 $eshopAppFound = true;
                 $template = $arAppTempalate;
             }
             $arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
         }
         if (!$eshopAppFound) {
             $arFields["TEMPLATE"][] = $arAppTempalate;
         }
         $obSite = new CSite();
         $arFields["LID"] = $default_site_id;
         $obSite->Update($default_site_id, $arFields);
     }
     return true;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:28,代码来源:index.php

示例3: InstallFiles

 function InstallFiles()
 {
     CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/public/mobile/", $_SERVER["DOCUMENT_ROOT"] . "/mobile/", True, True);
     CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/install/templates/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/", True, True);
     CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/mobile/install/components/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", true, true);
     $default_site_id = CSite::GetDefSite();
     if ($default_site_id) {
         $arAppTempalate = array("SORT" => 1, "CONDITION" => "CSite::InDir('/mobile/')", "TEMPLATE" => "mobile_app");
         $arFields = array("TEMPLATE" => array());
         $dbTemplates = CSite::GetTemplateList($default_site_id);
         $mobileAppFound = false;
         while ($template = $dbTemplates->Fetch()) {
             if ($template["TEMPLATE"] == "mobile_app") {
                 $mobileAppFound = true;
                 $template = $arAppTempalate;
             }
             $arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
         }
         if (!$mobileAppFound) {
             $arFields["TEMPLATE"][] = $arAppTempalate;
         }
         $obSite = new CSite();
         $arFields["LID"] = $default_site_id;
         $obSite->Update($default_site_id, $arFields);
     }
     CUrlRewriter::ReindexFile("/mobile/webdav/index.php");
     CUrlRewriter::ReindexFile("/mobile/disk/index.php");
     CUrlRewriter::Add(array("CONDITION" => "#^/mobile/disk/(?<hash>[0-9]+)/download#", "RULE" => "download=1&objectId=\$1", "ID" => "bitrix:mobile.disk.file.detail", "PATH" => "/mobile/disk/index.php"));
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:30,代码来源:index.php

示例4: GetMessageJS

        echo GetMessageJS("FORM_FIELD_MULTIPLE_WARNING");
        ?>
'
}
</script><script src="/bitrix/js/form/form_taskbar.js?<?php 
        echo @filemtime($_SERVER['DOCUMENT_ROOT'] . '/bitrix/js/form/form_taskbar.js');
        ?>
"></script>
	<tr>
		<td colspan="2"><div id="form_tpl_editor" style="display: <?php 
        echo $str_USE_DEFAULT_TEMPLATE == "Y" ? "none" : "block";
        ?>
;">
<?php 
        $site = is_array($arSITE) ? $arSITE[0] : LANG;
        $arTplList = CSite::GetTemplateList($site);
        $tpl = "";
        while ($ar = $arTplList->Fetch()) {
            if (strlen($tpl) == 0) {
                $tpl = $ar["TEMPLATE"];
            }
            if (strlen(trim($ar["CONDITION"])) == 0) {
                $tpl = $ar["TEMPLATE"];
                break;
            }
        }
        CFileMan::ShowHTMLEditControl("FORM_TEMPLATE", htmlspecialcharsback($str_FORM_TEMPLATE), array("site" => $arSITE[0], "templateID" => $tpl, "bUseOnlyDefinedStyles" => COption::GetOptionString("fileman", "show_untitled_styles", "N") != "Y", "bWithoutPHP" => false, "arToolbars" => array("standart", "style", "formating", "source", "template", "table"), "arTaskbars" => array("BXFormElementsTaskbar", "BXPropertiesTaskbar"), "toolbarConfig" => CFileman::GetEditorToolbarConfig("form_edit" . (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? "_public" : "")), "sBackUrl" => "", "fullscreen" => false, 'width' => '100%', 'height' => '500', 'use_editor_3' => 'N'));
        ?>
<script>
oBXEditorUtils.addPHPParser(oForm.PHPParser);
oBXEditorUtils.addTaskBar('BXFormElementsTaskbar', 2, "<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:form_edit.php

示例5: __InstallTemplate

	function __InstallTemplate($templateID)
	{
		if (!array_key_exists($templateID, $this->arTemplates))
			return;

		//Copy template
		$canCopyTemplate = !(
			file_exists($_SERVER["DOCUMENT_ROOT"].FX_PERSONAL_ROOT."/templates/".$templateID) &&
			isset($this->arTemplates[$templateID]["REWRITE"]) && $this->arTemplates[$templateID]["REWRITE"] == "N"
		);

		//If the main module was not included
		global $DB, $DBType, $APPLICATION, $USER;
		require_once($_SERVER['DOCUMENT_ROOT']."/freetrix/modules/main/include.php");

		if ($canCopyTemplate)
		{
			CopyDirFiles(
				$_SERVER["DOCUMENT_ROOT"].$this->__GetTemplatesPath()."/".$templateID,
				$_SERVER["DOCUMENT_ROOT"].FX_PERSONAL_ROOT."/templates/".$templateID,
				$rewrite = true,
				$recursive = true
			);
		}

		//Attach template to default site
		$obSite = CSite::GetList($by = "def", $order = "desc", Array("ACTIVE" => "Y"));
		if ($arSite = $obSite->Fetch())
		{
			$arTemplates = Array();
			$found = false;
			$obTemplate = CSite::GetTemplateList($arSite["LID"]);
			while($arTemplate = $obTemplate->Fetch())
			{
				if(!$found && strlen(Trim($arTemplate["CONDITION"]))<=0)
				{
					$arTemplate["TEMPLATE"] = $templateID;
					$found = true;
				}
				$arTemplates[]= $arTemplate;
			}

			if (!$found)
				$arTemplates[]= Array("CONDITION" => "", "SORT" => 150, "TEMPLATE" => $templateID);

			$arFields = Array(
				"TEMPLATE" => $arTemplates,
				"NAME" => $arSite["NAME"],
			);

			$obSite = new CSite();
			$obSite->Update($arSite["LID"], $arFields);
		}

		//Copy files
		$this->__MoveDirFiles($this->arTemplates[$templateID]);
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:57,代码来源:wizard_site.php

示例6: GetAllTemplateParams

 function GetAllTemplateParams($templateID, $site, $findcomponent = true, $arAdditionalParams = array())
 {
     global $APPLICATION;
     $db_templ = CSiteTemplate::GetByID($templateID);
     if (!($ar_templ = $db_templ->Fetch())) {
         $templateID = "";
         $db_site_templ = CSite::GetTemplateList($site);
         while ($ar_site_templ = $db_site_templ->Fetch()) {
             if (strlen($ar_site_templ["CONDITION"]) <= 0) {
                 $templateID = $ar_site_templ["TEMPLATE"];
                 break;
             }
         }
         if (strlen($templateID) > 0) {
             $db_templ = CSiteTemplate::GetByID($templateID);
             $ar_templ = $db_templ->Fetch();
         }
     }
     if ($ar_templ) {
         $arResult = array("ID" => $ar_templ["ID"], "NAME" => $ar_templ["NAME"]);
         if (is_set($ar_templ, "STYLES")) {
             // Fetch @import and include it to CSS - will include css from comments also :(.
             $pattern = '/^@import(.*)$/im';
             $matches = array();
             if (preg_match_all($pattern, $ar_templ["STYLES"], $matches)) {
                 for ($j = 0, $l = count($matches[0]); $j < $l; $j++) {
                     $str = $matches[0][$j];
                     $url = trim(trim($matches[1][$j]), '"\';');
                     $css = "";
                     if (substr($url, -5) != 'print') {
                         $url = trim(trim($url), ' "\';');
                         if (substr($url, 0, 4) == 'url(' && substr($url, -1) == ')') {
                             $url = trim(substr($url, 4, -1), ' "\'');
                         }
                         $url = trim(trim($url), '\'";');
                         if (substr($url, 0, 1) != '/' && file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $ar_templ["ID"] . "/" . $url)) {
                             $css = "\n" . $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $ar_templ["ID"] . "/" . $url) . "\n";
                         } else {
                             if (file_exists($_SERVER["DOCUMENT_ROOT"] . $url)) {
                                 $css = "\n" . $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . $url) . "\n";
                             }
                         }
                     }
                     $ar_templ["STYLES"] = str_replace($matches[0][$j], $css, $ar_templ["STYLES"]);
                 }
             }
             $arResult["STYLES"] = $ar_templ["STYLES"];
             $arResult["STYLES_TITLE"] = $ar_templ["STYLES_TITLE"];
             $arResult["EDITOR_STYLES"] = $ar_templ["EDITOR_STYLES"];
         }
     } else {
         $arResult = array("ID" => ".default", "NAME" => GetMessage("FILEMAN_DDEF_TEMPLATE"));
         $templateID = "";
     }
     if (!is_set($arResult, "STYLES") || $arResult["STYLES"] == false) {
         if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/" . (strlen($site) <= 0 ? LANGUAGE_ID : $site) . "/styles.css")) {
             $arResult["STYLES"] = $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/" . (strlen($site) <= 0 ? LANGUAGE_ID : $site) . "/styles.css");
             $arResult["STYLES_TITLE"] = CSiteTemplate::__GetByStylesTitle($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/" . (strlen($site) <= 0 ? LANGUAGE_ID : $site) . "/.styles.php");
         } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/styles.css")) {
             $arResult["STYLES"] = $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/styles.css");
             $arResult["STYLES_TITLE"] = CSiteTemplate::__GetByStylesTitle($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/.styles.php");
         } else {
             $arResult["STYLES"] = $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/styles.css");
             $arResult["STYLES_TITLE"] = CSiteTemplate::__GetByStylesTitle($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/.styles.php");
         }
     }
     if (isset($arAdditionalParams['additionalCSS'])) {
         $additionalCSS = $arAdditionalParams['additionalCSS'];
         for ($i = 0, $l = count($additionalCSS); $i < $l; $i++) {
             $css_file_path = $additionalCSS[$i];
             $arResult["STYLES"] .= "\r\n" . $APPLICATION->GetFileContent($css_file_path);
         }
     }
     if (strlen($templateID) > 0 && file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $templateID . "/editor.css")) {
         $arResult["STYLES"] .= "\r\n" . $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $templateID . "/editor.css");
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/editor.css")) {
         $arResult["STYLES"] .= "\r\n" . $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/editor.css");
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/" . $site . "/editor.css")) {
         $arResult["STYLES"] .= "\r\n" . $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/" . (strlen($site) <= 0 ? LANGUAGE_ID : $site) . "/editor.css");
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/editor.css")) {
         $arResult["STYLES"] .= "\r\n" . $APPLICATION->GetFileContent($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/php_interface/editor.css");
     }
     $arResult["STYLES"] = preg_replace("/\r\n/", " ", $arResult["STYLES"]);
     $arResult["STYLES"] = preg_replace("/\n/", " ", $arResult["STYLES"]);
     $arResult["SITE_TEMPLATE_PATH"] = getLocalPath('templates/' . $templateID, BX_PERSONAL_ROOT);
     return $arResult;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:87,代码来源:fileman.php

示例7: array

if (IsModuleInstalled('intranet')) {
    $arComponentParameters["PARAMETERS"]["PATH_TO_CONPANY_DEPARTMENT"] = array("NAME" => GetMessage("SONET_PATH_TO_CONPANY_DEPARTMENT"), "DEFAULT" => "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#", "PARENT" => "URL_TEMPLATES");
}
$arSMThemesMessages = array("grey" => GetMessage("SONET_SM_THEME_GREY"), "red" => GetMessage("SONET_SM_THEME_RED"), "green" => GetMessage("SONET_SM_THEME_GREEN"), "blue" => GetMessage("SONET_SM_THEME_BLUE"), "lightblue" => GetMessage("SONET_SM_THEME_LIGHTBLUE"), "brown" => GetMessage("SONET_SM_THEME_BROWN"));
$arSMThemes = array();
$dir = trim(preg_replace("'[\\\\/]+'", "/", $_SERVER['DOCUMENT_ROOT'] . "/bitrix/components/bitrix/socialnetwork.menu/templates/.default/themes/"));
if (is_dir($dir) && ($directory = opendir($dir))) {
    while (($file = readdir($directory)) !== false) {
        if ($file != "." && $file != ".." && is_dir($dir . $file)) {
            $arSMThemes[$file] = !empty($arSMThemesMessages[$file]) ? $arSMThemesMessages[$file] : strtoupper(substr($file, 0, 1)) . strtolower(substr($file, 1));
        }
    }
    closedir($directory);
}
$tmp_site = $_REQUEST["site"] != '' ? $_REQUEST["site"] : ($_REQUEST["src_site"] != '' ? $_REQUEST["src_site"] : false);
$dbSiteRes = CSite::GetTemplateList($tmp_site);
while ($arSiteRes = $dbSiteRes->Fetch()) {
    if (empty($arSiteRes["CONDITION"])) {
        $site_template = $arSiteRes["TEMPLATE"];
        break;
    }
}
if (strpos($site_template, "bright") === 0) {
    $DefaultSMTheme = "grey";
} else {
    if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite($tmp_site)) {
        $theme_id = COption::GetOptionString("main", "wizard_" . $site_template . "_theme_id_extranet");
    } else {
        $theme_id = COption::GetOptionString("main", "wizard_" . $site_template . "_theme_id");
    }
    if (strlen($theme_id) > 0) {
开发者ID:vim84,项目名称:b-markt,代码行数:31,代码来源:.parameters.php

示例8: InstallService

 function InstallService($serviceID, $serviceStage)
 {
     $wizard =& $this->GetWizard();
     $siteID = COption::GetOptionString("main", "wizard_site_code_extranet");
     $siteFolder = COption::GetOptionString("main", "wizard_site_folder_extranet");
     $siteName = COption::GetOptionString("main", "wizard_site_name_extranet");
     if (COption::GetOptionString("main", "wizard_extranet_rerun") == "Y") {
         define("WIZARD_IS_RERUN", true);
     }
     if (WIZARD_IS_RERUN === true) {
         $rsSites = CSite::GetByID(COption::GetOptionString("extranet", "extranet_site"));
         if ($arSite = $rsSites->Fetch()) {
             define("WIZARD_SITE_ID", $arSite["ID"]);
             define("WIZARD_SITE_DIR", $arSite["DIR"]);
             define("WIZARD_SITE_NAME", $siteName);
             define("WIZARD_SITE_PATH", $_SERVER["DOCUMENT_ROOT"] . $arSite["DIR"]);
             $bFound = true;
         }
     }
     if (!$bFound) {
         define("WIZARD_SITE_ID", $siteID);
         define("WIZARD_SITE_DIR", $siteFolder);
         define("WIZARD_SITE_NAME", $siteName);
         define("WIZARD_SITE_PATH", $_SERVER["DOCUMENT_ROOT"] . $siteFolder);
     }
     $wizardPath = $wizard->GetPath();
     define("WIZARD_RELATIVE_PATH", $wizardPath);
     define("WIZARD_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . $wizardPath);
     $templatesPath = "";
     $templatesPath = CExtranetWizardServices::GetTemplatesPath(WIZARD_RELATIVE_PATH . "/site");
     $arTemplates = CExtranetWizardServices::GetTemplates($templatesPath);
     $templateID = $wizard->GetVar("templateID");
     if ($templateID == "current_intranet_template") {
         $rsDefSiteTemplates = CSite::GetTemplateList(CSite::GetDefSite());
         while ($arDefSiteTemplates = $rsDefSiteTemplates->Fetch()) {
             if ($arDefSiteTemplates["CONDITION"] == "") {
                 $templateID = $arDefSiteTemplates["TEMPLATE"];
                 break;
             }
         }
     }
     define("WIZARD_TEMPLATE_ID", $templateID);
     if (in_array($templateID, array("bright_extranet", "classic_extranet", "modern_extranet"))) {
         define("WIZARD_TEMPLATE_RELATIVE_PATH", $templatesPath . "/" . WIZARD_TEMPLATE_ID);
         define("WIZARD_TEMPLATE_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . WIZARD_TEMPLATE_RELATIVE_PATH);
         $themeID = $wizard->GetVar($templateID . "_themeID");
         $arThemes = CExtranetWizardServices::GetThemes(WIZARD_TEMPLATE_RELATIVE_PATH . "/themes");
         define("WIZARD_THEME_ID", $themeID);
         define("WIZARD_THEME_RELATIVE_PATH", WIZARD_TEMPLATE_RELATIVE_PATH . "/themes/" . WIZARD_THEME_ID);
         define("WIZARD_THEME_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . WIZARD_THEME_RELATIVE_PATH);
     }
     $servicePath = WIZARD_RELATIVE_PATH . "/site/services/" . $serviceID;
     define("WIZARD_SERVICE_RELATIVE_PATH", $servicePath);
     define("WIZARD_SERVICE_ABSOLUTE_PATH", $_SERVER["DOCUMENT_ROOT"] . $servicePath);
     $b24ToCp = file_exists(WIZARD_SITE_PATH . ".superleft.menu.php") ? true : false;
     define("WIZARD_B24_TO_CP", $b24ToCp);
     define("WIZARD_SITE_LOGO", intval($wizard->GetVar("siteLogo")));
     if (!file_exists(WIZARD_SERVICE_ABSOLUTE_PATH . "/" . $serviceStage)) {
         return false;
     }
     if (LANGUAGE_ID != "en" && LANGUAGE_ID != "ru") {
         if (file_exists(WIZARD_SERVICE_ABSOLUTE_PATH . "/lang/en/" . $serviceStage)) {
             __IncludeLang(WIZARD_SERVICE_ABSOLUTE_PATH . "/lang/en/" . $serviceStage);
         }
     }
     $dbGroups = CGroup::GetList($by = "id", $order = "asc", array("ACTIVE" => "Y"));
     while ($arGroup = $dbGroups->Fetch()) {
         define("WIZARD_" . $arGroup["STRING_ID"] . "_GROUP", $arGroup["ID"]);
     }
     if (file_exists(WIZARD_SERVICE_ABSOLUTE_PATH . "/lang/" . LANGUAGE_ID . "/" . $serviceStage)) {
         __IncludeLang(WIZARD_SERVICE_ABSOLUTE_PATH . "/lang/" . LANGUAGE_ID . "/" . $serviceStage);
     }
     @set_time_limit(3600);
     global $DB, $DBType, $APPLICATION, $USER, $CACHE_MANAGER;
     include WIZARD_SERVICE_ABSOLUTE_PATH . "/" . $serviceStage;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:76,代码来源:wizard.php

示例9: array

        return;
    }
    $success = $package->ImportPackage();
    if ($success) {
        $dbResult = CCourse::GetList(array(), array("CODE" => "BX-ADM001"));
        $arCourse = $dbResult->Fetch();
    }
}
if (isset($arCourse["ID"])) {
    CCourse::SetPermission($arCourse["ID"], array("2" => "R"));
}
//Public files
CopyDirFiles($pathToService . "/" . LANGUAGE_ID . "/public", $_SERVER["DOCUMENT_ROOT"] . "/communication/learning", $rewrite = false, $recursive = true);
//Left menu
DemoSiteUtil::AddMenuItem("/communication/.left.menu.php", array(GetMessage("SERVICE_LEARNING"), "/communication/learning/", array(), array(), ""));
//Template
CopyDirFiles($pathToService . "/" . LANGUAGE_ID . "/template", $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/learning", $rewrite = true, $recursive = true);
$obSite = CSite::GetByID("s1");
if (!($arSite = $obSite->Fetch())) {
    return;
}
$arTemplates = array();
$obTemplate = CSite::GetTemplateList("s1");
while ($arTemplate = $obTemplate->Fetch()) {
    $arTemplates[] = $arTemplate;
}
$arTemplates[] = array("CONDITION" => "CSite::InDir('/communication/learning/course/')", "SORT" => 150, "TEMPLATE" => "learning");
$obSite = new CSite();
$obSite->Update("s1", array("TEMPLATE" => $arTemplates, "NAME" => $arSite["NAME"]));
//Communication section
include dirname(__FILE__) . "/../communication/install.php";
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:index.php

示例10: Init


//.........这里部分代码省略.........
				$siteId = CSite::GetDefSite();
			}
		}

		$templateId = null;
		if (isset($arParams['templateId']))
		{
			$templateId = $arParams['templateId'];
		}
		elseif (defined(SITE_TEMPLATE_ID))
		{
			$templateId = SITE_TEMPLATE_ID;
		}

		if ($arParams["bbCode"])
		{
			$arTemplates = array();
			$arSnippets = array();
			$templateParams = array();
		}
		else
		{
			if (isset($arParams['arTemplates']))
			{
				$arTemplates = $arParams['arTemplates'];
			}
			else
			{
				$arTemplates = self::GetSiteTemplates();
			}

			if (!isset($templateId) && isset($siteId))
			{
				$dbSiteRes = CSite::GetTemplateList($siteId);
				$first = false;
				while($arSiteRes = $dbSiteRes->Fetch())
				{
					if (!$first)
					{
						$first = $arSiteRes['TEMPLATE'];
					}
					if ($arSiteRes['CONDITION'] == "")
					{
						$templateId = $arSiteRes['TEMPLATE'];
						break;
					}
				}

				if (!isset($templateId))
				{
					$templateId = $first;
				}
			}

			$arSnippets = array($templateId => self::GetSnippets($templateId));
			$templateParams = self::GetSiteTemplateParams($templateId, $siteId);
		}

		$userSettings = array(
			'view' => isset($arParams["view"]) ? $arParams["view"] : 'wysiwyg',
			'split_vertical' => 0,
			'split_ratio' => 1,
			'taskbar_shown' => 0,
			'taskbar_width' => 250,
			'specialchars' => false,
			'clean_empty_spans' => 'Y'
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:67,代码来源:html_editor.php

示例11: isset

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule("socialnetwork")) {
    return false;
}
$site_dir = "/";
$tmp_site_id = isset($_REQUEST["site"]) && is_string($_REQUEST["site"]) ? trim($_REQUEST["site"]) : (isset($_REQUEST["src_site"]) && is_string($_REQUEST["src_site"]) ? trim($_REQUEST["src_site"]) : false);
if ($tmp_site_id) {
    $tmp_site_id = substr(preg_replace("/[^a-z0-9_]/i", "", $tmp_site_id), 0, 2);
    $dbSite = CSite::GetByID($tmp_site_id);
    if ($arSite = $dbSite->Fetch()) {
        $site_dir = strlen($arSite["DIR"]) > 0 ? trim($arSite["DIR"]) : "/";
    }
    $dbSiteTemplate = CSite::GetTemplateList($tmp_site_id);
    while ($arSiteTemplate = $dbSiteTemplate->Fetch()) {
        if (empty($arSiteTemplate["CONDITION"])) {
            $site_template = $arSiteTemplate["TEMPLATE"];
            break;
        }
    }
}
$arRes = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("USER", 0, LANGUAGE_ID);
$userProp = array();
if (!empty($arRes)) {
    foreach ($arRes as $key => $val) {
        $userProp[$val["FIELD_NAME"]] = strLen($val["EDIT_FORM_LABEL"]) > 0 ? $val["EDIT_FORM_LABEL"] : $val["FIELD_NAME"];
    }
}
$userPropEdit = $userProp1 = CSocNetUser::GetFields(true);
开发者ID:webgksupport,项目名称:alpina,代码行数:30,代码来源:.parameters.php

示例12: GetMessage

</td>
				<td align="center"><?php 
echo GetMessage("MAIN_SITE_EDIT_SORT");
?>
</td>
				<td align="center"><?php 
echo GetMessage("MAIN_SITE_EDIT_TYPE");
?>
</td>
				<td align="center"><?php 
echo GetMessage("MAIN_SITE_EDIT_COND");
?>
</td>
			</tr>
			<?php 
$dbSiteRes = CSite::GetTemplateList($LID);
if (!$bVarsFromForm) {
    $SITE_TEMPLATE = array();
    $max_sort = 0;
    while ($arSiteRes = $dbSiteRes->Fetch()) {
        $SITE_TEMPLATE[$arSiteRes["ID"]] = $arSiteRes;
        if ($max_sort < $arSiteRes["SORT"]) {
            $max_sort = $arSiteRes["SORT"];
        }
    }
    for ($i = 0; $i < 3; $i++) {
        $SITE_TEMPLATE["N" . $i] = array("SORT" => $max_sort + 1 + $i);
    }
} else {
    $SITE_TEMPLATE = array();
    foreach ($_POST["SITE_TEMPLATE"] as $key => $val) {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:site_edit.php

示例13: md5

							$new_name = md5(uniqid(rand()));
							rename($_SERVER["DOCUMENT_ROOT"].FX_PERSONAL_ROOT."/templates/".$ID."/".$file, $_SERVER["DOCUMENT_ROOT"].FX_PERSONAL_ROOT."/templates/".$ID."/".$new_name);
							CopyDirFiles($_SERVER["DOCUMENT_ROOT"].FX_PERSONAL_ROOT."/templates/".$ID."/".$new_name, $_SERVER["DOCUMENT_ROOT"].FX_PERSONAL_ROOT."/templates/".$ID, true, true, true);
							break;
						}
						closedir($dh);
					}

					$SITE_ID = $_POST["SITE_ID"];
					if(strlen($SITE_ID)>0 && $SITE_ID!="NOT_REF")
					{
						$db_site = CSite::GetByID($SITE_ID);
						if($ar_site = $db_site->Fetch())
						{
							$arTemplates = Array();
							$dbSiteRes = CSite::GetTemplateList($SITE_ID);
							$bW = false;
							while($v = $dbSiteRes->Fetch())
							{
								if(!$bW && strlen(Trim($v["CONDITION"]))<=0)
								{
									$v["TEMPLATE"] = $ID;
									$bW = true;
								}
								$arTemplates[]= $v;
							}

							if(!$bW)
								$arTemplates[]= Array('CONDITION' => '', 'SORT' => 150, 'TEMPLATE' => $ID);

							$arFields = array(
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:template_load.php

示例14: Init


//.........这里部分代码省略.........
            $siteId = $arParams['siteId'];
            $res = CSite::GetByID($siteId);
            if (!$res->Fetch()) {
                $siteId = CSite::GetDefSite();
            }
        }
        if (!isset($siteId) && defined(SITE_ID)) {
            $siteId = SITE_ID;
            $res = CSite::GetByID($siteId);
            if (!$res->Fetch()) {
                $siteId = CSite::GetDefSite();
            }
        }
        $templateId = null;
        if (isset($arParams['templateId'])) {
            $templateId = $arParams['templateId'];
        } elseif (defined('SITE_TEMPLATE_ID')) {
            $templateId = SITE_TEMPLATE_ID;
        }
        if (!isset($templateId) && isset($_GET['siteTemplateId'])) {
            $templateId = $_GET['siteTemplateId'];
        }
        if ($arParams["bbCode"]) {
            $arTemplates = array();
            $arSnippets = array();
            $templateParams = array();
        } else {
            if (isset($arParams['arTemplates'])) {
                $arTemplates = $arParams['arTemplates'];
            } else {
                $arTemplates = self::GetSiteTemplates();
            }
            if (!isset($templateId) && isset($siteId)) {
                $dbSiteRes = CSite::GetTemplateList($siteId);
                $first = false;
                while ($arSiteRes = $dbSiteRes->Fetch()) {
                    if (!$first) {
                        $first = $arSiteRes['TEMPLATE'];
                    }
                    if ($arSiteRes['CONDITION'] == "") {
                        $templateId = $arSiteRes['TEMPLATE'];
                        break;
                    }
                }
                if (!isset($templateId)) {
                    $templateId = $first ? $first : '';
                }
            }
            $arSnippets = array($templateId => self::GetSnippets($templateId));
            $templateParams = self::GetSiteTemplateParams($templateId, $siteId);
        }
        $userSettings = array('view' => isset($arParams["view"]) ? $arParams["view"] : 'wysiwyg', 'split_vertical' => 0, 'split_ratio' => 1, 'taskbar_shown' => 0, 'taskbar_width' => 250, 'specialchars' => false, 'clean_empty_spans' => 'Y', 'paste_clear_colors' => 'Y', 'paste_clear_borders' => 'Y', 'paste_clear_decor' => 'Y', 'paste_clear_table_dimen' => 'Y', 'show_snippets' => 'Y', 'link_dialog_type' => 'internal');
        $settingsKey = "user_settings_" . $arParams["bbCode"] . "_" . $this->id;
        $curSettings = CUserOptions::GetOption("html_editor", $settingsKey, false, $USER->GetId());
        if (is_array($curSettings)) {
            foreach ($userSettings as $k => $val) {
                if (isset($curSettings[$k])) {
                    $userSettings[$k] = $curSettings[$k];
                }
            }
        }
        if (!isset($arParams["usePspell"])) {
            $arParams["usePspell"] = COption::GetOptionString("fileman", "use_pspell", "N");
        }
        if (!isset($arParams["useCustomSpell"])) {
            $arParams["useCustomSpell"] = COption::GetOptionString("fileman", "use_custom_spell", "Y");
开发者ID:Satariall,项目名称:izurit,代码行数:67,代码来源:html_editor.php

示例15: while

                while ($template = $dbTemplates->Fetch()) {
                    if ($template["TEMPLATE"] == "eshop_app") {
                        $eshopAppFound = true;
                        $template = $arAppTempalate;
                    }
                    $arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
                }
                if (!$eshopAppFound) {
                    $arFields["TEMPLATE"][] = $arAppTempalate;
                }
                $obSite = new CSite();
                $arFields["LID"] = WIZARD_SITE_ID;
                $obSite->Update(WIZARD_SITE_ID, $arFields);
            }
        } else {
            if (!$module->UnInstallPublic(WIZARD_SITE_DIR)) {
                return false;
            }
            $arFields = array("TEMPLATE" => array());
            $dbTemplates = CSite::GetTemplateList(WIZARD_SITE_ID);
            while ($template = $dbTemplates->Fetch()) {
                if ($template["TEMPLATE"] != "eshop_app") {
                    $arFields["TEMPLATE"][] = array("TEMPLATE" => $template['TEMPLATE'], "SORT" => $template['SORT'], "CONDITION" => $template['CONDITION']);
                }
            }
            $obSite = new CSite();
            $arFields["LID"] = WIZARD_SITE_ID;
            $obSite->Update(WIZARD_SITE_ID, $arFields);
        }
    }
}
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:eshopapp.php


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