|
From: OryNider <ory...@us...> - 2008-03-14 14:23:36
|
Update of /cvsroot/mxbb/mx_smartor/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14976/phpbb2/admin Added Files: admin_album_auth.php admin_album_cat.php admin_album_cfg.php admin_album_clearcache.php admin_album_clown_SP.php admin_album_config_personal.php admin_album_otf.php admin_album_personal.php Log Message: i fogot to commit this somehow --- NEW FILE: admin_album_config_personal.php --- <?php /** * * @package Mx-Publisher Module - mx_smartor * @version $Id: admin_album_config_personal.php,v 1.1 2008/03/14 14:23:31 orynider Exp $ * @copyright (c) 2003 [sma...@ho..., Smartor] Mx-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_smartor/'; $setmodules_admin_path = 'modules/mx_smartor/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if( !empty($setmodules) ) { $filename = basename(__FILE__); $module['Smartor_Album']['Album_Personal_Settings'] = $setmodules_admin_path . $filename; return; } // // Let's set the root dir for phpBB // $album_root_path = $module_root_path . 'album_mod/'; require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($module_root_path . 'album_mod/includes/album_constants.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx")) { include($album_root_path . "language/lang_english/lang_admin.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx"); } // // Pull all config data // $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { mx_message_die(CRITICAL_ERROR, "Could not query Album config information", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . ALBUM_CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, "Failed to update Album configuration for $config_name", "", __LINE__, __FILE__, $sql); } } } if( isset($HTTP_POST_VARS['submit']) ) { $message = $lang['Album_config_updated'] . "<br /><br />" . sprintf($lang['Click_return_album_config'], "<a href=\"" . mx_append_sid("admin_album_config_personal.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } } $template->set_filenames(array( "body" => 'admin/album_config_personal_body.tpl') ); $template->assign_vars(array( 'L_ALBUM_PERSONAL_CONFIG' => $lang['Album_Personal_Settings'], 'L_ALBUM_PERSONAL_CONFIG_EXPLAIN' => $lang['Album_Personal_Settings_Explain'], 'S_ALBUM_PERSONAL_CONFIG_ACTION' => mx_append_sid('admin_album_config_personal.'.$phpEx), 'PERSONAL_GALLERY_LIMIT' => $new['personal_gallery_limit'], 'PERSONAL_GALLERY_USER' => ($new['personal_gallery'] == ALBUM_USER) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_PRIVATE' => ($new['personal_gallery'] == ALBUM_PRIVATE) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_ADMIN' => ($new['personal_gallery'] == ALBUM_ADMIN) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_VIEW_ALL' => ($new['personal_gallery_view'] == ALBUM_GUEST) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_VIEW_REG' => ($new['personal_gallery_view'] == ALBUM_USER) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_VIEW_PRIVATE' => ($new['personal_gallery_view'] == ALBUM_PRIVATE) ? 'checked="checked"' : '', 'PERSONAL_PICS_APPROVAL_DISABLED' => ($new['personal_pics_approval'] == ALBUM_USER) ? 'checked="checked"' : '', 'PERSONAL_PICS_APPROVAL_MOD' => ($new['personal_pics_approval'] == ALBUM_MOD) ? 'checked="checked"' : '', 'PERSONAL_PICS_APPROVAL_ADMIN' => ($new['personal_pics_approval'] == ALBUM_ADMIN) ? 'checked="checked"' : '', 'PERSONAL_SHOW_RECENT_IN_SUBCATS_ENABLED' => ($new['personal_show_recent_in_subcats'] == 1) ? 'checked="checked"' : '', 'PERSONAL_SHOW_RECENT_IN_SUBCATS_DISABLED' => ($new['personal_show_recent_in_subcats'] == 0) ? 'checked="checked"' : '', 'PERSONAL_SHOW_RECENT_INSTEAD_OF_NOPICS_ENABLED' => ($new['personal_show_recent_instead_of_nopics'] == 1) ? 'checked="checked"' : '', 'PERSONAL_SHOW_RECENT_INSTEAD_OF_NOPICS_DISABLED' => ($new['personal_show_recent_instead_of_nopics'] == 0) ? 'checked="checked"' : '', 'PERSONAL_MOD_ENABLED' => ($new['personal_allow_gallery_mod'] == 1) ? 'checked="checked"' : '', 'PERSONAL_MOD_DISABLED' => ($new['personal_allow_gallery_mod'] == 0) ? 'checked="checked"' : '', 'PERSONAL_SUBCAT_ENABLED' => ($new['personal_allow_sub_categories'] == 1) ? 'checked="checked"' : '', 'PERSONAL_SUBCAT_DISABLED' => ($new['personal_allow_sub_categories'] == 0) ? 'checked="checked"' : '', 'PERSONAL_SUB_GALLERY_LIMIT' => $new['personal_sub_category_limit'], 'PERSONAL_SHOW_SUBCATS_ENABLED' => ($new['personal_show_subcats_in_index'] == 1) ? 'checked="checked"' : '', 'PERSONAL_SHOW_SUBCATS_DISABLED' => ($new['personal_show_subcats_in_index'] == 0) ? 'checked="checked"' : '', 'PERSONAL_SHOW_ALL_PICS_ENABLED' => ($new['show_all_in_personal_gallery'] == 1) ? 'checked="checked"' : '', 'PERSONAL_SHOW_ALL_PICS_DISABLED' => ($new['show_all_in_personal_gallery'] == 0) ? 'checked="checked"' : '', 'PERSONAL_ALLOW_AVATARS_ENABLED' => ($new['personal_allow_avatar_gallery'] == 1) ? 'checked="checked"' : '', 'PERSONAL_ALLOW_AVATARS_DISABLED' => ($new['personal_allow_avatar_gallery'] == 0) ? 'checked="checked"' : '', 'S_GUEST' => ALBUM_GUEST, 'S_USER' => ALBUM_USER, 'S_PRIVATE' => ALBUM_PRIVATE, 'S_MOD' => ALBUM_MOD, 'S_ADMIN' => ALBUM_ADMIN, //--- Language setup --- 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_PERSONAL_GALLERY' => $lang['Personal_gallery'], 'L_PERSONAL_GALLERY_LIMIT' => $lang['Personal_gallery_limit'], 'L_PERSONAL_GALLERY_VIEW' => $lang['Personal_gallery_view'], 'L_ALBUM_PERSONAL_PICS_APPROVAL' => $lang['Personal_Gallery_Approval'], 'L_ALBUM_PERSONAL_MODERATOR' => $lang['Personal_Gallery_MOD'], 'L_PERSONAL_SUB_GALLERY_LIMIT' => $lang['Personal_Sub_Cat_Limit'], 'L_PERSONAL_ALLOW_SUB_CATEGORY' => $lang['User_Can_Create_Personal_SubCats'], 'L_PERSONAL_SHOW_SUBCATS' => $lang['Show_Personal_Sub_Cats'], 'L_PERSONAL_SHOW_RECENT_IN_SUBCATS' => $lang['Show_Recent_In_Personal_Subcats'], 'L_PERSONAL_SHOW_RECENT_INSTEAD_OF_NOPICS' => $lang['Show_Recent_Instead_of_Personal_NoPics'], 'L_ALBUM_DEBUG_MODE' => $lang['Album_debug_mode'], 'L_PERSONAL_SHOW_ALL_PICS' => $lang['Enable_Show_All_Pics'], 'L_PERSONAL_ALLOW_AVATARS' => $lang['Allow_Album_Avatars'], 'L_DISABLED' => $lang['Disabled'], 'L_ENABLED' => $lang['Enabled'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_ALWAYS' => $lang['SP_Always'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset']) ); $template->pparse("body"); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); ?> --- NEW FILE: admin_album_cfg.php --- <?php /** * * @package Mx-Publisher Module - mx_smartor * @version $Id: admin_album_cfg.php,v 1.1 2008/03/14 14:23:29 orynider Exp $ * @copyright (c) 2003 [sma...@ho..., Smartor] Mx-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_smartor/'; $setmodules_admin_path = 'modules/mx_smartor/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if( !empty($setmodules) ) { $filename = basename(__FILE__); $module['Smartor_Album']['Configuration std'] = $setmodules_admin_path . $filename; return; } // // Let's set the root dir for phpBB // $album_root_path = $module_root_path . 'album_mod/'; require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($module_root_path . 'album_mod/includes/album_constants.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx")) { include($album_root_path . "language/lang_english/lang_admin.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx"); } if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.$phpEx")) { include($album_root_path . "language/lang_english/lang_main.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.$phpEx"); } // // Pull all config data // $sql = "SELECT * FROM " . ALBUM_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { mx_message_die(CRITICAL_ERROR, "Could not query Album config information", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . ALBUM_CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, "Failed to update Album configuration for $config_name", "", __LINE__, __FILE__, $sql); } $default_config[$config_name] = $new[$config_name]; $mx_cache->put('album_config', $default_config); } } if( isset($HTTP_POST_VARS['submit']) ) { $message = $lang['Album_config_updated'] . "<br /><br />" . sprintf($lang['Click_return_album_config'], "<a href=\"" . mx_append_sid("admin_album_cfg.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } } $template->set_filenames(array( "body" => "admin/album_config_body.tpl") ); $template->assign_vars(array( 'L_ALBUM_CONFIG' => $lang['Album_config'], 'L_ALBUM_CONFIG_EXPLAIN' => $lang['Album_config_explain'], 'S_ALBUM_CONFIG_ACTION' => mx_append_sid('admin_album_cfg.'.$phpEx), // Index 'INDEX_SHOW_SUBCATS_ENABLED' => ($new['show_index_subcats'] == 1) ? 'checked="checked"' : '', 'INDEX_SHOW_SUBCATS_DISABLED' => ($new['show_index_subcats'] == 0) ? 'checked="checked"' : '', 'INDEX_THUMB_ENABLED' => ($new['show_index_thumb'] == 1) ? 'checked="checked"' : '', 'INDEX_THUMB_DISABLED' => ($new['show_index_thumb'] == 0) ? 'checked="checked"' : '', 'INDEX_TOTAL_PICS_ENABLED' => ($new['show_index_total_pics'] == 1) ? 'checked="checked"' : '', 'INDEX_TOTAL_PICS_DISABLED' => ($new['show_index_total_pics'] == 0) ? 'checked="checked"' : '', 'INDEX_TOTAL_COMMENTS_ENABLED' => ($new['show_index_total_comments'] == 1) ? 'checked="checked"' : '', 'INDEX_TOTAL_COMMENTS_DISABLED' => ($new['show_index_total_comments'] == 0) ? 'checked="checked"' : '', 'INDEX_PICS_ENABLED' => ($new['show_index_pics'] == 1) ? 'checked="checked"' : '', 'INDEX_PICS_DISABLED' => ($new['show_index_pics'] == 0) ? 'checked="checked"' : '', 'INDEX_COMMENTS_ENABLED' => ($new['show_index_comments'] == 1) ? 'checked="checked"' : '', 'INDEX_COMMENTS_DISABLED' => ($new['show_index_comments'] == 0) ? 'checked="checked"' : '', 'INDEX_LAST_COMMENT_ENABLED' => ($new['show_index_last_comment'] == 1) ? 'checked="checked"' : '', 'INDEX_LAST_COMMENT_DISABLED' => ($new['show_index_last_comment'] == 0) ? 'checked="checked"' : '', 'INDEX_LAST_PIC_ENABLED' => ($new['show_index_last_pic'] == 1) ? 'checked="checked"' : '', 'INDEX_LAST_PIC_DISABLED' => ($new['show_index_last_pic'] == 0) ? 'checked="checked"' : '', 'INDEX_LAST_PIC_LV_ENABLED' => ($new['show_index_last_pic_lv'] == 1) ? 'checked="checked"' : '', 'INDEX_LAST_PIC_LV_DISABLED' => ($new['show_index_last_pic_lv'] == 0) ? 'checked="checked"' : '', 'INDEX_LINEBREAK_ENABLED' => ($new['line_break_subcats'] == 1) ? 'checked="checked"' : '', 'INDEX_LINEBREAK_DISABLED' => ($new['line_break_subcats'] == 0) ? 'checked="checked"' : '', 'INDEX_SHOW_PERSONAL_GALLERY_LINK_ENABLED' => ($new['show_personal_gallery_link'] == 1) ? 'checked="checked"' : '', 'INDEX_SHOW_PERSONAL_GALLERY_LINK_DISABLED' => ($new['show_personal_gallery_link'] == 0) ? 'checked="checked"' : '', 'NEW_PIC_CHECK_INTERVAL' => $new['new_pic_check_interval'], 'INDEX_SUPERCELLS_ENABLED' => ($new['index_enable_supercells'] == 1) ? 'checked="checked"' : '', 'INDEX_SUPERCELLS_DISABLED' => ($new['index_enable_supercells'] == 0) ? 'checked="checked"' : '', 'L_INDEX_SHOW_SUBCATS' => $lang['Show_Index_Subcats'], 'L_INDEX_THUMB' => $lang['Show_Index_Thumb'], 'L_INDEX_TOTAL_PICS' => $lang['Show_Index_Total_Pics'], 'L_INDEX_TOTAL_COMMENTS' => $lang['Show_Index_Total_Comments'], 'L_INDEX_PICS' => $lang['Show_Index_Pics'], 'L_INDEX_COMMENTS' => $lang['Show_Index_Comments'], 'L_INDEX_LAST_COMMENT' => $lang['Show_Index_Last_Comment'], 'L_INDEX_LAST_PIC' => $lang['Show_Index_Last_Pic'], 'L_INDEX_LINEBREAK_SUBCATS' => $lang['Line_Break_Subcats'], 'L_SHOW_PERSONAL_GALLERY_LINK' => $lang['Show_Personal_Gallery_Link'], 'L_NEW_PIC_CHECK_INTERVAL' => $lang['New_Pic_Check_Interval'], 'L_NEW_PIC_CHECK_INTERVAL_DESC' => $lang['New_Pic_Check_Interval_Desc'], 'L_NEW_PIC_CHECK_INTERVAL_LV' => $lang['New_Pic_Check_Interval_LV'], 'L_ENABLE_SUPERCELLS' => $lang['Enable_Index_Supercells'], // Display OTF Link 'L_SHOW_OTF_LINK' => $lang['Show_OTF_Link'], 'SHOW_OTF_LINK_ENABLED' => ($new['show_otf_link'] == 1) ? 'checked="checked"' : '', 'SHOW_OTF_LINK_DISABLED' => ($new['show_otf_link'] == 0) ? 'checked="checked"' : '', // Display All Pics Link 'L_SHOW_ALL_PICS_LINK' => $lang['Show_AllPics_Link'], 'SHOW_ALL_PICS_LINK_ENABLED' => ($new['show_all_pics_link'] == 1) ? 'checked="checked"' : '', 'SHOW_ALL_PICS_LINK_DISABLED' => ($new['show_all_pics_link'] == 0) ? 'checked="checked"' : '', // Display PG Link 'L_SHOW_PERSONAL_GALLERIES_LINK' => $lang['Show_PG_Link'], 'SHOW_PERSONAL_GALLERIES_LINK_ENABLED' => ($new['show_personal_galleries_link'] == 1) ? 'checked="checked"' : '', 'SHOW_PERSONAL_GALLERIES_LINK_DISABLED' => ($new['show_personal_galleries_link'] == 0) ? 'checked="checked"' : '', // Display All Pics Link 'L_SHOW_LAST_COMMENTS' => $lang['Show_Last_Comments'], 'SHOW_LAST_COMMENTS_ENABLED' => ($new['show_last_comments'] == 1) ? 'checked="checked"' : '', 'SHOW_LAST_COMMENTS_DISABLED' => ($new['show_last_comments'] == 0) ? 'checked="checked"' : '', 'MAX_PICS' => $new['max_pics'], 'MAX_FILE_SIZE' => $new['max_file_size'], 'MAX_FILE_SIZE_RESAMPLING' => $new['max_file_size_resampling'], 'MAX_WIDTH' => $new['max_width'], 'MAX_HEIGHT' => $new['max_height'], 'MAX_FILES_TO_UPLOAD' => $new['max_files_to_upload'], 'MAX_PREGENERATED_FIELDS' => $new['max_pregenerated_fields'], 'ROWS_PER_PAGE' => $new['rows_per_page'], 'COLS_PER_PAGE' => $new['cols_per_page'], 'THUMBNAIL_QUALITY' => $new['thumbnail_quality'], 'THUMBNAIL_SIZE' => $new['thumbnail_size'], 'PERSONAL_GALLERY_LIMIT' => $new['personal_gallery_limit'], 'USER_PICS_LIMIT' => $new['user_pics_limit'], 'MOD_PICS_LIMIT' => $new['mod_pics_limit'], 'SET_MEMORY' => $new['set_memory'], 'DYNAMIC_PIC_RESAMPLING_ENABLED' => ($new['dynamic_pic_resampling'] == 1) ? 'checked="checked"' : '', 'DYNAMIC_PIC_RESAMPLING_DISABLED' => ($new['dynamic_pic_resampling'] == 0) ? 'checked="checked"' : '', 'THUMBNAIL_CACHE_ENABLED' => ($new['thumbnail_cache'] == 1) ? 'checked="checked"' : '', 'THUMBNAIL_CACHE_DISABLED' => ($new['thumbnail_cache'] == 0) ? 'checked="checked"' : '', 'JPG_ENABLED' => ($new['jpg_allowed'] == 1) ? 'checked="checked"' : '', 'JPG_DISABLED' => ($new['jpg_allowed'] == 0) ? 'checked="checked"' : '', 'PNG_ENABLED' => ($new['png_allowed'] == 1) ? 'checked="checked"' : '', 'PNG_DISABLED' => ($new['png_allowed'] == 0) ? 'checked="checked"' : '', 'GIF_ENABLED' => ($new['gif_allowed'] == 1) ? 'checked="checked"' : '', 'GIF_DISABLED' => ($new['gif_allowed'] == 0) ? 'checked="checked"' : '', 'PIC_DESC_MAX_LENGTH' => $new['desc_length'], 'HOTLINK_PREVENT_ENABLED' => ($new['hotlink_prevent'] == 1) ? 'checked="checked"' : '', 'HOTLINK_PREVENT_DISABLED' => ($new['hotlink_prevent'] == 0) ? 'checked="checked"' : '', 'HOTLINK_ALLOWED' => $new['hotlink_allowed'], 'PERSONAL_GALLERY_USER' => ($new['personal_gallery'] == ALBUM_USER) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_PRIVATE' => ($new['personal_gallery'] == ALBUM_PRIVATE) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_ADMIN' => ($new['personal_gallery'] == ALBUM_ADMIN) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_VIEW_ALL' => ($new['personal_gallery_view'] == ALBUM_GUEST) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_VIEW_REG' => ($new['personal_gallery_view'] == ALBUM_USER) ? 'checked="checked"' : '', 'PERSONAL_GALLERY_VIEW_PRIVATE' => ($new['personal_gallery_view'] == ALBUM_PRIVATE) ? 'checked="checked"' : '', // 'RATE_ENABLED' => ($new['rate'] == 1) ? 'checked="checked"' : '', // 'RATE_DISABLED' => ($new['rate'] == 0) ? 'checked="checked"' : '', 'RATE_SCALE' => $new['rate_scale'], // 'COMMENT_ENABLED' => ($new['comment'] == 1) ? 'checked="checked"' : '', // 'COMMENT_DISABLED' => ($new['comment'] == 0) ? 'checked="checked"' : '', 'PROPERCASE_TITLE_ENABLED' => ($new['propercase_pic_title'] == 1) ? 'checked="checked"' : '', 'PROPERCASE_TITLE_DISABLED' => ($new['propercase_pic_title'] == 0) ? 'checked="checked"' : '', 'SHOW_DOWNLOAD_ALWAYS' => ($new['show_download'] == 2) ? 'checked="checked"' : '', 'SHOW_DOWNLOAD_ENABLED' => ($new['show_download'] == 1) ? 'checked="checked"' : '', 'SHOW_DOWNLOAD_DISABLED' => ($new['show_download'] == 0) ? 'checked="checked"' : '', 'NO_GD' => ($new['gd_version'] == 0) ? 'checked="checked"' : '', 'GD_V1' => ($new['gd_version'] == 1) ? 'checked="checked"' : '', 'GD_V2' => ($new['gd_version'] == 2) ? 'checked="checked"' : '', 'SORT_TIME' => ($new['sort_method'] == 'pic_time') ? 'selected="selected"' : '', 'SORT_PIC_TITLE' => ($new['sort_method'] == 'pic_title') ? 'selected="selected"' : '', 'SORT_USERNAME' => ($new['sort_method'] == 'pic_user_id') ? 'selected="selected"' : '', 'SORT_VIEW' => ($new['sort_method'] == 'pic_view_count') ? 'selected="selected"' : '', 'SORT_RATING' => ($new['sort_method'] == 'rating') ? 'selected="selected"' : '', 'SORT_COMMENTS' => ($new['sort_method'] == 'comments') ? 'selected="selected"' : '', 'SORT_NEW_COMMENT' => ($new['sort_method'] == 'new_comment') ? 'selected="selected"' : '', 'SORT_ASC' => ($new['sort_order'] == 'ASC') ? 'selected="selected"' : '', 'SORT_DESC' => ($new['sort_order'] == 'DESC') ? 'selected="selected"' : '', 'FULLPIC_POPUP_ENABLED' => ($new['fullpic_popup'] == 1) ? 'checked="checked"' : '', 'FULLPIC_POPUP_DISABLED' => ($new['fullpic_popup'] == 0) ? 'checked="checked"' : '', // Added for Gold Begin 'SHOW_IMG_NO_GD_ENABLED' => ($new['show_img_no_gd'] == 1) ? 'checked="checked"' : '', 'SHOW_IMG_NO_GD_DISABLED' => ($new['show_img_no_gd'] == 0) ? 'checked="checked"' : '', 'SHOW_GIF_MID_THUMB_ENABLED' => ($new['show_gif_mid_thumb'] == 1) ? 'checked="checked"' : '', 'SHOW_GIF_MID_THUMB_DISABLED' => ($new['show_gif_mid_thumb'] == 0) ? 'checked="checked"' : '', 'SHOW_PIC_SIZE_ENABLED' => ($new['show_pic_size_on_thumb'] == 1) ? 'checked="checked"' : '', 'SHOW_PIC_SIZE_DISABLED' => ($new['show_pic_size_on_thumb'] == 0) ? 'checked="checked"' : '', 'LB_PREVIEW_ENABLED' => ($new['lb_preview'] == 1) ? 'checked="checked"' : '', 'LB_PREVIEW_DISABLED' => ($new['lb_preview'] == 0) ? 'checked="checked"' : '', // Added for Gold End 'SHOW_SLIDESHOW_ENABLED' => ($new['show_slideshow'] == 1) ? 'checked="checked"' : '', 'SHOW_SLIDESHOW_DISABLED' => ($new['show_slideshow'] == 0) ? 'checked="checked"' : '', 'SLIDESHOW_SCRIPT_ENABLED' => ($new['slideshow_script'] == 1) ? 'checked="checked"' : '', 'SLIDESHOW_SCRIPT_DISABLED' => ($new['slideshow_script'] == 0) ? 'checked="checked"' : '', 'SHOW_PICS_NAV_ENABLED' => ($new['show_pics_nav'] == 1) ? 'checked="checked"' : '', 'SHOW_PICS_NAV_DISABLED' => ($new['show_pics_nav'] == 0) ? 'checked="checked"' : '', // Invert Nav Arrows 'INVERT_NAV_ARROWS_ENABLED' => ($new['invert_nav_arrows'] == 1) ? 'checked="checked"' : '', 'INVERT_NAV_ARROWS_DISABLED' => ($new['invert_nav_arrows'] == 0) ? 'checked="checked"' : '', 'SHOW_INLINE_COPYRIGHT_ENABLED' => ($new['show_inline_copyright'] == 1) ? 'checked="checked"' : '', 'SHOW_INLINE_COPYRIGHT_DISABLED' => ($new['show_inline_copyright'] == 0) ? 'checked="checked"' : '', 'NUFFIMAGE_ENABLED' => ($new['enable_nuffimage'] == 1) ? 'checked="checked"' : '', 'NUFFIMAGE_DISABLED' => ($new['enable_nuffimage'] == 0) ? 'checked="checked"' : '', 'SEPIABW_ENABLED' => ($new['enable_sepia_bw'] == 1) ? 'checked="checked"' : '', 'SEPIABW_DISABLED' => ($new['enable_sepia_bw'] == 0) ? 'checked="checked"' : '', 'SHOW_EXIF_ENABLED' => ($new['show_exif'] == 1) ? 'checked="checked"' : '', 'SHOW_EXIF_DISABLED' => ($new['show_exif'] == 0) ? 'checked="checked"' : '', 'BBCODE_ENABLED' => ($new['album_bbcode'] == 1) ? 'checked="checked"' : '', 'BBCODE_DISABLED' => ($new['album_bbcode'] == 0) ? 'checked="checked"' : '', 'S_GUEST' => ALBUM_GUEST, 'S_USER' => ALBUM_USER, 'S_PRIVATE' => ALBUM_PRIVATE, 'S_MOD' => ALBUM_MOD, 'S_ADMIN' => ALBUM_ADMIN, //--- Language Setup 'L_MAX_PICS' => $lang['Max_pics'], 'L_MAX_FILE_SIZE' => $lang['Max_file_size'], 'L_MAX_FILE_SIZE_RESAMPLING' => $lang['Max_file_size_resampling'], 'L_MAX_WIDTH' => $lang['Max_width'], 'L_MAX_HEIGHT' => $lang['Max_height'], 'L_MAX_FILES_TO_UPLOAD' => $lang['Max_Files_To_Upload'], 'L_DYNAMIC_PIC_RESAMPLING' => $lang['Pic_Resampling'], 'L_ALBUM_UPLOAD_SETTINGS' => $lang['Album_upload_settings'], 'L_MAX_PREGENERATED_FIELDS' => $lang['Max_pregenerated_fields'], 'L_PROPERCASE_TITLE' => $lang['Propercase_pic_title'], 'L_USER_PICS_LIMIT' => $lang['User_pics_limit'], 'L_MOD_PICS_LIMIT' => $lang['Moderator_pics_limit'], 'L_ROWS_PER_PAGE' => $lang['Rows_per_page'], 'L_COLS_PER_PAGE' => $lang['Cols_per_page'], 'L_MANUAL_THUMBNAIL' => $lang['Manual_thumbnail'], 'L_THUMBNAIL_QUALITY' => $lang['Thumbnail_quality'], 'L_THUMBNAIL_SIZE' => $lang['Thumbnail_size'], 'L_THUMBNAIL_CACHE' => $lang['Thumbnail_cache'], 'L_JPG_ALLOWED' => $lang['JPG_allowed'], 'L_PNG_ALLOWED' => $lang['PNG_allowed'], 'L_GIF_ALLOWED' => $lang['GIF_allowed'], 'L_PIC_DESC_MAX_LENGTH' => $lang['Pic_Desc_Max_Length'], 'L_HOTLINK_PREVENT' => $lang['Hotlink_prevent'], 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], 'L_PERSONAL_GALLERY' => $lang['Personal_gallery'], 'L_PERSONAL_GALLERY_LIMIT' => $lang['Personal_gallery_limit'], 'L_PERSONAL_GALLERY_VIEW' => $lang['Personal_gallery_view'], 'L_RATE_SYSTEM' => $lang['Rate_system'], 'L_RATE_SCALE' => $lang['Rate_Scale'], 'L_COMMENT_SYSTEM' => $lang['Comment_system'], 'L_SHOW_DOWNLOAD' => $lang['Show_Download'], 'L_GD_VERSION' => $lang['GD_version'], 'L_THUMBNAIL_SETTINGS' => $lang['Thumbnail_Settings'], 'L_EXTRA_SETTINGS' => $lang['Extra_Settings'], 'L_DEFAULT_SORT_METHOD' => $lang['Default_Sort_Method'], 'L_TIME' => $lang['Time'], 'L_PIC_TITLE' => $lang['Pic_Title'], 'L_USERNAME' => $lang['Sort_Username'], 'L_VIEW' => $lang['View'], 'L_RATING' => $lang['Rating'], 'L_COMMENTS' => $lang['Comments'], 'L_NEW_COMMENT' => $lang['New_Comment'], 'L_DEFAULT_SORT_ORDER' => $lang['Default_Sort_Order'], 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'L_FULLPIC_POPUP' => $lang['Fullpic_Popup'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], // Added for Gold Begin 'L_SHOW_IMG_NO_GD' => $lang['Show_IMG_No_GD'], 'L_SHOW_GIF_MID_THUMB' => $lang['Show_GIF_MidThumb'], 'L_SHOW_PIC_SIZE' => $lang['Show_Pic_Size'], 'L_LB_PREVIEW' => $lang['LB_Preview'], 'L_LB_PREVIEW_EXPLAIN' => $lang['LB_Preview_Explain'], // Added for Gold End 'L_SHOW_SLIDESHOW' => $lang['Show_Slideshow'], 'L_SHOW_SLIDESHOW_SCRIPT' => $lang['Show_Slideshow_Script'], 'L_SHOW_PICS_NAV' => $lang['Show_Pics_Nav'], 'L_INVERT_NAV_ARROWS' => $lang['Invert_Nav_Arrows'], 'L_SHOW_INLINE_COPYRIGHT' => $lang['Show_Inline_Copyright'], 'L_ENABLE_NUFFIMAGE' => $lang['Enable_Nuffimage'], 'L_ENABLE_SEPIA_BW' => $lang['Enable_Sepia_BW'], 'L_SHOW_EXIF' => $lang['Show_EXIF_Info'], 'L_ENABLE_BBCODE' => $lang['Enable_BBCode'], 'L_ALBUM_DEBUG_MODE' => $lang['Album_debug_mode'], 'L_SET_MEMORY' => $lang['Set_Memory'], 'L_SET_MEMORY_EXPLAIN' => $lang['Set_Memory_Explain'], 'L_DISABLED' => $lang['Disabled'], 'L_ENABLED' => $lang['Enabled'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_ALWAYS' => $lang['SP_Always'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset']) ); $template->pparse("body"); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ ?> --- NEW FILE: admin_album_auth.php --- <?php /** * * @package Mx-Publisher Module - mx_smartor * @version $Id: admin_album_auth.php,v 1.1 2008/03/14 14:23:27 orynider Exp $ * @copyright (c) 2002-2006 [Smartor, Volodymyr (CLowN) Skoryk, IdleVoid, Jon Ohlsson] Mx-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_smartor/'; $setmodules_admin_path = 'modules/mx_smartor/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if( !empty($setmodules) ) { $filename = basename(__FILE__); $module['Smartor_Album']['Permissions'] = $setmodules_admin_path . $filename; return; } // // Let's set the root dir for phpBB // $album_root_path = $module_root_path . 'album_mod/'; require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($module_root_path . 'album_mod/album_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx")) { include($album_root_path . "language/lang_english/lang_admin.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx"); } $album_user_id = ALBUM_PUBLIC_GALLERY; if ( !isset( $HTTP_POST_VARS['submit'] ) ) { /* // Build the category selector $sql = "SELECT cat_id, cat_title, cat_order FROM ". ALBUM_CAT_TABLE ." ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not get Category list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $catrows[] = $row; } for ($i = 0; $i < count($catrows); $i++) { $template->assign_block_vars('catrow', array( 'CAT_ID' => $catrows[$i]['cat_id'], 'CAT_TITLE' => $catrows[$i]['cat_title']) ); } */ album_read_tree(); $s_album_cat_list = album_get_tree_option( ALBUM_ROOT_CATEGORY, ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL | ALBUM_SELECTBOX_INCLUDE_ROOT ); // --- Album Category Hierarchy : end $template->set_filenames( array( 'body' => 'admin/album_cat_select_body.tpl' ) ); $template->assign_vars( array( 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], 'L_SELECT_CAT' => $lang['Select_a_Category'], 'S_ALBUM_ACTION' => mx_append_sid( "admin_album_auth.$phpEx" ), 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], // --- Album Category Hierarchy : begin // --- version : 1.1.0 'CAT_SELECT_TITLE' => $s_album_cat_list ) // --- Album Category Hierarchy : end ); $template->pparse( 'body' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } else { if ( !isset( $HTTP_GET_VARS['cat_id'] ) ) { $cat_id = intval( $HTTP_POST_VARS['cat_id'] ); $template->set_filenames( array( 'body' => 'admin/album_auth_body.tpl' ) ); $template->assign_vars( array( 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_GROUPS' => $lang['Usergroups'], 'L_VIEW' => $lang['View'], 'L_UPLOAD' => $lang['Upload'], 'L_RATE' => $lang['Rate'], 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], 'S_ALBUM_ACTION' => mx_append_sid( "admin_album_auth.$phpEx?cat_id=$cat_id" ), )); // // Get the list of phpBB usergroups // $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> " . true . " ORDER BY group_name ASC"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql ); } while ( $row = $db->sql_fetchrow( $result ) ) { $groupdata[] = $row; } // // Get info of this cat // $sql = "SELECT cat_id, cat_title, cat_view_groups, cat_upload_groups, cat_rate_groups, cat_comment_groups, cat_edit_groups, cat_delete_groups, cat_moderator_groups FROM " . ALBUM_CAT_TABLE . " WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql ); } $thiscat = $db->sql_fetchrow( $result ); $view_groups = @explode( ',', $thiscat['cat_view_groups'] ); $upload_groups = @explode( ',', $thiscat['cat_upload_groups'] ); $rate_groups = @explode( ',', $thiscat['cat_rate_groups'] ); $comment_groups = @explode( ',', $thiscat['cat_comment_groups'] ); $edit_groups = @explode( ',', $thiscat['cat_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['cat_delete_groups'] ); $moderator_groups = @explode( ',', $thiscat['cat_moderator_groups'] ); for ( $i = 0; $i < count( $groupdata ); $i++ ) { $template->assign_block_vars( 'grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', 'UPLOAD_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $upload_groups ) ) ? 'checked="checked"' : '', 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ); } $template->pparse( 'body' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } else { $cat_id = intval( $HTTP_GET_VARS['cat_id'] ); $view_groups = @implode( ',', $HTTP_POST_VARS['view'] ); $upload_groups = @implode( ',', $HTTP_POST_VARS['upload'] ); $rate_groups = @implode( ',', $HTTP_POST_VARS['rate'] ); $comment_groups = @implode( ',', $HTTP_POST_VARS['comment'] ); $edit_groups = @implode( ',', $HTTP_POST_VARS['edit'] ); $delete_groups = @implode( ',', $HTTP_POST_VARS['delete'] ); $moderator_groups = @implode( ',', $HTTP_POST_VARS['moderator'] ); $sql = "UPDATE " . ALBUM_CAT_TABLE . " SET cat_view_groups = '$view_groups', cat_upload_groups = '$upload_groups', cat_rate_groups = '$rate_groups', cat_comment_groups = '$comment_groups', cat_edit_groups = '$edit_groups', cat_delete_groups = '$delete_groups', cat_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, 'Could not update Album config table', '', __LINE__, __FILE__, $sql ); } // okay, return a message... $message = $lang['Album_Auth_successfully'] . '<br /><br />' . sprintf( $lang['Click_return_album_auth'], '<a href="' . mx_append_sid( "admin_album_auth.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . mx_append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } ?> --- NEW FILE: admin_album_clearcache.php --- <?php /** * * @package Mx-Publisher Module - mx_smartor * @version $Id: admin_album_clearcache.php,v 1.1 2008/03/14 14:23:30 orynider Exp $ * @copyright (c) 2003 [sma...@ho..., Smartor] Mx-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_smartor/'; $setmodules_admin_path = 'modules/mx_smartor/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if( !empty($setmodules) ) { $filename = basename(__FILE__); $module['Smartor_Album']['Clear_Cache'] = $setmodules_admin_path . $filename; return; } // // Let's set the root dir for phpBB // $album_root_path = $module_root_path . 'album_mod/'; require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($module_root_path . 'album_mod/includes/album_constants.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx")) { include($album_root_path . "language/lang_english/lang_admin.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx"); } if( !isset($HTTP_POST_VARS['confirm']) ) { // // Start output of page // $template->set_filenames(array( 'body' => 'admin/album_config_clearcache_body.tpl') ); $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['Confirm'], 'CLEARCACHE_TEXT' => $lang['Album_clear_cache_confirm'], 'L_NO' => $lang['No'], 'L_YES' => $lang['Yes'], 'S_CONFIRM_ACTION' => mx_append_sid("admin_album_clearcache.$phpEx"), ) ); // // Generate the page // $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { $cache_dir = @opendir('../' . ALBUM_CACHE_PATH); while( $cache_file = @readdir($cache_dir) ) { if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $cache_file) ) { @unlink('../' . ALBUM_CACHE_PATH . $cache_file); } } @closedir($cache_dir); mx_message_die(GENERAL_MESSAGE, $lang['Thumbnail_cache_cleared_successfully']); } /* Powered by Photo Album v2.x.x (c) 2002-2003 Smartor */ ?> --- NEW FILE: admin_album_cat.php --- <?php /*************************************************************************** * admin_album_cat.php * ------------------- * begin : Monday, February 03, 2003 * copyright : (C) 2003 Smartor * email : sma...@ho... * * $Id: admin_album_cat.php,v 1.1 2008/03/14 14:23:28 orynider Exp $ * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_smartor/'; $setmodules_admin_path = 'modules/mx_smartor/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if( !empty($setmodules) ) { $filename = basename(__FILE__); $module['Smartor_Album']['Categories'] = $setmodules_admin_path . $filename; return; } // // Let's set the root dir for phpBB // $album_root_path = $module_root_path . 'album_mod/'; require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($module_root_path . 'album_mod/album_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx")) { include($album_root_path . "language/lang_english/lang_admin.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx"); } if ( !file_exists($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.$phpEx")) { include($album_root_path . "language/lang_english/lang_main.$phpEx"); } else { include($album_root_path . "language/lang_" . $board_config['default_lang'] . "/lang_main.$phpEx"); } $album_user_id = ALBUM_PUBLIC_GALLERY; function showResultMessage($in_message) { global $lang, $album_user_id, $phpEx; $message = $in_message . "<br /><br />" . sprintf($lang['Click_return_album_category'], "<a href=\"" . mx_append_sid("admin_album_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("../admin/index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } if( !isset($HTTP_POST_VARS['mode']) ) { if( !isset($HTTP_GET_VARS['action']) ) { album_read_tree(); /* if we still get layout issues then replace the template file with this $acp_prefix . 'album_cat_body_debug.tpl', BUT ONLY FOR DEBUGGING PURPOSE, and send me a screenshot of it then go back to this template file $acp_prefix . 'album_cat_body.tpl'. */ $template->set_filenames(array('body' => 'admin/album_cat_body.tpl')); $template->assign_vars(array( 'S_ALBUM_ACTION' => mx_append_sid("admin_album_cat.$phpEx"), 'L_CREATE_CATEGORY' => $lang['Create_category'], 'L_ALBUM_INDEX' => $lang['Album_Categories_Title'] ) ); // get the values of level selected if (!empty($cat_id)) { $parent = $cat_id; } if (!isset($album_cat_tree['keys'][$parent])) { $parent = ALBUM_ROOT_CATEGORY; } // display the tree album_display_admin_index($parent); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( $HTTP_GET_VARS['action'] == 'edit' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT cat.*, cat2.cat_title AS cat_parent_title, cat2.cat_id AS cat_parent_id FROM ". ALBUM_CAT_TABLE ." AS cat LEFT OUTER JOIN ". ALBUM_CAT_TABLE ." AS cat2 ON cat2.cat_id = cat.cat_parent WHERE cat.cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Could not query Album Categories information', '', __LINE__, __FILE__, $sql); } if( $db->sql_numrows($result) == 0 ) { mx_message_die(GENERAL_ERROR, 'The requested category is not existed'); } $catrow = $db->sql_fetchrow($result); album_read_tree(); $s_album_cat_list = album_get_tree_option($catrow['cat_parent_id'], ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL | ALBUM_SELECTBOX_INCLUDE_ROOT); $template->set_filenames(array('body' => 'admin/album_cat_new_body.tpl')); $template->assign_block_vars('acp', array( 'L_ALBUM_CAT_TITLE' => $lang['Album_Categories_Title'], 'L_ALBUM_CAT_EXPLAIN' => $lang['Album_Categories_Explain'] ) ); $template->assign_vars(array( 'S_ALBUM_ACTION' => mx_append_sid("admin_album_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PARENT_TITLE' => $lang['Parent_Category'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_PICS_APPROVAL' => $lang['Pics_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'L_WATERMARK' => $lang['Watermark'], 'L_WATERMARK_EXPLAIN' => $lang['Watermark_explain'], 'S_CAT_TITLE' => stripslashes($catrow['cat_title']), 'S_CAT_DESC' => stripslashes($catrow['cat_desc']), 'S_CAT_WM' => $catrow['cat_wm'], 'S_CAT_PARENT_OPTIONS' => $s_album_cat_list, 'VIEW_GUEST' => ($catrow['cat_view_level'] == ALBUM_GUEST) ? 'selected="selected"' : '', 'VIEW_REG' => ($catrow['cat_view_level'] == ALBUM_USER) ? 'selected="selected"' : '', 'VIEW_PRIVATE' => ($catrow['cat_view_level'] == ALBUM_PRIVATE) ? 'selected="selected"' : '', 'VIEW_MOD' => ($catrow['cat_view_level'] == ALBUM_MOD) ? 'selected="selected"' : '', 'VIEW_ADMIN' => ($catrow['cat_view_level'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'UPLOAD_GUEST' => ($catrow['cat_upload_level'] == ALBUM_GUEST) ? 'selected="selected"' : '', 'UPLOAD_REG' => ($catrow['cat_upload_level'] == ALBUM_USER) ? 'selected="selected"' : '', 'UPLOAD_PRIVATE' => ($catrow['cat_upload_level'] == ALBUM_PRIVATE) ? 'selected="selected"' : '', 'UPLOAD_MOD' => ($catrow['cat_upload_level'] == ALBUM_MOD) ? 'selected="selected"' : '', 'UPLOAD_ADMIN' => ($catrow['cat_upload_level'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'RATE_GUEST' => ($catrow['cat_rate_level'] == ALBUM_GUEST) ? 'selected="selected"' : '', 'RATE_REG' => ($catrow['cat_rate_level'] == ALBUM_USER) ? 'selected="selected"' : '', 'RATE_PRIVATE' => ($catrow['cat_rate_level'] == ALBUM_PRIVATE) ? 'selected="selected"' : '', 'RATE_MOD' => ($catrow['cat_rate_level'] == ALBUM_MOD) ? 'selected="selected"' : '', 'RATE_ADMIN' => ($catrow['cat_rate_level'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'COMMENT_GUEST' => ($catrow['cat_comment_level'] == ALBUM_GUEST) ? 'selected="selected"' : '', 'COMMENT_REG' => ($catrow['cat_comment_level'] == ALBUM_USER) ? 'selected="selected"' : '', 'COMMENT_PRIVATE' => ($catrow['cat_comment_level'] == ALBUM_PRIVATE) ? 'selected="selected"' : '', 'COMMENT_MOD' => ($catrow['cat_comment_level'] == ALBUM_MOD) ? 'selected="selected"' : '', 'COMMENT_ADMIN' => ($catrow['cat_comment_level'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'EDIT_REG' => ($catrow['cat_edit_level'] == ALBUM_USER) ? 'selected="selected"' : '', 'EDIT_PRIVATE' => ($catrow['cat_edit_level'] == ALBUM_PRIVATE) ? 'selected="selected"' : '', 'EDIT_MOD' => ($catrow['cat_edit_level'] == ALBUM_MOD) ? 'selected="selected"' : '', 'EDIT_ADMIN' => ($catrow['cat_edit_level'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'DELETE_REG' => ($catrow['cat_delete_level'] == ALBUM_USER) ? 'selected="selected"' : '', 'DELETE_PRIVATE' => ($catrow['cat_delete_level'] == ALBUM_PRIVATE) ? 'selected="selected"' : '', 'DELETE_MOD' => ($catrow['cat_delete_level'] == ALBUM_MOD) ? 'selected="selected"' : '', 'DELETE_ADMIN' => ($catrow['cat_delete_level'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'APPROVAL_DISABLED' => ($catrow['cat_approval'] == ALBUM_USER) ? 'selected="selected"' : '', 'APPROVAL_MOD' => ($catrow['cat_approval'] == ALBUM_MOD) ? 'selected="selected"' : '', 'APPROVAL_ADMIN' => ($catrow['cat_approval'] == ALBUM_ADMIN) ? 'selected="selected"' : '', 'S_MODE' => 'edit', 'S_GUEST' => ALBUM_GUEST, 'S_USER' => ALBUM_USER, 'S_PRIVATE' => ALBUM_PRIVATE, 'S_MOD' => ALBUM_MOD, 'S_ADMIN' => ALBUM_ADMIN, 'L_PANEL_TITLE' => $lang['Edit_Category'] ) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } elseif( $HTTP_GET_VARS['action'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT cat_id, cat_title, cat_order FROM ". ALBUM_CAT_TABLE ." ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Could not query Album Categories information', '', __LINE__, __FILE__, $sql); } $cat_found = false; while( $row = $db->sql_fetchrow($result) ) { if( $row['cat_id'] == $cat_id ) { $thiscat = $row; $cat_found = true; } else { $catrow[] = $row; } } if( $cat_found == false ) { mx_message_die(GENERAL_ERROR, 'The requested category is not existed'); } album_read_tree(); $select_to = '<select name="target">'; $select_to .= album_get_tree_option($catrow['cat_parent_id'], ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_ALL); $select_to .= '</select>'; $template->set_filenames(array('body' => 'admin/album_cat_delete_body.tpl')); $template->assign_vars(array( 'S_ALBUM_ACTION' => mx_append_sid("admin_album_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_DELETE' => $lang['Delete_Category'], 'L_CAT_DELETE_EXPLAIN' => $lang['Delete_Category_Explain'], 'L_CAT_TITLE' => $lang['Category_Title'], 'S_CAT_TITLE' => stripslashes($thiscat['cat_title']), 'L_MOVE_CONTENTS' => $lang['Move_contents'], 'L_MOVE_DELETE' => $lang['Move_and_Delete'], 'S_SELECT_TO' => $select_to ) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } elseif( $HTTP_GET_VARS['action'] == 'move' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $move = intval($HTTP_GET_VARS['move']); album_move_tree($cat_id, $move); // Return a message... showResultMessage($lang['Category_changed_order']); } } } else { if( $HTTP_POST_VARS['mode'] == 'new' ) { if ( is_array($HTTP_POST_VARS['addcategory'])) { list($cat_id) = each($HTTP_POST_VARS['addcategory']); $cat_title = stripslashes($HTTP_POST_VARS['name'][$cat_id]); $cat_parent = $cat_id; $cat_id = -1; } if( !isset($HTTP_POST_VARS['cat_title']) ) { album_read_tree(); $s_album_cat_list = album_get_tree_option($cat_parent, ALBUM_AUTH_VIEW, ALBUM_SELECTBOX_INCLUDE_ALL); $template->set_filenames(array('body' => 'admin/album_cat_new_body.tpl')); $template->assign_vars(array( 'L_ALBUM_CAT_TITLE' => $lang['Album_Categories_Title'], 'L_ALBUM_CAT_EXPLAIN' => $lang['Album_Categories_Explain'], 'S_ALBUM_ACTION' => mx_append_sid("admin_album_cat.$phpEx"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PARENT_TITLE' => $lang['Parent_Category'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_PICS_APPROVAL' => $lang['Pics_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'L_WATERMARK' => $lang['Watermark'], 'L_WATERMARK_EXPLAIN' => $lang['Watermark_explain'], 'S_CAT_TITLE' => stripslashes($cat_title), 'S_CAT_PARENT_OPTIONS' => $s_album_cat_list, 'VIEW_GUEST' => 'selected="selected"', 'UPLOAD_REG' => 'selected="selected"', 'RATE_REG' => 'selected="selected"', 'COMMENT_REG' => 'selected="selected"', 'EDIT_REG' => 'selected="selected"', 'DELETE_MOD' => 'selected="selected"', 'APPROVAL_DISABLED' => 'selected="selected"', 'S_MODE' => 'new', 'S_GUEST' => ALBUM_GUEST, 'S_USER' => ALBUM_USER, 'S_PRIVATE' => ALBUM_PRIVATE, 'S_MOD' => ALBUM_MOD, 'S_ADMIN' => ALBUM_ADMIN, 'L_PANEL_TITLE' => $lang['Create_category'] ) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( !get_magic_quotes_gpc() ) { $cat_title = addslashes(htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = addslashes(trim($HTTP_POST_VARS['cat_desc'])); } else { $cat_title = htmlspecialchars(trim($HTTP_POST_VARS['cat_title'])); $cat_desc = trim($HTTP_POST_VARS['cat_desc']); } $cat_wm = trim($HTTP_POST_VARS['cat_wm']); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intva... [truncated message content] |