LEFT JOIN (SELECT countries.id, event_to_country.event_id, GROUP_CONCAT(countries.name) as countries FROM countries LEFT JOIN event_to_country ON countries.id = event_to_country.country_id GROUP BY event_to_country.event_id) as countries ON events.id = countries.event_id
window.speechSynthesis.addEventListener('voiceschanged', function() {
if(isSpeechSynthesis() && isRuVoices()) {
$('.voice').toggleClass('d-none');
}
});
function isSpeechSynthesis() {
return window.speechSynthesis || false;
}
function isRuVoices() {
const arrVoices = window.speechSynthesis.getVoices();
return arrVoices.find(function(item){
return item.lang === 'ru-RU';
});
}
class MYPDF extends TCPDF {
//Page header
public function Header() {
// get the current page break margin
$bMargin = $this->getBreakMargin();
// get current auto-page-break mode
$auto_page_break = $this->AutoPageBreak;
// disable auto-page-break
$this->SetAutoPageBreak(false, 0);
// set bacground image
$img_file = './img/img.jpg';
$this->Image($img_file, 0, 0, 100, 0, 'JPG', '', '', false, 300, '', false, false, 0);
// restore auto-page-break status
$this->SetAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content
$this->setPageMark();
}
}
public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false, $alt=false, $altimgs=array()) {}
var txtCat = [];
$('.service_group').each(function(){
txtCat.push($(this).text());
});
<?
if(have_posts()) :
while(have_posts()) :
the_post();
?>
<h1><?the_title();?></h1>
<?
the_content();?>
<?if(get_post_meta(get_the_ID(),'cr_upload',true)){
$pics = get_post_meta(get_the_ID(),'cr_upload',true);
?>
<?// получаем вложения
$attachments = get_posts( array(
'post_type' => 'attachment',
'posts_per_page' => -1,
'post_parent' => $post->ID
));
?>
<?
$cnt=0;
foreach($pics as $pic){
?>
<div class="col-md-3 col-sm-4 col-xs-12 text-center img-gallery">
<a class="fancy" rel="group" href="<?=$pic["cr_upload"]?>"><img src="<?=$pic["cr_upload"]?>" /></a>
<?
$alt = get_post_meta($attachments[$cnt]->ID, '_wp_attachment_image_alt', true);
echo "<p>" . $attachments[$cnt]->post_excerpt . "<br>";
echo $attachments[$cnt]->post_content . "</p>";
$cnt++;
?>
</div>
<?}
}else{
?>
<div class="col-xs-12 text-center">В этом месяце нет фотографий.</div>
<?}
?>
<div class="clearfix"></div>
<?endwhile;?>
<?endif;?>