File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/sale/lib/discount/preset/htmlhelper.php
Back
<?php namespace Bitrix\Sale\Discount\Preset; final class HtmlHelper { public static function generateSelect($id, array $selectData, $value, array $params = array()) { $html = '<select name="' . $id . '" id="' . $id . '"'; foreach($params as $param) { $html .= ' ' . $param; } $html .= '>'; foreach($selectData as $key => $val) { $html .= '<option value="' . htmlspecialcharsbx($key) . '"' . ($value == $key ? ' selected' : '') . '>' . htmlspecialcharsex($val) . '</option>'; } $html .= '</select>'; return $html; } public static function generateMultipleSelect($id, array $selectData, array $values, array $params = array()) { $html = '<select multiple name="' . $id . '" id="' . $id . '"'; foreach($params as $param) { $html .= ' ' . $param; } $html .= '>'; foreach($selectData as $key => $val) { $html .= '<option value="' . htmlspecialcharsbx($key) . '"' . (in_array($key, $values) ? ' selected' : '') . '>' . htmlspecialcharsex($val) . '</option>'; } $html .= '</select>'; return $html; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.22 |
proxy
|
phpinfo
|
Settings