{if_wrong_email}<br /> {note_new}<br />'; $lang['email'] = $user['email']; $lang['validate_content'] = parsetemplate($ContentTPL, $lang); } else { $lang['validate_content'] = $lang['already_validated']; } $page = parsetemplate(gettemplate('redesigned/validate'), $lang); makeAXAH($page); } elseif ($user['validate'] > 0) { //Is user already validated? //Need to validate ths account //Do we have a code? if ($_GET['code']) { if ($_GET['code'] == $user['validate']) { doquery("UPDATE {{table}} SET `validate` = '0' WHERE `id` = '" . idstring($_GET['user']) . "' LIMIT 1 ;", 'users'); intercom_add($lang['acc_validated'], $user['id'], 0, 20); header("Location: " . AddUniToString("./")); } else { intercom_add($lang['bad_code'], $user['id'], 0, 20); header("Location: " . AddUniToString("./")); } } else { die("No code"); header("Location: " . AddUniToString("./")); } } else { //He is already validated intercom_add($lang['already_validated'], $user['id'], 0, 20); header("Location: " . AddUniToString("./")); }
doquery("UPDATE {{table}} SET `ally_id` = '0' , `ally_name` = '' , `ally_register_time` = '0' , `ally_rank` = '0' , `ally_rank_name` = 'Newbie' WHERE `id` = '" . $user['id'] . "' ;", 'users'); doquery("UPDATE {{table}} SET `ally_members` = `ally_members` - 1 WHERE `id` = '" . $user['ally_id'] . "' LIMIT 1 ;", 'alliance'); } //Back to alliance page header("Location: " . AddUniToString('./?page=network&axah=' . $_GET['axah'])); die; break; case "kick": //So they want to remove this guy? if (idstring($_GET['id']) != $allyrow['ally_owner']) { //Admin can't leave doquery("UPDATE {{table}} SET `ally_id` = '0' , `ally_name` = '' , `ally_register_time` = '0' , `ally_rank` = '0' , `ally_rank_name` = 'Newbie' WHERE `id` = '" . idstring($_GET['id']) . "' AND `ally_id` = '" . $user['ally_id'] . "' LIMIT 1 ;", 'users'); doquery("UPDATE {{table}} SET `ally_members` = `ally_members` - " . mysql_affected_rows() . " WHERE `id` = '" . $user['ally_id'] . "' LIMIT 1 ;", 'alliance'); } //Back to alliance page header("Location: " . AddUniToString('./?page=network&axah=' . $_GET['axah'])); die; break; default: $parse['name'] = $allyrow['ally_name']; $parse['tag'] = $allyrow['ally_tag']; $parse['www'] = addslashes($allyrow['ally_web']); $parse['members'] = idstring($allyrow['ally_members']); $parse['yourrank'] = addslashes($user['ally_rank_name']); $parse['internal'] = $bb->parse(addslashes($allyrow['ally_text'])); $parse['external'] = $bb->parse(addslashes($allyrow['ally_description'])); $parse['image'] = addslashes($allyrow['ally_image']); $members = $lang; $membersort = 'ally_register_time'; $memberquery = doquery("SELECT \r\n\t\t\t`id`,`username`,`galaxy`,`system`,`planet`,\r\n\t\t\t`ally_register_time`,`ally_rank_name`,`total_points`,`onlinetime` \r\n\t\t\tFROM {{table}} WHERE `ally_id` = '" . $allyrow['id'] . "' ORDER BY `" . $membersort . "` ASC ;", 'users'); $n = 0;
$rememberme = 1; } else { $expiretime = 0; $rememberme = 0; } @(include 'config' . UNIVERSE . '.php'); $cookie = $login["id"] . "/%/" . $login["username"] . "/%/" . sha($login["password"] . "--" . $dbsettings["secretword"]) . "/%/" . $rememberme; setcookie($game_config['COOKIE_NAME'], $cookie, $expiretime, "/", "", 0); unset($dbsettings); header("Location: " . AddUniToString($redirect)); exit; } else { header("Location: " . AddUniToString('./login.php?bad=Password')); } } else { header("Location: " . AddUniToString('./login.php?bad=Username')); } } elseif ($old) { $Count = doquery('SELECT COUNT(*) as `players` FROM {{table}} WHERE 1', 'users', true); $LastPlayer = doquery('SELECT `username` FROM {{table}} ORDER BY `register_time` DESC', 'users', true); $parse['last_user'] = $LastPlayer['username']; $PlayersOnline = doquery("SELECT COUNT(DISTINCT(id)) as `onlinenow` FROM {{table}} WHERE `onlinetime` > '" . (time() - 900) . "';", 'users', true); $parse['online_users'] = $PlayersOnline['onlinenow']; $parse['users_amount'] = $Count['players']; $parse['servername'] = $game_config['game_name']; $parse['forum_url'] = $game_config['forum_url']; $parse['PasswordLost'] = $lang['PasswordLost']; $page = parsetemplate(gettemplate('login_body'), $parse); // Test pour prendre le nombre total de joueur et le nombre de joueurs connect�s if ($_GET['ucount'] == 1) { $page = $PlayersOnline['onlinenow'] . "/" . $Count['players'];