Example #1
0
 /**
  * @param $value
  * @param \Freetrix\Main\Entity\Field $field
  * @param null|string $errorPhrase
  * @param null|array $additionalTemplates
  *
  * @return string
  */
 protected function getErrorMessage($value, Entity\Field $field, $errorPhrase = null, $additionalTemplates = null)
 {
     if ($errorPhrase === null) {
         $errorPhrase = $this->errorPhrase !== null ? $this->errorPhrase : Loc::getMessage($this->errorPhraseCode);
     }
     $langValues = array('#VALUE#' => $value, '#FIELD_NAME#' => $field->getName(), '#FIELD_TITLE#' => $field->getTitle());
     if (is_array($additionalTemplates)) {
         $langValues += $additionalTemplates;
     }
     return str_replace(array_keys($langValues), array_values($langValues), $errorPhrase);
 }
 function renderExceptionMessage(\Exception $exception, $debug = false)
 {
     if ($debug) {
         echo ExceptionHandlerFormatter::format($exception, false);
     } else {
         $context = Main\Application::getInstance();
         if ($context) {
             echo Main\Localization\Loc::getMessage("eho_render_exception_message");
         } else {
             echo "A error occurred during execution of this script. You can turn on extended error reporting in .settings.php file.";
         }
     }
 }
Example #3
0
 public function validate($value, $primary, array $row, Entity\Field $field)
 {
     if ($this->min !== null) {
         if (strlen($value) < $this->min) {
             $mess = $this->errorPhraseMin !== null ? $this->errorPhraseMin : Loc::getMessage($this->errorPhraseMinCode);
             return $this->getErrorMessage($value, $field, $mess, array("#MIN_LENGTH#" => $this->min));
         }
     }
     if ($this->max !== null) {
         if (strlen($value) > $this->max) {
             $mess = $this->errorPhraseMax !== null ? $this->errorPhraseMax : Loc::getMessage($this->errorPhraseMaxCode);
             return $this->getErrorMessage($value, $field, $mess, array("#MAX_LENGTH#" => $this->max));
         }
     }
     return true;
 }
 function renderExceptionMessage(\Exception $exception, $debug = false)
 {
     if ($debug) {
         echo ExceptionHandlerFormatter::format($exception, true);
     } else {
         $p = Main\IO\Path::convertRelativeToAbsolute("/error.php");
         if (Main\IO\File::isFileExists($p)) {
             include $p;
         } else {
             $context = Main\Application::getInstance();
             if ($context) {
                 echo Main\Localization\Loc::getMessage("eho_render_exception_message");
             } else {
                 echo "A error occurred during execution of this script. You can turn on extended error reporting in .settings.php file.";
             }
         }
     }
 }
Example #5
0
 public static function delete($id)
 {
     //We know for sure that languages and sites can refer to the culture.
     //Other entities should place CultureOnBeforeDelete event handler.
     $result = new Entity\DeleteResult();
     $res = LanguageTable::getList(array('filter' => array('=CULTURE_ID' => $id)));
     while ($language = $res->fetch()) {
         $result->addError(new Entity\EntityError(Loc::getMessage("culture_err_del_lang", array("#LID#" => $language["LID"]))));
     }
     $res = \Freetrix\Main\SiteTable::getList(array('filter' => array('=CULTURE_ID' => $id)));
     while ($site = $res->fetch()) {
         $result->addError(new Entity\EntityError(Loc::getMessage("culture_err_del_site", array("#LID#" => $site["LID"]))));
     }
     if (!$result->isSuccess()) {
         return $result;
     }
     return parent::delete($id);
 }
Example #6
0
		BX('sitemap_progress').innerHTML = data;
	});
}

