|
From: Jon O. <jon...@us...> - 2008-01-28 21:53:46
|
Update of /cvsroot/mxbb/mx_online_adv In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17035 Modified Files: mx_online_adv.php Log Message: probably nothing...but i got conflicts during update... Index: mx_online_adv.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/mx_online_adv.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_online_adv.php 2 Aug 2007 11:59:31 -0000 1.5 --- mx_online_adv.php 28 Jan 2008 21:53:43 -0000 1.6 *************** *** 18,22 **** // Start session management // ! //$mx_user->init($user_ip, PAGE_INDEX); // // End session management --- 18,22 ---- // Start session management // ! //$mx_user->init($user_ip, PAGE_INDEX); // // End session management *************** *** 67,73 **** $online_userlist = ''; $l_online_users = ''; ! $uot_this_timestamp_array = getdate(); $uot_when_from = mktime(0, 0, 0, $uot_this_timestamp_array[mon], $uot_this_timestamp_array[mday], $uot_this_timestamp_array[year]); ! $uot_hidden_count = 0; // ================================================================================ --- 67,73 ---- $online_userlist = ''; $l_online_users = ''; ! $uot_this_timestamp_array = getdate(); $uot_when_from = mktime(0, 0, 0, $uot_this_timestamp_array[mon], $uot_this_timestamp_array[mday], $uot_this_timestamp_array[year]); ! $uot_hidden_count = 0; // ================================================================================ *************** *** 90,198 **** if ($parm1_display_today == 'TRUE') { ! $sql = "SELECT count(*) cnt ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($uot_result); ! $uot_count = $row['cnt']; ! $sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, user_session_time ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $users_online_today = array(); ! while ($row = $db->sql_fetchrow($uot_result)) ! { ! $$which_counter++; ! $row_color = ($$which_counter % 2) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ($$which_counter % 2) ? $theme['td_class1'] : $theme['td_class2']; ! ! //generate the user name (robbed from the code above) ! $uot_user_id = $row['user_id']; ! ! //reset the style... ! $uot_style = ''; ! if ($uot_user_id != $prev_user) ! { ! $uot_username_plain = $uot_username = $row['username']; ! if ($row['user_level'] == ADMIN) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor3'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; ! } ! else if ($row['user_level'] == MOD) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor2'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; } ! if (!$row['user_allow_viewonline']) ! { ! $uot_hidden_count++; ! $view_online = ( $userdata['user_level'] == ADMIN ) ? true : false; ! $uot_username = $lang['UOT_hidden_start'] . $uot_username . $lang['UOT_hidden_end']; ! } ! else ! { ! $view_online = true; ! } ! } ! //annon does not have a profile... if($row['user_id'] > 0) ! { ! $uot_username = sprintf('<a href="' . PHPBB_URL . 'profile.php?mode=viewprofile&u=%d" title="%s was last here at: %s" %s>%s</a>',$uot_user_id,$uot_username_plain,create_date('g:ia', $row['user_session_time'], $board_config['board_timezone']),$uot_style,$uot_username); ! } ! ! //this will show just the user's name, with the time in the tool tip. ! if($view_online) ! { ! array_push($users_online_today, $uot_username); ! } ! } if(count($users_online_today)==0) ! { ! array_push($users_online_today,$lang['UOT_none']); ! } if( $userdata['user_level'] == ADMIN && $uot_hidden_count>0) ! { ! array_push($users_online_today,sprintf($lang['UOT_hidden'], $uot_hidden_count)); ! } if ($parm2_put_today_bottom == 'TRUE') { ! $template->assign_block_vars('show_today_mode_bottom', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ! ) ); } else { ! $template->assign_block_vars('show_today_mode_top', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ! ) ); } --- 90,198 ---- if ($parm1_display_today == 'TRUE') { ! $sql = "SELECT count(*) cnt ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($uot_result); ! $uot_count = $row['cnt']; ! $sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, user_session_time ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $users_online_today = array(); ! while ($row = $db->sql_fetchrow($uot_result)) ! { ! $$which_counter++; ! $row_color = ($$which_counter % 2) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ($$which_counter % 2) ? $theme['td_class1'] : $theme['td_class2']; ! ! //generate the user name (robbed from the code above) ! $uot_user_id = $row['user_id']; ! ! //reset the style... ! $uot_style = ''; ! ! if ($uot_user_id != $prev_user) ! { ! $uot_username_plain = $uot_username = $row['username']; ! ! if ($row['user_level'] == ADMIN) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor3'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; ! } ! else if ($row['user_level'] == MOD) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor2'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; } ! if (!$row['user_allow_viewonline']) ! { ! $uot_hidden_count++; ! $view_online = ( $userdata['user_level'] == ADMIN ) ? true : false; ! $uot_username = $lang['UOT_hidden_start'] . $uot_username . $lang['UOT_hidden_end']; ! } ! else ! { ! $view_online = true; ! } ! } ! //annon does not have a profile... if($row['user_id'] > 0) ! { ! $uot_username = sprintf('<a href="' . PHPBB_URL . 'profile.php?mode=viewprofile&u=%d" title="%s was last here at: %s" %s>%s</a>',$uot_user_id,$uot_username_plain,create_date('g:ia', $row['user_session_time'], $board_config['board_timezone']),$uot_style,$uot_username); ! } ! //this will show just the user's name, with the time in the tool tip. ! if($view_online) ! { ! array_push($users_online_today, $uot_username); ! } ! ! } if(count($users_online_today)==0) ! { ! array_push($users_online_today,$lang['UOT_none']); ! } if( $userdata['user_level'] == ADMIN && $uot_hidden_count>0) ! { ! array_push($users_online_today,sprintf($lang['UOT_hidden'], $uot_hidden_count)); ! } if ($parm2_put_today_bottom == 'TRUE') { ! $template->assign_block_vars('show_today_mode_bottom', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ! ) ); } else { ! $template->assign_block_vars('show_today_mode_top', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ! ) ); } *************** *** 201,206 **** if ($parm3_show_icon == 'TRUE') { ! $template->assign_block_vars('hide_left_icon', array( ! ) ); } --- 201,206 ---- if ($parm3_show_icon == 'TRUE') { ! $template->assign_block_vars('hide_left_icon', array( ! ) ); } *************** *** 241,245 **** { $row['username'] = '<b>' . $row['username'] . '</b>'; ! $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; } --- 241,245 ---- { $row['username'] = '<b>' . $row['username'] . '</b>'; ! $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; } *************** *** 290,294 **** $lycos_color = 'style="font-weight: bold;"'; ! $spiders = str_replace('google','<span style="font-weight: bold; color: #2244BB;">G</span><span style="font-weight: bold; color: #DD2222;">o</span><span style="font-weight: bold; color: #EEBB00;">o</span><span style="font-weight: bold; color: #2244BB;">g</span><span style="font-weight: bold; color: #339933;">l</span><span style="font-weight: bold; color: #DD2222;">e</span>',$spiders); $spiders = str_replace('adsense','<span ' . $yahoo_color . '>adsense</span>',$spiders); $spiders = str_replace('msn','<span ' . $msn_color . '>msn</span>',$spiders); --- 290,294 ---- $lycos_color = 'style="font-weight: bold;"'; ! $spiders = str_replace('google','<span style="font-weight: bold; color: #2244BB;">G</span><span style="font-weight: bold; color: #DD2222;">o</span><span style="font-weight: bold; color: #EEBB00;">o</span><span style="font-weight: bold; color: #2244BB;">g</span><span style="font-weight: bold; color: #339933;">l</span><span style="font-weight: bold; color: #DD2222;">e</span>',$spiders); $spiders = str_replace('adsense','<span ' . $yahoo_color . '>adsense</span>',$spiders); $spiders = str_replace('msn','<span ' . $msn_color . '>msn</span>',$spiders); *************** *** 436,442 **** // removing them // ! $total_posts = mx_get_db_stat('postcount'); ! $total_users = mx_get_db_stat('usercount'); ! $newest_userdata = mx_get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; --- 436,442 ---- // removing them // ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $newest_userdata = phpBB2::get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; |