コード例 #1
0
ファイル: index.php プロジェクト: mistgrass/geeklog-ivywe
    $T->set_block('page', 'ImageRow', 'IRow');
    for ($i = 0; $i < $media_per_page; $i += $columns_per_page) {
        $next_columns = $i + $columns_per_page;
        for ($j = $i; $j < $next_columns; $j++) {
            if ($j >= $total_media) {
                $T->parse('IRow', 'ImageRow', true);
                $T->set_var('IColumn', '');
                break 2;
            }
            $T->set_var('clear_float', '');
            if ($col == $columns_per_page) {
                $T->set_var('clear_float', ' clear:both;');
                $col = 0;
            }
            $T->set_var('CELL_DISPLAY_IMAGE', MG_albumThumbnail($sub_album_id[$j]));
            $T->parse('IColumn', 'ImageColumn', true);
            $col++;
        }
        $T->parse('IRow', 'ImageRow', true);
        $T->set_var('IColumn', '');
    }
    $T->set_var('album_body', 1);
} else {
    $T->set_var('lang_no_image', $LANG_MG03['no_media_objects']);
}
$T->parse('output', 'page');
MG_getThemePublicJSandCSS($root_album->skin);
MG_getCSS($root_album->album_skin);
$display = $T->finish($T->get_var('output'));
$display = MG_createHTMLDocument($display);
COM_output($display);
コード例 #2
0
ファイル: media.php プロジェクト: mistgrass/geeklog-ivywe
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.          |
// |                                                                          |
// +--------------------------------------------------------------------------+
require_once '../lib-common.php';
if (!in_array('mediagallery', $_PLUGINS)) {
    echo COM_refresh($_CONF['site_url'] . '/index.php');
    exit;
}
if (COM_isAnonUser() && $_MG_CONF['loginrequired'] == 1) {
    $display = SEC_loginRequiredForm();
    $display .= MG_createHTMLDocument($display);
    COM_output($display);
    exit;
}
require_once $_CONF['path'] . 'plugins/mediagallery/include/common.php';
require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-media.php';
$msg = isset($_REQUEST['msg']) ? COM_applyFilter($_REQUEST['msg'], true) : '';
$full = isset($_REQUEST['f']) ? COM_applyFilter($_REQUEST['f'], true) : 0;
$mid = isset($_REQUEST['s']) ? COM_applyFilter($_REQUEST['s'], true) : 0;
$sortOrder = isset($_REQUEST['sort']) ? COM_applyFilter($_REQUEST['sort'], true) : 0;
$page = isset($_REQUEST['p']) ? COM_applyFilter($_REQUEST['p'], true) : 0;
list($ptitle, $content, $album_id) = MG_displayMedia($mid, $full, $sortOrder, 1, $page);
$skin = DB_getItem($_TABLES['mg_albums'], 'skin', "album_id = " . intval($album_id));
MG_getThemePublicJSandCSS($skin);
$display = '';
if ($msg != '') {
    $display .= COM_showMessage($msg, 'mediagallery');
}
$display .= $content;
$display = MG_createHTMLDocument($display, $ptitle);
COM_output($display);
コード例 #3
0
ファイル: slideshow.php プロジェクト: mistgrass/geeklog-ivywe
if (COM_isAnonUser() && $_MG_CONF['loginrequired'] == 1) {
    $display = SEC_loginRequiredForm();
    $display = MG_createHTMLDocument($display);
    COM_output($display);
    exit;
}
require_once $_CONF['path'] . 'plugins/mediagallery/include/common.php';
/*
* Main Function
*/
COM_setArgNames(array('aid', 'f', 'sort'));
$album_id = COM_applyFilter(COM_getArgument('aid'), true);
$full = COM_applyFilter(COM_getArgument('f'), true);
$sortOrder = COM_applyFilter(COM_getArgument('sort'), true);
$album_data = MG_getAlbumData($album_id, array('skin', 'album_title', 'album_desc', 'album_parent', 'full_display', 'display_image_size'), true);
MG_getThemePublicJSandCSS($album_data['skin']);
$T = COM_newTemplate(MG_getTemplatePath($album_id));
$T->set_file('page', 'slideshow.thtml');
$T->set_block('page', 'slideItems', 'sItems');
$T->set_block('page', 'noItems', 'nItems');
$T->set_var('header', $LANG_MG00['plugin']);
$T->set_var('site_url', $_MG_CONF['site_url']);
$T->set_var('plugin', 'mediagallery');
$T->set_var('using_jquery', 'jquery');
if ($album_data['access'] == 0) {
    $display = COM_startBlock($LANG_ACCESS['accessdenied'], '', COM_getBlockTemplate('_msg_block', 'header')) . '<br' . XHTML . '>' . $LANG_MG00['access_denied_msg'] . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    $title = strip_tags($album_data['album_title']);
    $display = MG_createHTMLDocument($display, $title);
    COM_output($display);
    exit;
}