$rgData = [];
foreach($results as $i => $result){
switch ($result['TYPE']){
case 'Новости': $rgData['news'][$i] = $result; break;
case 'Статьи': $rgData['articles'][$i] = $result; break;
}
}
SELECT * FROM image
LEFT JOIN key ON key.ImgId= image.imId
LEFT JOIN tag ON tag.id = key.tagId where author='1'
GROUP BY image.id
AND `object_collection`.`collection_id` IN (38,15,39,40,41)
AND `object_collection`.`collection_id` IN ?
$this->getPdoForSelect($useReadPdo)->prepare($query);
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
html, body{
padding: 0;
margin: 0;
min-height: 100%;
}
.clear{
clear: both;
}
.wrapper{
width: 940px;
margin: 0 auto;
}
.content{
width: 630px;
background: #afd9ee;
height: 300px;
border-radius: 0 0 5px 0;
float: left;
}
.sidebar{
margin-left: 20px;
width: 290px;
height: 300px;
float: left;
background: rgb(37, 141, 231);
}
footer{
margin-top: 20px;
text-align: center;
background: #0055cc;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="content">
Блок с контентом
</div>
<div class="sidebar">
Сайдбар
</div>
<div class="clear"></div>
<footer>
Футер
</footer>
</div>
</body>
</html>
(function() {
var dlgtrigger = document.querySelector( '[data-dialog]' ),
somedialog = document.getElementById( dlgtrigger.getAttribute( 'data-dialog' ) ),
dlg = new DialogFx( somedialog );
dlgtrigger.addEventListener( 'click', dlg.toggle.bind(dlg) );
return false;
})();