|
From: Jon O. <jon...@us...> - 2005-12-11 16:18:14
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/modules/mx_kb/admin Modified Files: admin_kb_cat.php Log Message: adding php5 support Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** admin_kb_cat.php 8 Dec 2005 15:04:25 -0000 1.20 --- admin_kb_cat.php 11 Dec 2005 16:18:03 -0000 1.21 *************** *** 42,45 **** --- 42,46 ---- include( $phpbb_root_path . 'kb/kb_common.' . $phpEx ); + include( $phpbb_root_path . 'kb/includes/functions_admin.' . $phpEx ); } else *************** *** 70,73 **** --- 71,75 ---- include( $module_root_path . 'kb/kb_common.' . $phpEx ); + include( $module_root_path . 'kb/includes/functions_admin.' . $phpEx ); } *************** *** 867,959 **** include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - function admin_cat_main( $cat_parent = 0, $depth = 0 ) - { - global $mx_kb, $phpbb_root_path, $template, $phpEx, $lang, $images, $module_root_path; - - $pre = str_repeat( ' ', $depth ); - if ( isset( $mx_kb->subcat_rowset[$cat_parent] ) ) - { - foreach( $mx_kb->subcat_rowset[$cat_parent] as $category_id => $category ) - { - $category_details = $category['category_details']; - $category_articles = $category['number_articles']; - - $category_id = $category['category_id']; - $category_name = $category['category_name']; - $temp_url = append_sid( $module_root_path . "kb.$phpEx?mode=cat&cat=$category_id" ); - $category_link = '<a href="' . $temp_url . '" class="gen">' . $category_name . '</a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=edit&cat=$category_id" ); - $edit = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_edit'] . '" border="0" alt="' . $lang['Edit'] . '"></a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=delete&cat=$category_id" ); - $delete = '<a href="' . $temp_url . '" class="gen"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=up&cat=$category_id" ); - $up = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_up'] . '</a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=down&cat=$category_id" ); - $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; - - $row_color = ( !( $ss % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !( $ss % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; - - $template->assign_block_vars( 'catrow', array( - 'CATEGORY' => $category_link, - 'CAT_DESCRIPTION' => $category_details, - 'CAT_ARTICLES' => $category_articles, - - 'U_EDIT' => $edit, - 'U_DELETE' => $delete, - 'U_UP' => $up, - 'U_DOWN' => $down, - - 'ROW_COLOR' => '#' . $row_color, - 'ROW_CLASS' => $row_class, - 'PRE' => $pre - )); - - admin_cat_main( $category_id, $depth + 1 ); - } - return; - } - return; - } - - function get_forums( $sel_id = 0 ) - { - global $db; - - $sql = "SELECT forum_id, forum_name - FROM " . FORUMS_TABLE; - - if ( !$result = $db->sql_query( $sql ) ) - { - mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); - } - - $forumlist = '<select name="forum_id">'; - - if ( $sel_id == 0 ) - { - $forumlist .= '<option value="0" selected > Select a Forum !</option>'; - } - - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $sel_id == $row['forum_id'] ) - { - $status = "selected"; - } - else - { - $status = ''; - } - $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; - } - - $forumlist .= '</select>'; - - return $forumlist; - } ?> \ No newline at end of file --- 869,871 ---- |