Esempio n. 1
0
 function ShowPanel()
 {
     if ($GLOBALS["USER"]->IsAdmin() && COption::GetOptionString("main", "wizard_solution", "", SITE_ID) == "eshop") {
         $GLOBALS["APPLICATION"]->SetAdditionalCSS("/bitrix/wizards/bitrix/eshop/css/panel.css");
         $arMenu = array(array("ACTION" => "jsUtils.Redirect([], '" . CUtil::JSEscape("/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&wizardSiteID=" . SITE_ID . "&wizardName=bitrix:eshop&" . bitrix_sessid_get()) . "')", "ICON" => "bx-popup-item-wizard-icon", "TITLE" => GetMessage("STOM_BUTTON_TITLE_W1"), "TEXT" => GetMessage("STOM_BUTTON_NAME_W1")), array("ACTION" => "jsUtils.Redirect([], '" . CUtil::JSEscape("/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&site_id=" . SITE_ID . "&wizardName=bitrix:eshop.mobile&" . bitrix_sessid_get()) . "')", "ICON" => "bx-popup-item-wizard-icon", "TITLE" => GetMessage("STOM_BUTTON_TITLE_W5"), "TEXT" => GetMessage("STOM_BUTTON_NAME_W5")));
         /*if(COption::GetOptionString("bitrix.eshop", "demo_deleted", "", SITE_ID) != 'Y')
         			{
         				CModule::IncludeModule("iblock");
         				$dbr = CIBlock::GetList(Array(), Array("XML_ID"=>"furniture_".SITE_ID));
          				if($arR = $dbr->Fetch())
         				{
         					if($_REQUEST['delete_demo']=='eshop' && check_bitrix_sessid())
         					{
         				    		if(CIBlock::Delete($arR['ID']))
         				    		{
         				    			DeleteDirFilesEx(SITE_DIR.'catalog/furniture');
         								COption::GetOptionString("bitrix.eshop", "demo_deleted", "Y", SITE_ID);
         				    		}
         							unset($_SESSION["SALE_BASKET_NUM_PRODUCTS"][SITE_ID]);
         					}
         					else
         				 		$arMenu[] = Array(		
         							"ACTION" => "if(confirm('".GetMessage("STOM_BUTTON_CONFIRM_W2")."')) jsUtils.Redirect([], '".CUtil::JSEscape(SITE_DIR)."catalog/?delete_demo=eshop&".bitrix_sessid_get()."');",
         							"ICON" => "bx-popup-item-delete-icon",
         							"TITLE" => GetMessage("STOM_BUTTON_TITLE_W3"),
         							"TEXT" => GetMessage("STOM_BUTTON_NAME_W3"),
         						);
         				}
         				else
         					COption::SetOptionString("bitrix.eshop", "demo_deleted", "Y", "", SITE_ID);
         
         			}  */
         $GLOBALS["APPLICATION"]->AddPanelButton(array("HREF" => "/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&wizardName=bitrix:eshop&wizardSiteID=" . SITE_ID . "&" . bitrix_sessid_get(), "ID" => "eshop_wizard", "ICON" => "bx-panel-site-wizard-icon", "MAIN_SORT" => 2500, "TYPE" => "BIG", "SORT" => 10, "ALT" => GetMessage("SCOM_BUTTON_DESCRIPTION"), "TEXT" => GetMessage("SCOM_BUTTON_NAME"), "MENU" => $arMenu));
     }
 }
Esempio n. 2
0
	function ShowPanel()
	{
		if ($GLOBALS["USER"]->IsAdmin() && COption::GetOptionString("main", "wizard_solution", "", SITE_ID) == "eshop")
		{
			$GLOBALS["APPLICATION"]->SetAdditionalCSS("/bitrix/wizards/bitrix/eshop/css/panel.css"); 

			$arMenu = Array(
				Array(		
					"ACTION" => "jsUtils.Redirect([], '".CUtil::JSEscape("/bitrix/admin/wizard_install.php?lang=".LANGUAGE_ID."&wizardSiteID=".SITE_ID."&wizardName=bitrix:eshop&".bitrix_sessid_get())."')",
					"ICON" => "bx-popup-item-wizard-icon",
					"TITLE" => GetMessage("STOM_BUTTON_TITLE_W1"),
					"TEXT" => GetMessage("STOM_BUTTON_NAME_W1"),
				)
			);

			$GLOBALS["APPLICATION"]->AddPanelButton(array(
				"HREF" => "/bitrix/admin/wizard_install.php?lang=".LANGUAGE_ID."&wizardName=bitrix:eshop&wizardSiteID=".SITE_ID."&".bitrix_sessid_get(),
				"ID" => "eshop_wizard",
				"ICON" => "bx-panel-site-wizard-icon",
				"MAIN_SORT" => 2500,
				"TYPE" => "BIG",
				"SORT" => 10,	
				"ALT" => GetMessage("SCOM_BUTTON_DESCRIPTION"),
				"TEXT" => GetMessage("SCOM_BUTTON_NAME"),
				"MENU" => $arMenu,
			));
		}
	}
Esempio n. 3
0
function __get_import_profiles($strItemID)
{
    global $USER;
    global $adminMenu;
    if (!isset($USER) || !($USER instanceof CUser && 'CUser' == get_class($USER))) {
        return array();
    }
    if (empty($strItemID)) {
        return array();
    }
    $boolRead = $USER->CanDoOperation('catalog_read');
    $boolImportEdit = $USER->CanDoOperation('catalog_import_edit');
    $boolImportExec = $USER->CanDoOperation('catalog_import_exec');
    $arProfileList = array();
    if (($boolRead || $boolImportEdit || $boolImportExec) && method_exists($adminMenu, "IsSectionActive")) {
        if ($adminMenu->IsSectionActive($strItemID)) {
            $rsProfiles = CCatalogImport::GetList(array("NAME" => "ASC", "ID" => "ASC"), array("IN_MENU" => "Y"));
            while ($arProfile = $rsProfiles->Fetch()) {
                $strName = strlen($arProfile["NAME"]) > 0 ? $arProfile["NAME"] : $arProfile["FILE_NAME"];
                if ('Y' == $arProfile['DEFAULT_PROFILE']) {
                    $arProfileList[] = array("text" => htmlspecialcharsbx($strName), "url" => "cat_exec_imp.php?lang=" . LANGUAGE_ID . "&ACT_FILE=" . $arProfile["FILE_NAME"] . "&ACTION=IMPORT&PROFILE_ID=" . $arProfile["ID"] . "&" . bitrix_sessid_get(), "title" => GetMessage("CAM_IMPORT_DESCR_IMPORT") . " "" . htmlspecialcharsbx($strName) . """, "readonly" => !$boolImportExec);
                } else {
                    $arProfileList[] = array("text" => htmlspecialcharsbx($strName), "url" => "cat_import_setup.php?lang=" . LANGUAGE_ID . "&ACT_FILE=" . $arProfile["FILE_NAME"] . "&ACTION=IMPORT_EDIT&PROFILE_ID=" . $arProfile["ID"] . "&" . bitrix_sessid_get(), "title" => GetMessage("CAM_IMPORT_DESCR_EDIT") . " "" . htmlspecialcharsbx($strName) . """, "readonly" => !$boolImportEdit);
                }
            }
        }
    }
    return $arProfileList;
}
Esempio n. 4
0
 function ShowPanel()
 {
     if ($GLOBALS["USER"]->IsAdmin() && COption::GetOptionString("main", "wizard_solution", "", SITE_ID) == "corp_services") {
         $GLOBALS["APPLICATION"]->AddPanelButton(array("HREF" => "/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&wizardName=bitrix:corp_services&wizardSiteID=" . SITE_ID . "&" . bitrix_sessid_get(), "ID" => "corp_services_wizard", "ICON" => "bx-panel-site-wizard-icon", "MAIN_SORT" => 2500, "TYPE" => "BIG", "SORT" => 10, "ALT" => GetMessage("SCOM_BUTTON_DESCRIPTION"), "TEXT" => GetMessage("SCOM_BUTTON_NAME"), "MENU" => array()));
     }
     if ($GLOBALS["USER"]->IsAdmin() && COption::GetOptionString("main", "wizard_solution", "", SITE_ID) == "corp_furniture") {
         $GLOBALS["APPLICATION"]->AddPanelButton(array("HREF" => "/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&wizardName=bitrix:corp_furniture&wizardSiteID=" . SITE_ID . "&" . bitrix_sessid_get(), "ID" => "corp_services_wizard", "ICON" => "bx-panel-site-wizard-icon", "MAIN_SORT" => 2500, "TYPE" => "BIG", "SORT" => 10, "ALT" => GetMessage("SCOM_BUTTON_DESCRIPTION"), "TEXT" => GetMessage("SCOM_BUTTON_NAME"), "MENU" => array()));
     }
 }
