示例#1
0
 public function getValue($propertyCode)
 {
     if ($this->values === false) {
         $this->values = $this->queryValues();
     }
     if (isset($this->values[$propertyCode])) {
         return \Freetrix\Main\Text\String::htmlEncode($this->values[$propertyCode]["VALUE"]);
     } else {
         return "";
     }
 }
 public static function format(\Exception $exception, $htmlMode = false, $level = 0)
 {
     $result = '[' . get_class($exception) . '] ';
     if ($exception instanceof \ErrorException) {
         $result .= static::severityToString($exception->getSeverity());
     }
     $result .= "\n" . static::getMessage($exception) . "\n";
     if ($exception instanceof Main\DB\SqlQueryException) {
         $result .= $exception->getQuery() . "\n";
     }
     $fileLink = static::getFileLink($exception->getFile(), $exception->getLine());
     $result .= $fileLink . (empty($fileLink) ? "" : "\n");
     if ($htmlMode) {
         $result = Main\Text\String::htmlEncode($result);
     }
     $prevArg = null;
     $trace = static::getTrace($exception);
     foreach ($trace as $traceNum => $traceInfo) {
         $traceLine = '#' . $traceNum . ': ';
         if (array_key_exists('class', $traceInfo)) {
             $traceLine .= $traceInfo['class'] . $traceInfo['type'];
         }
         if (array_key_exists('function', $traceInfo)) {
             $traceLine .= $traceInfo['function'];
             $traceLine .= static::getArguments($traceInfo['args'], $level);
         }
         if ($htmlMode) {
             $traceLine = Main\Text\String::htmlEncode($traceLine);
         }
         if (array_key_exists('file', $traceInfo)) {
             $traceLine .= "\n\t" . static::getFileLink($traceInfo['file'], $traceInfo['line']);
         } else {
             $traceLine .= "\n\t" . static::getFileLink(null, null);
         }
         $result .= $traceLine . "\n";
     }
     if ($htmlMode) {
         $result = '<pre>' . $result . '</pre>';
     } else {
         $result .= static::DELIMITER;
     }
     return $result;
 }
示例#3
0
		$entity->setFields($arFields);

		$templates = $ipropTemplates->findTemplates();
		if (is_array($_POST["IPROPERTY_TEMPLATES"]))
		{
			foreach ($_POST["IPROPERTY_TEMPLATES"] as $TEMPLATE_NAME => $TEMPLATE_VALUE)
			{
				$templates[$TEMPLATE_NAME] = array(
					"TEMPLATE" => \Freetrix\Iblock\Template\Helper::convertArrayToModifiers($TEMPLATE_VALUE),
				);
			}
		}

		$result = array();
		foreach ($templates as $TEMPLATE_NAME => $templateInfo)
		{
			$result[] = array(
				"id" => $TEMPLATE_NAME,
				"value" => \Freetrix\Main\Text\String::htmlEncode(
					\Freetrix\Iblock\Template\Engine::process($entity, $templateInfo["TEMPLATE"])
				),
			);
		}
		echo CUtil::PhpToJSObject($result);
		//$entity = $values->createTemplateEntity();
		//$entity->setFields($arFields);
		//$templates = $values->getTemplateEntity();
	}
}
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/epilog_after.php");
?>
示例#4
0
	BX('bx_culture_link').href = 'culture_edit.php?ID='+culture.ID+'&lang=<?php 
echo LANGUAGE_ID;
?>
';
}
BX.ready(BXSetCulture);
</script>
			<select name="CULTURE_ID" onchange="BXSetCulture()" id="bx_culture_select">
<?
foreach($cultures as $cult):
?>
				<option value="<?php 
echo $cult["ID"];
?>
"<?if($cult["ID"] == $language["CULTURE_ID"]) echo " selected"?>><?php 
echo String::htmlEncode($cult["NAME"]);
?>
</option>
<?
endforeach;
?>
			</select>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><a href="culture_edit.php?lang=<?php 
echo LANGUAGE_ID;
?>
" id="bx_culture_link"><?echo Loc::getMessage("lang_edit_culture_edit")?></a></td>
	</tr>