|
From: Jon O. <jon...@us...> - 2006-06-17 20:10:21
|
Update of /cvsroot/mxbb/mx_act/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21181/modules/mx_act/includes Modified Files: act_cat_play.php act_challenges.php act_challenges_main.php act_constants.php act_functions.php act_games.php act_main.php act_scores.php act_stats.php act_top_scores.php act_top_scores_search.php act_trophy.php act_trophy_comments.php rewards_api.php Log Message: Syncronizing...and code cleanup Index: act_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_constants.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** act_constants.php 5 Apr 2006 22:03:55 -0000 1.12 --- act_constants.php 17 Jun 2006 20:10:12 -0000 1.13 *************** *** 8,12 **** * */ ! // ---------------------------------------------------------------------START // This file defines specific constants for the module --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! // ---------------------------------------------------------------------START // This file defines specific constants for the module *************** *** 59,64 **** // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE // ------------------------------------------------------------------------- ! $mx_user->extend(); ! $mx_page->add_copyright( 'mxBB Activity Games Module' ); } --- 64,69 ---- // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE // ------------------------------------------------------------------------- ! $mx_user->extend(); ! $mx_page->add_copyright( 'mxBB Activity Games Module' ); } Index: act_top_scores_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_top_scores_search.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** act_top_scores_search.php 5 Apr 2006 22:03:55 -0000 1.5 --- act_top_scores_search.php 17 Jun 2006 20:10:12 -0000 1.6 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /* Start Restriction Checks */ /* Start Ban Check */ *************** *** 72,76 **** if ( $user_rank == "0" ) { ! $where = "WHERE rank_min <= '$user_posts' AND rank_special = '0' LIMIT 1"; --- 77,81 ---- if ( $user_rank == "0" ) { ! $where = "WHERE rank_min <= '$user_posts' AND rank_special = '0' LIMIT 1"; *************** *** 135,139 **** "BOTTOM_FOUR" => $user_level, "HEADER_ONE" => $lang['game'], ! "HEADER_TWO" => $lang['score_2'] . "<br>" . $lang['date_took'] ) ); --- 140,144 ---- "BOTTOM_FOUR" => $user_level, "HEADER_ONE" => $lang['game'], ! "HEADER_TWO" => $lang['score_2'] . "<br>" . $lang['date_took'] ) ); *************** *** 161,165 **** "ROW_CLASS" => $row_class, "GAMES" => $game_image, ! "SCORE_DATE" => $score . "<br>" . $date ) ); $i++; --- 166,170 ---- "ROW_CLASS" => $row_class, "GAMES" => $game_image, ! "SCORE_DATE" => $score . "<br>" . $date ) ); $i++; Index: act_challenges_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_challenges_main.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** act_challenges_main.php 5 Apr 2006 22:03:55 -0000 1.4 --- act_challenges_main.php 17 Jun 2006 20:10:12 -0000 1.5 *************** *** 8,12 **** * */ ! $who = $_GET['user']; $who_id = $_GET['user']; --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! $who = $_GET['user']; $who_id = $_GET['user']; Index: act_trophy_comments.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_trophy_comments.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** act_trophy_comments.php 5 Apr 2006 22:03:55 -0000 1.5 --- act_trophy_comments.php 17 Jun 2006 20:10:13 -0000 1.6 *************** *** 8,12 **** * */ ! /* Start Restriction Checks */ /* Start Ban Check */ --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! /* Start Restriction Checks */ /* Start Ban Check */ *************** *** 60,64 **** $comment = $_GET['user']; // Get game_id ! $sql = "SELECT * FROM " . iNA_GAMES . " WHERE game_name = '" . $game_comment . "'"; --- 65,69 ---- $comment = $_GET['user']; // Get game_id ! $sql = "SELECT * FROM " . iNA_GAMES . " WHERE game_name = '" . $game_comment . "'"; *************** *** 75,79 **** $game_for_comment = $_POST['comment_game_name']; ! $sql = "SELECT * FROM " . INA_TROPHY . " WHERE game_name = '" . $game_for_comment . "'"; --- 80,84 ---- $game_for_comment = $_POST['comment_game_name']; ! $sql = "SELECT * FROM " . INA_TROPHY . " WHERE game_name = '" . $game_for_comment . "'"; *************** *** 101,105 **** } ! $sql = "SELECT * FROM " . iNA_TROPHY_COMMENTS . " WHERE game = '" . $game_for_comment . "' --- 106,110 ---- } ! $sql = "SELECT * FROM " . iNA_TROPHY_COMMENTS . " WHERE game = '" . $game_for_comment . "' *************** *** 193,197 **** $template->set_filenames( array( 'body' => 'trophy_comments_body.tpl' ) ); ! $sql = "SELECT * FROM " . INA_TROPHY . " WHERE game_name = '" . $game_comment . "'"; --- 198,202 ---- $template->set_filenames( array( 'body' => 'trophy_comments_body.tpl' ) ); ! $sql = "SELECT * FROM " . INA_TROPHY . " WHERE game_name = '" . $game_comment . "'"; *************** *** 222,226 **** "POST_GAME" => $_GET['game'], "POST_LINK" => this_act_mxurl( "mode=act_trophy_comments" ), ! "POST_IMAGE" => $game_link ) ); } --- 227,231 ---- "POST_GAME" => $_GET['game'], "POST_LINK" => this_act_mxurl( "mode=act_trophy_comments" ), ! "POST_IMAGE" => $game_link ) ); } *************** *** 231,235 **** $check_comments = $_GET['game']; ! $sql = "SELECT * FROM " . iNA_TROPHY_COMMENTS . " WHERE game = '" . $check_comments . "'"; --- 236,240 ---- $check_comments = $_GET['game']; ! $sql = "SELECT * FROM " . iNA_TROPHY_COMMENTS . " WHERE game = '" . $check_comments . "'"; *************** *** 267,274 **** "L_PLAY_AGAIN" => $lang['Play_again'], "L_RETURN_ACT" => $lang['Return_act'], ! "MAIN_IMAGE" => $game_link ) ); ! $sql = "SELECT * FROM " . iNA_GAMES . " WHERE game_name = '" . $check_comments . "'"; --- 272,279 ---- "L_PLAY_AGAIN" => $lang['Play_again'], "L_RETURN_ACT" => $lang['Return_act'], ! "MAIN_IMAGE" => $game_link ) ); ! $sql = "SELECT * FROM " . iNA_GAMES . " WHERE game_name = '" . $check_comments . "'"; *************** *** 288,292 **** } ! $sql = "SELECT * FROM " . iNA_TROPHY_COMMENTS . " WHERE game = '" . $check_comments . "' --- 293,297 ---- } ! $sql = "SELECT * FROM " . iNA_TROPHY_COMMENTS . " WHERE game = '" . $check_comments . "' *************** *** 342,346 **** "SCORE" => $score, "COMMENT" => $row['comment'], ! "DATE" => $date ) ); $i++; --- 347,351 ---- "SCORE" => $score, "COMMENT" => $row['comment'], ! "DATE" => $date ) ); $i++; Index: act_trophy.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_trophy.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** act_trophy.php 5 Apr 2006 22:03:55 -0000 1.6 --- act_trophy.php 17 Jun 2006 20:10:12 -0000 1.7 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /* Start Restriction Checks */ /* Start Ban Check */ *************** *** 55,59 **** "L_USER_SEARCH" => $lang['trophy_count_3'], "L_PM_PROFILE" => $lang['trophy_count_4'], ! "L_LINK" => $lang['trophy_count_link'] ) ); --- 60,64 ---- "L_USER_SEARCH" => $lang['trophy_count_3'], "L_PM_PROFILE" => $lang['trophy_count_4'], ! "L_LINK" => $lang['trophy_count_link'] ) ); *************** *** 88,92 **** "TROPHIES" => $trophies, "USER_SEARCH" => "<a href='" . this_act_mxurl( 'mode=act_top_scores_search' ) . "&user=$user_n&sid=" . $userdata['session_id'] . "'>$user_n</a>", ! "PM_PROFILE" => $pm . " " . $profile ) ); $i++; --- 93,97 ---- "TROPHIES" => $trophies, "USER_SEARCH" => "<a href='" . this_act_mxurl( 'mode=act_top_scores_search' ) . "&user=$user_n&sid=" . $userdata['session_id'] . "'>$user_n</a>", ! "PM_PROFILE" => $pm . " " . $profile ) ); $i++; Index: act_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_main.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** act_main.php 5 Apr 2006 22:03:55 -0000 1.7 --- act_main.php 17 Jun 2006 20:10:12 -0000 1.8 *************** *** 1,3 **** ! <?php /** * --- 1,3 ---- ! <?php /** * *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /* First Time Use, Transfer The Highest Scores To The New activity.php */ *************** *** 100,105 **** { $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_ip"; --- 105,110 ---- { $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_ip"; *************** *** 109,114 **** $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_ip"; --- 114,119 ---- $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_ip"; *************** *** 135,140 **** $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_user_id"; --- 140,145 ---- $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_user_id"; *************** *** 144,149 **** $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_user_id"; --- 149,154 ---- $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_user_id"; *************** *** 179,183 **** "MAIN_COLOR1" => "[ <font color=" . $theme['fontcolor2'] . ">" . $lang['online_viewing_games'] . "</font> ]", "MAIN_SEPERATOR" => "<b> :: </b>", ! "MAIN_COLOR2" => "[ <font color=" . $theme['fontcolor3'] . ">" . $lang['online_playing_games'] . "</font> ]" ) ); --- 184,188 ---- "MAIN_COLOR1" => "[ <font color=" . $theme['fontcolor2'] . ">" . $lang['online_viewing_games'] . "</font> ]", "MAIN_SEPERATOR" => "<b> :: </b>", ! "MAIN_COLOR2" => "[ <font color=" . $theme['fontcolor3'] . ">" . $lang['online_playing_games'] . "</font> ]" ) ); *************** *** 222,226 **** $template->assign_block_vars( "playing", array( "USERNAME" => $username_link, "USER_NUMBER" => " ", ! "MAIN_SEPERATOR" => " " ) ); } --- 227,231 ---- $template->assign_block_vars( "playing", array( "USERNAME" => $username_link, "USER_NUMBER" => " ", ! "MAIN_SEPERATOR" => " " ) ); } *************** *** 267,271 **** "L_SCORES" => $lang['game_score'], "L_INFO" => $lang['game_info'], ! "L_PLAYER" => $lang['game_best_player'] ) ); --- 272,276 ---- "L_SCORES" => $lang['game_score'], "L_INFO" => $lang['game_info'], ! "L_PLAYER" => $lang['game_best_player'] ) ); *************** *** 482,486 **** "L_PLAY_GAME_NOW" => $lang['Play_again'], "L_SAME_W" => $lang['same_window'], ! "L_NEW_W" => $lang['new_window'] ) ); } --- 487,491 ---- "L_PLAY_GAME_NOW" => $lang['Play_again'], "L_SAME_W" => $lang['same_window'], ! "L_NEW_W" => $lang['new_window'] ) ); } *************** *** 502,506 **** $template->assign_block_vars( "drop", array( "D_SELECT_1" => $game_i2, ! "D_SELECT_2" => $game_n2 ) ); } --- 507,511 ---- $template->assign_block_vars( "drop", array( "D_SELECT_1" => $game_i2, ! "D_SELECT_2" => $game_n2 ) ); } *************** *** 524,528 **** $template->assign_block_vars( "cat", array( "C_SELECT_1" => "(" . $row['total'] . ") " . $cat, ! "C_SELECT_2" => this_act_mxurl( "mode=category_play&cat=" . $cat_id . "&sid=" . $userdata['session_id'] ) ) ); } --- 529,533 ---- $template->assign_block_vars( "cat", array( "C_SELECT_1" => "(" . $row['total'] . ") " . $cat, ! "C_SELECT_2" => this_act_mxurl( "mode=category_play&cat=" . $cat_id . "&sid=" . $userdata['session_id'] ) ) ); } *************** *** 537,543 **** } ! $sql = "SELECT * FROM " . iNA_GAMES . " ! $where_clause ORDER BY $order_by"; if ( !$result = $db->sql_query( $sql ) ) --- 542,548 ---- } ! $sql = "SELECT * FROM " . iNA_GAMES . " ! $where_clause ORDER BY $order_by"; if ( !$result = $db->sql_query( $sql ) ) *************** *** 753,757 **** "L_PLAY_GAME_NOW" => $lang['Play_again'], "L_SAME_W" => $lang['same_window'], ! "L_NEW_W" => $lang['new_window'] ) ); } --- 758,762 ---- "L_PLAY_GAME_NOW" => $lang['Play_again'], "L_SAME_W" => $lang['same_window'], ! "L_NEW_W" => $lang['new_window'] ) ); } *************** *** 803,807 **** "L_SUBMIT" => $lang['Sort'], "L_SELECT_SORT_METHOD" => $lang['Select_sort_method'], ! "L_GOTO_PAGE" => $lang['Goto_page'] ) ); --- 808,812 ---- "L_SUBMIT" => $lang['Sort'], "L_SELECT_SORT_METHOD" => $lang['Select_sort_method'], ! "L_GOTO_PAGE" => $lang['Goto_page'] ) ); Index: act_top_scores.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_top_scores.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** act_top_scores.php 5 Apr 2006 22:03:55 -0000 1.6 --- act_top_scores.php 17 Jun 2006 20:10:12 -0000 1.7 *************** *** 1,3 **** ! <?php /** * --- 1,3 ---- ! <?php /** * *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /* Start Restriction Checks */ /* Start Ban Check */ *************** *** 120,124 **** "L_DELETE_SINGLE" => $lang['delete_this_button'], "L_DELETE_ALL" => $lang['delete_all'], ! "L_DELETE_ALL_MSG" => $lang['delete_all_button'] ) ); --- 125,129 ---- "L_DELETE_SINGLE" => $lang['delete_this_button'], "L_DELETE_ALL" => $lang['delete_all'], ! "L_DELETE_ALL_MSG" => $lang['delete_all_button'] ) ); *************** *** 132,136 **** $game_name = $row['game_name']; ! $template->assign_block_vars( "admin_drop_one", array( "GAME_NAME" => $game_name ) ); } --- 137,141 ---- $game_name = $row['game_name']; ! $template->assign_block_vars( "admin_drop_one", array( "GAME_NAME" => $game_name ) ); } *************** *** 143,147 **** "HEADER_TWO" => $lang['trophy_holder'], "HEADER_THREE" => $lang['score_owned_on'], ! "HEADER_FOUR" => $lang['contacts'] ) ); --- 148,152 ---- "HEADER_TWO" => $lang['trophy_holder'], "HEADER_THREE" => $lang['score_owned_on'], ! "HEADER_FOUR" => $lang['contacts'] ) ); *************** *** 183,187 **** "USER_SEARCH" => "<a href='" . this_act_mxurl( 'mode=act_top_scores_search' ) . "&user=$user_n&sid=" . $userdata['session_id'] . "'>$user_n</a>", "SCORE_DATE" => $score . "<br>" . $date, ! "PM_PROFILE" => $pm . " " . $profile ) ); $i++; --- 188,192 ---- "USER_SEARCH" => "<a href='" . this_act_mxurl( 'mode=act_top_scores_search' ) . "&user=$user_n&sid=" . $userdata['session_id'] . "'>$user_n</a>", "SCORE_DATE" => $score . "<br>" . $date, ! "PM_PROFILE" => $pm . " " . $profile ) ); $i++; Index: act_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** act_functions.php 5 Apr 2006 22:03:55 -0000 1.6 --- act_functions.php 17 Jun 2006 20:10:12 -0000 1.7 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + function UpdateTrophyStats() { *************** *** 89,93 **** $privmsg_subject = trim( strip_tags( $subject ) ); $bbcode_uid = make_bbcode_uid(); ! $privmsg_message = trim( strip_tags( $message ) ); // APM compliance if ( defined( 'PRIVMSGA_TABLE' ) ) --- 94,98 ---- $privmsg_subject = trim( strip_tags( $subject ) ); $bbcode_uid = make_bbcode_uid(); ! $privmsg_message = trim( strip_tags( $message ) ); // APM compliance if ( defined( 'PRIVMSGA_TABLE' ) ) *************** *** 111,115 **** FROM " . PRIVMSGS_TABLE . " WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) AND privmsgs_to_userid = '$dest_user'"; --- 116,120 ---- FROM " . PRIVMSGS_TABLE . " WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) AND privmsgs_to_userid = '$dest_user'"; *************** *** 125,129 **** if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " --- 130,134 ---- if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " *************** *** 139,143 **** $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id = '$old_privmsgs_id'"; --- 144,148 ---- $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id = '$old_privmsgs_id'"; *************** *** 147,151 **** } ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id = '$old_privmsgs_id'"; --- 152,156 ---- } ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id = '$old_privmsgs_id'"; *************** *** 157,161 **** } ! $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies) VALUES ( 1 , '" . str_replace( "\'", "''", addslashes( $privmsg_subject ) ) . "' , " . $from_id . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip' , $html_on, $bbcode_on, $smilies_on)"; --- 162,166 ---- } ! $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies) VALUES ( 1 , '" . str_replace( "\'", "''", addslashes( $privmsg_subject ) ) . "' , " . $from_id . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip' , $html_on, $bbcode_on, $smilies_on)"; *************** *** 175,179 **** $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " WHERE user_id = '" . $to_userdata['user_id'] . "'"; if ( !$status = $db->sql_query( $sql ) ) --- 180,184 ---- $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " WHERE user_id = '" . $to_userdata['user_id'] . "'"; if ( !$status = $db->sql_query( $sql ) ) *************** *** 183,187 **** if ( $to_userdata['user_notify_pm'] && !empty( $to_userdata['user_email'] ) && $to_userdata['user_active'] ) ! { // have the mail sender infos $script_name = preg_replace( '/^\/?(.*?)\/?$/', "\\1", trim( $board_config['script_path'] ) ); --- 188,192 ---- if ( $to_userdata['user_notify_pm'] && !empty( $to_userdata['user_email'] ) && $to_userdata['user_active'] ) ! { // have the mail sender infos $script_name = preg_replace( '/^\/?(.*?)\/?$/', "\\1", trim( $board_config['script_path'] ) ); *************** *** 212,216 **** 'SITENAME' => $board_config['sitename'], 'EMAIL_SIG' => ( !empty( $board_config['board_email_sig'] ) ) ? str_replace( '<br />', "\n", "-- \n" . $board_config['board_email_sig'] ) : '', ! 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox' ) ); --- 217,221 ---- 'SITENAME' => $board_config['sitename'], 'EMAIL_SIG' => ( !empty( $board_config['board_email_sig'] ) ) ? str_replace( '<br />', "\n", "-- \n" . $board_config['board_email_sig'] ) : '', ! 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox' ) ); Index: act_cat_play.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_cat_play.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** act_cat_play.php 5 Apr 2006 22:03:55 -0000 1.5 --- act_cat_play.php 17 Jun 2006 20:10:12 -0000 1.6 *************** *** 8,12 **** * */ ! $cat = $_GET['cat']; --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! $cat = $_GET['cat']; *************** *** 29,34 **** { $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_ip"; --- 34,39 ---- { $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_ip"; *************** *** 38,43 **** $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_ip"; --- 43,48 ---- $q = "SELECT COUNT(session_id) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '0' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_ip"; *************** *** 64,69 **** $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_user_id"; --- 69,74 ---- $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_ACTIVITY . "' GROUP BY session_user_id"; *************** *** 73,78 **** $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_user_id"; --- 78,83 ---- $q = "SELECT COUNT(*) AS total ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = '1' AND session_page = '" . PAGE_PLAYING_GAMES . "' GROUP BY session_user_id"; *************** *** 108,112 **** "MAIN_COLOR1" => "[ <font color=" . $theme['fontcolor2'] . ">" . $lang['online_viewing_games'] . "</font> ]", "MAIN_SEPERATOR" => "<b> :: </b>", ! "MAIN_COLOR2" => "[ <font color=" . $theme['fontcolor3'] . ">" . $lang['online_playing_games'] . "</font> ]" ) ); --- 113,117 ---- "MAIN_COLOR1" => "[ <font color=" . $theme['fontcolor2'] . ">" . $lang['online_viewing_games'] . "</font> ]", "MAIN_SEPERATOR" => "<b> :: </b>", ! "MAIN_COLOR2" => "[ <font color=" . $theme['fontcolor3'] . ">" . $lang['online_playing_games'] . "</font> ]" ) ); *************** *** 151,155 **** $template->assign_block_vars( "playing", array( "USERNAME" => $username_link, "USER_NUMBER" => " ", ! "MAIN_SEPERATOR" => " " ) ); } --- 156,160 ---- $template->assign_block_vars( "playing", array( "USERNAME" => $username_link, "USER_NUMBER" => " ", ! "MAIN_SEPERATOR" => " " ) ); } *************** *** 172,176 **** $template->assign_block_vars( "drop", array( "D_SELECT_1" => $game_i2, ! "D_SELECT_2" => $game_n2 ) ); } --- 177,181 ---- $template->assign_block_vars( "drop", array( "D_SELECT_1" => $game_i2, ! "D_SELECT_2" => $game_n2 ) ); } *************** *** 194,198 **** $template->assign_block_vars( "cat", array( "C_SELECT_1" => "(" . $row['total'] . ") " . $cat_n, ! "C_SELECT_2" => "activity." . $phpEx . "?mode=category_play&cat=" . $cat_id . "&sid=" . $userdata['session_id'] ) ); } --- 199,203 ---- $template->assign_block_vars( "cat", array( "C_SELECT_1" => "(" . $row['total'] . ") " . $cat_n, ! "C_SELECT_2" => "activity." . $phpEx . "?mode=category_play&cat=" . $cat_id . "&sid=" . $userdata['session_id'] ) ); } *************** *** 239,245 **** } ! $sql = "SELECT * FROM " . iNA_GAMES . " ! $where_clause ORDER BY $order_by"; if ( !$result = $db->sql_query( $sql ) ) --- 244,250 ---- } ! $sql = "SELECT * FROM " . iNA_GAMES . " ! $where_clause ORDER BY $order_by"; if ( !$result = $db->sql_query( $sql ) ) *************** *** 442,446 **** "L_SAME_W" => $lang['same_window'], "L_PLAY_GAME_NOW" => $lang['Play_again'], ! "L_NEW_W" => $lang['new_window'] ) ); } --- 447,451 ---- "L_SAME_W" => $lang['same_window'], "L_PLAY_GAME_NOW" => $lang['Play_again'], ! "L_NEW_W" => $lang['new_window'] ) ); } *************** *** 490,494 **** "L_SUBMIT" => $lang['Sort'], "L_SELECT_SORT_METHOD" => $lang['Select_sort_method'], ! "L_GOTO_PAGE" => $lang['Goto_page'] ) ); --- 495,499 ---- "L_SUBMIT" => $lang['Sort'], "L_SELECT_SORT_METHOD" => $lang['Select_sort_method'], ! "L_GOTO_PAGE" => $lang['Goto_page'] ) ); Index: act_scores.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_scores.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** act_scores.php 5 Apr 2006 22:03:55 -0000 1.4 --- act_scores.php 17 Jun 2006 20:10:12 -0000 1.5 *************** *** 8,15 **** * */ ! $game_name = ( !empty( $HTTP_POST_VARS['game_name'] ) ) ? $HTTP_POST_VARS['game_name'] : $HTTP_GET_VARS['game_name']; ! $sql = "SELECT * FROM " . iNA_GAMES . " WHERE game_name = '" . $game_name . "'"; if ( !$result = $db->sql_query( $sql ) ) --- 8,20 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! $game_name = ( !empty( $HTTP_POST_VARS['game_name'] ) ) ? $HTTP_POST_VARS['game_name'] : $HTTP_GET_VARS['game_name']; ! $sql = "SELECT * FROM " . iNA_GAMES . " WHERE game_name = '" . $game_name . "'"; if ( !$result = $db->sql_query( $sql ) ) *************** *** 40,53 **** if ( !empty( $highscore_limit ) ) { ! $sql = "SELECT *, MAX(score) AS hscore FROM " . iNA_SCORES . " ! WHERE game_name = '" . $game_name . "' GROUP BY player ! ORDER BY score $list_type LIMIT 0, $highscore_limit"; } else { ! $sql = "SELECT *, MAX(score) AS hscore FROM " . iNA_SCORES . " ! WHERE game_name = '" . $game_name . "' GROUP BY player ORDER BY score $list_type"; --- 45,58 ---- if ( !empty( $highscore_limit ) ) { ! $sql = "SELECT *, MAX(score) AS hscore FROM " . iNA_SCORES . " ! WHERE game_name = '" . $game_name . "' GROUP BY player ! ORDER BY score $list_type LIMIT 0, $highscore_limit"; } else { ! $sql = "SELECT *, MAX(score) AS hscore FROM " . iNA_SCORES . " ! WHERE game_name = '" . $game_name . "' GROUP BY player ORDER BY score $list_type"; *************** *** 71,75 **** "NAME" => $row['player'], "SCORE" => $row['hscore'], ! "DATE" => create_date( $board_config['default_dateformat'], $row['date'], $board_config['board_timezone'] ) ) ); $i++; --- 76,80 ---- "NAME" => $row['player'], "SCORE" => $row['hscore'], ! "DATE" => create_date( $board_config['default_dateformat'], $row['date'], $board_config['board_timezone'] ) ) ); $i++; Index: act_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_stats.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** act_stats.php 5 Apr 2006 22:03:55 -0000 1.5 --- act_stats.php 17 Jun 2006 20:10:12 -0000 1.6 *************** *** 8,13 **** * */ ! ! $game_id = ( isset( $HTTP_GET_VARS['id'] ) ) ? intval( $HTTP_GET_VARS['id'] ) : 0; // Grab Game info from game_id $sql = "SELECT * FROM " . iNA_GAMES . " --- 8,18 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! ! $game_id = ( isset( $HTTP_GET_VARS['id'] ) ) ? intval( $HTTP_GET_VARS['id'] ) : 0; // Grab Game info from game_id $sql = "SELECT * FROM " . iNA_GAMES . " *************** *** 88,92 **** "BEST_SCORE" => $lang['Best_score'], "L_INSTRUCTIONS" => $lang['Instructions'], ! "INSTRUCTIONS" => $instructions ) ); --- 93,97 ---- "BEST_SCORE" => $lang['Best_score'], "L_INSTRUCTIONS" => $lang['Instructions'], ! "INSTRUCTIONS" => $instructions ) ); Index: rewards_api.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/rewards_api.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rewards_api.php 5 Apr 2006 22:03:55 -0000 1.6 --- rewards_api.php 17 Jun 2006 20:10:13 -0000 1.7 *************** *** 8,12 **** * */ ! // give rewards to the user function add_reward( $user_id, $amount ) --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! // give rewards to the user function add_reward( $user_id, $amount ) *************** *** 93,97 **** // Get the rewards dbfield (API-internal function) function get_db_reward() ! { // All rewards mods must store their default database field in the config table ... // 'default_reward_dbfield' --- 98,102 ---- // Get the rewards dbfield (API-internal function) function get_db_reward() ! { // All rewards mods must store their default database field in the config table ... // 'default_reward_dbfield' Index: act_challenges.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_challenges.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** act_challenges.php 5 Apr 2006 22:03:55 -0000 1.4 --- act_challenges.php 17 Jun 2006 20:10:12 -0000 1.5 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /* Start Restriction Checks */ /* Start Ban Check */ *************** *** 56,60 **** "CHALLENGE_NAME" => $lang['challenge_username'], "CHALLENGE_SPOT" => $lang['challenge_position'], ! "CHALLENGE_COUNT" => $lang['challenge_challenges'] ) ); --- 61,65 ---- "CHALLENGE_NAME" => $lang['challenge_username'], "CHALLENGE_SPOT" => $lang['challenge_position'], ! "CHALLENGE_COUNT" => $lang['challenge_challenges'] ) ); *************** *** 93,97 **** "LINK" => $link, "PLACE" => $i, ! "COUNT" => $count ) ); $i++; --- 98,102 ---- "LINK" => $link, "PLACE" => $i, ! "COUNT" => $count ) ); $i++; *************** *** 112,116 **** "USER_TO_COUNT" => $lang['challenge_page_2'], "USER" => $sender . "'s" . $lang['challenge_page_3'], ! "RANKING" => $lang['challenge_page_4'] ) ); --- 117,121 ---- "USER_TO_COUNT" => $lang['challenge_page_2'], "USER" => $sender . "'s" . $lang['challenge_page_3'], ! "RANKING" => $lang['challenge_page_4'] ) ); *************** *** 142,146 **** "USER_TO" => $receiver, "USER_TO_COUNT" => $count, ! "RANKING" => $c ) ); $c++; --- 147,151 ---- "USER_TO" => $receiver, "USER_TO_COUNT" => $count, ! "RANKING" => $c ) ); $c++; Index: act_games.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/includes/act_games.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** act_games.php 5 Apr 2006 22:03:55 -0000 1.6 --- act_games.php 17 Jun 2006 20:10:12 -0000 1.7 *************** *** 8,13 **** * */ ! ! $game_id = ( isset( $HTTP_GET_VARS['id'] ) ) ? intval( $HTTP_GET_VARS['id'] ) : 0; // Grab Game info from game_id $sql = "SELECT * FROM " . iNA_GAMES . " --- 8,18 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! ! $game_id = ( isset( $HTTP_GET_VARS['id'] ) ) ? intval( $HTTP_GET_VARS['id'] ) : 0; // Grab Game info from game_id $sql = "SELECT * FROM " . iNA_GAMES . " *************** *** 48,52 **** mx_message_die( GENERAL_MESSAGE, $lang['not_enough_reward'], '', __LINE__, __FILE__, $sql ); } ! } // Update Game Played amount. $sql = "UPDATE " . iNA_GAMES . " --- 53,57 ---- mx_message_die( GENERAL_MESSAGE, $lang['not_enough_reward'], '', __LINE__, __FILE__, $sql ); } ! } // Update Game Played amount. $sql = "UPDATE " . iNA_GAMES . " *************** *** 105,109 **** SET session_page = '" . PAGE_PLAYING_GAMES . "' WHERE user_id = '" . $userdata['user_id'] . "'"; ! $r = $db->sql_query( $q ); // $header_location = ( @preg _match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; // header($header_location . append_sid($gamepath, true)); --- 110,114 ---- SET session_page = '" . PAGE_PLAYING_GAMES . "' WHERE user_id = '" . $userdata['user_id'] . "'"; ! $r = $db->sql_query( $q ); // $header_location = ( @preg _match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; // header($header_location . append_sid($gamepath, true)); *************** *** 176,180 **** mx_message_die( GENERAL_ERROR, $lang['no_game_data'], "", __LINE__, __FILE__, $sql ); } ! $game_info = $db->sql_fetchrow( $result ); // Extra Vars $game_name = $game_info['game_name']; --- 181,185 ---- mx_message_die( GENERAL_ERROR, $lang['no_game_data'], "", __LINE__, __FILE__, $sql ); } ! $game_info = $db->sql_fetchrow( $result ); // Extra Vars $game_name = $game_info['game_name']; *************** *** 190,194 **** { $gen_simple_header = true; ! $template->set_filenames( array( 'body' => 'flash_body.tpl' ) ); // Generate page $template->assign_vars( array( 'TITLE' => $game_name, --- 195,199 ---- { $gen_simple_header = true; ! $template->set_filenames( array( 'body' => 'flash_body.tpl' ) ); // Generate page $template->assign_vars( array( 'TITLE' => $game_name, *************** *** 197,201 **** 'SWFNAME' => $game_name . '.swf', 'BASE_PATH' => $base_path, ! 'PATH' => $game_path ) ); $template->pparse( 'body' ); --- 202,206 ---- 'SWFNAME' => $game_name . '.swf', 'BASE_PATH' => $base_path, ! 'PATH' => $game_path ) ); $template->pparse( 'body' ); *************** *** 242,246 **** 'SWFNAME' => $game_name . '.swf', 'BASE_PATH' => $base_path, ! 'PATH' => $game_path ) ); --- 247,251 ---- 'SWFNAME' => $game_name . '.swf', 'BASE_PATH' => $base_path, ! 'PATH' => $game_path ) ); *************** *** 258,262 **** WHERE game_name = '$game_name' GROUP BY player ! ORDER BY score $order LIMIT 0,10"; $r2 = $db->sql_query( $q2 ); --- 263,267 ---- WHERE game_name = '$game_name' GROUP BY player ! ORDER BY score $order LIMIT 0,10"; $r2 = $db->sql_query( $q2 ); *************** *** 272,276 **** $template->assign_block_vars( "runner", array( 'R_U_NAME' => $runner_up_name, ! 'R_U_SCORE' => $runner_up_score ) ); --- 277,281 ---- $template->assign_block_vars( "runner", array( 'R_U_NAME' => $runner_up_name, ! 'R_U_SCORE' => $runner_up_score ) ); *************** *** 278,282 **** } while ( $row = $db->sql_fetchrow( $r2 ) ); ! } // include($mx_root_path . 'includes/page_header.'. $phpEx); // $template->pparse('body'); --- 283,287 ---- } while ( $row = $db->sql_fetchrow( $r2 ) ); ! } // include($mx_root_path . 'includes/page_header.'. $phpEx); // $template->pparse('body'); *************** *** 291,295 **** 'BASE_PATH' => $base_path, 'GAMELIB' => $module_root_path . $act_config['games_path'] . "/" . $act_config['gamelib_path'] . "/", ! 'S_GAME_ACTION' => append_sid( $base_path . 'newscore.' . $phpEx . '?mode=check_score&game_name=' . $game_name ) ) ); } --- 296,300 ---- 'BASE_PATH' => $base_path, 'GAMELIB' => $module_root_path . $act_config['games_path'] . "/" . $act_config['gamelib_path'] . "/", ! 'S_GAME_ACTION' => append_sid( $base_path . 'newscore.' . $phpEx . '?mode=check_score&game_name=' . $game_name ) ) ); } |