Your IP : 18.222.184.184
<?php
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");
//namespace YopselMopsel;
use Bitrix\Highloadblock as HL;
class Manufacturer
{
public $id;
public $name;
public static function getById()
{
function getHighLoadBlockByName($hlbl,$queryData = array(),$debug = false)
{
$hlblock = HL\HighloadBlockTable::getList(
array("filter" => array('TABLE_NAME' => $hlbl))
)->fetch();
if (empty($hlblock))
{
return false;
}
$entity = HL\HighloadBlockTable::compileEntity($hlblock);
$entity_data_class = $entity->getDataClass();
$rsData = $entity_data_class::getList($queryData);
while($arData = $rsData->Fetch())
{
$arRes[] = $arData;
}
return $arRes;
}
$arGResult = getHighLoadBlockByName("Manufacturers",array(
"select" => array("*"),
//"order" => array(""),
//"filter" => array(''),
));
return $arGResult;
}
}
?>
<form name="find_form" method="GET" action="/bitrix/admin/highloadblock_rows_list.php?ENTITY_ID=12">
<div id="adm-filter-tab-wrap-tbl_manufacturers_filter_id" class="adm-filter-wrap" style="display: block;">
<table class="adm-filter-main-table">
<tbody><tr>
<td class="adm-filter-main-table-cell">
<div class="adm-filter-tabs-block" id="filter-tabs-tbl_manufacturers_filter_id">
<span id="adm-filter-tab-tbl_manufacturers_filter_id-0" class="adm-filter-tab adm-filter-tab-active" onclick="tbl_manufacturers_filter_id.SetActiveTab(this); tbl_manufacturers_filter_id.ApplyFilter('0'); " title="Перейти к фильтру "По умолчанию"">Фильтр</span><span id="adm-filter-add-tab-tbl_manufacturers_filter_id" class="adm-filter-tab adm-filter-add-tab" onclick="tbl_manufacturers_filter_id.SaveAs();" title="Создать новый фильтр"></span><span onclick="tbl_manufacturers_filter_id.SetFoldedView();" class="adm-filter-switcher-tab"><span id="adm-filter-switcher-tab" class="adm-filter-switcher-tab-icon" title="Свернуть фильтр"></span></span><span class="adm-filter-tabs-block-underlay"></span>
</div>
</td>
</tr>
<tr>
<td class="adm-filter-main-table-cell">
<div class="adm-filter-content adm-filter-content-first" id="tbl_manufacturers_filter_id_content">
<div class="adm-filter-content-table-wrap">
<table cellspacing="0" class="adm-filter-content-table" id="tbl_manufacturers_filter_id" style="display: table;"> <tbody><tr id="tbl_manufacturers_filter_id_row_0">
<td class="adm-filter-item-left">ID</td>
<td class="adm-filter-item-center"><div class="adm-filter-alignment"><div class="adm-filter-box-sizing"><div class="adm-input-wrap adm-input-help-icon-wrap"><input type="text" name="find_id" size="47" value="" class="adm-input"><a title="Помощь по языку запросов в полях фильтра" class="adm-input-help-icon" href="javascript:LogicHelp()"></a></div><script type="text/javascript">
function LogicHelp() { window.open('http://dev.1c-bitrix.ru/user_help/help/filter.php', '','scrollbars=yes,resizable=yes,width=780,height=500,top='+Math.floor((screen.height - 500)/2-14)+',left='+Math.floor((screen.width - 780)/2-5)); }
</script></div></div></td>
<td class="adm-filter-item-right"><span class="adm-filter-item-delete" onclick="this.blur(); tbl_manufacturers_filter_id.DeleteFilterRow('tbl_manufacturers_filter_id_row_0');" hidefocus="true" title="Скрыть условие поиска" style="display: none;"></span></td></tr>
<tr id="tbl_manufacturers_filter_id_row_0_delim"><td colspan="3" class="delimiter"><div class="empty"></div></td></tr></tbody></table>
</div>
<div class="adm-filter-bottom-separate" id="tbl_manufacturers_filter_id_bottom_separator" style="display: none;"></div>
<div class="adm-filter-bottom">
<input type="submit" class="adm-btn" id="tbl_manufacturers_filter_idset_filter" name="set_filter" title="Найти" onclick="return tbl_manufacturers_filter_id.OnSet('tbl_manufacturers', '/bitrix/admin/highloadblock_rows_list.php?ENTITY_ID=12&lang=ru', this);" value="Найти">
<input type="submit" class="adm-btn" id="tbl_manufacturers_filter_iddel_filter" name="del_filter" title="Отменить" onclick="return tbl_manufacturers_filter_id.OnClear('tbl_manufacturers', '/bitrix/admin/highloadblock_rows_list.php?ENTITY_ID=12&lang=ru', this);" value="Отменить">
<div class="adm-filter-setting-block">
<span class="adm-filter-setting" onclick="this.blur();tbl_manufacturers_filter_id.SaveMenuShow(this);return false;" hidefocus="true" title="Действия с фильтром"></span>
<span class="adm-filter-add-button" onclick="this.blur();tbl_manufacturers_filter_id.SettMenuShow(this);return false;" hidefocus="true" title="Дополнительные условия поиска"></span>
</div>
</div>
</div>
</td>
</tr>
</tbody></table>
</div><div style="display:none">
<div id="filter_save_opts_tbl_manufacturers_filter_id">
<table width="100%">
<tbody><tr>
<td align="right" width="40%">Название фильтра:</td>
<td><input type="text" name="save_filter_name" value="" size="30" maxlength="255"></td>
</tr>
<tr>
<td align="right" width="40%">Доступен всем:</td>
<td><input type="checkbox" name="common"></td>
</tr>
</tbody></table>
</div>
</div>
<script type="text/javascript">
var tbl_manufacturers_filter_id = {};
BX.ready(function(){
tbl_manufacturers_filter_id = new BX.AdminFilter("tbl_manufacturers_filter_id", ["0"]);
tbl_manufacturers_filter_id.state.init = true;
tbl_manufacturers_filter_id.state.folded = false;
tbl_manufacturers_filter_id.InitFilter({"0":true});
tbl_manufacturers_filter_id.oOptions = [];
tbl_manufacturers_filter_id.popupItems = ['ID'];
tbl_manufacturers_filter_id.InitFirst();
tbl_manufacturers_filter_id.url = "/bitrix/admin/highloadblock_rows_list.php?ENTITY_ID=12&lang=ru";
tbl_manufacturers_filter_id.table_id = "tbl_manufacturers";
tbl_manufacturers_filter_id.presetsDeleted = [];
tbl_manufacturers_filter_id.state.init = false;
BX("adm-filter-tab-wrap-tbl_manufacturers_filter_id").style.display = "block";
});
</script><script type="text/javascript"> BXHotKeys.Add("", "var d=BX .findChild(document, {attribute: {\'name\': \'del_filter\'}}, true ); if (d) d.click();", 14, 'Фильтр кнопка \'Отменить\'', 0); BXHotKeys.Add("", "var d=BX .findChild(document, {attribute: {\'name\': \'set_filter\'}}, true ); if (d) d.click();", 13, 'Фильтр кнопка \'Найти\'', 0); BXHotKeys.Add("", "var d=BX .findChild(document, {attribute: {\'name\': \'find\'}}, true ); if (d) d.focus();", 12, 'Фильтр фокус в поле \'Найти\'', 0); </script></form>
<div id="tbl_manufacturers_result_div" class="adm-list-table-layout"><div class="adm-list-table-wrap">
<div class="adm-list-table-top">
<a href="highloadblock_row_edit.php?ENTITY_ID=12&lang=ru" class="adm-btn adm-btn-save adm-btn-add" title="Добавить запись" id="btn_new">Добавить запись</a>
<script type="text/javascript"> if(window.BXHotKeys!==undefined) { BXHotKeys.Add("", "var d=BX (\'btn_new\'); if (d) location.href = d.href;", 5, 'Кнопка добавить', 0); } </script> <div class="adm-small-button adm-table-setting" title="Настроить внешний вид списка" onclick="this.blur();BX.adminList.ShowMenu(this, [{'GLOBAL_ICON':'adm-menu-setting','TEXT':'Настроить','TITLE':'Настроить внешний вид списка','ONCLICK':'tbl_manufacturers.ShowSettings(\'/bitrix/admin/highloadblock_rows_list.php?mode=settings&ENTITY_ID=12&lang=ru\')'},
{'GLOBAL_ICON':'adm-menu-excel','TEXT':'Excel','TITLE':'Выгрузить данные из списка в Excel','ONCLICK':'location.href=\'/bitrix/admin/highloadblock_rows_list.php?mode=excel&ENTITY_ID=12&lang=ru\''}]); return false;"></div>
</div>
<form method="POST" onsubmit="return BX.ajax.submitComponentForm(this, 'tbl_manufacturers_result_div', true);" id="form_tbl_manufacturers" name="form_tbl_manufacturers" action="/bitrix/admin/highloadblock_rows_list.php?mode=frame&ENTITY_ID=12&lang=ru"><input type="hidden" name="sessid" id="sessid" value="3db7570a787019e52923dd7fee5f50ad"><table class="adm-list-table" id="tbl_manufacturers">
<thead>
<tr class="adm-list-table-header">
<td class="adm-list-table-cell adm-list-table-checkbox" onclick="this.firstChild.firstChild.click(); return BX.PreventDefault(event);"><div class="adm-list-table-cell-inner"><input class="adm-checkbox adm-designed-checkbox" type="checkbox" id="tbl_manufacturers_check_all" onclick="tbl_manufacturers.SelectAllRows(this); return BX.eventCancelBubble(event);" title="Отметить все/Снять отметку у всех"><label for="tbl_manufacturers_check_all" class="adm-designed-checkbox-label"></label></div></td>
<td class="adm-list-table-cell adm-list-table-popup-block" title="Колонка действий"><div class="adm-list-table-cell-inner"></div></td>
<td class="adm-list-table-cell adm-list-table-cell-sort-up" onclick="tbl_manufacturers.Sort('/bitrix/admin/highloadblock_rows_list.php?ENTITY_ID=12&lang=ru&by=ID&order=desc', false, arguments);" title="Сортировка: ID (упорядочено по возрастанию)">
<div class="adm-list-table-cell-inner">ID</div>
</td>
<td class="adm-list-table-cell adm-list-table-cell-sort" onclick="tbl_manufacturers.Sort('/bitrix/admin/highloadblock_rows_list.php?ENTITY_ID=12&lang=ru&by=UF_MANUFACTURER_NAME&order=', true, arguments);" title="Сортировка: Имя">
<div class="adm-list-table-cell-inner">Имя</div>
</td>
</tr>
</thead>
<tbody>
<? //use YopselMopsel\Manufacturer;
foreach(Manufacturer::getById() as $manufacturer) { ?>
<tr class="adm-list-table-row" oncontextmenu="return [{'DEFAULT':true,'GLOBAL_ICON':'adm-menu-edit','DEFAULT':true,'TEXT':'Изменить','ONCLICK':'BX.adminPanel.Redirect([], \'highloadblock_row_edit.php?ENTITY_ID=12&ID=<?=$manufacturer["ID"]?>&lang=ru\', event);'},
{'GLOBAL_ICON':'adm-menu-copy','TEXT':'Копировать','ONCLICK':'BX.adminPanel.Redirect([], \'highloadblock_row_edit.php?ENTITY_ID=12&ID=4&lang=ru&action=copy\', event);'},
{'GLOBAL_ICON':'adm-menu-delete','TEXT':'Удалить','ONCLICK':'if(confirm(\'Удалить запись?\')) BX.adminPanel.Redirect([], \'highloadblock_row_edit.php?action=delete&ENTITY_ID=12&ID=<?=$manufacturer["ID"]?>&lang=ru&sessid=<?=bitrix_sessid_get()?>\', event);'}];" ondblclick="BX.adminPanel.Redirect([], 'highloadblock_row_edit.php?ENTITY_ID=12&ID=<?=$manufacturer["ID"]?>&lang=ru', event);" title="Двойной щелчок - Изменить">
<td class="adm-list-table-cell adm-list-table-checkbox adm-list-table-checkbox-hover"><input type="checkbox" class="adm-checkbox adm-designed-checkbox" name="ID[]" id="tbl_manufacturers_<?=$manufacturer["ID"]?>" value="<?=$manufacturer["ID"]?>" autocomplete="off" title="Отметить/Снять отметку"><label class="adm-designed-checkbox-label adm-checkbox" for="tbl_manufacturers_<?=$manufacturer["ID"]?>"></label></td>
<td class="adm-list-table-cell adm-list-table-popup-block" onclick="BX.adminList.ShowMenu(this.firstChild, this.parentNode.oncontextmenu(), this.parentNode);"><div class="adm-list-table-popup" title="Действия"></div></td>
<td class="adm-list-table-cell"><a href="highloadblock_row_edit.php?ENTITY_ID=12&ID=4&lang=ru"><?=$manufacturer['ID']?></a></td><td class="adm-list-table-cell adm-list-table-cell-last"><?=$manufacturer['UF_MANUFACTURER_NAME']?></td></tr>
<? } ?>
</tbody>
</table>
<div class="adm-list-table-footer" id="tbl_manufacturers_footer">
<input type="hidden" name="action_button" value="">
<span class="adm-selectall-wrap"><input type="checkbox" class="adm-checkbox adm-designed-checkbox" name="action_target" value="selected" id="action_target" onclick="if(this.checked && !confirm('Вы уверены, что хотите применить действие для ВСЕХ записей в списке, в том числе на других страницах списка, а не только для отмеченных флажками?')) {this.checked=false;} tbl_manufacturers.EnableActions();" title="Применить действие для всех записей в списке"><label for="action_target" class="adm-checkbox adm-designed-checkbox-label"></label><label title="Применить действие для всех записей в списке" for="action_target" class="adm-checkbox-label">Для всех</label></span>
<span class="adm-table-item-edit-wrap">
<a href="javascript:void(0)" class="adm-table-btn-edit adm-edit-disable" hidefocus="true" onclick="this.blur();if(tbl_manufacturers.IsActionEnabled('edit')){document.forms['form_tbl_manufacturers'].elements['action_button'].value='edit'; ; BX.submit(document.forms.form_tbl_manufacturers, 'action_button', 'edit');}" title="Редактировать отмеченные записи" id="action_edit_button"></a><a href="javascript:void(0);" class="adm-table-btn-delete adm-edit-disable" hidefocus="true" onclick="this.blur();if(tbl_manufacturers.IsActionEnabled() && confirm((document.getElementById('action_target') && document.getElementById('action_target').checked? 'Вы уверены, что хотите удалить ВСЕ записи из списка?':'Вы уверены, что хотите удалить отмеченные записи?'))) {document.forms['form_tbl_manufacturers'].elements['action_button'].value='delete'; ; BX.submit(document.forms.form_tbl_manufacturers, 'action_button', 'delete');}" title="Удалить записи" id="action_delete_button"></a>
</span>
<span class="adm-table-counter" id="tbl_manufacturers_selected_count">Выбрано: <span>0</span></span>
</div>
</form>
</div>
<div class="adm-navigation">
<div class="adm-nav-pages-block">
<span class="adm-nav-page adm-nav-page-prev"></span>
<span class="adm-nav-page-active adm-nav-page">1</span>
<span class="adm-nav-page adm-nav-page-next"></span>
</div>
<div class="adm-nav-pages-total-block"> 1 – 2 из 2</div>
<div class="adm-nav-pages-number-block"><span class="adm-nav-pages-number">
<span class="adm-nav-pages-number-text">На странице:</span><span class="adm-select-wrap"><select name="" class="adm-select" onchange="if(this[selectedIndex].value=='0'){tbl_manufacturers.GetAdminList('/bitrix/admin/highloadblock_rows_list.php?PAGEN_1=1&SHOWALL_1=1&ENTITY_ID=12&lang=ru');}else{tbl_manufacturers.GetAdminList('/bitrix/admin/highloadblock_rows_list.php?PAGEN_1=1&SHOWALL_1=0&SIZEN_1='+this[selectedIndex].value+'&ENTITY_ID=12&lang=ru');}">
<option value="10">10</option>
<option value="20" selected="selected">20</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="200">200</option>
<option value="500">500</option>
<option value="0">все</option>
</select></span></span></div>
</div>
<script type="text/javascript">top.BX.adminHistory.put('/bitrix/admin/highloadblock_rows_list.php?PAGEN_1=1&SIZEN_1=20&ENTITY_ID=12&lang=ru', top.BX.proxy(top.tbl_manufacturers.GetAdminList, parent.tbl_manufacturers), ['mode', 'table_id']);</script>
</div>
<? require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin.php");?>