BX.finishSitemap = function()
{
	window.tbl_sitemap.GetAdminList('/freetrix/admin/seo_sitemap.php?lang=<?php 
echo LANGUAGE_ID;
?>
');
}
</script>

<div id="sitemap_run" style="display: none;">
	<div id="sitemap_progress"><?php 
echo SitemapRuntime::showProgress(Loc::getMessage('SEO_SITEMAP_RUN_INIT'), Loc::getMessage('SEO_SITEMAP_RUN_TITLE'), 0);
?>
</div>
</div>
<?
if(isset($_REQUEST['run']) && check_freetrix_sessid())
{
	$ID = intval($_REQUEST['run']);
	if($ID > 0)
	{
?>
<script>BX.ready(BX.defer(function(){
	generateSitemap(<?php 
echo $ID;
?>
);
Example #7
0
 public static function getMap()
 {
     return array('ID' => array('data_type' => 'integer', 'primary' => true, 'autocomplete' => true, 'title' => Loc::getMessage('IBLOCK_ELEMENT_ENTITY_ID_FIELD')), 'NAME' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ELEMENT_ENTITY_NAME_FIELD')), 'CODE' => array('data_type' => 'string'), 'PREVIEW_PICTURE' => array('data_type' => 'integer'), 'DETAIL_PICTURE' => array('data_type' => 'integer'), 'PREVIEW_TEXT' => array('data_type' => 'string'), 'DETAIL_TEXT' => array('data_type' => 'string'), 'IBLOCK_ID' => array('data_type' => 'integer'), 'IBLOCK' => array('data_type' => 'Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')), 'ACTIVE' => array('data_type' => 'boolean', 'values' => array('N', 'Y')), 'IBLOCK_SECTION_ID' => array('data_type' => 'integer'));
 }
Example #8
0
 public static function getMap()
 {
     return array('IBLOCK_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_SEQUENCE_ENTITY_IBLOCK_ID_FIELD')), 'CODE' => array('data_type' => 'string', 'primary' => true, 'validation' => array(__CLASS__, 'validateCode'), 'title' => Loc::getMessage('IBLOCK_SEQUENCE_ENTITY_CODE_FIELD')), 'SEQ_VALUE' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SEQUENCE_ENTITY_SEQ_VALUE_FIELD')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')));
 }
Example #9
0
function GetMessage($name, $aReplace=false)
{
	global $MESS;
	if(isset($MESS[$name]))
	{
		$s = $MESS[$name];
		if($aReplace!==false && is_array($aReplace))
			foreach($aReplace as $search=>$replace)
				$s = str_replace($search, $replace, $s);
		return $s;
	}
	return \Freetrix\Main\Localization\Loc::getMessage($name, $aReplace);
}
Example #10
0
$adminList->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "NAME", "content" => Loc::getMessage("NAME"), "sort" => "name", "default" => true), array("id" => "CODE", "content" => Loc::getMessage("culture_code"), "sort" => "CODE", "default" => true), array("id" => "FORMAT_DATE", "content" => Loc::getMessage("culture_date"), "sort" => "FORMAT_DATE", "default" => true), array("id" => "FORMAT_DATETIME", "content" => Loc::getMessage("culture_datetime"), "sort" => "FORMAT_DATETIME", "default" => true), array("id" => "FORMAT_NAME", "content" => Loc::getMessage("culture_name"), "sort" => "FORMAT_NAME", "default" => true), array("id" => "CHARSET", "content" => Loc::getMessage("culture_charset"), "sort" => "CHARSET", "default" => true), array("id" => "WEEK_START", "content" => Loc::getMessage("culture_week"), "sort" => "WEEK_START", "default" => false), array("id" => "DIRECTION", "content" => Loc::getMessage("culture_direction"), "sort" => "DIRECTION", "default" => false)));
$days = array(Loc::getMessage("culture_su"), Loc::getMessage("culture_mo"), Loc::getMessage("culture_tu"), Loc::getMessage("culture_we"), Loc::getMessage("culture_th"), Loc::getMessage("culture_fr"), Loc::getMessage("culture_sa"));
while ($culture = $data->Fetch()) {
    $id = htmlspecialcharsbx($culture["ID"]);
    $name = htmlspecialcharsbx($culture["NAME"]);
    $row =& $adminList->AddRow($id, $culture, "culture_edit.php?ID=" . $id . "&lang=" . LANGUAGE_ID, Loc::getMessage("LANG_EDIT_TITLE"));
    $row->AddViewField("ID", $id);
    $row->AddField("NAME", '<a href="culture_edit.php?ID=' . $id . '&amp;lang=' . LANGUAGE_ID . '" title="' . Loc::getMessage("LANG_EDIT_TITLE") . '">' . $name . '</a>', $name);
    $row->AddInputField("CODE");
    $row->AddInputField("FORMAT_DATE");
    $row->AddInputField("FORMAT_DATETIME");
    $row->AddInputField("FORMAT_NAME");
    $row->AddViewField("WEEK_START", $days[$culture["WEEK_START"]]);
    $row->AddInputField("CHARSET");
    $row->AddViewField("DIRECTION", $culture["DIRECTION"] == CultureTable::LEFT_TO_RIGHT ? Loc::getMessage("culture_left_to_right") : Loc::getMessage("culture_right_to_left"));
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMessage("CHANGE"), "ACTION" => $adminList->ActionRedirect("culture_edit.php?ID=" . $id));
    if ($isAdmin) {
        $arActions[] = array("ICON" => "copy", "TEXT" => Loc::getMessage("COPY"), "ACTION" => $adminList->ActionRedirect("culture_edit.php?COPY_ID=" . $id));
        $arActions[] = array("SEPARATOR" => true);
        $arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("DELETE"), "ACTION" => "if(confirm('" . Loc::getMessage('CONFIRM_DEL') . "')) " . $adminList->ActionDoGroup($id, "delete"));
    }
    $row->AddActions($arActions);
}
$adminList->AddGroupActionTable(array("delete" => true));
$aContext = array(array("TEXT" => Loc::getMessage("ADD_LANG"), "LINK" => "culture_edit.php?lang=" . LANGUAGE_ID, "TITLE" => Loc::getMessage("ADD_LANG_TITLE"), "ICON" => "btn_new"));
$adminList->AddAdminContextMenu($aContext);
$adminList->CheckListMode();
require $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/include/prolog_admin_after.php";
$adminList->DisplayList();
require $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/include/epilog_admin.php";
Example #11
0
	public function GetSettingsHTML($arFields,$strHTMLControlName, &$arPropertyFields)
	{
		$arPropertyFields = array(
			"HIDE" => array("ROW_COUNT", "COL_COUNT", "MULTIPLE_CNT", "MULTIPLE"),
			"SET" => array("MULTIPLE" => "N"),
			'USER_TYPE_SETTINGS_TITLE' => Loc::getMessage('BT_UT_SKU_SETTING_TITLE'),
		);

		$arSettings = self::PrepareSettings($arFields);
		if (isset($arSettings['USER_TYPE_SETTINGS']))
			$arSettings = $arSettings['USER_TYPE_SETTINGS'];

		$strResult = '<tr>
		<td>'.Loc::getMessage('BT_UT_SKU_SETTING_VIEW').'</td>
		<td>'.SelectBoxFromArray($strHTMLControlName["NAME"].'[VIEW]',self::GetPropertyViewsList(true),htmlspecialcharsbx($arSettings['VIEW'])).'</td>
		</tr>
		<tr>
		<td>'.Loc::getMessage('BT_UT_SKU_SETTING_MAX_WIDTH').'</td>
		<td><input type="text" name="'.$strHTMLControlName["NAME"].'[MAX_WIDTH]" value="'.intval($arSettings['MAX_WIDTH']).'">&nbsp;'.Loc::getMessage('BT_UT_SKU_SETTING_COMMENT_MAX_WIDTH').'</td>
		</tr>
		<tr>
		<td>'.Loc::getMessage('BT_UT_SKU_SETTING_MIN_HEIGHT').'</td>
		<td><input type="text" name="'.$strHTMLControlName["NAME"].'[MIN_HEIGHT]" value="'.intval($arSettings['MIN_HEIGHT']).'">&nbsp;'.Loc::getMessage('BT_UT_SKU_SETTING_COMMENT_MIN_HEIGHT').'</td>
		</tr>
		<tr>
		<td>'.Loc::getMessage('BT_UT_SKU_SETTING_MAX_HEIGHT').'</td>
		<td><input type="text" name="'.$strHTMLControlName["NAME"].'[MAX_HEIGHT]" value="'.intval($arSettings['MAX_HEIGHT']).'">&nbsp;'.Loc::getMessage('BT_UT_SKU_SETTING_COMMENT_MAX_HEIGHT').'</td>
		</tr>
		<tr>
		<td>'.Loc::getMessage('BT_UT_SKU_SETTING_BAN_SYMBOLS').'</td>
		<td><input type="text" name="'.$strHTMLControlName["NAME"].'[BAN_SYM]" value="'.htmlspecialcharsbx($arSettings['BAN_SYM']).'"></td>
		</tr>
		<tr>
		<td>'.Loc::getMessage('BT_UT_SKU_SETTING_REP_SYMBOL').'</td>
		<td>'.SelectBoxFromArray($strHTMLControlName["NAME"].'[REP_SYM]',parent::GetReplaceSymList(true),htmlspecialcharsbx($arSettings['REP_SYM'])).'&nbsp;<input type="text" name="'.$strHTMLControlName["NAME"].'[OTHER_REP_SYM]" size="1" maxlength="1" value="'.$arSettings['OTHER_REP_SYM'].'"></td>
		</tr>';

		return $strResult;
	}