Esempio n. 5
0
 function ShowPanel()
 {
     global $USER, $APPLICATION;
     if (defined("ADMIN_SECTION") && ADMIN_SECTION == true) {
         return;
     }
     if ($USER->IsAdmin()) {
         if ($_REQUEST['add_new_site_sol'] == 'sol' && check_bitrix_sessid()) {
             $dbrSites = CSite::GetList($by, $ord);
             $arSitesID = array();
             $arSitesPath = array();
             $siteCnt = 0;
             while ($arSite = $dbrSites->Fetch()) {
                 if ($arSite["ACTIVE"] == "Y") {
                     $siteCnt++;
                 }
                 $arSitesID[] = strtolower($arSite["ID"]);
                 $arSitesPath[] = strtolower($arSite["PATH"]);
             }
             $newSiteID = "";
             while (true) {
                 $newSiteID = chr(rand(ord("a"), ord("z"))) . chr(rand(ord("a"), ord("z")));
                 if (!in_array($newSiteID, $arSitesID) && !in_array("/site" . $newSiteID . "/", $arSitesPath) && !file_exists($_SERVER['DOCUMENT_ROOT'] . "/site" . $newSiteID)) {
                     break;
                 }
             }
             $culture = CultureTable::getRow(array('filter' => array("=FORMAT_DATE" => FORMAT_DATE, "=FORMAT_DATETIME" => FORMAT_DATETIME, "=FORMAT_NAME" => CSite::GetDefaultNameFormat(), "=CHARSET" => SITE_CHARSET)));
             if ($culture) {
                 $cultureId = $culture["ID"];
             } else {
                 $addResult = CultureTable::add(array("NAME" => $newSiteID, "CODE" => $newSiteID, "FORMAT_DATE" => FORMAT_DATE, "FORMAT_DATETIME" => FORMAT_DATETIME, "FORMAT_NAME" => CSite::GetDefaultNameFormat(), "CHARSET" => SITE_CHARSET));
                 $cultureId = $addResult->getId();
             }
             $arFields = array("LID" => $newSiteID, "ACTIVE" => "Y", "SORT" => 100, "DEF" => "N", "NAME" => $newSiteID, "DIR" => "/site_" . $newSiteID . "/", "SITE_NAME" => $newSiteID, "SERVER_NAME" => $_SERVER["SERVER_NAME"], "EMAIL" => COption::GetOptionString("main", "email_from"), "LANGUAGE_ID" => LANGUAGE_ID, "DOC_ROOT" => "", "CULTURE_ID" => $cultureId);
             $obSite = new CSite();
             $result = $obSite->Add($arFields);
             if ($result) {
                 LocalRedirect("/bitrix/admin/wizard_install.php?lang=" . LANGUAGE_ID . "&wizardName=bitrix:portal&wizardSiteID=" . $newSiteID . "&" . bitrix_sessid_get());
             } else {
                 echo $obSite->LAST_ERROR;
             }
         }
         $arMenu = array(array("ACTION" => "jsUtils.Redirect([], '" . CUtil::JSEscape(SITE_DIR) . "?add_new_site_sol=sol&" . bitrix_sessid_get() . "')", "TEXT" => "<b>" . GetMessage("SOL_BUTTON_TEST_TEXT", array("#BR#" => " ")) . "</b>", "TITLE" => GetMessage("SOL_BUTTON_TEST_TITLE")));
         $arSites = array();
         $dbrSites = CSite::GetList($by, $ord, array("ACTIVE" => "Y"));
         while ($arSite = $dbrSites->GetNext()) {
             $arSites[] = array("ACTION" => "jsUtils.Redirect([], '" . CUtil::JSEscape($arSite["DIR"]) . "');", "ICON" => $arSite["LID"] == SITE_ID ? "checked" : "", "TEXT" => $arSite["NAME"], "TITLE" => GetMessage("SOL_BUTTON_GOTOSITE") . " " . $arSite["NAME"]);
         }
         $arMenu[] = array("SEPARATOR" => true);
         $arMenu[] = array("TEXT" => GetMessage("SOL_BUTTON_GOTOSITE"), "MENU" => $arSites);
         $APPLICATION->AddPanelButton(array("HREF" => SITE_DIR . "?add_new_site_sol=sol&" . bitrix_sessid_get(), "ID" => "solutions_wizard", "ICON" => "bx-panel-install-solution-icon", "TYPE" => "BIG", "ALT" => GetMessage("SOL_BUTTON_TEST_TITLE"), "TEXT" => GetMessage("SOL_BUTTON_TEST_TEXT"), "MAIN_SORT" => 2520, "SORT" => 20, "MENU" => $arMenu, 'HINT' => array('TITLE' => str_replace('#BR#', ' ', GetMessage("SOL_BUTTON_TEST_TEXT")), 'TEXT' => GetMessage('SOL_BUTTON_TEST_TEXT_HINT')), 'HINT_MENU' => array('TITLE' => str_replace('#BR#', ' ', GetMessage("SOL_BUTTON_TEST_TEXT")), 'TEXT' => GetMessage('SOL_BUTTON_TEST_MENU_HINT'))));
     }
 }
Esempio n. 6
0
function __GetSubmenu($menu)
{
	global $aUserOpt, $bSkipRecent;

	$aPopup = array();
	if (is_array($menu))
	{
		foreach($menu as $item)
		{
			if(!is_array($item))
				continue;

			$aItem = array(
				"TEXT"=>$item["text"],
				"TITLE"=>($aUserOpt['start_menu_title'] <> 'N'? $item["title"] : ''),
				"ICON"=>$item["icon"],
			);
			if($item["url"] <> "")
			{
				$link = htmlspecialcharsback($item["url"]);
				if(strpos($link, "/bitrix/admin/") !== 0)
					$link = "/bitrix/admin/".$link;

				if ($_REQUEST['back_url_pub'])
					$link .= (strpos($link, '?') > 0 ? '&' : '?')."back_url_pub=".urlencode($_REQUEST["back_url_pub"]);

				$aItem['LINK'] = $link;

				if (!$bSkipRecent)
					$aItem['ONCLICK'] = 'BX.admin.startMenuRecent('.CUtil::PhpToJsObject($aItem).')';
			}

			if(is_array($item["items"]) && count($item["items"])>0)
			{
				$aItem["MENU"] = __GetSubmenu($item["items"]);
				if($item["url"] <> "" && $aUserOpt['start_menu_title'] <> 'N')
					$aItem["TITLE"] .= ' '.GetMessage("get_start_menu_dbl");
			}
			elseif($item["dynamic"] == true)
			{
				$aItem["MENU_URL"] = '/bitrix/admin/get_start_menu.php?mode=dynamic&lang='.LANGUAGE_ID.'&admin_mnu_module_id='.urlencode($item['module_id']).'&admin_mnu_menu_id='.urlencode($item['items_id']).($bSkipRecent?'&skip_recent=Y':'').($_REQUEST["back_url_pub"]<>''? '&back_url_pub='.urlencode($_REQUEST["back_url_pub"]):'').'&'.bitrix_sessid_get();
				$aItem['MENU_PRELOAD'] = false;

				if($item["url"] <> "" && $aUserOpt['start_menu_title'] <> 'N')
					$aItem["TITLE"] .= ' '.GetMessage("get_start_menu_dbl");
			}

			$aPopup[] = $aItem;
		}
	}

	return $aPopup;
}
Esempio n. 7
0
File: class.php Progetto: ASDAFF/mp
 /**
  * Если не знаешь что за метод, дальше не смотри
  */
 public function executeComponent() 
 {
     if (false === $this->Initialize()) {
         return false;
     }
     global $USER;
     $cache = $this->navParams . bitrix_sessid_get() . $USER->GetID();
     
     if ($this->startResultCache(0, $cache)) {
         $this->arResult["items"] = $this->GetItems();
         $this->includeComponentTemplate();
     }
 }
 function handleFile($hash, $file, &$package, &$upload)
 {
     global $APPLICATION;
     $name = $file["name"];
     $pattern = defined('BX_UTF') ? "/[^\\p{L}L0-9!\\p{Z}\$&\\(\\)\\[\\]\\{\\}\\-\\.;=@\\^_\\~]/uis" : "/[^A-Za-zÀ-ߨà-ÿ¸0-9!\\s\$&\\(\\)\\[\\]\\{\\}\\-\\.;=@\\^_\\~]/is";
     $name = trim(preg_replace($pattern, "", $name));
     if (strlen(trim(substr($name, 0, strpos($name, '.')))) <= 0) {
         $name = substr(md5(uniqid(rand(), true)), 0, 8) . trim($name);
     }
     $res = CMedialibItem::Edit(array('file' => array_key_exists("files", $file) ? $file["files"]["default"] : $file, 'arFields' => array('NAME' => $name, 'DESCRIPTION' => $file['description'], 'KEYWORDS' => ''), 'arCollections' => array($package["collectionId"])));
     if (!array_key_exists("redirectUrl", $upload) && $res && $res['ID'] > 0) {
         $upload["redirectUrlPart"] = "action=redirect&" . bitrix_sessid_get() . "&first_id=" . $res["ID"] . "&col_id=" . $package["collectionId"] . "&ml_type=" . htmlspecialcharsEx($package["ml_type"]);
         $upload["redirectUrl"] = $APPLICATION->GetCurPageParam($upload["redirectUrlPart"], array("action", "ml_type", "first_id", "col_id", "sessid"));
     }
     return $res;
 }
