コード例 #1
0
ファイル: basevalues.php プロジェクト: spas-viktor/books
 public function getValue($propertyCode)
 {
     if ($this->values === false) {
         $this->values = $this->queryValues();
     }
     if (isset($this->values[$propertyCode])) {
         return \Bitrix\Main\Text\String::htmlEncode($this->values[$propertyCode]["VALUE"]);
     } else {
         return "";
     }
 }
コード例 #2
0
 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
ファイル: options.php プロジェクト: romzes5000/bex.d7dull
echo bitrix_sessid_post();
$tabControl->beginNextTab();
?>
    <tr>
        <td width="40%">
            <label for="max_image_size"><?php 
echo Loc::getMessage("REFERENCES_MAX_IMAGE_SIZE");
?>
:</label>
        <td width="60%">
            <input type="text"
                   size="50"
                   maxlength="5"
                   name="max_image_size"
                   value="<?php 
echo String::htmlEncode(Option::get(ADMIN_MODULE_NAME, "max_image_size", 500));
?>
"
                   />
        </td>
    </tr>

    <?php 
$tabControl->buttons();
?>
    <input type="submit"
           name="save"
           value="<?php 
echo Loc::getMessage("MAIN_SAVE");
?>
"
コード例 #4
0
ファイル: class.php プロジェクト: akniyev/arteva.ru
 /**
  * Sets measure for all viewed products.
  * @return void
  */
 protected function setItemsMeasure()
 {
     if (!count($this->productIdsMap)) {
         return;
     }
     $measures = $this->data['MEASURE'];
     foreach ($this->items as &$item) {
         if (array_key_exists($item['CATALOG_MEASURE'], $measures)) {
             $measure = $measures[$item['CATALOG_MEASURE']];
             $item['~CATALOG_MEASURE_NAME'] = LANGUAGE_ID == "ru" ? $measure["SYMBOL_RUS"] : $measure["SYMBOL_INTL"];
             $item['CATALOG_MEASURE_NAME'] = String::htmlEncode($item['~CATALOG_MEASURE_NAME']);
         }
     }
     // Ratios
     $ratioIterator = CCatalogMeasureRatio::getList(array(), array('@PRODUCT_ID' => array_values($this->productIdsMap)), false, false, array('PRODUCT_ID', 'RATIO'));
     while ($ratio = $ratioIterator->fetch()) {
         if (isset($this->items[$ratio['PRODUCT_ID']])) {
             $intRatio = intval($ratio['RATIO']);
             $dblRatio = doubleval($ratio['RATIO']);
             $mxRatio = $dblRatio > $intRatio ? $dblRatio : $intRatio;
             if (CATALOG_VALUE_EPSILON > abs($mxRatio)) {
                 $mxRatio = 1;
             } elseif (0 > $mxRatio) {
                 $mxRatio = 1;
             }
             $this->items[$ratio['PRODUCT_ID']]['CATALOG_MEASURE_RATIO'] = $mxRatio;
         }
     }
 }
コード例 #5
0
ファイル: template.php プロジェクト: ASDAFF/entask.ru
														<?foreach($app["OPTIONS"] as $opt):?>
														<option value="<?php 
echo String::htmlEncode($opt);
?>
"><?php 
echo String::htmlEncode($opt);
?>
</option>
														<?endforeach?>
														<option value="<?echo GetMessage("main_app_pass_other")?>"><?echo GetMessage("main_app_pass_other")?></option>
													<?else:?>
														<option value="<?php 
echo String::htmlEncode($app["NAME"]);
?>
"><?php 
echo String::htmlEncode($app["NAME"]);
?>
</option>
													<?endif?>
													</select>
												</td>
												<td class="tal" style="padding: 0;">
													<input type="text" name="COMMENT" class="bx-otp-slt medium m0" placeholder="<?echo GetMessage("main_app_pass_comment_ph")?>">
												</td>
											</tr>
										</tbody>
									</table>
									<input type="hidden" name="APPLICATION_ID" value="<?php 
echo $app_id;
?>
">
コード例 #6
0
        if (is_array($_POST["IBLOCK_SECTION"])) {
            $section_id = min(array_filter($_POST["IBLOCK_SECTION"], "strlen"));
        } else {
            $section_id = 0;
        }
        $arFields = array("IBLOCK_ID" => $_REQUEST["IBLOCK_ID"], "IBLOCK_SECTION_ID" => $section_id, "NAME" => $_POST["NAME"], "CODE" => $_POST["CODE"], "PREVIEW_TEXT" => $_POST["PREVIEW_TEXT"], "DETAIL_TEXT" => $_POST["DETAIL_TEXT"]);
    } else {
        $ipropTemplates = null;
        $arFields = array();
    }
    if ($ipropTemplates) {
        $values = $ipropTemplates->getValuesEntity();
        $entity = $values->createTemplateEntity();
        $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" => \Bitrix\Iblock\Template\Helper::convertArrayToModifiers($TEMPLATE_VALUE));
            }
        }
        $result = array();
        foreach ($templates as $TEMPLATE_NAME => $templateInfo) {
            $result[] = array("id" => $TEMPLATE_NAME, "value" => \Bitrix\Main\Text\String::htmlEncode(\Bitrix\Iblock\Template\Engine::process($entity, $templateInfo["TEMPLATE"])));
        }
        echo CUtil::PhpToJSObject($result);
        //$entity = $values->createTemplateEntity();
        //$entity->setFields($arFields);
        //$templates = $values->getTemplateEntity();
    }
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
コード例 #7
0
ファイル: lang_edit.php プロジェクト: DarneoStudio/bitrix
BX.ready(BXSetCulture);
</script>
			<select name="CULTURE_ID" onchange="BXSetCulture()" id="bx_culture_select">
<?php 
foreach ($cultures as $cult) {
    ?>
				<option value="<?php 
    echo $cult["ID"];
    ?>
"<?php 
    if ($cult["ID"] == $language["CULTURE_ID"]) {
        echo " selected";
    }
    ?>
><?php 
    echo String::htmlEncode($cult["NAME"]);
    ?>
</option>
<?php 
}
?>
			</select>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><a href="culture_edit.php?lang=<?php 
echo LANGUAGE_ID;
?>
" id="bx_culture_link"><?php 
echo Loc::getMessage("lang_edit_culture_edit");