$(document).ready(function(){
var detailsData = $('#detailsList').DataTable({
"lengthChange": false,
"processing":true,
"serverSide":true,
"bLengthChange": true,
"order":[],
"ajax":{
url:"detailsaction.php",
type:"POST",
data:{action:'listDetails'},
dataType:"json"
},
"columnDefs":[
{
"targets":[0, 9, 10],
"orderable":false,
},
],
"pageLength": 10
});
...
<?php
include('pages/details/details.php');
$detail = new details();
if(!empty($_POST['action']) && $_POST['action'] == 'listDetails') {
$detail->detailsList();
}
if(!empty($_POST['action']) && $_POST['action'] == 'addDetails') {
$detail->addDetails();
}
if(!empty($_POST['action']) && $_POST['action'] == 'getDetails') {
$detail->getDetails();
}
if(!empty($_POST['action']) && $_POST['action'] == 'updateDetails') {
$detail->updateDetails();
}
if(!empty($_POST['action']) && $_POST['action'] == 'detailDelete') {
$detail->deleteDetails();
}
?>
$moldsid = '113';
$sqlQuery = "SELECT * FROM ".$this->detailTable."
WHERE moldsid = '".$moldsid."' ";
$moldsid = $_GET['moldsid'];
$sqlQuery = "SELECT * FROM ".$this->detailTable."
WHERE moldsid = '".$moldsid."' ";
<?foreach($arResult["ITEMS"] as $arItem){?>
<div class="tableline"></div>
<h3 class="visita">Последние новости</h3>
...
<div class="tableline"></div>
<h3 class="visita">Последние новости</h3>
<?foreach($arResult["ITEMS"] as $arItem){?>
...
<?
$from = date('d.m.Y', time() - 86400*10);
$to = date("d.m.Y");
$label = $arResult["PROPERTIES"]["LABEL"]["VALUE"];
$GLOBALS['arrFilter'] = array(">=DATE_ACTIVE_FROM" => $from, "<=DATE_ACTIVE_FROM" => $to, "=PROPERTY_46_VALUE" => $label);?>
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"map_news",
array(
"ACTIVE_DATE_FORMAT" => "j F Y",
"ADD_SECTIONS_CHAIN" => "N",
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "3600",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"COMPONENT_TEMPLATE" => "map_news",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"DETAIL_URL" => "",
"DISPLAY_BOTTOM_PAGER" => "N",
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FIELD_CODE" => array(
0 => "TAGS",
1 => "",
),
"FILTER_NAME" => "arrFilter",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "1",
"IBLOCK_TYPE" => "news",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"INCLUDE_SUBSECTIONS" => "N",
"MESSAGE_404" => "",
"NEWS_COUNT" => "1",
"PAGER_BASE_LINK_ENABLE" => "N",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "N",
"PAGER_SHOW_ALWAYS" => "N",
"PAGER_TEMPLATE" => ".default",
"PAGER_TITLE" => "",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"PREVIEW_TRUNCATE_LEN" => "100",
"PROPERTY_CODE" => array(
0 => "LABEL_NEWS",
1 => "",
),
"SET_BROWSER_TITLE" => "N",
"SET_LAST_MODIFIED" => "N",
"SET_META_DESCRIPTION" => "N",
"SET_META_KEYWORDS" => "Y",
"SET_STATUS_404" => "N",
"SET_TITLE" => "N",
"SHOW_404" => "N",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "DESC",
"SORT_ORDER2" => "ASC",
"STRICT_SECTION_CHECK" => "N",
"TEMPLATE_THEME" => "blue",
"MEDIA_PROPERTY" => "",
"SLIDER_PROPERTY" => "",
"SEARCH_PAGE" => "/search/",
"USE_RATING" => "N",
"USE_SHARE" => "N"
),
false
);?>