Example #12
0
		<img src="<?php 
echo Converter::getHtmlConverter()->encode($currentUser['picture']);
?>
" style="float: left; margin: 0 13px 0 0; max-width: 55px;" />
<?
		}
?>
		<a href="<?php 
echo Converter::getHtmlConverter()->encode($currentUser['profile']);
?>
" target="_blank"><?php 
echo Converter::getHtmlConverter()->encode($currentUser['name']);
?>
</a><br /><br />
		<a href="javascript:void(0)" onclick="makeNewAuth()"><?php 
echo Loc::getMessage('SEO_AUTH_CANCEL');
?>
</a>
		<div style="clear: both;"></div>
	</div>
</div>
<?
	}
?>
<script type="text/javascript">updateInfo();</script>
<?
}
?>
<?php 
echo EndNote();
?>
Example #13
0
 public static function getUserByPassword($login, $password, $passwordIsOriginal = true)
 {
     if (empty($login)) {
         throw new Main\ArgumentNullException("login");
     }
     $event = new Main\Event("main", "OnBeforeUserLogin", array(array("LOGIN" => $login, "PASSWORD" => $password, "PASSWORD_ORIGINAL" => $passwordIsOriginal)));
     $event->send();
     if (($eventResults = $event->getResults()) !== null) {
         foreach ($eventResults as $eventResult) {
             if ($eventResult->getResultType() === Main\EventResult::ERROR) {
                 static::$lastError = $eventResult->getParameters();
                 return null;
             } elseif ($eventResult->getResultType() === Main\EventResult::SUCCESS) {
                 if (($resultParams = $eventResult->getParameters()) && is_array($resultParams)) {
                     if (isset($resultParams["LOGIN"])) {
                         $login = $resultParams["LOGIN"];
                     }
                     if (isset($resultParams["PASSWORD"])) {
                         $password = $resultParams["PASSWORD"];
                     }
                     if (isset($resultParams["PASSWORD_ORIGINAL"])) {
                         $passwordIsOriginal = $resultParams["PASSWORD_ORIGINAL"];
                     }
                 }
             }
         }
     }
     $user = null;
     $event = new Main\Event("main", "OnUserLoginExternal", array(array("LOGIN" => $login, "PASSWORD" => $password, "PASSWORD_ORIGINAL" => $passwordIsOriginal)));
     $event->send();
     if (($eventResults = $event->getResults()) !== null) {
         foreach ($eventResults as $eventResult) {
             if ($eventResult->getResultType() === Main\EventResult::SUCCESS) {
                 $userId = $eventResult->getParameters();
                 if (!Main\Type\Int::isInteger($userId)) {
                     throw new SecurityException();
                 }
                 $user = new CurrentUser($userId);
                 break;
             }
         }
     }
     $connection = Main\Application::getDbConnection();
     $sqlHelper = $connection->getSqlHelper();
     if (is_null($user)) {
         $sql = "SELECT U.ID, U.PASSWORD, U.LOGIN_ATTEMPTS " . "FROM b_user U  " . "WHERE U.LOGIN = '******' " . "\tAND (U.EXTERNAL_AUTH_ID IS NULL OR U.EXTERNAL_AUTH_ID = '') " . "   AND U.ACTIVE = 'Y' ";
         $userRecordset = $connection->query($sql);
         if ($userRecord = $userRecordset->fetch()) {
             $userTmp = new CurrentUser($userRecord["ID"]);
             $salt = substr($userRecord["PASSWORD"], 0, -32);
             $passwordFromDb = substr($userRecord["PASSWORD"], -32);
             if ($passwordIsOriginal) {
                 $passwordFromUser = md5($salt . $password);
             } else {
                 $passwordFromUser = strlen($password) > 32 ? substr($password, -32) : $password;
             }
             $policy = $userTmp->getPolicy();
             $policyLoginAttempts = intval($policy["LOGIN_ATTEMPTS"]);
             $userLoginAttempts = intval($userRecord["LOGIN_ATTEMPTS"]) + 1;
             if ($policyLoginAttempts > 0 && $userLoginAttempts > $policyLoginAttempts) {
                 //					$_SESSION["FX_LOGIN_NEED_CAPTCHA"] = true;
                 //					if (!$APPLICATION->captchaCheckCode($_REQUEST["captcha_word"], $_REQUEST["captcha_sid"]))
                 //					{
                 //						$passwordUser = false;
                 //					}
             }
             if ($passwordFromDb === $passwordFromUser) {
                 $user = $userTmp;
                 //update digest hash for http digest authorization
                 if ($passwordIsOriginal && Main\Config\Option::get('main', 'use_digest_auth', 'N') == 'Y') {
                     static::updateDigest($user->getUserId(), $password);
                 }
             } else {
                 $connection->query("UPDATE b_user SET " . "   LOGIN_ATTEMPTS = " . $userLoginAttempts . " " . "WHERE ID = " . intval($userRecord["ID"]));
             }
         }
     }
     if (is_null($user)) {
         if (Main\Config\Option::get("main", "event_log_login_fail", "N") === "Y") {
             \CEventLog::log("SECURITY", "USER_LOGIN", "main", $login, "LOGIN_FAILED");
         }
         return null;
     }
     if ($user->getUserId() !== 1) {
         $limitUsersCount = intval(Main\Config\Option::get("main", "PARAM_MAX_USERS", 0));
         if ($limitUsersCount > 0) {
             $usersCount = Main\UserTable::getActiveUsersCount();
             if ($usersCount > $limitUsersCount) {
                 $sql = "SELECT 'x' " . "FROM b_user " . "WHERE ACTIVE = 'Y' " . "   AND ID = " . intval($user->getUserId()) . " " . "   AND LAST_LOGIN IS NULL ";
                 $recordset = $connection->query($sql);
                 if ($recordset->fetch()) {
                     $user = null;
                     static::$lastError = array("CODE" => "LIMIT_USERS_COUNT", "MESSAGE" => Main\Localization\Loc::getMessage("LIMIT_USERS_COUNT"));
                 }
             }
         }
     }
     if (is_null($user)) {
         if (Main\Config\Option::get("main", "event_log_login_fail", "N") === "Y") {
             \CEventLog::log("SECURITY", "USER_LOGIN", "main", $login, "LIMIT_USERS_COUNT");
         }
         return null;
     }
     $user->setAuthType(static::AUTHENTICATED_BY_PASSWORD);
     $event = new \Freetrix\Main\Event("main", "OnAfterUserLogin", array(array("LOGIN" => $login, "PASSWORD" => $password, "PASSWORD_ORIGINAL" => $passwordIsOriginal, "USER_ID" => $user->getUserId())));
     $event->send();
     return $user;
 }