Esempio n. 9
0
    /**
     * Если не знаешь что за метод, дальше не смотри
     */
    public function executeComponent() 
    {
        if (false === $this->Initialize()) {
            return false;
        }

        $arNavigation = CDBResult::GetNavParams($arNavParams);

        global $USER;
        $cache = $this->navParams . $arNavigation . bitrix_sessid_get() . $USER->GetID();
        
        if ($this->startResultCache(0, $cache)) {
            $this->arResult['filter']['makes'] = $this->makes();
            $this->arResult['filter']['models'] = $this->models();
            $this->arResult["items"] = array_chunk($this->GetItems($arNavParams), self::ITEM_IN_LINE);
            $this->includeComponentTemplate();
        }
    }
Esempio n. 10
0
 function SeoOnPanelCreate()
 {
     global $APPLICATION, $USER;
     if (!$USER->CanDoOperation('seo_tools')) {
         return false;
     }
     if (isset($_SERVER["REAL_FILE_PATH"]) && $_SERVER["REAL_FILE_PATH"] != "") {
         $currentDirPath = dirname($_SERVER["REAL_FILE_PATH"]);
         $currentFilePath = $_SERVER["REAL_FILE_PATH"];
     } else {
         $currentDirPath = $APPLICATION->GetCurDir();
         $currentFilePath = $APPLICATION->GetCurPage(true);
     }
     $encCurrentDirPath = urlencode($currentDirPath);
     $encCurrentFilePath = urlencode($currentFilePath);
     $encRequestUri = urlencode($_SERVER["REQUEST_URI"]);
     $encTitleChangerLink = '';
     $encWinTitleChangerLink = '';
     $encTitleChangerName = '';
     $encWinTitleChangerName = '';
     if (is_array($APPLICATION->sDocTitleChanger)) {
         if (isset($APPLICATION->sDocTitleChanger['PUBLIC_EDIT_LINK'])) {
             $encTitleChangerLink = urlencode(base64_encode($APPLICATION->sDocTitleChanger['PUBLIC_EDIT_LINK']));
         }
         if (isset($APPLICATION->sDocTitleChanger['COMPONENT_NAME'])) {
             $encTitleChangerName = urlencode($APPLICATION->sDocTitleChanger['COMPONENT_NAME']);
         }
     }
     $prop_code = ToUpper(COption::GetOptionString('seo', 'property_window_title', 'title'));
     if (is_array($APPLICATION->arPagePropertiesChanger[$prop_code])) {
         if (isset($APPLICATION->arPagePropertiesChanger[$prop_code]['PUBLIC_EDIT_LINK'])) {
             $encWinTitleChangerLink = urlencode(base64_encode($APPLICATION->arPagePropertiesChanger[$prop_code]['PUBLIC_EDIT_LINK']));
         }
         if (isset($APPLICATION->arPagePropertiesChanger[$prop_code]['COMPONENT_NAME'])) {
             $encWinTitleChangerName = urlencode($APPLICATION->arPagePropertiesChanger[$prop_code]['COMPONENT_NAME']);
         }
     }
     $encTitle = urlencode(base64_encode($APPLICATION->sDocTitle));
     $encWinTitle = urlencode(base64_encode($APPLICATION->arPageProperties[$prop_code]));
     $APPLICATION->AddPanelButton(array("HREF" => 'javascript:' . $APPLICATION->GetPopupLink(array("URL" => "/bitrix/admin/public_seo_tools.php?lang=" . LANGUAGE_ID . "&bxpublic=Y&from_module=seo&site=" . SITE_ID . "&path=" . $encCurrentFilePath . "&title_final=" . $encTitle . "&title_changer_name=" . $encTitleChangerName . '&title_changer_link=' . $encTitleChangerLink . "&title_win_final=" . $encWinTitle . "&title_win_changer_name=" . $encWinTitleChangerName . '&title_win_changer_link=' . $encWinTitleChangerLink . "&" . bitrix_sessid_get() . "&back_url=" . $encRequestUri, "PARAMS" => array("width" => 920, "height" => 400, 'resize' => false))), "ID" => "seo", "ICON" => "bx-panel-seo-icon", "ALT" => GetMessage('SEO_ICON_ALT'), "TEXT" => GetMessage('SEO_ICON_TEXT'), "MAIN_SORT" => "300", "SORT" => 50, "HINT" => array("TITLE" => GetMessage('SEO_ICON_TEXT'), "TEXT" => GetMessage('SEO_ICON_HINT'))));
 }
Esempio n. 11
0
File: class.php Progetto: ASDAFF/mp
 /**
  * Если не знаешь что за метод, дальше не смотри
  */
 public function executeComponent() 
 {
     if (false === $this->Initialize()) {
         // 404
         return false;
     }
     global $USER;
     global $APPLICATION;
     global $arrFilter;
     $cache = bitrix_sessid_get() . $USER->GetID();
     
     if ($this->startResultCache(0, $cache)) {
         $this->arResult = $this->GetItems();
         $APPLICATION->SetTitle($this->arResult['name']);
         $APPLICATION->SetPageProperty('description', $this->arResult['anounce']);
         $APPLICATION->AddHeadString('<meta property="og:title" content="' . $this->arResult['name'] . '"/>');
         $APPLICATION->AddHeadString('<meta property="og:description" content="' . $this->arResult['anounce'] . '"/>');
         $arrFilter = $this->arResult['globalFilter'];
         $this->includeComponentTemplate();
     }
 }
