Esempio n. 1
0
function error_message($message)
{
    error_idmessage("unknown", $message);
}
Esempio n. 2
0
</BODY></HTML>
<?php 
    die;
}
?>
<H1>
<IMG SRC="/images/gif/dragon.gif">
<?php 
echo $_REQUEST["name"];
?>
 - A New Character</H1>
<?php 
if (isset($_REQUEST["name"])) {
    // make that change.
    $query = "insert into mm_usertable " . "(name, address, password, title, realname, email, race, sex, age, \n\t\tlength, width, complexion, eyes, face, hair, beard, arm, leg, lok, \n\t\tactive, lastlogin, birth) " . "values(\"" . quote_smart($_REQUEST["name"]) . "\", \"" . quote_smart($_SERVER['REMOTE_ADDR']) . "\", sha1(\"" . quote_smart($_REQUEST["password"]) . "\"), \"" . quote_smart($_REQUEST["title"]) . "\", \"" . quote_smart($_REQUEST["realname"]) . "\", \"" . quote_smart($_REQUEST["email"]) . "\", \"" . quote_smart($_REQUEST["race"]) . "\", \"" . quote_smart($_REQUEST["sex"]) . "\", \"" . quote_smart($_REQUEST["age"]) . "\", \"" . quote_smart($_REQUEST["length"]) . "\", \"" . quote_smart($_REQUEST["width"]) . "\", \"" . quote_smart($_REQUEST["complexion"]) . "\", \"" . quote_smart($_REQUEST["eyes"]) . "\", \"" . quote_smart($_REQUEST["face"]) . "\", \"" . quote_smart($_REQUEST["hair"]) . "\", \"" . quote_smart($_REQUEST["beard"]) . "\", \"" . quote_smart($_REQUEST["arms"]) . "\", \"" . quote_smart($_REQUEST["legs"]) . "\", null, 0, now(), now())";
    mysql_query($query, $dbhandle) or error_idmessage(6, "Query(8) failed : " . mysql_error());
    writeLogLong($dbhandle, "Created new user " . $_REQUEST["name"] . " from " . $_SERVER['REMOTE_ADDR'] . ".", $query);
}
mysql_close($dbhandle);
?>

The new character has been created. Click on the link <I>Back</I> below 
to return to the logon screen. In the logon screen fill out the name
and the password of the newly created character.
<p>
<a HREF="/karchan/index.html">
<img SRC="/images/gif/webpic/buttono.gif"  
BORDER="0"></a><p>

</BODY>
</HTML>
 */
$query = "select \"yes\" from mm_usertable where name = \"" . quote_smart($_COOKIE["karchanname"]) . "\" and lok = \"" . quote_smart($_COOKIE["karchanpassword"]) . "\" and active = 1 and god < 2";
$result = mysql_query($query, $dbhandle) or error_message("Query failed : " . mysql_error());
$good = "no";
while ($myrow = mysql_fetch_array($result)) {
    if ($myrow[0] == "yes") {
        $good = "yes";
    }
}
if ($good == "no") {
    error_message("Your user account for user " . quote_smart($_COOKIE["karchanname"]) . " does not exist!");
}
/**
 * Read logfile and dump it to output.
 */
$filename = $mudfilepath . "/" . quote_smart($_COOKIE["karchanname"]) . ".log";
$fp = fopen($filename, 'r');
if (!$fp) {
    error_idmessage($errno, "Error opening file " . $filename);
}
if (isset($_REQUEST["position"])) {
    fseek($fp, $_REQUEST["position"]);
}
while (!feof($fp)) {
    $readline = fread($fp, 1024);
    if (get_cfg_var("magic_quotes_gpc") == "1") {
        $readline = stripslashes($readline);
    }
    echo $readline;
}
fclose($fp);