Example #14
0
<?php

namespace Freetrix\Iblock;

use Freetrix\Main\Entity;
use Freetrix\Main\Localization\Loc;
Loc::loadMessages(__FILE__);
class InheritedPropertyTable extends Entity\DataManager
{
    public static function getFilePath()
    {
        return __FILE__;
    }
    public static function getTableName()
    {
        return 'b_iblock_iproperty';
    }
    public static function getMap()
    {
        return array('ID' => array('data_type' => 'integer', 'primary' => true, 'autocomplete' => true), 'IBLOCK_ID' => array('data_type' => 'integer'), 'CODE' => array('data_type' => 'string'), 'ENTITY_TYPE' => array('data_type' => 'string'), 'ENTITY_ID' => array('data_type' => 'string'), 'TEMPLATE' => array('data_type' => 'string'));
    }
}
Example #15
0
 public static function getMap()
 {
     return array('ID' => array('data_type' => 'integer', 'primary' => true, 'autocomplete' => true, 'title' => Loc::getMessage('IBLOCK_ENTITY_ID_FIELD')), 'TIMESTAMP_X' => array('data_type' => 'datetime', 'title' => Loc::getMessage('IBLOCK_ENTITY_TIMESTAMP_X_FIELD')), 'IBLOCK_TYPE_ID' => array('data_type' => 'string', 'required' => true, 'title' => Loc::getMessage('IBLOCK_ENTITY_IBLOCK_TYPE_ID_FIELD'), 'validation' => array(__CLASS__, 'validateIblockTypeId')), 'CODE' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_CODE_FIELD'), 'validation' => array(__CLASS__, 'validateCode')), 'NAME' => array('data_type' => 'string', 'required' => true, 'title' => Loc::getMessage('IBLOCK_ENTITY_NAME_FIELD'), 'validation' => array(__CLASS__, 'validateName')), 'ACTIVE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_ENTITY_ACTIVE_FIELD')), 'SORT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_ENTITY_SORT_FIELD')), 'LIST_PAGE_URL' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_LIST_PAGE_URL_FIELD'), 'validation' => array(__CLASS__, 'validateListPageUrl')), 'DETAIL_PAGE_URL' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_DETAIL_PAGE_URL_FIELD'), 'validation' => array(__CLASS__, 'validateDetailPageUrl')), 'SECTION_PAGE_URL' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_SECTION_PAGE_URL_FIELD'), 'validation' => array(__CLASS__, 'validateSectionPageUrl')), 'PICTURE' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_ENTITY_PICTURE_FIELD')), 'DESCRIPTION' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_DESCRIPTION_FIELD')), 'DESCRIPTION_TYPE' => array('data_type' => 'enum', 'values' => array('text', 'html'), 'title' => Loc::getMessage('IBLOCK_ENTITY_DESCRIPTION_TYPE_FIELD')), 'XML_ID' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_XML_ID_FIELD'), 'validation' => array(__CLASS__, 'validateXmlId')), 'TMP_ID' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_TMP_ID_FIELD'), 'validation' => array(__CLASS__, 'validateTmpId')), 'INDEX_ELEMENT' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_ENTITY_INDEX_ELEMENT_FIELD')), 'INDEX_SECTION' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_ENTITY_INDEX_SECTION_FIELD')), 'WORKFLOW' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_ENTITY_WORKFLOW_FIELD')), 'BIZPROC' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_ENTITY_BIZPROC_FIELD')), 'SECTION_CHOOSER' => array('data_type' => 'enum', 'values' => array(self::SELECT, self::DROPDOWNS, self::PATH), 'title' => Loc::getMessage('IBLOCK_ENTITY_SECTION_CHOOSER_FIELD')), 'LIST_MODE' => array('data_type' => 'enum', 'values' => array(self::SEPARATE, self::COMBINED), 'title' => Loc::getMessage('IBLOCK_ENTITY_LIST_MODE_FIELD')), 'RIGHTS_MODE' => array('data_type' => 'enum', 'values' => array(self::SIMPLE, self::EXTENDED), 'title' => Loc::getMessage('IBLOCK_ENTITY_RIGHTS_MODE_FIELD')), 'SECTION_PROPERTY' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_ENTITY_SECTION_PROPERTY_FIELD')), 'VERSION' => array('data_type' => 'enum', 'values' => array(1, 2), 'title' => Loc::getMessage('IBLOCK_ENTITY_VERSION_FIELD')), 'LAST_CONV_ELEMENT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_ENTITY_LAST_CONV_ELEMENT_FIELD')), 'SOCNET_GROUP_ID' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_ENTITY_SOCNET_GROUP_ID_FIELD')), 'EDIT_FILE_BEFORE' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_EDIT_FILE_BEFORE_FIELD'), 'validation' => array(__CLASS__, 'validateEditFileBefore')), 'EDIT_FILE_AFTER' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_ENTITY_EDIT_FILE_AFTER_FIELD'), 'validation' => array(__CLASS__, 'validateEditFileAfter')), 'TYPE' => array('data_type' => 'Freetrix\\Iblock\\Type', 'reference' => array('=this.IBLOCK_TYPE_ID' => 'ref.ID')));
 }
