<?php if ($media_item) { $aql = "blog_article{\n\t\t\t\ttitle,\n\t\t\t\tintroduction,\n\t\t\t\tmedia_item_id as article__media_item_id\n\t\t\t}\n\t\t\tblog_media\t{\n\t\t\t\t\t\t\tmedia_item_id as blog_media__media_item_id\n\t\t\t\t\t\t}\n\t\t\tblog_article_tag{\n\t\t\t\tname\n\t\t\t\twhere blog_media.blog_article_id = {$blog_article_id}\n\t\t\t\t\tand blog_media.type = 'mebox'\n\t\t\t\torder by iorder asc\n\t\t\t\tlimit 1\n\t\t\t}"; $rs = aql::select($aql); } $settingss = array("transition" => "fade", "duration" => 4000, "height" => 322, "width" => 640, "height_small" => 62, "width_small" => 90); ?> <fieldset> <legend>Mediabox Preview</legend> <?php if ($rs) { $rs[0]['media_item_id'] = $rs[0]['blog_media__media_item_id'] ? $rs[0]['blog_media__media_item_id'] : $rs[0]['article__media_item_id']; $aql = "blog_media {\n media_item_id\n where blog_media.blog_article_id = {$rs[0]['blog_article_id']}\n and type = 'tnail'\n limit 1\n }"; $thumb = aql::select($aql); $rs[0]['thumb__media_item_id'] = $thumb[0]['media_item_id'] ? $thumb[0]['media_item_id'] : $rs[0]['media_item_id']; blog::marquee($rs, $settingss); } else { echo "No images have been uploaded yet"; } ?> </fieldset> <ul class="contextMenu" id="imageContextMenu"> <li> <a href="#set_article">Add to article</a> </li> <li> <a href="#delete">Delete</a> </li> </ul>