77 lines
3.6 KiB
PHP
77 lines
3.6 KiB
PHP
<?php if(strlen(filter_input(INPUT_GET,'search')) != 0): ?>
|
|
<?php get_template_part( 'content','search' ); ?>
|
|
<?php else: ?>
|
|
<?php if(filter_input(INPUT_GET,'custom_args') == 'type:short'): ?>
|
|
<?php get_template_part( 'content','news' ); ?>
|
|
<?php elseif(filter_input(INPUT_GET,'custom_args') == 'type:ajax'): ?>
|
|
<?php get_template_part( 'content','page-ajax' ); ?>
|
|
<?php else: ?>
|
|
<?php if(filter_input(INPUT_GET,'custom_args') == 'type:gallery'): ?>
|
|
<?php get_template_part( 'content-gallery-cell' ); ?>
|
|
<?php else: ?>
|
|
<?php
|
|
if (filter_input(INPUT_GET,'id') == 'mainpage_request'){
|
|
$iteration = floor($alm_item/14);//итерация
|
|
$evenodd = ($iteration%2 == 0) ? true : false;//true если итерация четная
|
|
if ($evenodd){
|
|
if (
|
|
($alm_item == 5 || ($alm_item-($iteration * 14)) == 5)
|
|
||
|
|
($alm_item == 13 || ($alm_item-($iteration * 14)) == 13)
|
|
){
|
|
get_template_part( 'content', 'preview-long' );
|
|
}else{
|
|
get_template_part( 'content', 'preview-short' );
|
|
}
|
|
}else{
|
|
if (
|
|
($alm_item == 7 || ($alm_item-($iteration * 14)) == 7)
|
|
||
|
|
($alm_item == 13 || ($alm_item-($iteration * 14)) == 13)
|
|
){
|
|
get_template_part( 'content', 'preview-long' );
|
|
}else{
|
|
get_template_part( 'content', 'preview-short' );
|
|
}
|
|
}
|
|
}else if (filter_input(INPUT_GET,'id') == 'category_request' || filter_input(INPUT_GET,'id') == 'author_request'){
|
|
$iteration = floor($alm_item/10);//итерация
|
|
$evenodd = ($iteration%2 == 0) ? true : false;//true если итерация четная
|
|
if (
|
|
($alm_item == 1 || ($alm_item-($iteration * 10)) == 1)
|
|
||
|
|
($alm_item == 7 || ($alm_item-($iteration * 10)) == 7)
|
|
){
|
|
get_template_part( 'content', 'preview-long-rubrick' );
|
|
}else{
|
|
get_template_part( 'content', 'preview-short-rubrick' );
|
|
}
|
|
}else{
|
|
$iteration = floor($alm_item/14);//итерация
|
|
$evenodd = ($iteration%2 == 0) ? true : false;//true если итерация четная
|
|
if ($evenodd){
|
|
if (
|
|
($alm_item == 5 || ($alm_item-($iteration * 14)) == 5)
|
|
||
|
|
($alm_item == 13 || ($alm_item-($iteration * 14)) == 13)
|
|
){
|
|
get_template_part( 'content', 'preview-long' );
|
|
}else{
|
|
get_template_part( 'content', 'preview-short' );
|
|
}
|
|
}else{
|
|
if (
|
|
($alm_item == 7 || ($alm_item-($iteration * 14)) == 7)
|
|
||
|
|
($alm_item == 13 || ($alm_item-($iteration * 14)) == 13)
|
|
){
|
|
get_template_part( 'content', 'preview-long' );
|
|
}else{
|
|
get_template_part( 'content', 'preview-short' );
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|