Example #16
0
 public static function getMap()
 {
     return array('ID' => array('data_type' => 'integer', 'primary' => true, 'autocomplete' => true, 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_ID_FIELD')), 'TIMESTAMP_X' => array('data_type' => 'datetime', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_TIMESTAMP_X_FIELD')), 'IBLOCK_ID' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_IBLOCK_ID_FIELD')), 'NAME' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateName'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_NAME_FIELD')), 'ACTIVE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_ACTIVE_FIELD')), 'SORT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_SORT_FIELD')), 'CODE' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateCode'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_CODE_FIELD')), 'DEFAULT_VALUE' => array('data_type' => 'text', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_DEFAULT_VALUE_FIELD')), 'PROPERTY_TYPE' => array('data_type' => 'enum', 'values' => array(self::TYPE_STRING, self::TYPE_NUMBER, self::TYPE_FILE, self::TYPE_ELEMENT, self::TYPE_SECTION), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_PROPERTY_TYPE_FIELD')), 'ROW_COUNT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_ROW_COUNT_FIELD')), 'COL_COUNT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_COL_COUNT_FIELD')), 'LIST_TYPE' => array('data_type' => 'enum', 'values' => array(self::LISTBOX, self::CHECKBOX), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_LIST_TYPE_FIELD')), 'MULTIPLE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_MULTIPLE_FIELD')), 'XML_ID' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateXmlId'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_XML_ID_FIELD')), 'FILE_TYPE' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateFileType'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_FILE_TYPE_FIELD')), 'MULTIPLE_CNT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_MULTIPLE_CNT_FIELD')), 'TMP_ID' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateTmpId'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_TMP_ID_FIELD')), 'LINK_IBLOCK_ID' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_LINK_IBLOCK_ID_FIELD')), 'WITH_DESCRIPTION' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_WITH_DESCRIPTION_FIELD')), 'SEARCHABLE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_SEARCHABLE_FIELD')), 'FILTRABLE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_FILTRABLE_FIELD')), 'IS_REQUIRED' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_IS_REQUIRED_FIELD')), 'VERSION' => array('data_type' => 'enum', 'values' => array(1, 2), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_VERSION_FIELD')), 'USER_TYPE' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateUserType'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_USER_TYPE_FIELD')), 'USER_TYPE_SETTINGS' => array('data_type' => 'text', 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_USER_TYPE_SETTINGS_FIELD')), 'HINT' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateHint'), 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENTITY_HINT_FIELD')), 'LINK_IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.LINK_IBLOCK_ID' => 'ref.ID')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')));
 }
Example #17
0
 public static function getMap()
 {
     return array('IBLOCK_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_IBLOCK_ID_FIELD')), 'SECTION_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_SECTION_ID_FIELD')), 'PROPERTY_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_PROPERTY_ID_FIELD')), 'SMART_FILTER' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_SMART_FILTER_FIELD')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')), 'PROPERTY' => array('data_type' => 'Freetrix\\Iblock\\Property', 'reference' => array('=this.PROPERTY_ID' => 'ref.ID')), 'SECTION' => array('data_type' => 'Freetrix\\Iblock\\Section', 'reference' => array('=this.SECTION_ID' => 'ref.ID')));
 }