Esempio n. 12
0
            function ShowComment($comment, $tabCount = 0, $tabSize = 2.5, $canModerate = false, $User = array(), $use_captcha = false, $bCanUserComment = false, $errorComment = false, $arParams = array())
            {
                if ($comment["SHOW_AS_HIDDEN"] == "Y" || $comment["PUBLISH_STATUS"] == BLOG_PUBLISH_STATUS_PUBLISH || $comment["SHOW_SCREENNED"] == "Y" || $comment["ID"] == "preview") {
                    global $prevTab;
                    $tabCount = IntVal($tabCount);
                    if ($tabCount <= 5) {
                        $paddingSize = 2.5 * $tabCount;
                    } elseif ($tabCount > 5 && $tabCount <= 10) {
                        $paddingSize = 2.5 * 5 + ($tabCount - 5) * 1.5;
                    } elseif ($tabCount > 10) {
                        $paddingSize = 2.5 * 5 + 1.5 * 5 + ($tabCount - 10) * 1;
                    }
                    if ($tabCount + 1 <= 5) {
                        $paddingSizeNew = 2.5 * ($tabCount + 1);
                    } elseif ($tabCount + 1 > 5 && $tabCount + 1 <= 10) {
                        $paddingSizeNew = 2.5 * 5 + ($tabCount + 1 - 5) * 1.5;
                    } elseif ($tabCount + 1 > 10) {
                        $paddingSizeNew = 2.5 * 5 + 1.5 * 5 + ($tabCount + 1 - 10) * 1;
                    }
                    $paddingSizeNew -= $paddingSize;
                    if ($prevTab > $tabCount) {
                        $prevTab = $tabCount;
                    }
                    if ($prevTab <= 5) {
                        $prevPaddingSize = 2.5 * $prevTab;
                    } elseif ($prevTab > 5 && $prevTab <= 10) {
                        $prevPaddingSize = 2.5 * 5 + ($prevTab - 5) * 1.5;
                    } elseif ($prevTab > 10) {
                        $prevPaddingSize = 2.5 * 5 + 1.5 * 5 + ($prevTab - 10) * 1;
                    }
                    $prevTab = $tabCount;
                    ?>
					<a name="<?php 
                    echo $comment["ID"];
                    ?>
"></a>
					<div class="blog-comment" style="padding-left:<?php 
                    echo $paddingSize;
                    ?>
em;">
					<div id="blg-comment-<?php 
                    echo $comment["ID"];
                    ?>
">
					<?php 
                    if ($comment["PUBLISH_STATUS"] == BLOG_PUBLISH_STATUS_PUBLISH || $comment["SHOW_SCREENNED"] == "Y" || $comment["ID"] == "preview") {
                        $aditStyle = "";
                        if ($arParams["is_ajax_post"] == "Y" || $comment["NEW"] == "Y") {
                            $aditStyle .= " blog-comment-new";
                        }
                        if ($comment["AuthorIsAdmin"] == "Y") {
                            $aditStyle = " blog-comment-admin";
                        }
                        if (IntVal($comment["AUTHOR_ID"]) > 0) {
                            $aditStyle .= " blog-comment-user-" . IntVal($comment["AUTHOR_ID"]);
                        }
                        if ($comment["AuthorIsPostAuthor"] == "Y") {
                            $aditStyle .= " blog-comment-author";
                        }
                        if ($comment["PUBLISH_STATUS"] != BLOG_PUBLISH_STATUS_PUBLISH && $comment["ID"] != "preview") {
                            $aditStyle .= " blog-comment-hidden";
                        }
                        if ($comment["ID"] == "preview") {
                            $aditStyle .= " blog-comment-preview";
                        }
                        ?>
						<div class="blog-comment-cont<?php 
                        echo $aditStyle;
                        ?>
">
						<div class="blog-comment-cont-white" onmouseout="BX.removeClass(this, 'photo-comment-hover')" onmouseover="BX.addClass(this, 'photo-comment-hover')">
							<?php 
                        if ($bCanUserComment === true) {
                            ?>
								<script>
								top.title<?php 
                            echo $comment["ID"];
                            ?>
 = title<?php 
                            echo $comment["ID"];
                            ?>
 = '<?php 
                            echo CUtil::JSEscape($comment["CommentTitle"]);
                            ?>
';
								</script>
								<a href="" class="photo-comment-reply"  onclick="return showComment('<?php 
                            echo $comment["ID"];
                            ?>
', '', '', '')" title="<?php 
                            echo GetMessage("B_B_MS_REPLY");
                            ?>
"></a>
							<?php 
                        }
                        ?>
							<?php 
                        if ($comment["CAN_EDIT"] == "Y") {
                            ?>
								<script>
								top.text<?php 
                            echo $comment["ID"];
                            ?>
 = text<?php 
                            echo $comment["ID"];
                            ?>
 = '<?php 
                            echo CUtil::JSEscape($comment["~POST_TEXT"]);
                            ?>
';
								top.title<?php 
                            echo $comment["ID"];
                            ?>
 = title<?php 
                            echo $comment["ID"];
                            ?>
 = '<?php 
                            echo CUtil::JSEscape($comment["TITLE"]);
                            ?>
';
								</script>
								<a href="" class="photo-comment-edit" onclick="return editComment('<?php 
                            echo $comment["ID"];
                            ?>
')" title="<?php 
                            echo GetMessage("BPC_MES_EDIT");
                            ?>
"></a>
							<?php 
                        }
                        ?>

							<?php 
                        if ($comment["urlToDelete"] !== '') {
                            ?>
								<a href="" class="photo-comment-remove" onclick="if(confirm('<?php 
                            echo GetMessage("BPC_MES_DELETE_POST_CONFIRM");
                            ?>
')) deleteComment('<?php 
                            echo $comment["urlToDelete"] . "&" . bitrix_sessid_get();
                            ?>
', '<?php 
                            echo $comment["ID"];
                            ?>
'); return false;" title="<?php 
                            echo GetMessage("BPC_MES_DELETE");
                            ?>
"></a>
							<?php 
                        }
                        ?>

						<div class="photo-comment-avatar <?php 
                        if ($comment["AVATAR_img"] == '') {
                            echo 'photo-comment-avatar-none';
                        }
                        ?>
" >
							<?php 
                        if ($comment["AVATAR_img"] != '') {
                            ?>
								<?php 
                            echo $comment["AVATAR_img"];
                            ?>
							<?php 
                        }
                        ?>
						</div>

						<div class="blog-comment-info">
							<?php 
                        if ($arParams['FETCH_USER_ALIAS']) {
                            $comment["urlToAuthor"] = CPGalleryInterface::GetPathWithUserAlias($comment["urlToAuthor"], $comment["arUser"]["ID"], $arParams['IBLOCK_ID']);
                        }
                        ?>
							<?php 
                        if (intVal($comment["arUser"]["ID"]) > 0 && !empty($comment["urlToAuthor"])) {
                            ?>
							<a class="photo-comment-name" href="<?php 
                            echo $comment["urlToAuthor"];
                            ?>
"><?php 
                            echo $comment["AuthorName"];
                            ?>
</a>
							<?php 
                        } else {
                            ?>
							<span class="photo-comment-name"><?php 
                            echo $comment["AuthorName"];
                            ?>
</span>
							<?php 
                        }
                        ?>
							<span class="photo-info-date"><?php 
                        echo $comment["DateFormated"];
                        ?>
</span>
							<?php 
                        if ($arParams["SHOW_RATING"] == "Y") {
                            ?>
							<span class="review-rating rating_vote_text">
							<?php 
                            $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:rating.vote", $arParams["RATING_TYPE"], array("ENTITY_TYPE_ID" => "BLOG_COMMENT", "ENTITY_ID" => $comment["ID"], "OWNER_ID" => $comment["arUser"]["ID"], "USER_VOTE" => $arParams["RATING"][$comment["ID"]]["USER_VOTE"], "USER_HAS_VOTED" => $arParams["RATING"][$comment["ID"]]["USER_HAS_VOTED"], "TOTAL_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_VOTES"], "TOTAL_POSITIVE_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_POSITIVE_VOTES"], "TOTAL_NEGATIVE_VOTES" => $arParams["RATING"][$comment["ID"]]["TOTAL_NEGATIVE_VOTES"], "TOTAL_VALUE" => $arParams["RATING"][$comment["ID"]]["TOTAL_VALUE"], "PATH_TO_USER_PROFILE" => $arParams["~PATH_TO_USER"], "AJAX_MODE" => "Y"), $arParams["component"], array("HIDE_ICONS" => "Y"));
                            ?>
							</span>
							<?php 
                        }
                        ?>
						</div>

						<div class="blog-comment-content">
							<?php 
                        if (strlen($comment["TitleFormated"]) > 0) {
                            ?>
								<b><?php 
                            echo $comment["TitleFormated"];
                            ?>
</b><br />
							<?php 
                        }
                        ?>
							<?php 
                        echo $comment["TextFormated"];
                        ?>
						</div>
						</div>
						</div>
							<div class="blog-clear-float"></div>

						<?php 
                        if (strlen($errorComment) > 0 && $bCanUserComment === true && (IntVal($_POST["parentId"]) == $comment["ID"] || IntVal($_POST["edit_id"]) == $comment["ID"])) {
                            ?>
							<div class="blog-errors blog-note-box blog-note-error">
								<div class="blog-error-text">
									<?php 
                            echo $errorComment;
                            ?>
								</div>
							</div>
							<?php 
                        }
                        ?>
						</div>
						<div id="err_comment_<?php 
                        echo $comment['ID'];
                        ?>
"></div>
						<div id="form_comment_<?php 
                        echo $comment['ID'];
                        ?>
"></div>
						<div id="new_comment_cont_<?php 
                        echo $comment['ID'];
                        ?>
" style="padding-left:<?php 
                        echo $paddingSizeNew;
                        ?>
em;"></div>
						<div id="new_comment_<?php 
                        echo $comment['ID'];
                        ?>
" style="display:none;"></div>
						<?php 
                        if ((strlen($errorComment) > 0 || strlen($_POST["preview"]) > 0) && (IntVal($_POST["parentId"]) == $comment["ID"] || IntVal($_POST["edit_id"]) == $comment["ID"]) && $bCanUserComment === true) {
                            ?>
							<script>
							top.text<?php 
                            echo $comment["ID"];
                            ?>
 = text<?php 
                            echo $comment["ID"];
                            ?>
 = '<?php 
                            echo CUtil::JSEscape($_POST["comment"]);
                            ?>
';
							top.title<?php 
                            echo $comment["ID"];
                            ?>
 = title<?php 
                            echo $comment["ID"];
                            ?>
 = '<?php 
                            echo CUtil::JSEscape($_POST["subject"]);
                            ?>
';
							<?php 
                            if (IntVal($_POST["edit_id"]) == $comment["ID"]) {
                                ?>
editComment('<?php 
                                echo $comment["ID"];
                                ?>
');<?php 
                            } else {
                                ?>
showComment('<?php 
                                echo $comment["ID"];
                                ?>
', 'Y', '<?php 
                                echo CUtil::JSEscape($_POST["user_name"]);
                                ?>
', '<?php 
                                echo CUtil::JSEscape($_POST["user_email"]);
                                ?>
', 'Y');<?php 
                            }
                            ?>
							</script>
							<?php 
                        }
                    } elseif ($comment["SHOW_AS_HIDDEN"] == "Y") {
                        echo "<b>" . GetMessage("BPC_HIDDEN_COMMENT") . "</b>";
                    }
                    ?>
					</div>
					<?php 
                }
            }
Esempio n. 13
0
}
if (isset($QUESTION_TYPE) && strlen($QUESTION_TYPE) === 1) {
    $str_QUESTION_TYPE = $QUESTION_TYPE;
}
if ($ID > 0) {
    $APPLICATION->SetTitle(GetMessage("LEARNING_QUESTION") . ": " . GetMessage("LEARNING_EDIT_TITLE"));
} else {
    $APPLICATION->SetTitle(GetMessage('LEARNING_QUESTION') . ": " . GetMessage("LEARNING_NEW_TITLE"));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$aContext = array(array("ICON" => "btn_list", "TEXT" => GetMessage("MAIN_ADMIN_MENU_LIST"), "LINK" => "learn_question_admin.php?lang=" . LANG . '&LESSON_PATH=' . $uriLessonPath . GetFilterParams("filter_"), "TITLE" => GetMessage("LEARNING_QUESTION_LIST")));
if (!$bBadCourse) {
    if ($ID > 0) {
        $arContextPopup = array(array("TEXT" => GetMessage('LEARNING_SINGLE_CHOICE'), "ACTION" => "window.location='learn_question_edit.php?lang=" . LANG . '&LESSON_PATH=' . $uriLessonPath . GetFilterParams("filter_", false) . "&QUESTION_TYPE=S" . ($from == "learn_admin" ? "&from=learn_admin" : "") . "'"), array("TEXT" => GetMessage('LEARNING_MULTIPLE_CHOICE'), "ACTION" => "window.location='learn_question_edit.php?lang=" . LANG . '&LESSON_PATH=' . $uriLessonPath . GetFilterParams("filter_", false) . "&QUESTION_TYPE=M" . ($from == "learn_admin" ? "&from=learn_admin" : "") . "'"), array("TEXT" => GetMessage('LEARNING_SORTING'), "ACTION" => "window.location='learn_question_edit.php?lang=" . LANG . '&LESSON_PATH=' . $uriLessonPath . GetFilterParams("filter_", false) . "&QUESTION_TYPE=R" . ($from == "learn_admin" ? "&from=learn_admin" : "") . "'"), array("TEXT" => GetMessage('LEARNING_TEXT_ANSWER'), "ACTION" => "window.location='learn_question_edit.php?lang=" . LANG . '&LESSON_PATH=' . $uriLessonPath . GetFilterParams("filter_", false) . "&QUESTION_TYPE=T" . ($from == "learn_admin" ? "&from=learn_admin" : "") . "'"));
        $aContext[] = array("ICON" => "btn_new", "TEXT" => GetMessage("MAIN_ADMIN_MENU_CREATE"), "MENU" => $arContextPopup, "TITLE" => GetMessage("LEARNING_ADD"));
        $aContext[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "LINK" => "javascript:if(confirm('" . GetMessage("LEARNING_CONFIRM_DEL_MESSAGE") . "'))window.location='learn_question_admin.php?lang=" . LANG . '&LESSON_PATH=' . $uriLessonPath . "&action=delete&ID=" . $ID . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_", false)) . "';");
    }
    $context = new CAdminContextMenu($aContext);
    $context->Show();
    if ($message) {
        echo $message->Show();
    }
    ?>

<?php 
    CAdminFileDialog::ShowScript(array("event" => "OpenFileBrowserWindMedia", "arResultDest" => array("FUNCTION_NAME" => "SetUrl"), "arPath" => array("SITE" => $_GET["site"], "PATH" => strlen($str_FILENAME) > 0 ? GetDirPath($str_FILENAME) : ''), "select" => 'F', "operation" => 'O', "showUploadTab" => true, "showAddToMenuTab" => false, "fileFilter" => 'wmv,flv,mp4,wma,mp3', "allowAllFiles" => true, "SaveConfig" => true));
    function CustomizeEditor()
    {
        ob_start();
        ?>
	<div class="bxed-dialog">
Esempio n. 14
0
	/**
	* Function adds an delete action to some area inside the component.
	*
	* <ul>
	* <li>$arParams['CONFIRM'] = false - disable confirm;
	* <li>$arParams['CONFIRM'] = 'Text' - confirm with custom text;
	* <li>no $arParams['CONFIRM'] at all - confirm with default text
	* </ul>
	* @param string $entryId
	* @param string $deleteLink
	* @param string $deleteTitle
	* @param array[string]mixed $arParams
	* @return void
	*
	*/
	final public function addDeleteAction($entryId, $deleteLink, $deleteTitle = false, $arParams = array())
	{
		global $APPLICATION;

		if (!$entryId || !$deleteLink)
			return;

		includeModuleLangFile(__FILE__);
		if (!$deleteTitle)
		{
			$deleteTitle = GetMessage('DELETE_ACTION_TITLE_DEFAULT');
		}

		if (!is_array($arParams))
			$arParams = array();

		if (!$arParams['ICON'] && !$arParams['SRC'] && !$arParams['IMAGE'])
			$arParams['ICON'] = 'bx-context-toolbar-delete-icon';

		if (substr($deleteLink, 0, 11) != 'javascript:')
		{
			if (false === strpos($deleteLink, 'return_url='))
				$deleteLink.= '&return_url='.urlencode($APPLICATION->getCurPageParam());

			$deleteLink.= '&'.bitrix_sessid_get();
			if ($arParams['CONFIRM'] !== false)
			{
				$confirmText = $arParams['CONFIRM'] ? $arParams['CONFIRM'] : GetMessage('DELETE_ACTION_CONFIRM');
				$deleteLink = 'javascript:if(confirm(\''.CUtil::JSEscape($confirmText).'\')) jsUtils.Redirect([], \''.CUtil::JSEscape($deleteLink).'\');';
			}
		}

		$arBtn = array(
			'URL' => $deleteLink,
			'TITLE' => $deleteTitle,
		);

		if ($arParams['ICON'])
			$arBtn['ICON'] = $arParams['ICON'];
		elseif ($arParams['SRC'] || $arParams['IMAGE'])
			$arBtn['SRC'] = $arParams['IMAGE'] ? $arParams['IMAGE'] : $arParams['SRC'];

		$GLOBALS['APPLICATION']->setEditArea($this->getEditAreaId($entryId), array(
			$arBtn,
		));
	}
Esempio n. 15
0
                            }
                        }
                        if ($bContinue) {
                            continue;
                        }
                    }
                    $arReports[] = array("TEXT" => $rep_title, "ONCLICK" => "window.open('/bitrix/admin/sale_order_print_new.php?&ORDER_ID=" . $ID . "&doc=" . substr($file, 0, strlen($file) - 4) . "&" . bitrix_sessid_get() . "', '_blank');");
                }
            }
        }
        closedir($handle);
    }
}
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_TO_PRINT"), "TITLE" => Loc::getMessage("SALE_OVIEW_TO_PRINT_TITLE"), "LINK" => "/bitrix/admin/sale_order_print.php?ID=" . $ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"), "MENU" => $arReports);
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_ORDER_COPY"), "TITLE" => Loc::getMessage("SALE_OVIEW_ORDER_COPY_TITLE"), "LINK" => '/bitrix/admin/sale_order_create.php?lang=' . LANGUAGE_ID . "&SITE_ID=" . $saleOrder->getSiteId() . "&ID=" . $ID . "&" . bitrix_sessid_get() . GetFilterParams("filter_"));
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_DELETE"), "TITLE" => Loc::getMessage("SALE_OVIEW_DELETE_TITLE"), "LINK" => "javascript:if(confirm('" . GetMessageJS("SALE_OVIEW_DEL_MESSAGE") . "')) window.location='sale_order.php?ID=" . $ID . "&action=delete&lang=" . LANGUAGE_ID . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_")) . "'", "WARNING" => "Y");
$context = new CAdminContextMenu($aMenu);
$context->Show();
//prepare blocks order
$defaultBlocksOrder = array("statusorder", "buyer", "delivery", "financeinfo", "payment", "additional", "basket");
$formId = "sale_order_view";
$orderBasket = new Admin\Blocks\OrderBasket($saleOrder, "BX.Sale.Admin.OrderBasketObj", "sale_order_basket", true, Admin\Blocks\OrderBasket::VIEW_MODE);
echo Admin\OrderEdit::getScripts($saleOrder, $formId);
echo Admin\Blocks\OrderInfo::getScripts();
echo Admin\Blocks\OrderBuyer::getScripts();
echo Admin\Blocks\OrderPayment::getScripts();
echo Admin\Blocks\OrderStatus::getScripts($saleOrder, $USER->GetID());
echo Admin\Blocks\OrderAdditional::getScripts();
echo Admin\Blocks\OrderFinanceInfo::getScripts();
echo Admin\Blocks\OrderShipment::getScripts();
echo Admin\Blocks\OrderAnalysis::getScripts();
);

