Exemplo n.º 1
0
function ezgallery_admin()
{
    global $lang, $mybb, $db, $page, $tabs, $plugins;
    if ($page->active_action != 'ezgallery') {
        return false;
    }
    // Load Language file
    ezgallery_loadlanguage();
    require_once MYBB_ROOT . 'inc/ezgallery.lib.php';
    LoadGallerySettings();
    $page->add_breadcrumb_item($lang->ezgallery_title);
    // Create Admin Tabs
    $tabs['ezgallery_settings'] = array('title' => $lang->gallery_text_settings, 'link' => 'index.php?module=config/ezgallery&action=adminset', 'description' => $lang->gallery_set_description);
    $tabs['ezgallery_categories'] = array('title' => $lang->gallery_form_managecats, 'link' => 'index.php?module=config/ezgallery&action=admincat', 'description' => $lang->gallery_managecats_description);
    $tabs['ezgallery_approveimages'] = array('title' => $lang->gallery_form_approveimages, 'link' => 'index.php?module=config/ezgallery&action=approvelist', 'description' => $lang->gallery_approveimages_description);
    $tabs['ezgallery_reportimages'] = array('title' => $lang->gallery_form_reportimages, 'link' => 'index.php?module=config/ezgallery&action=reportlist', 'description' => $lang->gallery_reportimages_description);
    $tabs['ezgallery_permissions'] = array('title' => $lang->gallery_text_permissions, 'link' => 'index.php?module=config/ezgallery&action=permissions', 'description' => $lang->gallery_permissions_description);
    // Gallery Actions
    $subActions = array('admincat' => 'AdminCats', 'adminset' => 'AdminSettings', 'adminset2' => 'AdminSettings2', 'deletereport' => 'DeleteReport', 'reportlist' => 'ReportList', 'delcomment' => 'DeleteComment', 'catup' => 'CatUp', 'catdown' => 'CatDown', 'addcat' => 'AddCategory', 'addcat2' => 'AddCategory2', 'editcat' => 'EditCategory', 'editcat2' => 'EditCategory2', 'deletecat' => 'DeleteCategory', 'deletecat2' => 'DeleteCategory2', 'approvelist' => 'ApproveList', 'approve' => 'ApprovePicture', 'unapprove' => 'UnApprovePicture', 'permissions' => 'GalleryPermissions', 'permissions2' => 'GalleryPermissions2');
    $plugins->run_hooks("gallery_admin_subactions");
    // Follow the sa or just go to main function
    @($sa = $mybb->input['action']);
    if (!empty($subActions[$sa])) {
        $subActions[$sa]();
    } else {
        AdminSettings();
    }
}
Exemplo n.º 2
0
Links to http://www.mybbhacks.com must remain unless
branding free option is purchased.
#############################################
*/
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'ezgallery.php');
require_once "./global.php";
require_once MYBB_ROOT . "inc/ezgallery.lib.php";
require_once MYBB_ROOT . "inc/class_parser.php";
$parser = new postParser();
$parser_options = array("allow_html" => 0, "allow_mycode" => 1, "allow_smilies" => 1, "allow_imgcode" => 1, "filter_badwords" => 1);
$lang->load("ezgallery");
add_breadcrumb($lang->gallery_text_title, "ezgallery.php");
// Load Gallery Settings
LoadGallerySettings();
// Load Gallery Permissions
GalleryLoadPermissions();
// Gallery Actions
$subActions = array('view' => 'ViewPicture', 'delete' => 'DeletePicture', 'delete2' => 'DeletePicture2', 'edit' => 'EditPicture', 'edit2' => 'EditPicture2', 'report' => 'ReportPicture', 'report2' => 'ReportPicture2', 'comment' => 'AddComment', 'comment2' => 'AddComment2', 'viewc' => 'ViewC', 'myimages' => 'MyImages', 'add' => 'AddPicture', 'add2' => 'AddPicture2', 'search' => 'Search', 'search2' => 'Search2');
@($sa = $mybb->input['action']);
if (!empty($subActions[$sa])) {
    $subActions[$sa]();
} else {
    mainview();
}
function mainview()
{
    global $context, $lang, $db, $gallerySettings, $mybb;
    global $parser_options, $parser, $config;
    // View the main gallery