Example #18
0
 public static function getMap()
 {
     return array('ID' => array('data_type' => 'string', 'primary' => true, 'validation' => array(__CLASS__, 'validateId'), 'title' => Loc::getMessage('IBLOCK_TYPE_ENTITY_ID_FIELD')), 'SECTIONS' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_TYPE_ENTITY_SECTIONS_FIELD')), 'EDIT_FILE_BEFORE' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateEditFileBefore'), 'title' => Loc::getMessage('IBLOCK_TYPE_ENTITY_EDIT_FILE_BEFORE_FIELD')), 'EDIT_FILE_AFTER' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateEditFileAfter'), 'title' => Loc::getMessage('IBLOCK_TYPE_ENTITY_EDIT_FILE_AFTER_FIELD')), 'IN_RSS' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_TYPE_ENTITY_IN_RSS_FIELD')), 'SORT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_TYPE_ENTITY_SORT_FIELD')), 'LANG_MESSAGE' => array('data_type' => 'Freetrix\\Iblock\\TypeLanguage', 'reference' => array('=this.ID' => 'ref.IBLOCK_TYPE_ID')));
 }
Example #19
0
 public static function getMap()
 {
     return array('IBLOCK_TYPE_ID' => array('data_type' => 'string', 'primary' => true, 'validation' => array(__CLASS__, 'validateIblockTypeId'), 'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_IBLOCK_TYPE_ID_FIELD')), 'LANGUAGE_ID' => array('data_type' => 'string', 'primary' => true, 'column_name' => 'LID', 'validation' => array(__CLASS__, 'validateLanguageId'), 'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_LID_FIELD')), 'NAME' => array('data_type' => 'string', 'required' => true, 'validation' => array(__CLASS__, 'validateName'), 'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_NAME_FIELD')), 'SECTIONS_NAME' => array('data_type' => 'string', 'column_name' => 'SECTION_NAME', 'validation' => array(__CLASS__, 'validateSectionsName'), 'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_SECTION_NAME_FIELD')), 'ELEMENTS_NAME' => array('data_type' => 'string', 'required' => true, 'column_name' => 'ELEMENT_NAME', 'validation' => array(__CLASS__, 'validateElementsName'), 'title' => Loc::getMessage('IBLOCK_TYPE_LANG_ENTITY_ELEMENT_NAME_FIELD')), 'LANGUAGE' => array('data_type' => 'Freetrix\\Main\\Localization\\Language', 'reference' => array('=this.LID' => 'ref.LID')));
 }
Example #20
0
, <?php 
echo $v;
?>
, '<?php 
echo $PID;
?>
', <?php 
echo CUtil::PhpToJsObject($NS);
?>
);
</script>
<?
	}
	else
	{
		if(isset($arExistedSitemaps) && count($arExistedSitemaps) > 0)
		{
			echo BeginNote(),Loc::getMessage('SEO_SITEMAP_RUN_ROBOTS_WARNING', array(
				"#SITEMAPS#" => "<li>".implode("</li><li>", $arExistedSitemaps)."</li>",
				"#LANGUAGE_ID#" => LANGUAGE_ID,
				"#SITE_ID#" => $arSitemap['SITE_ID'],
			));
		}
?>
<script>
top.BX.finishSitemap();
</script>
<?
	}
}
?>
Example #21
0
 public static function getMap()
 {
     return array('IBLOCK_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_MESSAGE_ENTITY_IBLOCK_ID_FIELD')), 'MESSAGE_ID' => array('data_type' => 'string', 'primary' => true, 'validation' => array(__CLASS__, 'validateMessageId'), 'title' => Loc::getMessage('IBLOCK_MESSAGE_ENTITY_MESSAGE_ID_FIELD')), 'MESSAGE_TEXT' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateMessageText'), 'title' => Loc::getMessage('IBLOCK_MESSAGE_ENTITY_MESSAGE_TEXT_FIELD')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')));
 }
									if(!!res[i]['linked-from'])
									{
										s += '<tr><td><?php 
echo CUtil::JSEscape(Loc::getMessage('SEO_CRAWLISSUES_LINKEDFROM'));
?>
</td><td>'+res[i]['linked-from']+'</td></tr>'

									}

									s += '</table><br /><br />';
								}
							}
							else
							{
								s += '<b><?php 
echo CUtil::JSEscape(Loc::getMessage('SEO_EDIT_NO_MESSAGES'));
?>
</b>';
							}

						break;
					}

					node.innerHTML = s;
				}
			}
		}
	);
}
</script>
<?
Example #23
0
 public static function getMap()
 {
     return array('IBLOCK_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IBLOCK_ID_FIELD')), 'FIELD_ID' => array('data_type' => 'string', 'primary' => true, 'validation' => array(__CLASS__, 'validateFieldId'), 'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_FIELD_ID_FIELD')), 'IS_REQUIRED' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IS_REQUIRED_FIELD')), 'DEFAULT_VALUE' => array('data_type' => 'string', 'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_DEFAULT_VALUE_FIELD')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')));
 }
Example #24
0
Loc::loadMessages(__FILE__);

global $APPLICATION;

if(!CModule::IncludeModule('iblock'))
{
	echo Loc::getMessage("BT_COMP_MLI_AJAX_ERR_MODULE_ABSENT");
	die();
}

CUtil::JSPostUnescape();

$IBlockID = intval($_REQUEST["IBLOCK_ID"]);
if(!CIBlockRights::UserHasRightTo($IBlockID, $IBlockID, "iblock_admin_display"))
{
	echo Loc::getMessage('BT_COMP_MLI_AJAX_ERR_IBLOCK_ACCESS_DENIED');
	die();
}

$arIBlock = CIBlock::GetArrayByID($IBlockID);

$strBanSym = trim($_REQUEST['BAN_SYM']);
$arBanSym = str_split($strBanSym,1);
$strRepSym = trim($_REQUEST['REP_SYM']);
$arRepSym = array_fill(0,sizeof($arBanSym),$strRepSym);

