Example #1
0
<?php

global $stF, $st, $FLEETNAMES, $arrIncomingFleets, $showcolors, $g_arrResources;
$stF = str_replace('.php', '', basename($_SERVER['SCRIPT_NAME']));
$st = reset(explode(".", $stF));
if (logincheck(false) && '1' === $g_arrUser['oldpwd'] && 'preferences' != $st && $GAMEPREFS['must_change_pwd']) {
    Save_Msg('<b>YOU MUST CHANGE YOUR PASSWORD BEFORE STARTING THE GAME!!', 'red');
    Go("preferences.php");
}
?>
<!doctype html>
<html>

<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><?php 
echo $GAMEPREFS['gamename'];
?>
</title>
<link type="text/css" rel="stylesheet" href="css/styles.css" />
<script src="general_1_2_6.js"></script>
<script src="ajax_1_3_1.js"></script>
<script>
function TD(o) {
	var d = $(o).style;
	d.display = d.display != 'none' ? 'none' : '';
}
function R(o) {
	new Ajax(o.href, {
Example #2
0
<?php

require_once 'inc.config.php';
logincheck();
if (!empty($_POST['message']) && (!empty($_POST['parent_thread_id']) || !empty($_POST['title']))) {
    $arrInsert = array('parent_thread_id' => !empty($_POST['parent_thread_id']) ? (int) $_POST['parent_thread_id'] : null, 'galaxy_id' => $g_arrUser['galaxy_id'], 'utc_time' => time(), 'title' => !empty($_POST['title']) ? trim($_POST['title']) : null, 'message' => $_POST['message'], 'creator_planet_id' => PLANET_ID);
    if (!db_insert('politics', $arrInsert)) {
        Save_Msg('Could not save topic!', 'red');
    }
    $iThreadId = !empty($_POST['parent_thread_id']) ? $_POST['parent_thread_id'] : db_insert_id();
    Go('?id=' . (int) $iThreadId);
}
/*else if ( isset($_GET['delete_id']) && $g_arrUser['moc_planet_id'] === PLANET_ID )
{
	$q = db_query("SELECT threadid FROM $TABLE[politics] WHERE id='".$_GET['tid']."' AND deleted='0';");
	if (!mysql_num_rows($q))
	{
		Save_Msg("This message does not exist!");
		Go();
	}
	if (mysql_result($q,0,'threadid')>0)
	{
		// Bericht is een antwoord, geen Thread (OF bestaat niet)
		db_query("UPDATE $TABLE[politics] SET deleted='1' WHERE id='".$_GET['tid']."';");

		Go("?id=".mysql_result($q,0,'threadid'));
	}
	else
	{
		// Bericht is Thread, dus alle antwoorden ook weggooien!
		db_query("UPDATE $TABLE[politics] SET deleted='1' WHERE (id='".$_GET['tid']."' OR threadid='".$_GET['tid']."');");
Example #3
0
        Go();
    }
    if (db_update('planets', 'password = MD5(CONCAT(id,\':' . addslashes($_POST['newpassword']) . '\'))', '') && db_affected_rows()) {
        db_update('planets', 'oldpwd = \'0\'', 'id = ' . PLANET_ID);
    }
    Save_Msg("Password changed!", "lime");
    Go();
} else {
    if (isset($_POST['sleep'])) {
        if (time() > $g_arrUser['nextsleep']) {
            db_update('planets', 'sleep = ' . (time() + $_POST['sleep']) . ', nextsleep = ' . (time() + $_POST['sleep'] + 14 * 3600), 'id = ' . PLANET_ID);
            Go('logout.php');
        }
        $h = floor(($g_arrUser['nextsleep'] - time()) / 3600);
        $m = ceil(($g_arrUser['nextsleep'] - time() - $h * 3600) / 60);
        Save_Msg('You cannot go into sleepmode yet. You have to wait ' . $h . ' hours and ' . $m . ' minutes');
        Go();
    }
}
_header();
?>

<div class="header">Preferences</div>

<br />
<br />

<form method="post" action="">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
	<td width="130" align="right">Race</td>
Example #4
0
        $s = db_query("UPDATE {$TABLE['users']} SET activationcode='',lastaction='" . time() . "' WHERE email='" . trim($_POST['email']) . "' AND activationcode='" . trim($_POST['activationcode']) . "';");
        if (mysql_affected_rows()) {
            Save_Msg("Your account has been activated. You can now proceed to login", "green");
            Go("./?changepage=login");
        } else {
            Save_Msg("Your account has either already been activated, or the data your sent was not correct!", "red");
            Go();
        }
    } else {
        if (isset($_POST['action']) && $_POST['action'] == "new_email" && isset($_POST['new_email_code']) && isset($_POST['old_email']) && isset($_POST['new_email']) && isset($_POST['pwd'])) {
            $s = db_query("UPDATE {$TABLE['users']} SET email=new_email,new_email='',new_email_code='',lastaction='" . time() . "' WHERE email='" . trim($_POST['old_email']) . "' AND new_email='" . trim($_POST['new_email']) . "' AND new_email_code='" . trim($_POST['new_email_code']) . "' AND password='******'pwd']) . "';");
            if (mysql_affected_rows()) {
                Save_Msg("Your E-mail address has been updated! You can proceed to login or continue your old session.", "green");
                Go("./?changepage=login");
            } else {
                Save_Msg("There was no request found for a new e-mail address (WRONG_DATA?). Contact the Site Admin or try again in the Preferences!", "red");
                Go();
            }
        }
    }
}
?>
<html>

<head>
<title><?php 
echo $GAMENAME;
?>
</title>
<link rel=stylesheet href="css/styles.css">
</head>
Example #5
0
    if (isset($_POST['resend_code'])) {
        $szUserEmail = db_select_one('planets', 'email', "email = '" . addslashes($_POST['resend_code']) . "'");
        if ($szUserEmail) {
            $szActivationCode = md5(microtime());
            db_update('planets', "activationcode = '" . $szActivationCode . "'", "email = '" . addslashes($szUserEmail) . "'");
            $szGameHost = str_replace('www.', '', $_SERVER['HTTP_HOST']);
            $headers = "From: PORNSTARS <pornstars@" . $szGameHost . ">\r\n";
            $headers .= "Return-Path: <pornstars@" . $szGameHost . ">\r\n";
            $headers .= "X-Sender: <pornstars@" . $szGameHost . ">\r\n";
            if (mail($szUserEmail, 'PORNSTARS - ACTIVATION CODE', 'Your new activationcode = ' . $szActivationCode, $headers)) {
                Save_Msg('E-mail sent!', 'lime');
            } else {
                Save_Msg('E-mail not sent :( Try again soon!', 'red');
            }
        } else {
            Save_Msg('No e-mail found!', 'red');
        }
        Go();
    }
}
?>
<html>

<head>
<title><?php 
echo $GAMENAME;
?>
</title>
<link rel=stylesheet href="css/styles.css" />
</head>
Example #6
0
    $r = db_query("SELECT * FROM {$TABLE['alliances']} WHERE pwd='" . trim($_POST['pwd']) . "';");
    if (mysql_num_rows($r)) {
        $i = mysql_fetch_assoc($r);
        if ($i['leader_id'] == $UID) {
            Save_Msg("You cannot join your own alliance again!", "red");
            Go();
        }
        db_query("UPDATE {$TABLE['users']} SET tag='" . $i['tag'] . "' WHERE id='{$UID}'");
        $garbage = "tag" . substr(md5(time()), 0, 7);
        db_query("UPDATE {$TABLE['alliances']} SET pwd='{$garbage}' WHERE leader_id='" . $i['leader_id'] . "' AND tag='" . $i['tag'] . "';");
        AddNews("Alliance", "<b>" . $USER['rulername'] . " of " . $USER['planetname'] . " (" . $USER['x'] . ":" . $USER['y'] . ")</b> has joined your Alliance.<br>The new password = <b>{$garbage}</b>.", $i['leader_id']);
        Logbook("alliance", "Just joined <b>" . $i['tag'] . "</b>], pwd = " . $_POST['pwd']);
        Save_Msg("You have joined an Alliance (<b>" . $i['tag'] . "</b>)!", "green");
        Go();
    }
    Save_Msg("Wrong Password!");
    Go();
}
_header();
?>
<center>
<table border=0 cellpadding=2 cellspacing=0 width="100%">
<tr><td class=header>Alliance Page</td></tr>
</table>
</center><br>
<?php 
if (strlen($USER['tag']) >= 2) {
    $ai = mysql_fetch_assoc(db_query("SELECT * FROM {$TABLE['alliances']} WHERE tag='" . $USER['tag'] . "';"));
    $members = db_query("SELECT id,x,y,rulername,planetname,tag FROM {$TABLE['users']} WHERE tag='" . $USER['tag'] . "';");
    $members2 = db_query("SELECT id,x,y,rulername,planetname,tag FROM {$TABLE['users']} WHERE tag='" . $USER['tag'] . "';");
    $nm = mysql_num_rows($members);
Example #7
0
            db_query("UPDATE planets SET password ='******'id'] . ':' . $newpwd) . "' WHERE id = " . (int) $i['id'] . ";");
            logbook('pwd_reminder', 'email=' . $i['email'] . '&new=' . $newpwd, (int) $i['id']);
            $gameaddress = str_replace("index.php", "misc.php", $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);
            $gamename0 = str_replace("www.", "", $_SERVER['HTTP_HOST']);
            $gamename = "PS " . $gamename0 . " LOGIN";
            $headers = "From: PornStarS PASSWORD <pornstars@" . $gamename0 . ">\r\n";
            $headers .= "Return-Path: <pornstars@" . $gamename0 . ">\r\n";
            $headers .= "X-Sender: <pornstars@" . $gamename0 . ">\r\n";
            $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
            $mailed = mail($i['email'], "PORNSTARS - Forgotten Password", "Your new password: "******"Your password has been sent to \"<b>" . htmlspecialchars($i['email']) . "\"" : "We have failed in sending you your password. Wrong e-mail server";
            $color = $mailed ? "green" : "red";
            Save_Msg($msg, $color);
            Go();
        }
        Save_Msg("Cant find the emailaddress \"<b>" . htmlspecialchars($_POST['email']) . "</b>\"", "red");
        Go();
    }
}
?>
<html>

<head>
<title><?php 
echo $GAMENAME;
?>
</title>
<script type="text/javascript" src="general_1_2_6.js"></script>
<script type="text/javascript" src="ajax_1_3_1.js"></script>
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<script type="text/javascript">
Example #8
0
<?php

require_once 'inc.config.php';
if (logincheck(false)) {
    Go('./');
}
if (!$GAMEPREFS['general_signup'] && !$_SESSION[$sessionname . '_ADMIN']) {
    $tickerstatus = $GAMEPREFS['ticker_on'] ? "ON" : "OFF";
    $loginstatus = $GAMEPREFS['general_login'] ? "" : "NOT";
    Save_Msg("<b>Signup is closed for the moment.</b><br>Ticker is <b>{$tickerstatus}</b>!<br>To login is <b>{$loginstatus} possible</b>!", "red");
    Go("?changepage=index");
}
if (isset($_POST['email'], $_POST['rulername'], $_POST['planetname'], $_POST['password'], $_POST['password2'], $_POST['race_id'])) {
    if (4 > strlen($_POST['rulername'])) {
        exit('Rulername too short!');
    } else {
        if (4 > strlen($_POST['planetname'])) {
            exit('Planetname too short!');
        } else {
            if (md5($_POST['password']) !== md5($_POST['password2'])) {
                exit('Passwords don\'t match!');
            } else {
                if (db_count('planets', "rulername = '" . addslashes($_POST['rulername']) . "'")) {
                    exit('Rulername taken!');
                } else {
                    if (db_count('planets', "planetname = '" . addslashes($_POST['planetname']) . "'")) {
                        exit('Planetname taken!');
                    } else {
                        if (db_count('planets', "email = '" . addslashes($_POST['email']) . "'")) {
                            exit('E-mail address taken!');
                        } else {