This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class CCustomTypeElementDateText{ | |
//описываем поведение пользовательского свойства | |
function GetUserTypeDescription() { | |
return array( | |
'PROPERTY_TYPE' => 'S', | |
'USER_TYPE' => 'history', | |
'DESCRIPTION' => 'История просрочки — дата со значением', //именно это будет выведено в списке типов свойств во вкладке редактирования свойств ИБ | |
//указываем необходимые функции, используемые в создаваемом типе |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$items_per_page = 2; | |
$page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; | |
$offset = ( $page * $items_per_page ) - $items_per_page; | |
$query = 'SELECT * FROM '.$table_name; | |
$total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; | |
$total = $wpdb->get_var( $total_query ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
$iblockId = (int)$_REQUEST['iblock']; | |
$page = isset($_REQUEST['page']) ? (int)$_REQUEST['page'] : 1; | |
$pageSize = 70; | |
$isEnd = true; | |
if ($iblockId <= 0) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array ( | |
/*Отвечает за кодиорвку*/ | |
'utf_mode' => | |
array ( | |
'value' => true, | |
'readonly' => true, | |
), | |
/*Отвечает за кодиорвку по умолчанию*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Paginate Advanced Custom Field repeater | |
*/ | |
if( get_query_var('page') ) { | |
$page = get_query_var( 'page' ); | |
} else { | |
$page = 1; | |
} |