if($ID > 0)
{
	if(!$bReadOnly)
	{
		$aMenu[] = array(
			"ICON" => "btn_new",
			"TEXT" => Loc::getMessage("MAIN_ADD"),
			"LINK" => "seo_search_yandex_direct_banner_edit.php?lang=".LANGUAGE_ID."&campaign=".$campaignId
		);

		$aMenu[] = array(
			"TEXT" => Loc::getMessage("MAIN_DELETE"),
			"ICON" => "btn_delete",
			"LINK" => "seo_search_yandex_direct_banner.php?lang=".LANGUAGE_ID."&campaign=".$campaignId."&ID=".$ID."&action=delete&".bitrix_sessid_get()
		);
	}
}

if(!defined('BX_PUBLIC_MODE') || !BX_PUBLIC_MODE)
{
	require_once("tab/seo_search_yandex_direct_auth.php");
}

$context = new CAdminContextMenu($aMenu);
$context->Show();

if ($message)
{
	echo $message->Show();
 static function ShowMenu()
 {
     global $APPLICATION;
     $aContext = array(array("ICON" => "btn_list", "TEXT" => GetMessage("MAIN_ADMIN_MENU_LIST"), "LINK" => self::LIST_URL . "?lang=" . LANG . GetFilterParams("filter_"), "TITLE" => GetMessage("MAIN_ADMIN_MENU_LIST")));
     if (!self::$notSaved) {
         $aContext[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "LINK" => "javascript:if(confirm('" . GetMessage("SUP_CONFIRM_DEL_MESSAGE") . "'))window.location='" . LIST_URL . "?lang=" . LANG . "&action=delete&ID=" . self::$holidaysFields->ID . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_", false)) . "';");
     }
     if (self::SHOW_FORM_SETTINGS) {
         $link = DeleteParam(array("mode"));
         $link = $APPLICATION->GetCurPage() . "?mode=settings" . ($link != "" ? "&" . $link : "");
         $aContext[] = array("TEXT" => GetMessage("SUP_FORM_SETTINGS"), "TITLE" => GetMessage("SUP_FORM_SETTINGS_EX"), "LINK" => "javascript:" . self::$objCAdminForm->GetName() . ".ShowSettings('" . urlencode($link) . "')", "ICON" => "btn_settings");
     }
     $context = new CAdminContextMenu($aContext);
     $context->Show();
 }
Esempio n. 18
0
	else
	{
		if (obEnableReservation.hasAttribute('data-oldvalue'))
		{
			oldValue = obEnableReservation.getAttribute('data-oldvalue');
			obEnableReservation.checked = (oldValue === 'Y');
		}
	}
	showReservation(obEnableReservation.checked);
	obEnableReservation.disabled = el.checked;
}

function RestoreDefaults()
{
	if (confirm('<?echo CUtil::JSEscape(Loc::getMessage("CAT_OPTIONS_BTN_HINT_RESTORE_DEFAULT_WARNING"));?>'))
		window.location = "<? echo $APPLICATION->GetCurPage(); ?>?RestoreDefaults=Y&lang=<? echo LANGUAGE_ID; ?>&mid=<? echo urlencode($mid); ?>&<? echo bitrix_sessid_get(); ?>";
}
</script>
<form method="POST" action="<?echo $APPLICATION->GetCurPage()?>?lang=<?php 
echo LANGUAGE_ID;
?>
&mid=<?php 
echo htmlspecialcharsbx($mid);
?>
&mid_menu=1" name="ara">
<?echo bitrix_sessid_post()?><?
	$tabControl->BeginNextTab();
	?>
<tr class="heading">
	<td colspan="2"><? echo Loc::getMessage("CAT_PRODUCT_CARD") ?></td>
</tr>
Esempio n. 19
0
	if ($arAllBucket)
	{
		foreach($arAllBucket as $arBucket)
		{
		?>
			if (document.getElementById('dump_cloud_<?=$arBucket['ID']?>').checked)
				queryString += '&dump_cloud[<?=$arBucket['ID']?>]=Y';
		<?
		}
	}
	?>

	if ((ob = document.fd1.dump_encrypt) && ob.checked)
		queryString += '&dump_encrypt_key=' + encodeURIComponent(document.fd1.dump_encrypt_key.value);

	queryString += '&<?=bitrix_sessid_get()?>';

	document.getElementById('dump_result_div').innerHTML='';
	AjaxSend('dump.php', queryString);
}

