function get_album_nick($album_id) { if ($album_id == 0) { return 'System'; } $album = new SmrMySqlDatabase(); $account =& SmrAccount::getAccount($album_id); return $account->getHofName(); }
function check_sms_response($fp) { // get one dlr per time so we do not spam anyone $db = new SmrMySqlDatabase(); $db->query('SELECT * FROM account_sms_response LEFT JOIN account_sms_log USING (message_id) WHERE announce = 0'); if ($db->nextRecord()) { $response_id = $db->getField('response_id'); $message_id = $db->getField('message_id'); $message = $db->getField('message'); $orig_sender_id = $db->getField('account_id'); echo_r('Found new SMS response... ' . $message_id); $orig_sender =& SmrAccount::getAccount($orig_sender_id, true); fputs($fp, 'NOTICE ' . $orig_sender->getIrcNick() . ' :You have received a response to your text: ' . EOL); fputs($fp, 'NOTICE ' . $orig_sender->getIrcNick() . ' :' . $message . EOL); // update announce status $db->query('UPDATE account_sms_response SET announce = 1 WHERE response_id = ' . $response_id); } }
$PHP_OUTPUT .= create_echo_form($container); $PHP_OUTPUT .= '<br />'; $PHP_OUTPUT .= 'Click either name to reply<br />'; $PHP_OUTPUT .= '<table width="100%" class="standard">'; while ($db->nextRecord()) { $PHP_OUTPUT .= '<tr>'; $notify_id = $db->getField('notify_id'); $PHP_OUTPUT .= '<td><input type="checkbox" name="notify_id[]" value="' . $notify_id . '"></td>'; $gameID = $db->getField('game_id'); $sender =& getMessagePlayer($db->getField('from_id'), $gameID); $receiver =& getMessagePlayer($db->getField('to_id'), $gameID); if (is_object($sender)) { $sender_acc = SmrAccount::getAccount($db->getField('from_id')); } if (is_object($receiver)) { $receiver_acc = SmrAccount::getAccount($db->getField('to_id')); } $container = create_container('skeleton.php', 'notify_reply.php'); $container['offender'] = $db->getField('from_id'); $container['offended'] = $db->getField('to_id'); $container['game_id'] = $gameID; $PHP_OUTPUT .= '<td class="noWrap">'; $offender = 'From: '; if (is_object($sender)) { $offender .= $sender_acc->getLogin() . ' (' . $sender_acc->getAccountID() . ')'; if ($sender_acc->getLogin() != $sender->getPlayerName()) { $offender .= ' a.k.a ' . $sender->getPlayerName(); } } else { $offender .= $sender; }
} $template->assign('Boxes', $boxes); } else { $template->assign('BackHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'box_view.php'))); $db->query('SELECT * FROM message_boxes WHERE box_type_id=' . $db->escapeNumber($var['box_type_id']) . ' ORDER BY send_time DESC'); $messages = array(); if ($db->getNumRows()) { $container = create_container('box_delete_processing.php'); $container['box_type_id'] = $var['box_type_id']; $template->assign('DeleteHREF', SmrSession::getNewHREF($container)); while ($db->nextRecord()) { $gameID = $db->getInt('game_id'); $validGame = $gameID > 0 && Globals::isValidGame($gameID); $messageID = $db->getInt('message_id'); $messages[$messageID] = array('ID' => $messageID); $senderAccount =& SmrAccount::getAccount($db->getField('sender_id')); $senderName = $senderAccount->getLogin() . ' (' . $senderAccount->getAccountID() . ')'; if ($validGame) { $senderPlayer =& SmrPlayer::getPlayer($senderAccount->getAccountID(), $gameID); if ($senderAccount->getLogin() != $senderPlayer->getPlayerName()) { $senderName .= ' a.k.a ' . $senderPlayer->getPlayerName(); } $container = create_container('skeleton.php', 'box_reply.php'); $container['sender_id'] = $senderAccount->getAccountID(); $container['game_id'] = $gameID; $messages[$messageID]['ReplyHREF'] = SmrSession::getNewHREF($container); } $messages[$messageID]['SenderName'] = $senderName; if (!$validGame) { $messages[$messageID]['GameName'] = 'Game no longer exists'; } else {
$account->setCellPhone(null); $container['msg'] = '<span class="green">SUCCESS: </span>You have deleted your cell phone number.'; } else { // validate number if (preg_match('/^\\+[0-9] {3,24}$/', $cellPhone) == 0) { create_error('Cell phone numbers must be given in the international format, eg: +15551234567 (For details see this link: http://www.ehow.com/how_5547899_write-phone-number-international-format.html)'); } // and save cell phone $account->setCellPhone($cellPhone); $container['msg'] = '<span class="green">SUCCESS: </span>You have changed your cell phone number.'; } } elseif ($action == 'Yes') { $account_id = $var['account_id']; $amount = $var['amount']; // create his account $his_account =& SmrAccount::getAccount($account_id); // take from us $account->decreaseSmrCredits($amount); // add to him $his_account->increaseSmrCredits($amount); $container['msg'] = '<span class="green">SUCCESS: </span>You have sent SMR credits.'; } elseif ($action == 'Change Timezone') { $timez = $_REQUEST['timez']; if (!is_numeric($timez)) { create_error('Numbers only please'); } $db->query('UPDATE account SET offset = ' . $db->escapeNumber($timez) . ' WHERE account_id = ' . $db->escapeNumber($account->getAccountID())); $container['msg'] = '<span class="green">SUCCESS: </span>You have changed your time offset.'; } elseif ($action == 'Change Date Formats') { $account->setShortDateFormat($_REQUEST['dateformat']); $account->setShortTimeFormat($_REQUEST['timeformat']);
$PHP_OUTPUT .= 'Following accounts where accessed by these logged people:'; $PHP_OUTPUT .= '<p> </p>'; $PHP_OUTPUT .= '<p>'; while ($db->nextRecord()) { if ($anon_id != $db->getField('anon_id')) { // if this is not the first entry we have to close previous list if ($anon_id > 0) { $PHP_OUTPUT .= '</ul>'; } // set current anon_id $anon_id = $db->getInt('anon_id'); // start topic for it $PHP_OUTPUT .= 'Account #' . $anon_id; $PHP_OUTPUT .= '<ul>'; } $curr_account =& SmrAccount::getAccount($db->getInt('account_id')); $transaction_id = $db->getInt('transaction_id'); $db2->query('SELECT * FROM anon_bank_transactions WHERE account_id = ' . $db2->escapeNumber($curr_account->getAccountID()) . ' AND anon_id = ' . $db2->escapeNumber($anon_id) . ' AND transaction_id = ' . $db2->escapeNumber($transaction_id)); if ($db2->nextRecord()) { $text = strtolower($db2->getField('transaction')) . ' ' . number_format($db2->getInt('amount')) . ' credits'; } $PHP_OUTPUT .= '<li>' . $curr_account->getLogin() . ' ' . $text . '</li>'; } $PHP_OUTPUT .= '</ul>'; $PHP_OUTPUT .= '</p>'; $PHP_OUTPUT .= '<p> </p>'; $PHP_OUTPUT .= '<p>'; $PHP_OUTPUT .= create_link(create_container('skeleton.php', 'log_console.php'), '<b>< Back</b>');
?> </select><?php } else { echo $Roles[$PlayerRole]; } ?> </td><?php } if ($ThisPlayer->getAllianceID() == $Alliance->getAllianceID()) { ?> <td class="center status"><?php if (in_array($AlliancePlayer->getAccountID(), $ActiveIDs)) { ?> <span class="friendly">Online</span><?php } else { if ($ThisPlayer->getAccountID() == $Alliance->getLeaderID() && ($Disabled = SmrAccount::getAccount($AlliancePlayer->getAccountID())->isDisabled())) { ?> <span class="enemy">Banned Until:<br/><?php echo date(DATE_FULL_SHORT_SPLIT, $Disabled['Time']); ?> </span><?php } else { ?> <span class="enemy">Offline</span><?php } } ?> </td><?php } ?> </tr><?php
<?php $disable_account = $_REQUEST['disable_account']; foreach ($disable_account as $currAccountID) { //never expire SmrAccount::getAccount($currAccountID)->banAccount(0, $account, 2, 'Double password'); } forward(create_container('skeleton.php', 'admin_tools.php'));
if ($db2->getField(0) == 1) { //this is the ip search way $users = explode(',', $info); $PHP_OUTPUT .= '<td align=center>User IP was found to match '; } elseif ($db3->getField(0) == 1) { //this is the comp share way $users = explode('-', $info); $PHP_OUTPUT .= '<td align=center>User was found to share comp with '; } else { //the admin closed (Edit account_account way) $users = explode('+', $info); $PHP_OUTPUT .= '<td align=center>User was closed via Edit Account with '; } $size = sizeof($users); foreach ($users as $key => $value) { $curr_account =& SmrAccount::getAccount($value); if ($curr_account->getAccountID() != $id) { $PHP_OUTPUT .= $curr_account->getLogin(); if ($key + 1 < $size) { $PHP_OUTPUT .= ', '; } } } $PHP_OUTPUT .= '.</td>'; } elseif ($method == 'Auto') { //closed by admin with multi tools $PHP_OUTPUT .= '<td align=center>Closed by Admin After viewing the accounts IPs</td>'; } else { //method unsupported for lookup $db2->query('SELECT * FROM account_is_closed WHERE account_id = ' . $db->escapeNumber($id)); if ($db2->nextRecord()) {
<?php $template->assign('PageTopic', 'Reply To Reported Messages'); require_once get_file_loc('message.functions.inc'); $container = create_container('notify_reply_processing.php'); transfer('game_id'); transfer('offended'); transfer('offender'); $template->assign('NotifyReplyFormHref', SmrSession::getNewHREF($container)); $offender =& getMessagePlayer($var['offender'], $var['game_id']); $offended =& getMessagePlayer($var['offended'], $var['game_id']); if (is_object($offender)) { $template->assignByRef('OffenderAccount', SmrAccount::getAccount($var['offender'])); } if (is_object($offended)) { $template->assignByRef('OffendedAccount', SmrAccount::getAccount($var['offended'])); } $template->assignByRef('Offender', $offender); $template->assignByRef('Offended', $offended); if (isset($var['PreviewOffender'])) { $template->assign('PreviewOffender', $var['PreviewOffender']); } if (isset($var['OffenderBanPoints'])) { $template->assign('OffenderBanPoints', $var['OffenderBanPoints']); } if (isset($var['PreviewOffended'])) { $template->assign('PreviewOffended', $var['PreviewOffended']); } if (isset($var['OffendedBanPoints'])) { $template->assign('OffendedBanPoints', $var['OffendedBanPoints']); }
<?php $message = trim($_REQUEST['message']); if ($_REQUEST['action'] == 'Preview message') { $container = create_container('skeleton.php', 'box_reply.php'); $container['BanPoints'] = $_REQUEST['BanPoints']; transfer('game_id'); transfer('sender_id'); $container['Preview'] = $message; forward($container); } if (!empty($message)) { SmrPlayer::sendMessageFromAdmin($var['game_id'], $var['sender_id'], $_REQUEST['message']); //do we have points? if ($_REQUEST['BanPoints']) { $suspicion = 'Inappropriate Actions'; $senderAccount =& SmrAccount::getAccount($var['sender_id']); $senderAccount->addPoints($_REQUEST['BanPoints'], $account, 7, $suspicion); } } forward(create_container('skeleton.php', 'box_view.php'));
<?php if (!Globals::isFeatureRequestOpen()) { create_error('Feature requests are currently not being accepted.'); } $template->assign('PageTopic', 'Feature Request Comments'); $container = $var; $container['body'] = 'feature_request.php'; $template->assign('BackHref', SmrSession::getNewHREF($container)); $db->query('SELECT * FROM feature_request JOIN feature_request_comments USING(feature_request_id) WHERE feature_request_id = ' . $db->escapeNumber($var['RequestID']) . ' ORDER BY comment_id ASC'); if ($db->getNumRows() > 0) { $featureModerator = $account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST); $template->assign('FeatureModerator', $featureModerator); $featureRequestComments = array(); while ($db->nextRecord()) { $commentID = $db->getField('comment_id'); $featureRequestComments[$commentID] = array('CommentID' => $commentID, 'Message' => $db->getField('text'), 'Time' => date(DATE_FULL_SHORT, $db->getField('posting_time')), 'Anonymous' => $db->getBoolean('anonymous')); if ($featureModerator || !$db->getBoolean('anonymous')) { $featureRequestComments[$commentID]['PosterAccount'] =& SmrAccount::getAccount($db->getField('poster_id')); } } $template->assignByRef('FeatureRequests', $featureRequestComments); } $container = $var; $container['url'] = 'feature_request_comment_processing.php'; unset($container['body']); $template->assign('FeatureRequestCommentFormHREF', SmrSession::getNewHREF($container));
$PHP_OUTPUT .= create_link($container, '<span class="lgreen">Race</span>'); $PHP_OUTPUT .= '</th>'; $container['sort'] = 'alliance_id'; $PHP_OUTPUT .= '<th>'; $PHP_OUTPUT .= create_link($container, '<span class="lgreen">Alliance</span>'); $PHP_OUTPUT .= '</th>'; $container['sort'] = 'experience'; $PHP_OUTPUT .= '<th>'; $PHP_OUTPUT .= create_link($container, '<span class="lgreen">Experience</span>'); $PHP_OUTPUT .= '</th>'; $PHP_OUTPUT .= '</tr>'; $db2 = new SmrMySqlDatabase(); while ($db->nextRecord()) { $accountID = $db->getField('account_id'); $curr_player =& SmrPlayer::getPlayer($accountID, $player->getGameID()); $curr_account =& SmrAccount::getAccount($accountID); $class = ''; if ($player->equals($curr_player)) { $class .= 'bold'; } if ($curr_account->isNewbie()) { $class .= ' newbie'; } if ($class != '') { $class = ' class="' . trim($class) . '"'; } $PHP_OUTPUT .= '<tr' . $class . '>'; $PHP_OUTPUT .= '<td valign="top">'; $container = array(); $container['url'] = 'skeleton.php'; $container['body'] = 'trader_search_result.php';
SmrSession::updateVar('account_id', $_REQUEST['account_id']); } $amount = $var['amount']; $account_id = $var['account_id']; if (!is_numeric($amount)) { create_error('Numbers only please!'); } if (!is_numeric($account_id)) { create_error('Invalid player selected!'); } $amount = round($amount); if ($amount <= 0) { create_error('You can only tranfer a positive amount!'); } if ($amount > $account->getSmrCredits()) { create_error('You can\'t transfer more than you have!'); } $template->assign('PageTopic', 'Confirmation'); $PHP_OUTPUT .= 'Are you sure you want to transfer ' . $amount . ' credits to<br />'; $PHP_OUTPUT .= 'Player with HoF name ' . SmrAccount::getAccount($account_id)->getHofName() . '?<br />'; $PHP_OUTPUT .= '<br/><h3>Please make sure this is definitely the correct person before confirming.</h3>'; $PHP_OUTPUT .= '<p> </p>'; $container = array(); $container['url'] = 'preferences_processing.php'; $container['account_id'] = $account_id; $container['amount'] = $amount; $PHP_OUTPUT .= create_echo_form($container); $PHP_OUTPUT .= create_submit('Yes'); $PHP_OUTPUT .= ' '; $PHP_OUTPUT .= create_submit('No'); $PHP_OUTPUT .= '</form>';
<?php $template->assign('PageTopic', 'Reply To Reported Messages'); $container = create_container('box_reply_processing.php'); transfer('game_id'); transfer('sender_id'); $template->assign('BoxReplyFormHref', SmrSession::getNewHREF($container)); $template->assignByRef('Sender', SmrPlayer::getPlayer($var['sender_id'], $var['game_id'])); $template->assignByRef('SenderAccount', SmrAccount::getAccount($var['sender_id'])); if (isset($var['Preview'])) { $template->assign('Preview', $var['Preview']); } if (isset($var['BanPoints'])) { $template->assign('BanPoints', $var['BanPoints']); }
$banReasons = array(); $db->query('SELECT * FROM closing_reason'); while ($db->nextRecord()) { $reason = $db->getField('reason'); if (strlen($reason) > 50) { $reason = substr($reason, 0, 75) . '...'; } $banReasons[$db->getInt('reason_id')] = $reason; } $template->assign('BanReasons', $banReasons); $closingHistory = array(); $db->query('SELECT * FROM account_has_closing_history WHERE account_id = ' . $db->escapeNumber($curr_account->getAccountID()) . ' ORDER BY time DESC'); while ($db->nextRecord()) { // if an admin did it we get his/her name if ($admin_id > 0) { $admin = SmrAccount::getAccount($db->getInt('admin_id'))->getLogin(); } else { $admin = 'System'; } $closingHistory[] = array('Time' => $db->getInt('time'), 'Action' => $db->getField('action'), 'AdminName' => $admin); } $template->assign('ClosingHistory', $closingHistory); $db->query('SELECT * FROM account_exceptions WHERE account_id = ' . $curr_account->getAccountID()); if ($db->nextRecord()) { $template->assign('Exception', $db->getField('reason')); } $recentIPs = array(); $db->query('SELECT ip, time, host FROM account_has_ip WHERE account_id = ' . $db->escapeNumber($curr_account->getAccountID()) . ' ORDER BY time DESC'); while ($db->nextRecord()) { $recentIPs[] = array('IP' => $db->getField('ip'), 'Time' => $db->getField('time'), 'Host' => $db->getField('host')); }
} $container['OffenderBanPoints'] = $_REQUEST['offenderBanPoints']; if (!empty($offendedReply)) { $container['PreviewOffended'] = $offendedReply; } $container['OffendedBanPoints'] = $_REQUEST['offendedBanPoints']; forward($container); } if (isset($offenderReply) && $offenderReply != '') { SmrPlayer::sendMessageFromAdmin($var['game_id'], $var['offender'], $offenderReply); //do we have points? if ($_REQUEST['offenderBanPoints']) { $suspicion = 'Inappropriate In-Game Message'; $offenderAccount =& SmrAccount::getAccount($var['offender']); $offenderAccount->addPoints($_REQUEST['offenderBanPoints'], $account, 7, $suspicion); } } if (isset($_REQUEST['offendedReply'])) { $offendedReply = $_REQUEST['offendedReply']; } if (isset($offendedReply) && $offendedReply != '') { //next message SmrPlayer::sendMessageFromAdmin($var['game_id'], $var['offended'], $offendedReply); //do we have points? if ($_REQUEST['offendedBanPoints']) { $suspicion = 'Inappropriate In-Game Message'; $offenderAccount =& SmrAccount::getAccount($var['offended']); $offenderAccount->addPoints($_REQUEST['offendedBanPoints'], $account, 7, $suspicion); } } forward(create_container('skeleton.php', 'notify_view.php'));
<?php $account_id = $var['account_id']; $curr_account =& SmrAccount::getAccount($account_id); // request $donation = $_REQUEST['donation']; $smr_credit = $_REQUEST['smr_credit']; $reopenType = $_REQUEST['reopen_type']; $choise = $_REQUEST['choise']; $reason_pre_select = $_REQUEST['reason_pre_select']; $reason_msg = $_REQUEST['reason_msg']; $veteran_status = $_REQUEST['veteran_status'] == 'TRUE'; $logging_status = $_REQUEST['logging_status'] == 'TRUE'; $except = $_REQUEST['exception_add']; $names = $_REQUEST['player_name']; $points = intval($_REQUEST['points']); $mailBan = intval($_REQUEST['mailban']); $delete = $_REQUEST['delete']; $msg = 'You '; if (!empty($donation)) { // add entry to account donated table $db->query('INSERT INTO account_donated (account_id, time, amount) VALUES (' . $db->escapeNumber($account_id) . ', ' . $db->escapeNumber(TIME) . ' , ' . $db->escapeNumber($donation) . ')'); // add the credits to the players account - if requested if (!empty($smr_credit)) { $curr_account->increaseSmrCredits($donation * CREDITS_PER_DOLLAR); } $msg .= 'added $' . $donation; } if (!empty($_REQUEST['grant_credits']) && is_numeric($_REQUEST['grant_credits'])) { $curr_account->increaseSmrRewardCredits($_REQUEST['grant_credits']); if (strlen($msg) > 9) {
$continue = '0'; continue; } if ($continue == 'next') { if (isset($match_sec) && $match_sec != '') { $isset = 'yes'; } else { $match_sec = $login_name; $isset = 'no'; } $db3->query('SELECT * FROM account_is_closed WHERE suspicion = ' . $db->escapeString($match_sec)); $db2->query('SELECT * FROM account WHERE login = '******'account_id')); $id = $curr_acc->getAccountID(); $match_sec = $curr_acc->getLogin(); if (!in_array($match_sec, $names)) { $continue = 'next'; $PHP_OUTPUT .= $login_name . ' is disabled matching ' . $match_sec . '<br />'; } elseif (in_array($match_sec, $next_arr)) { $stop = 'yes'; continue; } else { $next_arr[] = $match_sec; } } } elseif ($isset == 'yes' && !$db2->nextRecord()) { $PHP_OUTPUT .= 'Data Error 2: ' . $match_sec . ' does not exist!<br />'; $continue = '0';
} } $db->query('SELECT * ' . 'FROM feature_request ' . 'JOIN feature_request_comments super USING(feature_request_id) ' . 'WHERE comment_id = 1 ' . 'AND status = ' . $db->escapeString($var['Status']) . ($showCurrent ? ' AND EXISTS(SELECT posting_time FROM feature_request_comments WHERE feature_request_id = super.feature_request_id AND posting_time > ' . (TIME - 14 * 86400) . ')' : '') . ' ORDER BY (SELECT MAX(posting_time) FROM feature_request_comments WHERE feature_request_id = super.feature_request_id) DESC'); if ($db->getNumRows() > 0) { $featureModerator = $account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST); $template->assign('FeatureModerator', $featureModerator); $template->assign('FeatureRequestVoteFormHREF', SmrSession::getNewHREF(create_container('feature_request_vote_processing.php', ''))); $commentsContainer = $var; $commentsContainer['body'] = 'feature_request_comments.php'; $db2 = new SmrMySqlDatabase(); $featureRequests = array(); while ($db->nextRecord()) { $featureRequestID = $db->getInt('feature_request_id'); $featureRequests[$featureRequestID] = array('RequestID' => $featureRequestID, 'Message' => $db->getField('text'), 'Votes' => array('FAVOURITE' => $db->getInt('fav'), 'YES' => $db->getInt('yes'), 'NO' => $db->getInt('no')), 'VotedFor' => isset($featureVotes[$featureRequestID]) ? $featureVotes[$featureRequestID] : false); if ($featureModerator) { $featureRequests[$featureRequestID]['RequestAccount'] =& SmrAccount::getAccount($db->getInt('poster_id')); } if ($var['Status'] == 'Opened') { $db2->query('SELECT COUNT(*), vote_type FROM account_votes_for_feature WHERE feature_request_id=' . $db2->escapeNumber($featureRequestID) . ' GROUP BY vote_type'); while ($db2->nextRecord()) { $featureRequests[$featureRequestID]['Votes'][$db2->getField('vote_type')] = $db2->getInt('COUNT(*)'); } } $db2->query('SELECT COUNT(*) FROM feature_request_comments WHERE feature_request_id=' . $db2->escapeNumber($featureRequestID)); while ($db2->nextRecord()) { $featureRequests[$featureRequestID]['Comments'] = $db2->getInt('COUNT(*)');
<?php $account_id = $_REQUEST['account_id']; $exception = $_REQUEST['exception']; if (!is_array($account_id)) { create_error('Please check the boxes next to the names you wish to open.'); } $action = $_REQUEST['action']; if ($action == 'Reopen and add to exceptions') { foreach ($account_id as $id) { $curr_exception = $exception[$id]; $bannedAccount =& SmrAccount::getAccount($id); $bannedAccount->unbanAccount($account, $curr_exception); } } else { foreach ($account_id as $id) { $bannedAccount =& SmrAccount::getAccount($id); $bannedAccount->unbanAccount($account); } } forward(create_container('skeleton.php', 'admin_tools.php'));
foreach ($newer_ip as $db_ip) { $ip_numbers[] = $db_ip; $account_numbers[] = $acc_id; } } foreach ($ip_numbers as $something) { $amount += 1; } reset($ip_numbers); array_multisort($ip_numbers, $account_numbers); $i = 0; while ($i < $amount) { $account_wanted = array_shift($account_numbers); $ip_wanted = array_shift($ip_numbers); $new_acc =& SmrAccount::getAccount($account_wanted); $last_acc =& SmrAccount::getAccount($last_acc_id); $db2->query('SELECT * FROM account_is_closed WHERE account_id = ' . $db2->escapeNumber($acc_id)); if ($db2->getNumRows() && $db_ip != $last_ip) { continue; } $PHP_OUTPUT .= '<tr>'; $PHP_OUTPUT .= '<td align=center>' . $new_acc->getLogin() . ' (' . $new_acc->getAccountID() . ')</td>'; $PHP_OUTPUT .= '<td align=center>' . $ip_wanted . '</td>'; if ($ip_wanted == $last_ip && !$db2->nextRecord()) { $PHP_OUTPUT .= '<td align=center><span class="red">MATCH w/ ' . $last_acc->getLogin() . '</span></td>'; } elseif ($ip_wanted == $last_ip) { $PHP_OUTPUT .= '<td align=center><span class="red">(Already disabled) MATCH w/ ' . $last_acc->getLogin() . '</span></td>'; } else { $PHP_OUTPUT .= '<td align=center> </td>'; } $PHP_OUTPUT .= '<td><input type="checkbox" name="account_id[]" value="' . $new_acc->getAccountID() . '"></td>';
<?php try { // includes require_once 'config.inc'; require_once ENGINE . 'Default/smr.inc'; require_once LIB . 'Default/SmrMySqlDatabase.class.inc'; require_once get_file_loc('SmrAccount.class.inc'); require_once get_file_loc('SmrSession.class.inc'); $db = new SmrMySqlDatabase(); if (SmrSession::$account_id > 0) { $account =& SmrAccount::getAccount(SmrSession::$account_id); $disabled = $account->isDisabled(); if ($disabled !== false) { $reason = $disabled['Reason']; if ($disabled['Time'] > 0) { $reason .= ' Your account is set to reopen on ' . date(DEFAULT_DATE_FULL_LONG, $disabled['Time']) . '.'; } else { $reason .= ' Your account is set to never reopen. If you believe this is wrong contact an admin.'; } } // SmrSession::destroy(); } else { if (USE_COMPATIBILITY && SmrSession::$old_account_id > 0) { foreach (Globals::getCompatibilityDatabases('Game') as $databaseClassName => $gameType) { require_once get_file_loc($databaseClassName . '.class.inc'); $db = new $databaseClassName(); $db->query('SELECT * FROM account_is_closed JOIN closing_reason USING(reason_id) WHERE account_id = ' . $db->escapeNumber(SmrSession::$old_account_id)); if ($db->nextRecord()) { $time = $db->getField('expires'); $reason = $db->getField('reason');
$action = $_REQUEST['action']; if ($action == 'End >>') { $container = create_container('skeleton.php', 'universe_create_end.php'); $container['game_id'] = $var['game_id']; forward($container); } // check if no account was selected if ($_POST['admin_id'] == 0) { create_error('No Account selected!'); } if (empty($_POST['player_name'])) { create_error('You must select a name for that player!'); } // create an account object from the guy $admin_account =& SmrAccount::getAccount($_POST['admin_id']); // check if hof entry is there $db->query('SELECT * FROM account_has_stats WHERE account_id = ' . $admin_account->getAccountID()); if (!$db->getNumRows()) { $db->query('INSERT INTO account_has_stats (account_id, HoF_name) VALUES (' . $admin_account->getAccountID() . ', ' . $db->escape_string($admin_account->getLogin(), true) . ')'); } // give game stats entry $db->query('INSERT INTO player_has_stats (account_id, game_id) VALUES (' . $admin_account->getAccountID() . ', ' . $var['game_id'] . ')'); // put him in a sector with a hq $hq_id = $_POST['race_id'] + 101; $db->query('SELECT * FROM location JOIN sector USING(game_id, sector_id) ' . 'WHERE game_id = ' . $var['game_id'] . ' AND ' . 'location_type_id = ' . $hq_id); if ($db->nextRecord()) { $home_sector_id = $db->getField('sector_id'); } else { $home_sector_id = 1; }