<tr class="yellow"> <td>Rank</td> <td>Name</td> <td>Vocation</td> <td>Level</td> <?php if ($type === 7) { echo "<td>Points</td>"; } ?> </tr> <?php for ($i = 0; $i < count($scores[$type]); $i++) { if (pageCheck($i, $page, $rowsPerPage)) { $profile_data = user_character_data($scores[$type][$i]['id'], 'account_id'); $account_data = user_znote_account_data($profile_data['account_id'], 'flag'); ?> <tr> <td><?php echo $i + 1; ?> </td> <td><?php echo '<img src="\\flags\\' . $account_data['flag'] . '.png"> '; ?> <a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?> "><?php echo $scores[$type][$i]['name']; ?>
function user_recover($mode, $edom, $email, $character, $ip) { /* -- Lost account function - user_recovery -- $mode = username/password recovery definition $edom = The remembered value. (if mode is username, edom is players password and vice versa) $email = email address $character = character name $ip = character IP */ // Structure verify array data correctly if ($mode === 'username') { $verify_data = array('password' => sha1($edom), 'email' => $email); } else { $verify_data = array('name' => $edom, 'email' => $email); } // Determine if the submitted information is correct and herit from same account if (user_account_fields_verify_value($verify_data)) { // Structure account id fetch method correctly if ($mode == 'username') { $account_id = user_account_id_from_password($verify_data['password']); } else { $account_id = user_id($verify_data['name']); } // get account id from character name $player_account_id = user_character_account_id($character); //Verify that players.account_id matches account.id if ($player_account_id == $account_id) { // verify IP match (IP = accounts.email_new) \\ // Fetch IP data $ip_data = user_znote_account_data($account_id, 'ip'); if ($ip == $ip_data['ip']) { // IP Match, time to stop verifying SHIT and get on // With giving the visitor his goddamn username/password! if ($mode == 'username') { $name_data = user_data($account_id, 'name'); echo '<br><p>Your username is:</p> <h3>' . $name_data['name'] . '</h3>'; } else { $newpass = substr(sha1(rand(1000000, 99999999)), 8); echo '<br><p>Your new password is:</p> <h3>' . $newpass . '</h3><p>Remember to login and change it!</p>'; user_change_password($account_id, $newpass); } // END?! no, but almost. :) } else { echo 'IP does not match.'; } } else { echo 'Account data does not match.'; } } else { echo 'Account data does not match.'; } }
} require_once 'database/connect.php'; require_once 'function/general.php'; require_once 'function/users.php'; require_once 'function/cache.php'; require_once 'function/mail.php'; require_once 'function/token.php'; require_once 'function/itemparser/itemlistparser.php'; if (isset($_SESSION['token'])) { $_SESSION['old_token'] = $_SESSION['token']; } Token::generate(); if (user_logged_in() === true) { $session_user_id = getSession('user_id'); $user_data = user_data($session_user_id, 'id', 'name', 'password', 'email', 'premdays'); $user_znote_data = user_znote_account_data($session_user_id, 'ip', 'created', 'points', 'cooldown'); } $errors = array(); // Log IP if ($config['log_ip']) { $visitor_config = $config['ip_security']; $flush = $config['flush_ip_logs']; if ($flush != false) { $timef = $time - $flush; if (getCache() < $timef) { $timef = $time - $visitor_config['time_period']; mysql_delete("DELETE FROM znote_visitors_details WHERE time <= '{$timef}'"); setCache($time); } } $visitor_data = znote_visitors_get_data();
// Check if user have access to login $status = false; if ($config['mailserver']['register']) { $authenticate = mysql_select_single("SELECT `id` FROM `znote_accounts` WHERE `account_id`='{$login}' AND `active`='1' LIMIT 1;"); if ($authenticate !== false) { $status = true; } else { $errors[] = "Your account is not activated. An email should have been sent to you when you registered. Please find it and click the activation link to activate your account."; } } else { $status = true; } if ($status) { setSession('user_id', $login); // if IP is not set (etc acc created before Znote AAC was in use) $znote_data = user_znote_account_data($login); if ($znote_data['ip'] == 0) { $update_data = array('ip' => ip2long(getIP())); user_update_znote_account($update_data); } // Send them to myaccount.php header('Location: myaccount.php'); exit; } } } } } } } else { header('Location: index.php');