本文整理汇总了PHP中CWizardUtil::MakeWizardPath方法的典型用法代码示例。如果您正苦于以下问题:PHP CWizardUtil::MakeWizardPath方法的具体用法?PHP CWizardUtil::MakeWizardPath怎么用?PHP CWizardUtil::MakeWizardPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWizardUtil
的用法示例。
在下文中一共展示了CWizardUtil::MakeWizardPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CWizard
function CWizard($wizardName)
{
$this->name = $wizardName;
if (!CWizardUtil::CheckName($this->name)) {
$this->SetError(GetMessage("MAIN_WIZARD_ERROR_WRONG_WIZ_NAME"));
return;
}
$pathToWizard = CWizardUtil::MakeWizardPath($this->name);
$this->path = CWizardUtil::GetRepositoryPath() . $pathToWizard;
if (!file_exists($_SERVER["DOCUMENT_ROOT"] . $this->path) || !is_dir($_SERVER["DOCUMENT_ROOT"] . $this->path)) {
$this->SetError(GetMessage("MAIN_WIZARD_ERROR_NOT_FOUND"));
return;
}
$this->__GetDescription();
$this->__CheckDepends();
$this->__GetInstallationScript();
}
示例2: CopyWizard
function CopyWizard($wizardName, $newName)
{
if (!CWizardUtil::CheckName($wizardName) || !CWizardUtil::CheckName($newName)) {
return false;
}
$wizardPath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($wizardName);
$newNamePath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($newName);
if (!file_exists($wizardPath) || file_exists($newNamePath)) {
return false;
}
CopyDirFiles($wizardPath, $newNamePath, $rewrite = false, $recursive = true);
return true;
}
示例3: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/extranet/classes/general/wizard_utils.php";
$arTemplates = array();
$templatesPath = CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath("bitrix:extranet") . "/site/templates";
$arTemplates = CExtranetWizardServices::GetTemplates($templatesPath);
$arSteps = array("WelcomeStep");
if (!empty($arTemplates)) {
$arSteps[] = "SelectTemplateStep";
$arSteps[] = "SelectThemeStep";
}
$arSteps[] = "SiteSettingsStep";
$arSteps[] = "DataInstallStep";
$arSteps[] = "FinishStep";
$arWizardDescription = array("NAME" => GetMessage("EXTRANET_WIZARD_NAME"), "DESCRIPTION" => GetMessage("EXTRANET_WIZARD_DESC"), "VERSION" => "1.0.0", "START_TYPE" => "WINDOW", "TEMPLATES" => array(array("SCRIPT" => "scripts/template.php", "CLASS" => "ExtranetWizardTemplate")), "STEPS" => $arSteps);
示例4: GetWizardCharset
function GetWizardCharset($wizardName)
{
if (!defined("B_PROLOG_INCLUDED")) {
define("B_PROLOG_INCLUDED", true);
}
$wizardPath = CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($wizardName);
if (!file_exists($_SERVER["DOCUMENT_ROOT"] . $wizardPath . "/.description.php")) {
return false;
}
$arWizardDescription = array();
include $_SERVER["DOCUMENT_ROOT"] . $wizardPath . "/.description.php";
if (array_key_exists("CHARSET", $arWizardDescription) && strlen($arWizardDescription["CHARSET"]) > 0) {
return $arWizardDescription["CHARSET"];
}
return false;
}
示例5: IncludeModuleLangFile
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/classes/general/tar_gz.php";
if (!$USER->CanDoOperation('edit_php') || !check_bitrix_sessid()) {
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
IncludeModuleLangFile(__FILE__);
$ID = $_REQUEST["ID"];
$ID = str_replace("\\", "", $ID);
$ID = str_replace("/", "", $ID);
$bUseCompression = true;
if (!extension_loaded('zlib') || !function_exists("gzcompress")) {
$bUseCompression = false;
}
$HTTP_ACCEPT_ENCODING = "";
CheckDirPath($_SERVER['DOCUMENT_ROOT'] . BX_PERSONAL_ROOT . "/tmp/wizards/");
$tempFile = $_SERVER['DOCUMENT_ROOT'] . BX_PERSONAL_ROOT . "/tmp/wizards/" . md5(uniqid(rand(), true) . ".tar.gz");
$wizardPath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($ID);
$strError = "";
if (is_dir($wizardPath)) {
$oArchiver = new CArchiver($tempFile, $bUseCompression);
$success = $oArchiver->add("\"" . $wizardPath . "\"", false, $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath());
if ($success) {
header('Pragma: public');
header('Cache-control: private');
header('Accept-Ranges: bytes');
header("Content-Length: " . filesize($tempFile));
header("Content-Type: application/x-force-download; filename=" . str_replace(":", "-", $ID) . ".tar.gz");
header("Content-Disposition: attachment; filename=\"" . str_replace(":", "-", $ID) . ".tar.gz\"");
header("Content-Transfer-Encoding: binary");
readfile($tempFile);
unlink($tempFile);
} else {