function EndDump()
{
	stop = true;
	document.getElementById('stop_button').disabled = true;
	document.getElementById('start_button').disabled = false;
}

function AjaxSend(url, data)
{
	stop = false;
Esempio n. 20
0
                $arResult["SecondLine"] = "Y";
            } elseif ($perm >= BLOG_PERMS_PREMODERATE) {
                $arResult["urlToNewPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST_EDIT"], array("blog" => $arBlog["URL"], "post_id" => "new"));
                $arResult["SecondLine"] = "Y";
            }
            if (CBlog::CanUserManageBlog($arBlog["ID"], $user_id)) {
                $arResult["urlToUserSettings"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_SETTINGS"], array("blog" => $arBlog["URL"]));
                $arResult["urlToGroupEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP_EDIT"], array("blog" => $arBlog["URL"]));
                $arResult["urlToCategoryEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_CATEGORY_EDIT"], array("blog" => $arBlog["URL"]));
                $arResult["urlToBlogEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG_EDIT"], array("blog" => $arBlog["URL"]));
                $arResult["ThirdLine"] = "Y";
            }
        }
        if (empty($arOwnBlog) || $arOwnBlog["URL"] != $arBlog["URL"]) {
            if (IntVal($user_id) > 0) {
                if (!CBlog::IsFriend($arBlog["ID"], $user_id)) {
                    $arResult["urlToBecomeFriend"] = $arResult["urlToCurrentBlog"] . (strpos($arResult["urlToCurrentBlog"], "?") === false ? "?" : "&") . "become_friend=Y&" . bitrix_sessid_get();
                    $arResult["SecondLine"] = "Y";
                }
                if (!empty($arOwnBlog)) {
                    if (!CBlog::IsFriend($arOwnBlog["ID"], $arBlog["OWNER_ID"])) {
                        $tmpUrl = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_SETTINGS"], array("blog" => $arOwnBlog["URL"]));
                        $arResult["urlToAddFriend"] = $tmpUrl . (strpos($tmpUrl, "?") === false ? "?" : "&") . "add_friend[]=" . UrlEncode($arBlog["URL"]) . "&" . bitrix_sessid_get();
                        $arResult["SecondLine"] = "Y";
                    }
                }
            }
        }
    }
}
$this->IncludeComponentTemplate();
Esempio n. 21
0
		"TEXT"			=> GetMessage("FORM_FIELDS")." [".$arForm["C_FIELDS"]."]",
		"LINK"			=> "/bitrix/admin/form_field_list.php?lang=".LANGUAGE_ID."&WEB_FORM_ID=".$WEB_FORM_ID."&additional=Y",
		"TEXT_PARAM"	=> " [<a title=".GetMessage("FORM_ADD_FIELD")."  href='/bitrix/admin/form_field_edit.php?lang=".LANGUAGE_ID."&WEB_FORM_ID=".$WEB_FORM_ID."&additional=Y'>+</a>]",
		"TITLE"			=> GetMessage("FORM_FIELDS_ALT")
		);
}
*/
if ($F_RIGHT >= 30 && $ID > 0) {
    if ($additional == "Y") {
        $aMenu[] = array("ICON" => "btn_new", "TEXT" => GetMessage("FORM_CREATE"), "TITLE" => GetMessage("FORM_CREATE_FIELD"), "LINK" => "form_field_edit.php?lang=" . LANGUAGE_ID . "&WEB_FORM_ID=" . $WEB_FORM_ID . "&additional=Y");
        $aMenu[] = array("ICON" => "btn_copy", "TEXT" => GetMessage("FORM_CP"), "TITLE" => GetMessage("FORM_COPY_FIELD"), "LINK" => "form_field_edit.php?ID=" . $ID . "&amp;copy_id=" . $ID . "&lang=" . LANGUAGE_ID . "&WEB_FORM_ID=" . $WEB_FORM_ID . "&additional=Y&" . bitrix_sessid_get());
        $aMenu[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("FORM_DELETE_FIELD"), "TITLE" => GetMessage("FORM_DELETE_FIELD"), "LINK" => "javascript:if(confirm('" . GetMessage("FORM_CONFIRM_DELETE_FIELD") . "'))window.location='form_field_list.php?action=delete&ID=" . $ID . "&WEB_FORM_ID=" . $WEB_FORM_ID . "&" . bitrix_sessid_get() . "&lang=" . LANGUAGE_ID . "&additional=Y';");
    } else {
        $aMenu[] = array("ICON" => "btn_new", "TEXT" => GetMessage("FORM_CREATE"), "TITLE" => GetMessage("FORM_CREATE_QUESTION"), "LINK" => "form_field_edit.php?lang=" . LANGUAGE_ID . "&WEB_FORM_ID=" . $WEB_FORM_ID);
        $aMenu[] = array("ICON" => "btn_copy", "TEXT" => GetMessage("FORM_CP"), "TITLE" => GetMessage("FORM_COPY_QUESTION"), "LINK" => "form_field_edit.php?ID=" . $ID . "&amp;copy_id=" . $ID . "&lang=" . LANGUAGE_ID . "&WEB_FORM_ID=" . $WEB_FORM_ID . "&" . bitrix_sessid_get());
        $aMenu[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("FORM_DELETE_QUESTION"), "TITLE" => GetMessage("FORM_DELETE_QUESTION"), "LINK" => "javascript:if(confirm('" . GetMessage("FORM_CONFIRM_DELETE_QUESTION") . "'))window.location='form_field_list.php?action=delete&ID=" . $ID . "&WEB_FORM_ID=" . $WEB_FORM_ID . "&" . bitrix_sessid_get() . "&lang=" . LANGUAGE_ID . "';", "WARNING" => "Y");
    }
    $context = new CAdminContextMenu($aMenu);
    $context->Show();
}
/*
echo '<pre>'; print_r($arForm); echo '</pre>';

$aMenu[] = array("NEWBAR"=>"Y");

$aMenu[] = array(
	"TEXT"			=> GetMessage("FORM_STATUSES")." [".$arForm["STATUSES"]."]",
	"LINK"			=> "/bitrix/admin/form_status_list.php?lang=".LANGUAGE_ID."&WEB_FORM_ID=".$WEB_FORM_ID,
	"TEXT_PARAM"	=> " [<a title=".GetMessage("FORM_ADD_STATUS")."  href='/bitrix/admin/form_status_edit.php?lang=".LANGUAGE_ID."&WEB_FORM_ID=".$WEB_FORM_ID."'>+</a>]",
	"TITLE"			=> GetMessage("FORM_STATUSES_ALT")
	);
Esempio n. 22
0
        ?>
					<span class="bizproc-document-control-first">
						<a href="<?php 
        echo $APPLICATION->GetCurPageParam("id=" . $arDocumentState["ID"] . "&action=stop_bizproc&" . bitrix_sessid_get() . (!empty($arParams["back_url"]) ? "&back_url=" . urlencode($arParams["back_url"]) : ""), array("id", "action", "sessid", "back_url"));
        ?>
"><?php 
        echo GetMessage("IBEL_BIZPROC_STOP");
        ?>
</a></span>
					<?php 
    } elseif ($arParams["DropWorkflowPermission"] == "Y") {
        $tmp = true;
        ?>
					<span class="bizproc-document-control-first">
						<a href="<?php 
        echo $APPLICATION->GetCurPageParam("id=" . $arDocumentState["ID"] . "&action=del_bizproc&" . bitrix_sessid_get() . (!empty($arParams["back_url"]) ? "&back_url=" . urlencode($arParams["back_url"]) : ""), array("id", "action", "sessid", "back_url"));
        ?>
"><?php 
        echo GetMessage("IBEL_BIZPROC_DEL");
        ?>
</a></span>
					<?php 
    }
    ?>
					<span class="<?php 
    echo $tmp ? "bizproc-document-control-second" : "bizproc-document-control-single";
    ?>
">
						<a href="<?php 
    echo CComponentEngine::MakePathFromTemplate($arParams["WORKFLOW_LOG_URL"], array("MODULE_ID" => $arParams["DOCUMENT_ID"][0], "ENTITY" => $arParams["DOCUMENT_ID"][1], "DOCUMENT_ID" => $arParams["DOCUMENT_ID"][2], "DOCUMENT_TYPE" => $arParams["DOCUMENT_TYPE"][2], "ID" => $arDocumentState["ID"], "STATE_ID" => $arDocumentState["ID"]));
    ?>
Esempio n. 23
0
$bCanEdit = CLearnAccessMacroses::CanUserEditLesson(array('lesson_id' => $arParams['CHAPTER_ID'])) || $USER->IsAdmin();
if ($bCanEdit) {
    $deleteReturnUrl = "";
    if ($parent = $this->GetParent()) {
        $parentLessonId = 0;
        $lessonPath = "";
        if (strlen($arParams["LESSON_PATH"]) > 0) {
            $path = new CLearnPath();
            $path->ImportUrlencoded($arParams["LESSON_PATH"]);
            $path->PopBottom();
            $lessonPath = $path->ExportUrlencoded();
            $lessonId = $path->PopBottom();
            $edgesToParents = CLearnLesson::ListImmediateParents($arParams['CHAPTER_ID']);
            foreach ($edgesToParents as $arEdgeToParent) {
                if ((int) $arEdgeToParent['PARENT_LESSON'] === (int) $lessonId) {
                    $parentLessonId = $lessonId;
                    break;
                }
            }
        }
        if ($parentLessonId) {
            $deleteReturnUrl = CComponentEngine::MakePathFromTemplate($parent->arResult["FOLDER"] . $parent->arResult["URL_TEMPLATES"]["chapter.detail"], array("CHAPTER_ID" => "0" . $parentLessonId, "COURSE_ID" => $arParams["COURSE_ID"]));
            $deleteReturnUrl .= strpos($deleteReturnUrl, "?") !== false ? "&" : "?";
            $deleteReturnUrl .= "LESSON_PATH=" . $lessonPath;
        } else {
            $deleteReturnUrl = CComponentEngine::MakePathFromTemplate($parent->arResult["FOLDER"] . $parent->arResult["URL_TEMPLATES"]["course.detail"], array("COURSE_ID" => $arParams["COURSE_ID"]));
        }
    }
    $arAreaButtons = array(array("TEXT" => GetMessage("LEARNING_COURSES_CHAPTER_EDIT"), "TITLE" => GetMessage("LEARNING_COURSES_CHAPTER_EDIT"), "URL" => 'javascript:' . $APPLICATION->GetPopupLink(array("URL" => "/bitrix/admin/learn_unilesson_edit.php" . "?LESSON_ID=" . $arParams["CHAPTER_ID"] . '&' . $strUrlencodedLessonPath . "&lang=" . LANGUAGE_ID . "&COURSE_ID=" . $arParams["COURSE_ID"] . "&bxpublic=Y&from_module=learning", "PARAMS" => array("width" => 700, 'height' => 500, 'resize' => false))), "ICON" => "bx-context-toolbar-edit-icon", "ID" => "bx-context-toolbar-edit-chapter"), array("TEXT" => GetMessage("LEARNING_COURSES_CHAPTER_DELETE"), "TITLE" => GetMessage("LEARNING_COURSES_CHAPTER_DELETE"), "URL" => "javascript:if(confirm('" . GetMessage("LEARNING_COURSES_CHAPTER_DELETE_CONF") . "'))jsUtils.Redirect([], '" . CUtil::JSEscape("/bitrix/admin/learn_unilesson_admin.php?ID=" . $arParams["CHAPTER_ID"] . "&action=delete&lang=" . LANGUAGE_ID . "&" . bitrix_sessid_get() . "&COURSE_ID=" . $arParams["COURSE_ID"]) . (strlen($deleteReturnUrl) ? "&return_url=" . urlencode($deleteReturnUrl) : "") . "')", "ICON" => "bx-context-toolbar-delete-icon", "ID" => "bx-context-toolbar-delete-chapter"));
    $this->AddIncludeAreaIcons($arAreaButtons);
}
Esempio n. 24
0
" <?php 
        ?>
onclick="try {__photo_change_template(this, '<?php 
        echo $arParams["ID"];
        ?>
');return false;} catch (e) {return true;}"><i><span><?php 
        echo GetMessage("P_RECTANGLE_TEMPLATE");
        ?>
</span></i></a>
					</li>
					<li class="photo-control-photo-template-default<?php 
        echo $arParams["TEMPLATE"] == "default" ? " photo-control-photo-template-default-active" : "";
        ?>
">
						<a rel="nofollow" href="<?php 
        echo $APPLICATION->GetCurPageParam("template=default" . ($GLOBALS["USER"]->IsAuthorized() ? "&" . bitrix_sessid_get() : ""), array("template", "sessid"));
        ?>
" <?php 
        ?>
title="<?php 
        echo GetMessage("P_DEFAULT_TEMPLATE_TITLE");
        ?>
" <?php 
        ?>
onclick="try {__photo_change_template(this, '<?php 
        echo $arParams["ID"];
        ?>
');return false;} catch (e) {return true;}"><i><span><?php 
        echo GetMessage("P_DEFAULT_TEMPLATE");
        ?>
</span></i></a>
Esempio n. 25
0
$GROUP_EXIST = array();
$groupDb = \Bitrix\Sender\GroupTable::getList(array('select' => array('NAME', 'ID', 'ADDRESS_COUNT'), 'filter' => array('ACTIVE' => 'Y'), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC')));
while ($arGroup = $groupDb->fetch()) {
    $GROUP_EXIST[] = $arGroup;
}
if ($bVarsFromForm) {
    $DB->InitTableVarsForEdit("b_sender_mailing", "", "str_");
}
\CJSCore::Init(array("sender_admin"));
$APPLICATION->SetTitle($ID > 0 ? GetMessage("sender_mailing_edit_title_edit") . $ID : GetMessage("sender_mailing_edit_title_new"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$aMenu = array(array("TEXT" => GetMessage("sender_mailing_edit_list"), "TITLE" => GetMessage("sender_mailing_edit_list_title"), "LINK" => "sender_mailing_admin.php?lang=" . LANG, "ICON" => "btn_list"));
if ($ID > 0) {
    $aMenu[] = array("SEPARATOR" => "Y");
    $aMenu[] = array("TEXT" => GetMessage("sender_mailing_edit_add"), "TITLE" => GetMessage("sender_mailing_edit_add_title"), "LINK" => "sender_mailing_edit.php?lang=" . LANG, "ICON" => "btn_new");
    $aMenu[] = array("TEXT" => GetMessage("sender_mailing_edit_del"), "TITLE" => GetMessage("sender_mailing_edit_del_title"), "LINK" => "javascript:if(confirm('" . GetMessage("sender_mailing_edit_del_confirm") . "'))window.location='sender_mailing_admin.php?ID=" . $ID . "&action=delete&lang=" . LANGUAGE_ID . "&" . bitrix_sessid_get() . "';", "ICON" => "btn_delete");
    $aMenu[] = array("SEPARATOR" => "Y");
}
$context = new CAdminContextMenu($aMenu);
$context->Show();
?>

<?php 
if ($_REQUEST["mess"] == "ok" && $ID > 0) {
    CAdminMessage::ShowMessage(array("MESSAGE" => GetMessage("sender_mailing_edit_saved"), "TYPE" => "OK"));
}
if ($message) {
    echo $message->Show();
} elseif ($rubric->LAST_ERROR != "") {
    CAdminMessage::ShowMessage($rubric->LAST_ERROR);
}
    $DB->InitTableVarsForEdit("b_sale_pay_system", "", "str_");
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php";
$APPLICATION->SetTitle($ID > 0 ? GetMessage("SALE_EDIT_RECORD", array("#ID#" => $ID)) : GetMessage("SALE_NEW_RECORD"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
/*********************************************************************/
/********************  BODY  *****************************************/
/*********************************************************************/
?>

