Exemple #1
0
 function GetDemoWizard()
 {
     if (!defined("B_PROLOG_INCLUDED")) {
         define("B_PROLOG_INCLUDED", true);
     }
     if (isset($GLOBALS["arWizardConfig"]) && array_key_exists("demoWizardName", $GLOBALS["arWizardConfig"]) && CWizardUtil::CheckName($GLOBALS["arWizardConfig"]["demoWizardName"])) {
         return $GLOBALS["arWizardConfig"]["demoWizardName"];
     }
     $arWizards = CWizardUtil::GetWizardList();
     $defaultWizard = false;
     foreach ($arWizards as $arWizard) {
         $wizardID = $arWizard["ID"];
         if ($wizardID == "bitrix:demo") {
             $defaultWizard = "bitrix:demo";
             continue;
         }
         $position = strpos($wizardID, ":");
         if ($position !== false) {
             $wizardName = substr($wizardID, $position + 1);
         } else {
             $wizardName = $wizardID;
         }
         if ($wizardName == "demo") {
             return $wizardID;
         }
     }
     return $defaultWizard;
 }
Exemple #2
0
			<script type="text/javascript">
				exportWizard('<?php 
                echo $ID;
                ?>
');
			</script>
			<?php 
                break;
                /*case "copy":
                		CWizardUtil::CopyWizard($ID, $ID."_copy");
                		break;*/
        }
    }
}
$rsData = new CDBResult();
$rsData->InitFromArray(CWizardUtil::GetWizardList(false, true));
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES"), false));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "default" => true), array("id" => "NAME", "content" => GetMessage("MAIN_WIZARD_ADMIN_NAME"), "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage("MAIN_WIZARD_ADMIN_DESC"), "default" => true), array("id" => "VERSION", "content" => GetMessage("MAIN_WIZARD_ADMIN_VERSION"), "default" => true)));
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    $idTmp = $f_ID;
    $arID = explode(":", $f_ID);
    if (count($arID) > 2) {
        $idTmp = $arID[1] . ":" . $arID[2];
    }
    $row->AddField("ID", $idTmp);
    $arActions = array();
    if ($isAdmin) {
        $startType = array_key_exists("START_TYPE", $arRes) ? $arRes["START_TYPE"] : "POPUP";