$bSection = false;
if (isset($_REQUEST['TYPE']) && 'SECTION' == $_REQUEST['TYPE'])
{
	$bSection = true;
}
Example #25
0
 public static function getMap()
 {
     return array('IBLOCK_SECTION_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_ELEMENT_ENTITY_IBLOCK_SECTION_ID_FIELD')), 'IBLOCK_SECTION' => array('data_type' => 'Section', 'reference' => array('=this.IBLOCK_SECTION_ID' => 'ref.ID')), 'IBLOCK_ELEMENT_ID' => array('data_type' => 'integer', 'primary' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_ELEMENT_ENTITY_IBLOCK_ELEMENT_ID_FIELD')), 'IBLOCK_ELEMENT' => array('data_type' => 'Element', 'reference' => array('=this.IBLOCK_ELEMENT_ID' => 'ref.ID'), 'title' => Loc::getMessage('IBLOCK_SECTION_ELEMENT_ENTITY_IBLOCK_ELEMENT_FIELD')), 'ADDITIONAL_PROPERTY_ID' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ELEMENT_ENTITY_ADDITIONAL_PROPERTY_ID_FIELD')));
 }
Example #26
0
 public static function getMap()
 {
     return array('ID' => array('data_type' => 'integer', 'primary' => true, 'autocomplete' => true, 'title' => Loc::getMessage('IBLOCK_RSS_ENTITY_ID_FIELD')), 'IBLOCK_ID' => array('data_type' => 'integer', 'required' => true, 'title' => Loc::getMessage('IBLOCK_RSS_ENTITY_IBLOCK_ID_FIELD')), 'NODE' => array('data_type' => 'string', 'required' => true, 'validation' => array(__CLASS__, 'validateNode'), 'title' => Loc::getMessage('IBLOCK_RSS_ENTITY_NODE_FIELD')), 'NODE_VALUE' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateNodeValue'), 'title' => Loc::getMessage('IBLOCK_ENTITY_NODE_VALUE_FIELD')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')));
 }
Example #27
0
function seo_getIblock($iblockId, $sectionId, $sectionChecked, $elementChecked, $arSectionChecked = array(), $arElementChecked = array())
{
	$dbIblock = \CIBlock::GetByID($iblockId);
	$arIBlock = $dbIblock->Fetch();
	if(is_array($arIBlock))
	{
		$bSection = strlen($arIBlock['SECTION_PAGE_URL']) > 0;
		$bElement = strlen($arIBlock['DETAIL_PAGE_URL']) > 0;

		$dbRes = \CIBlockSection::GetList(
			array('SORT' => 'ASC', 'NAME' => 'ASC'),
			array(
				'IBLOCK_ID' => $iblockId,
				'SECTION_ID' => $sectionId,
				'ACTIVE' => 'Y',
				'CHECK_PERMISSIONS' => 'Y'
			)
		);
		$bFound = false;
		while ($arRes = $dbRes->Fetch())
		{
			$r = RandString(8);
			$d = $arRes['ID'];

			$bSectionChecked = $bSection && ($arSectionChecked[$d] === 'Y' || $sectionChecked && $arSectionChecked[$d] !== 'N');
			$bElementChecked = $bElement && ($arElementChecked[$d] === 'Y' || $elementChecked && $arElementChecked[$d] !== 'N');


			if(!$bFound)
			{
				$bFound = true;
?>
<table class="internal" style="width: 100%;">
	<tr class="heading">
		<td colspan="2"><?php 
echo Loc::getMessage('SEO_SITEMAP_IBLOCK_SECTION_NAME');
?>
</td>
		<td width="100"><?php 
echo Loc::getMessage('SEO_SITEMAP_IBLOCK_SECTION_SECTION');
?>
</td>
		<td width="100"><?php 
echo Loc::getMessage('SEO_SITEMAP_IBLOCK_SECTION_ELEMENTS');
?>
</td>
	</tr>
<?
			}
?>
	<tr>
		<td width="20"><span onclick="loadIblock(this, '<?php 
echo $arRes['IBLOCK_ID'];
?>
', '<?php 
echo $d;
?>
', '<?php 
echo $r;
?>
', BX('IBLOCK_SECTION_SECTION_<?php 
echo $d;
?>
').checked, BX('IBLOCK_SECTION_ELEMENT_<?php 
echo $d;
?>
').checked);" class="sitemap-tree-icon-iblock"></span></td>
		<td><a href="iblock_list_admin.php?lang=<?php 
echo LANGUAGE_ID;
?>
&amp;IBLOCK_ID=<?php 
echo $arRes['IBLOCK_ID'];
?>
&amp;find_section_section=<?php 
echo $d;
?>
"><?php 
echo Converter::getHtmlConverter()->encode($arRes['NAME']);
?>
</a></td>
		<td align="center"><input type="hidden" name="IBLOCK_SECTION_SECTION[<?php 
echo $iblockId;
?>
][<?php 
echo $d;
?>
]" value="N" /><input type="checkbox" name="IBLOCK_SECTION_SECTION[<?php 
echo $iblockId;
?>
][<?php 
echo $d;
?>
]" id="IBLOCK_SECTION_SECTION_<?php 
echo $d;
?>
" value="Y"<?php 
echo $bSection ? '' : ' disabled="disabled"';
echo $bSectionChecked ? ' checked="checked"' : '';
?>
 data-type="section" onclick="checkAllSection('<?php 
echo $r;
?>
', this.checked);" />&nbsp;<label for="IBLOCK_SECTION_SECTION_<?php 
echo $d;
?>
"><?php 
echo Loc::getMessage('MAIN_YES');
?>
</label></td>
		<td align="center"><input type="hidden" name="IBLOCK_SECTION_ELEMENT[<?php 
echo $iblockId;
?>
][<?php 
echo $d;
?>
]" value="N" /><input type="checkbox" name="IBLOCK_SECTION_ELEMENT[<?php 
echo $iblockId;
?>
][<?php 
echo $d;
?>
]" id="IBLOCK_SECTION_ELEMENT_<?php 
echo $d;
?>
" value="Y"<?php 
echo $bElement ? '' : ' disabled="disabled"';
echo $bElementChecked ? ' checked="checked"' : '';
?>
 data-type="element" onclick="checkAllElement('<?php 
echo $r;
?>
', this.checked);" />&nbsp;<label for="IBLOCK_SECTION_ELEMENT_<?php 
echo $d;
?>
"><?php 
echo Loc::getMessage('MAIN_YES');
?>
</label></td>
	</tr>
	<tr style="display: none" id="subdirs_row_<?php 
echo $r;
?>
">
		<td colspan="4" id="subdirs_<?php 
echo $r;
?>
" align="center"></td>
	</tr>
<?
		}

		if(!$bFound)
		{
			echo Loc::getMessage('SEO_SITEMAP_NO_DIRS_FOUND');
		}
	}
}
Example #28
0
<?php