<?php 
$aMenu = array(array("TEXT" => GetMessage("SPSN_2FLIST"), "LINK" => "/bitrix/admin/sale_pay_system.php?lang=" . LANG . GetFilterParams("filter_"), "ICON" => "btn_list"));
if ($ID > 0 && $saleModulePermissions >= "W") {
    $aMenu[] = array("SEPARATOR" => "Y");
    $aMenu[] = array("TEXT" => GetMessage("SPSN_NEW_PAYSYS"), "LINK" => "/bitrix/admin/sale_pay_system_edit.php?lang=" . LANG . GetFilterParams("filter_"), "ICON" => "btn_new");
    $aMenu[] = array("TEXT" => GetMessage("SPSN_DELETE_PAYSYS"), "LINK" => "javascript:if(confirm('" . GetMessage("SPSN_DELETE_PAYSYS_CONFIRM") . "')) window.location='/bitrix/admin/sale_pay_system.php?action=delete&ID[]=" . $ID . "&lang=" . LANG . "&" . bitrix_sessid_get() . "#tb';", "WARNING" => "Y", "ICON" => "btn_delete");
}
$context = new CAdminContextMenu($aMenu);
$context->Show();
?>

<?php 
if (strlen($errorMessage) > 0) {
    echo CAdminMessage::ShowMessage(array("DETAILS" => $errorMessage, "TYPE" => "ERROR", "MESSAGE" => GetMessage("SPSN_ERROR"), "HTML" => true));
}
?>

