|
From: Jon O. <jon...@us...> - 2007-09-09 16:48:23
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8466/admin Modified Files: admin_mx_block_cp.php admin_mx_chkobjs.php admin_mx_gen_cache.php admin_mx_meta.php admin_mx_module.php admin_mx_module_cp.php admin_mx_page_cp.php admin_mx_portal.php index.php page_header_admin.php pagestart.php Added Files: admin_mx_styles.php Log Message: Ok, massive update for 2.9.x. Index: admin_mx_chkobjs.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_chkobjs.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** admin_mx_chkobjs.php 5 May 2007 20:12:54 -0000 1.22 --- admin_mx_chkobjs.php 9 Sep 2007 16:48:15 -0000 1.23 *************** *** 109,113 **** mx_message_die(GENERAL_MESSAGE, '<p>'.$main_desc.'</p>' . ! '<form action="' . append_sid(PORTAL_URL . "admin/admin_mx_chkobjs.$phpEx") . '" method="post"> ' . $select_options . ' <input type="submit" name="submit" value="' . $lang[Submit].'" class="mainoption" /></form>', --- 109,113 ---- mx_message_die(GENERAL_MESSAGE, '<p>'.$main_desc.'</p>' . ! '<form action="' . mx_append_sid(PORTAL_URL . "admin/admin_mx_chkobjs.$phpEx") . '" method="post"> ' . $select_options . ' <input type="submit" name="submit" value="' . $lang[Submit].'" class="mainoption" /></form>', *************** *** 141,147 **** '<b>' . $lang['Confirm'] . '</b>:<br />' . $sql . '<br />' . '<br /> <br />' . ! '[ <a href="'.append_sid(basename(__FILE__)."?check_mode=$tb").'">'.$lang['No'].'</a> ]' . ' ' . ! '[ <a href="'.append_sid(basename(__FILE__).'?mode=db_delete'.$get_vars).'">'.$lang['Yes'].'</a> ]' . '</div><br /> ' . '</form>'; --- 141,147 ---- '<b>' . $lang['Confirm'] . '</b>:<br />' . $sql . '<br />' . '<br /> <br />' . ! '[ <a href="'.mx_append_sid(basename(__FILE__)."?check_mode=$tb").'">'.$lang['No'].'</a> ]' . ' ' . ! '[ <a href="'.mx_append_sid(basename(__FILE__).'?mode=db_delete'.$get_vars).'">'.$lang['Yes'].'</a> ]' . '</div><br /> ' . '</form>'; *************** *** 208,212 **** $html.="\t" . '</tr>' . "\n"; $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'cat', 5, '<a href="'.append_sid(basename(__FILE__)."?table=$tb").'"><b>Go Back</b></a>'); $html.="\t" . '</tr>' . "\n"; --- 208,212 ---- $html.="\t" . '</tr>' . "\n"; $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'cat', 5, '<a href="'.mx_append_sid(basename(__FILE__)."?table=$tb").'"><b>Go Back</b></a>'); $html.="\t" . '</tr>' . "\n"; *************** *** 258,262 **** $onclick = 'onclick="return confirm(\'Are you sure you want to delete this object?\');"'; ! $html.=tbItem('td', 'row1', 'center', '<a href="'.append_sid(basename(__FILE__).'?mode=delete'.$get_vars).'" '.$onclick.'>'.$lang['Delete'].'</a>'); $html.= "\t" . '</tr>' . "\n"; $row_count++; --- 258,262 ---- $onclick = 'onclick="return confirm(\'Are you sure you want to delete this object?\');"'; ! $html.=tbItem('td', 'row1', 'center', '<a href="'.mx_append_sid(basename(__FILE__).'?mode=delete'.$get_vars).'" '.$onclick.'>'.$lang['Delete'].'</a>'); $html.= "\t" . '</tr>' . "\n"; $row_count++; *************** *** 264,268 **** $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'catBottom', 5, '<a href="'.append_sid(basename(__FILE__)."?table=$tb").'"><b>Go Back</b></a>'); $html.="\t" . '</tr>' . "\n"; $html.='</table><br />' . "\n"; --- 264,268 ---- $html.="\t" . '<tr>' . "\n"; ! $html.=tbHead('td', 'catBottom', 5, '<a href="'.mx_append_sid(basename(__FILE__)."?table=$tb").'"><b>Go Back</b></a>'); $html.="\t" . '</tr>' . "\n"; $html.='</table><br />' . "\n"; Index: admin_mx_module_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module_cp.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** admin_mx_module_cp.php 5 May 2007 20:12:55 -0000 1.17 --- admin_mx_module_cp.php 9 Sep 2007 16:48:15 -0000 1.18 *************** *** 289,294 **** 'COOKIE_SECURE' => $board_config['cookie_secure'], ! 'S_ACTION' => append_sid("admin_mx_module_cp.$phpEx"), ! 'S_ACTION_DEFAULT' => append_sid("admin_mx_module_cp.$phpEx"), // --- 289,294 ---- 'COOKIE_SECURE' => $board_config['cookie_secure'], ! 'S_ACTION' => mx_append_sid("admin_mx_module_cp.$phpEx"), ! 'S_ACTION_DEFAULT' => mx_append_sid("admin_mx_module_cp.$phpEx"), // *************** *** 317,324 **** // 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)) ) { --- 317,336 ---- // Get the list of phpBB usergroups // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE . " ! ORDER BY group_name ASC"; ! break; ! case 'phpbb3': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY group_name ASC"; ! break; ! } if( !($result = $db->sql_query($sql)) ) { *************** *** 491,495 **** 'MODULE_DESC' => ( $module_rows[$module_count]['module_desc'] != '' ) ? ' - ' . $module_rows[$module_count]['module_desc'] : '', ! 'U_MODULE_EDIT' => append_sid(PORTAL_URL . "admin/admin_mx_module.$phpEx?module_id=" . $module_rows[$module_count]['module_id']), // --- 503,507 ---- 'MODULE_DESC' => ( $module_rows[$module_count]['module_desc'] != '' ) ? ' - ' . $module_rows[$module_count]['module_desc'] : '', ! 'U_MODULE_EDIT' => mx_append_sid(PORTAL_URL . "admin/admin_mx_module.$phpEx?module_id=" . $module_rows[$module_count]['module_id']), // *************** *** 519,523 **** { $template->assign_block_vars('module.reload', array( ! 'U_MODULE_EDIT' => append_sid(PORTAL_URL . "admin/admin_mx_module_cp.$phpEx?module_id=" . $module_id), )); --- 531,535 ---- { $template->assign_block_vars('module.reload', array( ! 'U_MODULE_EDIT' => mx_append_sid(PORTAL_URL . "admin/admin_mx_module_cp.$phpEx?module_id=" . $module_id), )); *************** *** 584,588 **** $message_delete = $lang['Delete_function'] . ' - ' . $function_title . '<br /><br />' . $lang['Delete_function_explain'] ! . '<br /><br />' . sprintf($lang['Click_function_delete_yes'], '<a href="' . append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 596,600 ---- $message_delete = $lang['Delete_function'] . ' - ' . $function_title . '<br /><br />' . $lang['Delete_function_explain'] ! . '<br /><br />' . sprintf($lang['Click_function_delete_yes'], '<a href="' . mx_append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 622,626 **** 'FUNCTION_DESC' => ( $function_desc != '' ) ? ' - ' . $function_desc : '', ! 'U_FUNCTION_DELETE' => append_sid(PORTAL_URL . "admin/admin_mx_module_cp.$phpEx" . $deletemode), // --- 634,638 ---- 'FUNCTION_DESC' => ( $function_desc != '' ) ? ' - ' . $function_desc : '', ! 'U_FUNCTION_DELETE' => mx_append_sid(PORTAL_URL . "admin/admin_mx_module_cp.$phpEx" . $deletemode), // *************** *** 722,726 **** $message_delete = $lang['Delete_parameter'] . ' - ' . $parameter_title . '<br /><br />' . $lang['Delete_parameter_explain'] ! . '<br /><br />' . sprintf($lang['Click_parameter_delete_yes'], '<a href="' . append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 734,738 ---- $message_delete = $lang['Delete_parameter'] . ' - ' . $parameter_title . '<br /><br />' . $lang['Delete_parameter_explain'] ! . '<br /><br />' . sprintf($lang['Click_parameter_delete_yes'], '<a href="' . mx_append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 753,759 **** "PARAMETER_TYPE" => $new_parameter ? '' : (!empty($lang['ParType_'.$parameter_type_key]) ? $lang['ParType_'.$parameter_type_key] : $parameter_type_key), ! "U_DELETE" => append_sid("admin_mx_module_cp.php" . $deletemode), ! "U_MOVE_UP" => append_sid("admin_mx_module_cp.php" . $upmode), ! "U_MOVE_DOWN" => append_sid("admin_mx_module_cp.php" . $downmode), // --- 765,771 ---- "PARAMETER_TYPE" => $new_parameter ? '' : (!empty($lang['ParType_'.$parameter_type_key]) ? $lang['ParType_'.$parameter_type_key] : $parameter_type_key), ! "U_DELETE" => mx_append_sid("admin_mx_module_cp.php" . $deletemode), ! "U_MOVE_UP" => mx_append_sid("admin_mx_module_cp.php" . $upmode), ! "U_MOVE_DOWN" => mx_append_sid("admin_mx_module_cp.php" . $downmode), // *************** *** 857,861 **** $message_delete = $lang['Delete_block'] . ' - ' . $block_title . '<br /><br />' . $lang['Delete_block_explain'] ! . '<br /><br />' . sprintf($lang['Click_block_delete_yes'], '<a href="' . append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 869,873 ---- $message_delete = $lang['Delete_block'] . ' - ' . $block_title . '<br /><br />' . $lang['Delete_block_explain'] ! . '<br /><br />' . sprintf($lang['Click_block_delete_yes'], '<a href="' . mx_append_sid("admin_mx_module_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 874,882 **** $block_editor_id = !$new_block ? $block_rows[$block_count]['block_editor_id'] : $userdata['user_id']; ! $editor_name_tmp = get_userdata($block_editor_id); $editor_name = $editor_name_tmp['username']; $block_time = !$new_block ? $block_rows[$block_count]['block_time'] : time(); ! $edit_time = create_date( $board_config['default_dateformat'], $block_time, $board_config['board_timezone'] ); if ($new_block) --- 886,894 ---- $block_editor_id = !$new_block ? $block_rows[$block_count]['block_editor_id'] : $userdata['user_id']; ! $editor_name_tmp = mx_get_userdata($block_editor_id); $editor_name = $editor_name_tmp['username']; $block_time = !$new_block ? $block_rows[$block_count]['block_time'] : time(); ! $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $block_time, $board_config['board_timezone'] ); if ($new_block) *************** *** 917,923 **** 'BLOCK_LAST_EDITED' => ( $editor_name != '' && !$new_block) ? ' (' . $lang['Block_updated_by'] . $editor_name . ', ' . $edit_time . ')' : '', ! 'U_BLOCK_SETTINGS' => append_sid(PORTAL_URL . "admin/admin_mx_block_cp.$phpEx?block_id=$block_id"), ! 'U_BLOCK_DELETE' => append_sid(PORTAL_URL . "admin/admin_mx_module_cp.$phpEx" . $deletemode), ! 'U_BLOCK_PERMISSIONS' => append_sid(PORTAL_URL . "admin/admin_mx_block_auth.$phpEx?cat_id=$block_id"), // --- 929,935 ---- 'BLOCK_LAST_EDITED' => ( $editor_name != '' && !$new_block) ? ' (' . $lang['Block_updated_by'] . $editor_name . ', ' . $edit_time . ')' : '', ! 'U_BLOCK_SETTINGS' => mx_append_sid(PORTAL_URL . "admin/admin_mx_block_cp.$phpEx?block_id=$block_id"), ! 'U_BLOCK_DELETE' => mx_append_sid(PORTAL_URL . "admin/admin_mx_module_cp.$phpEx" . $deletemode), ! 'U_BLOCK_PERMISSIONS' => mx_append_sid(PORTAL_URL . "admin/admin_mx_block_auth.$phpEx?cat_id=$block_id"), // Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** admin_mx_page_cp.php 21 Jul 2007 23:07:14 -0000 1.25 --- admin_mx_page_cp.php 9 Sep 2007 16:48:15 -0000 1.26 *************** *** 148,152 **** // General // ! 'S_ACTION' => append_sid(PORTAL_URL . "admin/admin_mx_page_cp.$phpEx"), 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => $lang['Page_admin'], --- 148,152 ---- // General // ! 'S_ACTION' => mx_append_sid(PORTAL_URL . "admin/admin_mx_page_cp.$phpEx"), 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => $lang['Page_admin'], *************** *** 301,305 **** $message_delete = $lang['Delete_page_template'] . '<br /><br />' . $lang['Delete_page_template_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_template_delete_yes'], '<a href="' . append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 301,305 ---- $message_delete = $lang['Delete_page_template'] . '<br /><br />' . $lang['Delete_page_template_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_template_delete_yes'], '<a href="' . mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 323,330 **** 'TEMPLATE_TITLE' => $new_template ? $lang['Add_Template'] : $template_title, ! 'U_DELETE' => append_sid("admin_mx_page_cp.$phpEx" . $deletemode), 'L_TEMPLATE_DELETE' => $lang['Page_template_delete'], ! 'U_TEMPLATE_DELETE' => append_sid("admin_mx_page_cp_template_setting.$phpEx?mode=deletetemplate&page_template_id=$page_template_id"), 'L_CREATE_TEMPLATE' => $lang['Add_Template'], --- 323,330 ---- 'TEMPLATE_TITLE' => $new_template ? $lang['Add_Template'] : $template_title, ! 'U_DELETE' => mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode), 'L_TEMPLATE_DELETE' => $lang['Page_template_delete'], ! 'U_TEMPLATE_DELETE' => mx_append_sid("admin_mx_page_cp_template_setting.$phpEx?mode=deletetemplate&page_template_id=$page_template_id"), 'L_CREATE_TEMPLATE' => $lang['Add_Template'], *************** *** 423,427 **** $message_delete = $lang['Delete_page_template_column'] . ' - ' . $column_title . '<br /><br />' . $lang['Delete_page_template_column_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_template_column_delete_yes'], '<a href="' . append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 423,427 ---- $message_delete = $lang['Delete_page_template_column'] . ' - ' . $column_title . '<br /><br />' . $lang['Delete_page_template_column_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_template_column_delete_yes'], '<a href="' . mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 437,443 **** 'COLUMN_TITLE' => $new_column ? $lang['Create_column'] : $column_title, ! 'U_COLUMN_DELETE' => append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_COLUMN_MOVE_UP' => append_sid("admin_mx_page_cp.$phpEx" . $upmode), ! 'U_COLUMN_MOVE_DOWN' => append_sid("admin_mx_page_cp.$phpEx" . $downmode), // --- 437,443 ---- 'COLUMN_TITLE' => $new_column ? $lang['Create_column'] : $column_title, ! 'U_COLUMN_DELETE' => mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_COLUMN_MOVE_UP' => mx_append_sid("admin_mx_page_cp.$phpEx" . $upmode), ! 'U_COLUMN_MOVE_DOWN' => mx_append_sid("admin_mx_page_cp.$phpEx" . $downmode), // *************** *** 478,485 **** // 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)) ) { --- 478,498 ---- // Get the list of phpBB usergroups // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE . " ! ORDER BY group_name ASC"; ! break; ! case 'phpbb3': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY group_name ASC"; ! break; ! } ! if( !($result = $db->sql_query($sql)) ) { *************** *** 632,636 **** $message_delete = $lang['Delete_page'] . '<br /><br />' . $lang['Delete_page_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_delete_yes'], '<a href="' . append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 645,649 ---- $message_delete = $lang['Delete_page'] . '<br /><br />' . $lang['Delete_page_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_delete_yes'], '<a href="' . mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 678,683 **** 'PAGE_ICON' => $icon_tmp, ! 'U_DELETE' => append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_PREVIEW' => append_sid($mx_root_path . "index.$phpEx" . '?page=' . $page_id), // --- 691,696 ---- 'PAGE_ICON' => $icon_tmp, ! 'U_DELETE' => mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_PREVIEW' => mx_append_sid($mx_root_path . "index.$phpEx" . '?page=' . $page_id), // *************** *** 788,792 **** { $template->assign_block_vars('pages.reload', array( ! 'U_PAGE_EDIT' => append_sid(PORTAL_URL . "admin/admin_mx_page_cp.$phpEx?page_id=" . $page_id), )); --- 801,805 ---- { $template->assign_block_vars('pages.reload', array( ! 'U_PAGE_EDIT' => mx_append_sid(PORTAL_URL . "admin/admin_mx_page_cp.$phpEx?page_id=" . $page_id), )); *************** *** 903,907 **** $message_delete = $lang['Delete_page_column'] . '<br /><br />' . $lang['Delete_page_column_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_column_delete_yes'], '<a href="' . append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; --- 916,920 ---- $message_delete = $lang['Delete_page_column'] . '<br /><br />' . $lang['Delete_page_column_explain'] ! . '<br /><br />' . sprintf($lang['Click_page_column_delete_yes'], '<a href="' . mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; *************** *** 922,928 **** 'COLUMN_TITLE' => $new_column ? $lang['Create_column'] : $column_title, ! 'U_COLUMN_DELETE' => append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_COLUMN_MOVE_UP' => append_sid("admin_mx_page_cp.$phpEx" . $upmode), ! 'U_COLUMN_MOVE_DOWN' => append_sid("admin_mx_page_cp.$phpEx" . $downmode), // --- 935,941 ---- 'COLUMN_TITLE' => $new_column ? $lang['Create_column'] : $column_title, ! 'U_COLUMN_DELETE' => mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_COLUMN_MOVE_UP' => mx_append_sid("admin_mx_page_cp.$phpEx" . $upmode), ! 'U_COLUMN_MOVE_DOWN' => mx_append_sid("admin_mx_page_cp.$phpEx" . $downmode), // *************** *** 992,998 **** $block_order = $block_rows[$block]['block_order']; ! $editor_name_tmp = get_userdata($mx_block->editor_id); $editor_name = $editor_name_tmp['username']; ! $edit_time = create_date( $board_config['default_dateformat'], $mx_block->block_time, $board_config['board_timezone'] ); $mode = MX_PAGE_BLOCK_TYPE; --- 1005,1011 ---- $block_order = $block_rows[$block]['block_order']; ! $editor_name_tmp = mx_get_userdata($mx_block->editor_id); $editor_name = $editor_name_tmp['username']; ! $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $mx_block->block_time, $board_config['board_timezone'] ); $mode = MX_PAGE_BLOCK_TYPE; *************** *** 1006,1010 **** { $l_setting = $lang['Block_cp']; ! $u_setting = append_sid(PORTAL_URL . $mx_block->block_edit_file . "?block_id=$block_id"); } else --- 1019,1023 ---- { $l_setting = $lang['Block_cp']; ! $u_setting = mx_append_sid(PORTAL_URL . $mx_block->block_edit_file . "?block_id=$block_id"); } else *************** *** 1018,1022 **** // $l_setting = $lang['Block_cp']; ! $u_setting = append_sid("admin_mx_block_cp.$phpEx?block_id=$block_id"); } --- 1031,1035 ---- // $l_setting = $lang['Block_cp']; ! $u_setting = mx_append_sid("admin_mx_block_cp.$phpEx?block_id=$block_id"); } *************** *** 1035,1042 **** 'U_BLOCK_SETTING' => $u_setting, ! 'U_BLOCK_DELETE' => append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_BLOCK_MOVE_UP' => append_sid("admin_mx_page_cp.$phpEx" . $upmode), ! 'U_BLOCK_MOVE_DOWN' => append_sid("admin_mx_page_cp.$phpEx" . $downmode), ! 'U_BLOCK_RESYNC' => append_sid("admin_mx_page_cp.$phpEx" . $syncmode) )); } // for ... blocks --- 1048,1055 ---- 'U_BLOCK_SETTING' => $u_setting, ! 'U_BLOCK_DELETE' => mx_append_sid("admin_mx_page_cp.$phpEx" . $deletemode), ! 'U_BLOCK_MOVE_UP' => mx_append_sid("admin_mx_page_cp.$phpEx" . $upmode), ! 'U_BLOCK_MOVE_DOWN' => mx_append_sid("admin_mx_page_cp.$phpEx" . $downmode), ! 'U_BLOCK_RESYNC' => mx_append_sid("admin_mx_page_cp.$phpEx" . $syncmode) )); } // for ... blocks Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** index.php 5 May 2007 20:12:56 -0000 1.32 --- index.php 9 Sep 2007 16:48:16 -0000 1.33 *************** *** 99,108 **** 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! "U_PORTAL_INDEX" => append_sid(PORTAL_URL . "index.$phpEx"), "L_PORTAL_INDEX" => $lang['Portal_index'], "L_PREVIEW_PORTAL" => $lang['Preview_portal'], ! "U_FORUM_INDEX" => append_sid(PHPBB_URL . "index.$phpEx"), ! "U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"), //+MOD: DHTML Menu for ACP 'COOKIE_NAME' => $board_config['cookie_name'], --- 99,108 ---- 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! "U_PORTAL_INDEX" => mx_append_sid(PORTAL_URL . "index.$phpEx"), "L_PORTAL_INDEX" => $lang['Portal_index'], "L_PREVIEW_PORTAL" => $lang['Preview_portal'], ! "U_FORUM_INDEX" => mx_append_sid(PHPBB_URL . "index.$phpEx"), ! "U_ADMIN_INDEX" => mx_append_sid("index.$phpEx?pane=right"), //+MOD: DHTML Menu for ACP 'COOKIE_NAME' => $board_config['cookie_name'], *************** *** 164,168 **** //-MOD: DHTML Menu for ACP "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => append_sid(PORTAL_URL . $file) )); $row_count++; --- 164,168 ---- //-MOD: DHTML Menu for ACP "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => mx_append_sid(PORTAL_URL . $file) )); $row_count++; *************** *** 176,228 **** // Include PHPBB Administration // ------------------------------------------------------------------------------- ! $module_phpbb = read_admin($phpbb_root_path . 'admin/'); ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'] ! )); ! ! ksort($module_phpbb); ! //+MOD: DHTML Menu for ACP ! $menu_cat_id = 0; ! //-MOD: DHTML Menu for ACP ! while( list($cat, $action_array) = each($module_phpbb) ) ! { ! $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars('module_phpbb.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ! ); ! ksort($action_array); ! $row_count = 0; ! while( list($action, $file) = each($action_array) ) { ! $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; ! ! $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! $template->assign_block_vars('module_phpbb.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => $row_count, //-MOD: DHTML Menu for ACP ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => append_sid(PHPBB_URL . 'admin/' . $file)) ); ! $row_count++; } - //+MOD: DHTML Menu for ACP - $menu_cat_id++; - //-MOD: DHTML Menu for ACP - } // // Read Portal Module Configuration --- 176,265 ---- // Include PHPBB Administration // ------------------------------------------------------------------------------- ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! break; ! case 'phpbb2': ! $module_phpbb = read_admin($phpbb_root_path . 'admin/'); ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'] ! )); ! ksort($module_phpbb); ! //+MOD: DHTML Menu for ACP ! $menu_cat_id = 0; ! //-MOD: DHTML Menu for ACP ! while( list($cat, $action_array) = each($module_phpbb) ) { ! $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! $template->assign_block_vars('module_phpbb.catrow', array( //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ); ! ! ksort($action_array); ! ! $row_count = 0; ! while( list($action, $file) = each($action_array) ) ! { ! $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; ! ! $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! ! $template->assign_block_vars('module_phpbb.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => $row_count, ! //-MOD: DHTML Menu for ACP ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => mx_append_sid(PHPBB_URL . 'admin/' . $file . '?sid='.$userdata['session_id'])) ! ); ! $row_count++; ! } ! //+MOD: DHTML Menu for ACP ! $menu_cat_id++; ! //-MOD: DHTML Menu for ACP } + break; + + case 'phpbb3': + + $template->assign_block_vars('module_phpbb', array( + 'L_PHPBB' => $lang['Phpbb'] + )); + + $menu_cat_id = 0; + + $template->assign_block_vars('module_phpbb.catrow', array( + //+MOD: DHTML Menu for ACP + 'MENU_CAT_ID' => $menu_cat_id, + 'MENU_CAT_ROWS' => 1, + //-MOD: DHTML Menu for ACP + 'ADMIN_CATEGORY' => 'Olympus adminCP') + ); + + $template->assign_block_vars('module_phpbb.catrow.modulerow', array( + "ROW_COLOR" => "#" . $theme['td_color1'], + "ROW_CLASS" => $theme['td_class1'], + //+MOD: DHTML Menu for ACP + 'ROW_COUNT' => 0, + //-MOD: DHTML Menu for ACP + "ADMIN_MODULE" => 'Go!', + "U_ADMIN_MODULE" => mx_append_sid($phpbb_root_path . 'adm/index.php?sid='.$mx_user->session_id)) + ); + + break; + } // // Read Portal Module Configuration *************** *** 304,308 **** "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => append_sid(PORTAL_URL . $file)) ); $row_count++; --- 341,345 ---- "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => mx_append_sid(PORTAL_URL . $file)) ); $row_count++; *************** *** 333,338 **** 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, // END ! "L_WELCOME" => $lang['Welcome_mxBB'], ! "L_ADMIN_INTRO" => $lang['Admin_intro_mxBB'], "L_FORUM_STATS" => $lang['Forum_stats'], "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], --- 370,375 ---- 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, // END ! "L_WELCOME" => $lang['Welcome_mxBB'], ! "L_ADMIN_INTRO" => $lang['Admin_intro_mxBB'], "L_FORUM_STATS" => $lang['Forum_stats'], "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], *************** *** 357,470 **** ); ! // ! // Get forum statistics ! // ! $total_posts = get_db_stat('postcount'); ! $total_users = get_db_stat('usercount'); ! $total_topics = get_db_stat('topiccount'); ! $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); ! $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); ! $users_per_day = sprintf("%.2f", $total_users / $boarddays); ! $avatar_dir_size = 0; ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']) ) ! { ! while( $file = @readdir($avatar_dir) ) ! { ! if( $file != "." && $file != ".." ) ! { ! $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); ! } ! } ! @closedir($avatar_dir); ! // ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! // ! if($avatar_dir_size >= 1048576) ! { ! $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; ! } ! else if($avatar_dir_size >= 1024) ! { ! $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; ! } ! else ! { ! $avatar_dir_size = $avatar_dir_size . " Bytes"; ! } ! } ! else ! { ! // Couldn't open Avatar dir. ! $avatar_dir_size = $lang['Not_available']; ! } ! if($posts_per_day > $total_posts) ! { ! $posts_per_day = $total_posts; ! } ! if($topics_per_day > $total_topics) ! { ! $topics_per_day = $total_topics; ! } ! if($users_per_day > $total_users) ! { ! $users_per_day = $total_users; ! } ! // ! // DB size ... MySQL only ! // ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! // ! if( preg_match("/^mysql/", SQL_LAYER) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; ! if($result = $db->sql_query($sql)) ! { ! $row = $db->sql_fetchrow($result); ! $version = $row['mysql_version']; ! if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) { ! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; ! $sql = "SHOW TABLE STATUS ! FROM " . $db_name; if($result = $db->sql_query($sql)) { ! $tabledata_ary = $db->sql_fetchrowset($result); ! $dbsize = 0; ! for($i = 0; $i < count($tabledata_ary); $i++) { ! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) { ! if( $table_prefix != "" ) { ! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ) { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; } } ! else ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } } ! } // Else we couldn't get the table status. } else --- 394,541 ---- ); ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! break; ! case 'phpbb2': ! case 'phpbb3': ! $template->assign_block_vars("forum_stats", array()); ! // ! // Get forum statistics ! // ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $total_topics = phpBB2::get_db_stat('topiccount'); ! $start_date = phpBB2::create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); ! $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); ! $users_per_day = sprintf("%.2f", $total_users / $boarddays); ! $avatar_dir_size = 0; ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']) ) ! { ! while( $file = @readdir($avatar_dir) ) ! { ! if( $file != "." && $file != ".." ) ! { ! $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); ! } ! } ! @closedir($avatar_dir); ! // ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! // ! if($avatar_dir_size >= 1048576) ! { ! $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; ! } ! else if($avatar_dir_size >= 1024) ! { ! $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; ! } ! else ! { ! $avatar_dir_size = $avatar_dir_size . " Bytes"; ! } ! } ! else ! { ! // Couldn't open Avatar dir. ! $avatar_dir_size = $lang['Not_available']; ! } ! if($posts_per_day > $total_posts) ! { ! $posts_per_day = $total_posts; ! } ! if($topics_per_day > $total_topics) ! { ! $topics_per_day = $total_topics; ! } ! if($users_per_day > $total_users) { ! $users_per_day = $total_users; ! } ! // ! // DB size ... MySQL only ! // ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! // ! if( preg_match("/^mysql/", SQL_LAYER) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; if($result = $db->sql_query($sql)) { ! $row = $db->sql_fetchrow($result); ! $version = $row['mysql_version']; ! if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) { ! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; ! ! $sql = "SHOW TABLE STATUS ! FROM " . $db_name; ! if($result = $db->sql_query($sql)) { ! $tabledata_ary = $db->sql_fetchrowset($result); ! ! $dbsize = 0; ! for($i = 0; $i < count($tabledata_ary); $i++) { ! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) { ! if( $table_prefix != "" ) ! { ! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ) ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! else ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } } } ! } // Else we couldn't get the table status. } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else if( preg_match("/^mssql/", SQL_LAYER) ) ! { ! $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize ! FROM sysfiles"; ! if( $result = $db->sql_query($sql) ) ! { ! $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); } else *************** *** 472,543 **** $dbsize = $lang['Not_available']; } - } - else - { - $dbsize = $lang['Not_available']; - } - $db->sql_freeresult($result); - } - else if( preg_match("/^mssql/", SQL_LAYER) ) - { - $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize - FROM sysfiles"; - if( $result = $db->sql_query($sql) ) - { - $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; - } - else - { - $dbsize = $lang['Not_available']; - } - $db->sql_freeresult($result); - } - else - { - $dbsize = $lang['Not_available']; - } ! if ( is_integer($dbsize) ) ! { ! if( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); ! } ! else if( $dbsize >= 1024 ) ! { ! $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); ! } ! else ! { ! $dbsize = sprintf("%.2f Bytes", $dbsize); ! } ! } ! $template->assign_vars(array( ! "NUMBER_OF_POSTS" => $total_posts, ! "NUMBER_OF_TOPICS" => $total_topics, ! "NUMBER_OF_USERS" => $total_users, ! "START_DATE" => $start_date, ! "POSTS_PER_DAY" => $posts_per_day, ! "TOPICS_PER_DAY" => $topics_per_day, ! "USERS_PER_DAY" => $users_per_day, ! "AVATAR_DIR_SIZE" => $avatar_dir_size, ! "DB_SIZE" => $dbsize, ! "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']) ! ); ! // ! // End forum statistics ! // // // Get users online information. // ! $sql = "SELECT u.user_id, u.username, u.user_session_time, u.user_session_page, s.session_logged_in, s.session_ip, s.session_start ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE s.session_logged_in = " . TRUE . " ! AND u.user_id = s.session_user_id ! AND u.user_id <> " . ANONYMOUS . " ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY u.user_session_time DESC"; if(!$result = $db->sql_query($sql)) { --- 543,606 ---- $dbsize = $lang['Not_available']; } ! if ( is_integer($dbsize) ) ! { ! if( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); ! } ! else if( $dbsize >= 1024 ) ! { ! $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); ! } ! else ! { ! $dbsize = sprintf("%.2f Bytes", $dbsize); ! } ! } ! $template->assign_vars(array( ! "NUMBER_OF_POSTS" => $total_posts, ! "NUMBER_OF_TOPICS" => $total_topics, ! "NUMBER_OF_USERS" => $total_users, ! "START_DATE" => $start_date, ! "POSTS_PER_DAY" => $posts_per_day, ! "TOPICS_PER_DAY" => $topics_per_day, ! "USERS_PER_DAY" => $users_per_day, ! "AVATAR_DIR_SIZE" => $avatar_dir_size, ! "DB_SIZE" => $dbsize, ! "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']) ! ); ! // ! // End forum statistics ! // ! break; ! } // // Get users online information. // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE s.session_logged_in = " . TRUE . " ! AND u.user_id = s.session_user_id ! AND u.user_id <> " . ANONYMOUS . " ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY u.user_session_time DESC"; ! break; ! case 'phpbb3': ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE u.user_id <> " . ANONYMOUS . " ! AND u.user_id = s.session_user_id ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY s.session_time DESC"; ! break; ! } ! if(!$result = $db->sql_query($sql)) { *************** *** 547,555 **** $db->sql_freeresult($result); ! $sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = 0 ! AND session_time >= " . ( time() - 300 ) . " ! ORDER BY session_time DESC"; if(!$result = $db->sql_query($sql)) { --- 610,633 ---- $db->sql_freeresult($result); ! ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT session_page, session_logged_in, session_time, session_ip, session_start ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = 0 ! AND session_time >= " . ( time() - 300 ) . " ! ORDER BY session_time DESC"; ! break; ! case 'phpbb3': ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE u.user_id = " . ANONYMOUS . " ! AND u.user_id = s.session_user_id ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY s.session_time DESC"; ! break; ! } if(!$result = $db->sql_query($sql)) { *************** *** 559,578 **** $db->sql_freeresult($result); - $sql = "SELECT forum_name, forum_id - FROM " . FORUMS_TABLE; ! if($forums_result = $db->sql_query($sql)) ! { ! while($forumsrow = $db->sql_fetchrow($forums_result)) ! { ! $forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name']; ! } ! } ! else { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql); ! } ! $db->sql_freeresult($result); $reg_userid_ary = array(); --- 637,671 ---- $db->sql_freeresult($result); ! switch (PORTAL_BACKEND) { ! case 'internal': ! break; ! case 'phpbb2': ! ! $sql = "SELECT forum_name, forum_id ! FROM " . FORUMS_TABLE; ! ! if($forums_result = $db->sql_query($sql)) ! { ! while($forumsrow = $db->sql_fetchrow($forums_result)) ! { ! $forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name']; ! } ! } ! else ! { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql); ! } ! ! $db->sql_freeresult($result); ! break; ! ! case 'phpbb3': ! // To-do ! break; ! ! } $reg_userid_ary = array(); *************** *** 664,668 **** } //-MOD: ViewOnline extension for mxBB Portal Pages ! $location_url = append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']); $location = $forum_data[$onlinerow_reg[$i]['user_session_page']]; } --- 757,761 ---- } //-MOD: ViewOnline extension for mxBB Portal Pages ! $location_url = mx_append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']); $location = $forum_data[$onlinerow_reg[$i]['user_session_page']]; } *************** *** 671,675 **** $row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; ! $reg_ip = decode_ip($onlinerow_reg[$i]['session_ip']); $template->assign_block_vars("reg_user_row", array( --- 764,768 ---- $row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; ! $reg_ip = phpBB2::decode_ip($onlinerow_reg[$i]['session_ip']); $template->assign_block_vars("reg_user_row", array( *************** *** 677,688 **** "ROW_CLASS" => $row_class, "USERNAME" => $username, ! "STARTED" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $reg_ip, "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip", ! "U_USER_PROFILE" => append_sid(PHPBB_URL . "admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), ! "U_FORUM_LOCATION" => append_sid($location_url)) ); } --- 770,781 ---- "ROW_CLASS" => $row_class, "USERNAME" => $username, ! "STARTED" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $reg_ip, "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip", ! "U_USER_PROFILE" => mx_append_sid(PHPBB_URL . "admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), ! "U_FORUM_LOCATION" => mx_append_sid($location_url)) ); } *************** *** 763,767 **** else { ! $location_url = append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']); $location = $forum_data[$onlinerow_guest[$i]['session_page']]; } --- 856,860 ---- else { ! $location_url = mx_append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']); $location = $forum_data[$onlinerow_guest[$i]['session_page']]; } *************** *** 770,774 **** $row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; ! $guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']); $template->assign_block_vars("guest_user_row", array( --- 863,867 ---- $row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; ! $guest_ip = phpBB2::decode_ip($onlinerow_guest[$i]['session_ip']); $template->assign_block_vars("guest_user_row", array( *************** *** 776,786 **** "ROW_CLASS" => $row_class, "USERNAME" => $lang['Guest'], ! "STARTED" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $guest_ip, "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip", ! "U_FORUM_LOCATION" => append_sid($location_url)) ); } --- 869,879 ---- "ROW_CLASS" => $row_class, "USERNAME" => $lang['Guest'], ! "STARTED" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $guest_ip, "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip", ! "U_FORUM_LOCATION" => mx_append_sid($location_url)) ); } *************** *** 936,941 **** $template->assign_vars(array( 'ADMIN_TITLE' => $lang['mxBB_adminCP'], ! "S_FRAME_NAV" => append_sid("index.$phpEx?pane=left"), ! "S_FRAME_MAIN" => append_sid("index.$phpEx?pane=right")) ); --- 1029,1034 ---- $template->assign_vars(array( 'ADMIN_TITLE' => $lang['mxBB_adminCP'], ! "S_FRAME_NAV" => mx_append_sid("index.$phpEx?pane=left"), ! "S_FRAME_MAIN" => mx_append_sid("index.$phpEx?pane=right")) ); Index: page_header_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_header_admin.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** page_header_admin.php 5 May 2007 20:12:56 -0000 1.19 --- page_header_admin.php 9 Sep 2007 16:48:16 -0000 1.20 *************** *** 73,82 **** 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']), 'L_FAQ' => $lang['FAQ'], ! 'U_INDEX' => append_sid('../index.'.$phpEx), 'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone), ! 'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx), ! 'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx), ! 'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], --- 73,82 ---- 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']), 'L_FAQ' => $lang['FAQ'], ! 'U_INDEX' => mx_append_sid('../index.'.$phpEx), 'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone), ! 'S_LOGIN_ACTION' => mx_append_sid('../login.'.$phpEx), ! 'S_JUMPBOX_ACTION' => mx_append_sid('../viewforum.'.$phpEx), ! 'S_CURRENT_TIME' => sprintf($lang['Current_time'], phpBB2::create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], *************** *** 138,142 **** 'T_GECKO_STYLESHEET' => 'gecko.css', ! 'MX_ICON_CSS' => $images['mx_graphics']['icon_style'] //- mxBB )); --- 138,143 ---- 'T_GECKO_STYLESHEET' => 'gecko.css', ! 'MX_ICON_CSS' => $images['mx_graphics']['icon_style'], ! 'LOGO' => $images['mx_logo'] //- mxBB )); Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** admin_mx_module.php 5 May 2007 20:12:55 -0000 1.46 --- admin_mx_module.php 9 Sep 2007 16:48:15 -0000 1.47 *************** *** 183,187 **** 'COOKIE_SECURE' => $board_config['cookie_secure'], ! 'S_ACTION' => append_sid("admin_mx_module.$phpEx") )); --- 183,187 ---- 'COOKIE_SECURE' => $board_config['cookie_secure'], ! 'S_ACTION' => mx_append_sid("admin_mx_module.$phpEx") )); *************** *** 293,305 **** $message_uninstall = $lang['Module_delete'] ! . '<br /><br />' . sprintf($lang['Click_module_delete_yes'], '<a href="' . append_sid("admin_mx_module.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; $message_upgrade = $lang['upgrade_module_pack_explain'] ! . '<br /><br />' . sprintf($lang['Click_module_upgrade_yes'], '<a href="' . append_sid("admin_mx_module.$phpEx" . $upgrademode) . '">', '</a>') . '<br /><br />'; $message_export = $lang['export_module_pack_explain'] ! . '<br /><br />' . sprintf($lang['Click_module_export_yes'], '<a href="' . append_sid("admin_mx_module.$phpEx" . $exportmode) . '">', '</a>') . '<br /><br />'; --- 293,305 ---- $message_uninstall = $lang['Module_delete'] ! . '<br /><br />' . sprintf($lang['Click_module_delete_yes'], '<a href="' . mx_append_sid("admin_mx_module.$phpEx" . $deletemode) . '">', '</a>') . '<br /><br />'; $message_upgrade = $lang['upgrade_module_pack_explain'] ! . '<br /><br />' . sprintf($lang['Click_module_upgrade_yes'], '<a href="' . mx_append_sid("admin_mx_module.$phpEx" . $upgrademode) . '">', '</a>') . '<br /><br />'; $message_export = $lang['export_module_pack_explain'] ! . '<br /><br />' . sprintf($lang['Click_module_export_yes'], '<a href="' . mx_append_sid("admin_mx_module.$phpEx" . $exportmode) . '">', '</a>') . '<br /><br />'; *************** *** 325,329 **** 'IMG_URL_DELETE' => $visible_uninstall ? $module_nav_icon_url . 'contract.gif' : $module_nav_icon_url . 'expand.gif', ! 'U_MODULE' => append_sid("admin_mx_module_cp.$phpEx" . $settingmode), 'MODULE_ID' => $module_id, --- 325,329 ---- 'IMG_URL_DELETE' => $visible_uninstall ? $module_nav_icon_url . 'contract.gif' : $module_nav_icon_url . 'expand.gif', ! 'U_MODULE' => mx_append_sid("admin_mx_module_cp.$phpEx" . $settingmode), 'MODULE_ID' => $module_id, --- NEW FILE: admin_mx_styles.php --- <?php /*************************************************************************** * admin_styles.php * ------------------- * begin : Thursday, Jul 12, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: admin_mx_styles.php,v 1.1 2007/09/09 16:48:16 jonohlsson 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. * ***************************************************************************/ if( !empty($setmodules) ) { $file = basename(__FILE__); $module['Styles']['Add_new'] = 'admin/' . "$file?mode=addnew"; //$module['Styles']['Create_new'] = 'admin/' . "$file?mode=create"; $module['Styles']['Manage'] = 'admin/' . $file; //$module['Styles']['Export'] = 'admin/' . "$file?mode=export"; //$module['2_CP']['2_1_Modules'] = 'admin/' . $file; return; } // // Security and Page header // define('IN_PORTAL', 1); $mx_root_path = './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); $no_page_header = TRUE; require('./pagestart.' . $phpEx); // // Load default header // include_once('./page_header_admin.php'); $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; if ($cancel) { redirect('admin/' . mx_append_sid("admin_mx_styles.$phpEx", true)); } if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) { $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode']; $mode = htmlspecialchars($mode); } else { $mode = ""; } switch( $mode ) { case "addnew": $install_to = ( isset($HTTP_GET_VARS['install_to']) ) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to']; $style_name = ( isset($HTTP_GET_VARS['style']) ) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style']; if( isset($install_to) ) { include($mx_root_path. "templates/" . basename($install_to) . "/". basename($install_to). ".cfg"); $sql = "INSERT INTO " . MX_THEMES_TABLE . " (template_name, style_name, head_stylesheet, portal_backend) VALUES( '" . $style_name . "', '" . $style_name . "', '" . $style_name . ".css', '" . PORTAL_BACKEND . "' )"; if( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, "Could not insert theme data!", "", __LINE__, __FILE__, $sql); } $message = $lang['Theme_installed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . mx_append_sid("admin_mx_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } else { $installable_themes = array(); if( $dir = @opendir($mx_root_path. "templates/") ) { while( $sub_dir = @readdir($dir) ) { if( !is_file(phpBB2::phpbb_realpath($mx_root_path . 'templates/' .$sub_dir)) && !is_link(phpBB2::phpbb_realpath($mx_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) { if( @file_exists(@phpBB2::phpbb_realpath($mx_root_path. "templates/" . $sub_dir . "/$sub_dir.cfg")) ) { @include($mx_root_path. "templates/" . $sub_dir . "/$sub_dir.cfg"); if ($mx_template_settings['portal_backend'] == PORTAL_BACKEND) { $style_name = $sub_dir; $sql = "SELECT themes_id FROM " . MX_THEMES_TABLE . " WHERE style_name = '" . str_replace("\'", "''", $style_name) . "'"; if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query themes table!", "", __LINE__, __FILE__, $sql); } if(!$db->sql_numrows($result)) { $installable_themes[] = array('style_name'=>$sub_dir, 'template_name'=>$sub_dir); } } } } } $template->set_filenames(array( "body" => "admin/styles_addnew_body.tpl") ); $template->assign_vars(array( "L_STYLES_TITLE" => $lang['Styles_admin'], "L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'], "L_STYLE" => $lang['Style'], //"L_TEMPLATE" => $lang['Template'], "L_INSTALL" => $lang['Install'], "L_ACTION" => $lang['Action']) ); for($i = 0; $i < count($installable_themes); $i++) { $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars("styles", array( "ROW_CLASS" => $row_class, "ROW_COLOR" => "#" . $row_color, "STYLE_NAME" => $installable_themes[$i]['style_name'], //"TEMPLATE_NAME" => $installable_themes[$i]['template_name'], "U_STYLES_INSTALL" => mx_append_sid("admin_mx_styles.$phpEx?mode=addnew&style=" . urlencode($installable_themes[$i]['style_name']) . "&install_to=" . urlencode($installable_themes[$i]['template_name']))) ); } $template->pparse("body"); } closedir($dir); } break; case "delete": $style_id = ( isset($HTTP_GET_VARS['style_id']) ) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']); if( !$confirm ) { if($style_id == $board_config['default_style']) { mx_message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style']); } $hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />'; // // Set template files // $template->set_filenames(array( "confirm" => "admin/confirm_body.tpl") ); $template->assign_vars(array( "MESSAGE_TITLE" => $lang['Confirm'], "MESSAGE_TEXT" => $lang['Confirm_delete_style'], "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], "S_CONFIRM_ACTION" => mx_append_sid("admin_mx_styles.$phpEx"), "S_HIDDEN_FIELDS" => $hidden_fields) ); $template->pparse("confirm"); } else { // // The user has confirmed the delete. Remove the style, the style element // names and update any users who might be using this style // $sql = "DELETE FROM " . MX_THEMES_TABLE . " WHERE themes_id = $style_id"; if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION)) { mx_message_die(GENERAL_ERROR, "Could not remove style data!", "", __LINE__, __FILE__, $sql); } $sql = "UPDATE " . USERS_TABLE . " SET user_style = " . $board_config['default_style'] . " WHERE user_style = $style_id"; if(!$result = $db->sql_query($sql, END_TRANSACTION)) { mx_message_die(GENERAL_ERROR, "Could not update user style information", "", __LINE__, __FILE__, $sql); } $message = $lang['Style_removed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . mx_append_sid("admin_mx_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } break; default: $sql = "SELECT themes_id, template_name, style_name FROM " . MX_THEMES_TABLE . " WHERE portal_backend = '" . PORTAL_BACKEND . "' ORDER BY template_name"; if(!$result = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not get style information!", "", __LINE__, __FILE__, $sql); } $style_rowset = $db->sql_fetchrowset($result); $template->set_filenames(array( "body" => "admin/styles_list_body.tpl") ); $template->assign_vars(array( "L_STYLES_TITLE" => $lang['Styles_admin'], "L_STYLES_TEXT" => $lang['Styles_explain'], "L_STYLE" => $lang['Style'], "L_DELETE" => $lang['Delete']) ); for($i = 0; $i < count($style_rowset); $i++) { $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars("styles", array( "ROW_CLASS" => $row_class, "ROW_COLOR" => $row_color, "STYLE_NAME" => $style_rowset[$i]['style_name'], "U_STYLES_DELETE" => mx_append_sid("admin_mx_styles.$phpEx?mode=delete&style_id=" . $style_rowset[$i]['themes_id'])) ); } $template->pparse("body"); break; } if (empty($HTTP_POST_VARS['send_file'])) { include('./page_footer_admin.php'); } ?> Index: admin_mx_gen_cache.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_gen_cache.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** admin_mx_gen_cache.php 5 May 2007 20:12:54 -0000 1.25 --- admin_mx_gen_cache.php 9 Sep 2007... [truncated message content] |