Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
chat.php
r311 r313 4 4 /* trick */ 5 5 $chat_last_msg = ( isset($_REQUEST['chat_last_msg']) ? (int) $_REQUEST['chat_last_msg'] : 0 ); 6 7 if ( $chat_last_msg ) { 6 $action = ( isset($_REQUEST['action']) ? $_REQUEST['action'] : '' ); 7 8 if ( $chat_last_msg && $action != 'add' ) { 8 9 $chat_last_msg_stored = @file_get_contents($root_path . 'cache/chat_last_msg'); 9 10 if ( $chat_last_msg == $chat_last_msg_stored ) { … … 90 91 91 92 case '/search': 92 $search_str = ( !empty($textParts[1]) ? trim($textParts[1]) : '' ); 93 unset($textParts[0]); 94 $search_str = implode(' ', $textParts); 93 95 if ( !$search_str || utf_strlen($search_str) < 3 ) { 94 96 return false; … … 314 316 } 315 317 else { 316 if ( $time && strpos($time, '.') !== false ) { 317 @list($day, $month, $year) = @explode('.', $time); 318 $time = mktime(0, 0, 0, $month, $day, $year); 318 if ( ( $date = strtotime($time) ) !== false ) { 319 $day = date('d', $date); 320 $month = date('m', $date); 321 $year = date('Y', $date); 322 $hours = date('H', $date); 323 $minutes = date('i', $date); 324 325 $time = mktime($hours, $minutes, 0, $month, $day, $year); 319 326 } 320 327 elseif ( $time ) { … … 324 331 $time = time() - 24 * 60 * 60; 325 332 } 326 $sql = 'SELECT name AS username, chat_msg AS message, chat_msg_added AS added, u.uid, u.class, u.parked, u.warneduntil, u.enabled, u.donor, chat_msg_id 333 334 $sql = 'SELECT name AS username, chat_msg AS message, chat_msg_added AS added, u.uid, chat_msg_id, u.class, u.donor, u.name_append, u.enabled, u.warneduntil, u.parked 327 335 FROM ' . CHAT_MESSAGES_TABLE . ' c, ' . USERS_TABLE . ' u 328 336 WHERE c.chat_uid = u.uid AND c.chat_msg_added > ' . $time . ' AND chat_msg NOT LIKE \'/delete%\' … … 340 348 $seo->set_user_url($row['username'], $row['uid']); 341 349 // www.phpBB-SEO.com SEO TOOLKIT END 342 $user_link = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '" target="_blank">' . get_user_class_color($row['class'], $row['username']) . '</a>' . get_user_icons($row);350 $user_link = parse_username($row); 343 351 344 352 $row['user_link'] = $user_link; … … 370 378 $data[0]['chat_msg_id'] = 0; 371 379 380 $_userdata = $userdata; 381 unset($_userdata['user_reputation_level']); 382 372 383 // www.phpBB-SEO.com SEO TOOLKIT START 373 384 $seo->set_user_url($userdata['name'], $userdata['uid']); 374 385 // www.phpBB-SEO.com SEO TOOLKIT END 375 $user_link = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $userdata['uid']) . '" target="_blank">' . get_user_class_color($userdata['class'], $userdata['name']) . '</a>' . get_user_icons($userdata);386 $user_link = parse_username($_userdata, false); 376 387 377 388 $data[0]['user_link'] = $user_link; … … 422 433 } 423 434 424 $sql = 'SELECT name AS username, chat_msg AS message, chat_msg_added AS added, u.uid, u.class, u.parked, u.warneduntil, u.enabled, u.donor, chat_msg_id435 $sql = 'SELECT name AS username, chat_msg AS message, chat_msg_added AS added, u.uid, chat_msg_id, u.class, u.donor, u.name_append, u.enabled, u.warneduntil, u.parked 425 436 FROM ' . CHAT_MESSAGES_TABLE . ' c, ' . USERS_TABLE . ' u 426 437 WHERE c.chat_uid = u.uid ' . ( $chat_last_msg ? 'AND c.chat_msg_id > ' . $chat_last_msg : ' ORDER BY chat_msg_added DESC LIMIT 10'); … … 433 444 $row['added'] = create_date($row['added'], 'H:i:s'); 434 445 435 // www.phpBB-SEO.com SEO TOOLKIT START 436 $seo->set_user_url($row['username'], $row['uid']); 437 // www.phpBB-SEO.com SEO TOOLKIT END 438 $user_link = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '" target="_blank">' . get_user_class_color($row['class'], $row['username']) . '</a>' . get_user_icons($row); 446 $user_link = parse_username($row); 439 447 440 448 $row['user_link'] = $user_link; … … 466 474 467 475 case 'get_online_users': 468 $user_link = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $userdata['uid']) . '" target="_blank">' . get_user_class_color($userdata['class'], $userdata['name']) . '</a>' . get_user_icons($userdata); 469 $row['clean_username'] = str_replace("'", "\'", $userdata['name']); 470 $row['username'] = get_user_class_color($userdata['class'], $userdata['name']); 471 $row['u_userdetails'] = append_sid($root_path . 'userdetails.php?id=' . $userdata['uid']); 472 473 $data[$userdata['uid']] = $row; 474 475 476 $sql = 'SELECT u.name, u.uid, u.class, u.parked, u.warneduntil, u.enabled, u.donor 476 $_userdata = $userdata; 477 unset($_userdata['user_reputation_level']); 478 479 $row['clean_username'] = str_replace("'", "\'", $_userdata['name']); 480 $row['username'] = parse_username($_userdata, false); 481 $row['u_userdetails'] = append_sid($root_path . 'userdetails.php?id=' . $_userdata['uid']); 482 483 $data[$_userdata['uid']] = $row; 484 485 486 $sql = 'SELECT u.name, u.uid, u.class, u.donor, u.name_append, u.enabled, u.warneduntil, u.parked 477 487 FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s 478 488 WHERE u.uid = s.session_user_id … … 484 494 485 495 while ( $row = $db->sql_fetchrow($result) ) { 486 // www.phpBB-SEO.com SEO TOOLKIT START487 $seo->set_user_url($row['name'], $row['uid']);488 // www.phpBB-SEO.com SEO TOOLKIT END489 $user_link = '<a href="' . append_sid($root_path . 'userdetails.php?id=' . $row['uid']) . '" target="_blank">' . get_user_class_color($row['class'], $row['name']) . '</a>' . get_user_icons($row);490 491 $row['user_link'] = $user_link;492 493 496 $row['clean_username'] = str_replace("'", "\'", $row['name']); 494 $row['username'] = get_user_class_color($row['class'], $row['name']);497 $row['username'] = parse_username($row, false); 495 498 $row['u_userdetails'] = append_sid($root_path . 'userdetails.php?id=' . $row['uid']); 496 499 … … 526 529 if ( $username == $userdata['name'] ) { 527 530 $data['menu'] .= '<li><a href="javascript:;" onclick="$(\'#message\').attr(\'value\', \'/banlist\');$(\'#message\').focus();">' . $lang['ban_list'] . '</a></li>'; 528 } 529 530 $data['menu'] .= '<li><a href="javascript:;" onclick="view_logs(0);">' . $lang['view_logs'] . '</a></li>'; 531 $data['menu'] .= '<li><a href="javascript:;" onclick="view_logs(0);">' . $lang['view_logs'] . '</a></li>'; 532 } 531 533 } 532 534