namespace Freetrix\Main\Page;

\Freetrix\Main\Localization\Loc::loadMessages(__FILE__);
final class Frame
{
    private static $instance;
    private static $isEnabled = false;
    private static $isAjaxRequest = null;
    private static $useHTMLCache = false;
    private static $onBeforeHandleKey = false;
    private static $onHandleKey = false;
    private static $onRestartBufferHandleKey = false;
    private static $onPrologHandleKey = false;
    private $dynamicIDs = array();
    private $dynamicData = array();
    private $containers = array();
    private $curDynamicId = false;
    private $injectedJS = false;
    public $arDynamicData = array();
    private function __construct()
    {
        //use self::getInstance()
    }
    private function __clone()
    {
        //you can't clone it
    }
    /**
     * @return Frame
Example #29
0
 public static function getMap()
 {
     return array('ID' => array('data_type' => 'integer', 'primary' => true, 'autocomplete' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_ID_FIELD')), 'TIMESTAMP_X' => array('data_type' => 'datetime', 'required' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_TIMESTAMP_X_FIELD')), 'MODIFIED_BY' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_MODIFIED_BY_FIELD')), 'DATE_CREATE' => array('data_type' => 'datetime', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_DATE_CREATE_FIELD')), 'CREATED_BY' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_CREATED_BY_FIELD')), 'IBLOCK_ID' => array('data_type' => 'integer', 'required' => true, 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_IBLOCK_ID_FIELD')), 'IBLOCK_SECTION_ID' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_IBLOCK_SECTION_ID_FIELD')), 'ACTIVE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_ACTIVE_FIELD')), 'GLOBAL_ACTIVE' => array('data_type' => 'boolean', 'values' => array('N', 'Y'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_GLOBAL_ACTIVE_FIELD')), 'SORT' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_SORT_FIELD')), 'NAME' => array('data_type' => 'string', 'required' => true, 'validation' => array(__CLASS__, 'validateName'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_NAME_FIELD')), 'PICTURE' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_PICTURE_FIELD')), 'LEFT_MARGIN' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_LEFT_MARGIN_FIELD')), 'RIGHT_MARGIN' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_RIGHT_MARGIN_FIELD')), 'DEPTH_LEVEL' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_DEPTH_LEVEL_FIELD')), 'DESCRIPTION' => array('data_type' => 'text', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_DESCRIPTION_FIELD')), 'DESCRIPTION_TYPE' => array('data_type' => 'enum', 'required' => true, 'values' => array('text', 'html'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_DESCRIPTION_TYPE_FIELD')), 'SEARCHABLE_CONTENT' => array('data_type' => 'text', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_SEARCHABLE_CONTENT_FIELD')), 'CODE' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateCode'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_CODE_FIELD')), 'XML_ID' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateXmlId'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_XML_ID_FIELD')), 'TMP_ID' => array('data_type' => 'string', 'validation' => array(__CLASS__, 'validateTmpId'), 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_TMP_ID_FIELD')), 'DETAIL_PICTURE' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_DETAIL_PICTURE_FIELD')), 'SOCNET_GROUP_ID' => array('data_type' => 'integer', 'title' => Loc::getMessage('IBLOCK_SECTION_ENTITY_SOCNET_GROUP_ID_FIELD')), 'IBLOCK' => array('data_type' => 'Freetrix\\Iblock\\Iblock', 'reference' => array('=this.IBLOCK_ID' => 'ref.ID')), 'PARENT_SECTION' => array('data_type' => 'Freetrix\\Iblock\\Section', 'reference' => array('=this.IBLOCK_SECTION_ID' => 'ref.ID')), 'CREATED_BY_USER' => array('data_type' => 'Freetrix\\Main\\User', 'reference' => array('=this.CREATED_BY' => 'ref.ID')), 'MODIFIED_BY_USER' => array('data_type' => 'Freetrix\\Main\\User', 'reference' => array('=this.MODIFIED_BY' => 'ref.ID')));
 }
Example #30
0
	function EmployeeDrawStructure($arStructure, $arSections, $key, $win_id)
	{
		foreach ($arStructure[$key] as $ID)
		{
			$arRes = $arSections[$ID];

			echo '<div class="mts-section'.($key == 0 ? '-first' : '').'" style="padding-left: '.(($arRes['DEPTH_LEVEL']-1)*15).'px" onclick="document.getElementById(\''.$win_id.'\').__object.LoadSection(\''.$ID.'\')" id="mts_section_'.$ID.'">';
			echo '<div class="mts-section-name mts-closed">'.$arRes['NAME'].'</div>';
			echo '</div>';

			echo '<div style="display: none" id="bx_children_'.$arRes['ID'].'">';
			if (is_array($arStructure[$ID]))
			{
				EmployeeDrawStructure($arStructure, $arSections, $ID, $win_id);
			}
			echo '<div class="mts-list" id="mts_elements_'.$ID.'" style="margin-left: '.($arRes['DEPTH_LEVEL']*15).'px"><i>'.Loc::getMessage('CT_BMTS_WAIT').'</i></div>';
			echo '</div>';

		}
	}