<script language="JavaScript">
<!--
function SetActLinkText(ind, flag)
{
Esempio n. 27
0
                ?>
"><span class="idea-post-link-caption"><?php 
                echo GetMessage("BLOG_MES_EDIT");
                ?>
</span></a>
                                                <?php 
            }
            ?>
                                                <?php 
            if (strLen($CurPost["urlToDelete"]) > 0) {
                ?>
                                                        <a href="javascript:if(confirm('<?php 
                echo GetMessage("BLOG_MES_DELETE_POST_CONFIRM");
                ?>
')) window.location='<?php 
                echo $CurPost["urlToDelete"] . "&" . bitrix_sessid_get();
                ?>
'"><span class="idea-post-link-caption"><?php 
                echo GetMessage("BLOG_MES_DELETE");
                ?>
</span></a>
                                                <?php 
            }
            ?>
                                            </div>
                                            <br clear="both"/>
                                        </div>
                                    <?php 
        }
        ?>
				</div>
Esempio n. 28
0
            $cache->StartDataCache($arParams["CACHE_TIME"], $cache_id, $cache_path);
            $cache->EndDataCache(array("GALLERIES" => $arResult["GALLERIES"], "NAV_STRING" => $arResult["NAV_STRING"], "NAV_RESULT" => $arResult["NAV_RESULT"]));
        }
    }
}
/********************************************************************
				/Main Data
********************************************************************/
/********************************************************************
				Data
********************************************************************/
/************** GALLERIES ******************************************/
$arResult["GALLERIES"] = !is_array($arResult["GALLERIES"]) ? array() : $arResult["GALLERIES"];
if ($arParams["PERMISSION"] >= "U") {
    foreach ($arResult["GALLERIES"] as $key => $res) {
        $arResult["GALLERIES"][$key]["LINK"]["~DROP"] .= "&" . bitrix_sessid_get();
        $arResult["GALLERIES"][$key]["LINK"]["DROP"] = htmlspecialcharsbx($arResult["GALLERIES"][$key]["LINK"]["~DROP"]);
    }
}
/************** PERMISSION *****************************************/
$arResult["I"] = array("ACTIONS" => array("CREATE_GALLERY" => "N", "EDIT_GALLERY" => "N", "UPLOAD" => "N"), "PERMISSION" => $arParams["PERMISSION"], "ABS_PERMISSION" => $arParams["ABS_PERMISSION"]);
if (!$GLOBALS["USER"]->IsAuthorized() || $arParams["PERMISSION"] < "U") {
    // no changes
} elseif ($arParams["ABS_PERMISSION"] >= "U") {
    $arResult["I"]["ACTIONS"]["CREATE_GALLERY"] = "Y";
    $arResult["I"]["ACTIONS"]["EDIT_GALLERY"] = "Y";
    $arResult["I"]["ACTIONS"]["UPLOAD"] = "Y";
} elseif ($GLOBALS["USER"]->GetID() == $arParams["USER_ID"]) {
    if ($arParams["ONLY_ONE_GALLERY"] == "Y" && !empty($arResult["GALLERIES"])) {
        $arResult["I"]["ACTIONS"]["CREATE_GALLERY"] = "N";
    } else {
Esempio n. 29
0
					}
					data["url"] = BX.util.add_url_param(data["url"], request);
				}
		);

		BX.CrmFormTabLazyLoader.create(
			"<?php 
    echo CUtil::JSEscape(strtolower($arResult['FORM_ID'])) . '_livefeed';
    ?>
",
			{
				containerID: liveFeedContainerId,
				serviceUrl: "/bitrix/components/bitrix/crm.entity.livefeed/lazyload.ajax.php?&site=<?php 
    echo SITE_ID;
    ?>
&<?php 
    echo bitrix_sessid_get();
    ?>
",
				formID: "<?php 
    echo CUtil::JSEscape($arResult['FORM_ID']);
    ?>
",
				tabID: "tab_live_feed",
				params: params
			}
		);
	})();
</script>
<?php 
}
Esempio n. 30
0
            echo GetMessage("F_SUBSCRIBE_TITLE");
            ?>
" href="<?php 
            echo $APPLICATION->GetCurPageParam("TOPIC_SUBSCRIBE=Y&" . bitrix_sessid_get(), array("FORUM_SUBSCRIBE", "FORUM_SUBSCRIBE_TOPIC", "sessid"));
            ?>
"><?php 
            echo GetMessage("F_SUBSCRIBE");
            ?>
</a></noindex></span><?php 
        } else {
            ?>
			<span class="forum-option-subscribe forum-option-do-unsubscribe"><noindex><a rel="nofollow" title="<?php 
            echo GetMessage("F_UNSUBSCRIBE_TITLE");
            ?>
" href="<?php 
            echo $APPLICATION->GetCurPageParam("TOPIC_UNSUBSCRIBE=Y&" . bitrix_sessid_get(), array("FORUM_UNSUBSCRIBE", "FORUM_UNSUBSCRIBE_TOPIC", "sessid"));
            ?>
"><?php 
            echo GetMessage("F_UNSUBSCRIBE");
            ?>
</a></noindex></span><?php 
        }
    }
    ?>
	</div>
	<div class="forum-header-title"><span>
<?php 
    if ($arResult["TOPIC"]["STATE"] != "Y") {
        ?>
<span class="forum-header-title-closed">[ <span><?php 
        echo GetMessage("F_CLOSED");