|
From: OryNider <ory...@us...> - 2008-03-11 18:06:08
|
Update of /cvsroot/mxbb/mx_glance In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26009 Modified Files: mx_glance.php Log Message: fix Index: mx_glance.php =================================================================== RCS file: /cvsroot/mxbb/mx_glance/mx_glance.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mx_glance.php 21 Feb 2008 16:12:23 -0000 1.14 --- mx_glance.php 11 Mar 2008 17:00:20 -0000 1.15 *************** *** 132,142 **** } ! if ( !function_exists( 'this_recent_url' ) ) { function this_recent_url($args = '') { ! global $server_protocol, $server_name, $server_port, $script_path, $page_id, $phpEx; ! $url = $server_protocol . $server_name . $server_port . $script_path . '/' . 'index.' . $phpEx; if( is_numeric($page_id) && !empty($page_id) ) --- 132,142 ---- } ! if (!function_exists('this_recent_url')) { function this_recent_url($args = '') { ! global $page_id, $phpEx; ! $url = PORTAL_URL . "index.$phpEx"; if( is_numeric($page_id) && !empty($page_id) ) *************** *** 153,156 **** --- 153,181 ---- } + /* + if (!function_exists('glance_userdata')) + { + function glance_userdata($user_id) + { + global $db; + + $sql = "SELECT username, user_id, user_level + FROM ".USERS_TABLE." + WHERE user_id = ".$user_id." + ORDER BY username ASC"; + if( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, 'Could not obtain glance user information', '', __LINE__, __FILE__, $sql); + } + + while($row = $db->sql_fetchrow($result)) + { + return $row; + } + $db->sql_freeresult($result); + } + } + */ + // GET USER LAST VISIT $recent_last_visit = $userdata['user_lastvisit']; //$recent_last_visit = $mx_user->data['user_lastvisit']; *************** *** 536,567 **** if ($recent_show_user_color) { ! $sql = "SELECT username, user_id, user_level ! FROM ".USERS_TABLE." ! WHERE user_id = ".$latest_news[$i]['poster_id']." ! ORDER BY username ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); ! } ! while( $row = $db->sql_fetchrow($result) ) ! { ! if ($row['user_level'] == ADMIN) ! { ! $last_poster_color = $theme['fontcolor3']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else if ($row['user_level'] == MOD) ! { ! $last_poster_color = $theme['fontcolor2']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else ! { ! $last_poster_color = ''; ! $last_poster_style = 'style="font-weight : bold;"'; ! } } - $db->sql_freeresult($result); } else if ($recent_show_user_bold) --- 561,581 ---- if ($recent_show_user_color) { ! $news_last_posterdata = mx_get_userdata($latest_news[$i]['poster_id'], false); ! if ($news_last_posterdata['user_level'] == ADMIN) ! { ! $last_poster_color = $theme['fontcolor3']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else if ($news_last_posterdata['user_level'] == MOD) ! { ! $last_poster_color = $theme['fontcolor2']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else ! { ! $last_poster_color = ''; ! $last_poster_style = 'style="font-weight : bold;"'; } } else if ($recent_show_user_bold) *************** *** 581,612 **** if ($recent_show_user_color) { ! $sql = "SELECT username, user_id, user_level ! FROM ".USERS_TABLE." ! WHERE user_id = ".$latest_news[$i]['topic_poster']." ! ORDER BY username ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } ! ! while( $row = $db->sql_fetchrow($result) ) ! { ! if ($row['user_level'] == ADMIN) ! { ! $topic_poster_color = $theme['fontcolor3']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else if ($row['user_level'] == MOD) ! { ! $topic_poster_color = $theme['fontcolor2']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else ! { $topic_poster_color = ''; $topic_poster_style = 'style="font-weight : bold;"'; - } } - $db->sql_freeresult($result); } else if ($recent_show_user_bold) --- 595,615 ---- if ($recent_show_user_color) { ! $news_topic_posterdata = mx_get_userdata($latest_news[$i]['topic_poster'], false); ! ! if ($news_topic_posterdata['user_level'] == ADMIN) ! { ! $topic_poster_color = $theme['fontcolor3']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else if ($news_topic_posterdata['user_level'] == MOD) ! { ! $topic_poster_color = $theme['fontcolor2']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; } ! else ! { $topic_poster_color = ''; $topic_poster_style = 'style="font-weight : bold;"'; } } else if ($recent_show_user_bold) *************** *** 820,851 **** if ($recent_show_user_color) { ! $sql = "SELECT username, user_id, user_level ! FROM ".USERS_TABLE." ! WHERE user_id = ".$latest_topics[$i]['poster_id']." ! ORDER BY username ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } ! ! while( $row = $db->sql_fetchrow($result) ) ! { ! if ($row['user_level'] == ADMIN) ! { ! $last_poster_color = $theme['fontcolor3']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else if ($row['user_level'] == MOD) ! { ! $last_poster_color = $theme['fontcolor2']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else ! { ! $last_poster_color = ''; ! $last_poster_style = 'style="font-weight : bold;"'; ! } } - $db->sql_freeresult($result); } else if ($recent_show_user_bold) --- 823,843 ---- if ($recent_show_user_color) { ! $recent_last_posterdata = mx_get_userdata($latest_topics[$i]['poster_id'], false); ! ! if ($recent_last_posterdata['user_level'] == ADMIN) ! { ! $last_poster_color = $theme['fontcolor3']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; ! } ! else if ($recent_last_posterdata['user_level'] == MOD) ! { ! $last_poster_color = $theme['fontcolor2']; ! $last_poster_style = 'style="color:#' . $last_poster_color . '; font-weight : bold;"'; } ! else ! { ! $last_poster_color = ''; ! $last_poster_style = 'style="font-weight : bold;"'; } } else if ($recent_show_user_bold) *************** *** 865,896 **** if ($recent_show_user_color) { ! $sql = "SELECT username, user_id, user_level ! FROM ".USERS_TABLE." ! WHERE user_id = ".$latest_topics[$i]['topic_poster']." ! ORDER BY username ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); ! } ! while( $row = $db->sql_fetchrow($result) ) ! { ! if ($row['user_level'] == ADMIN) ! { ! $topic_poster_color = $theme['fontcolor3']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else if ($row['user_level'] == MOD) ! { ! $topic_poster_color = $theme['fontcolor2']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else ! { ! $topic_poster_color = $theme['fontcolor1']; ! $topic_poster_style = 'style="font-weight : bold;"'; ! } } - $db->sql_freeresult($result); } else if ($recent_show_user_bold) --- 857,877 ---- if ($recent_show_user_color) { ! $recent_topic_posterdata = mx_get_userdata($latest_topics[$i]['topic_poster'], false); ! if ($recent_topic_posterdata['user_level'] == ADMIN) ! { ! $topic_poster_color = $theme['fontcolor3']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else if ($recent_topic_posterdata['user_level'] == MOD) ! { ! $topic_poster_color = $theme['fontcolor2']; ! $topic_poster_style = 'style="color:#' . $topic_poster_color . '; font-weight : bold;"'; ! } ! else ! { ! $topic_poster_color = $theme['fontcolor1']; ! $topic_poster_style = 'style="font-weight : bold;"'; } } else if ($recent_show_user_bold) |