Jump to content

PHP coding error... Help!


katarra

Recommended Posts

Now how do I make it so that it will automatically search for the person that is currently logged in?

 

"Zelig" will work for my character, but say someone else logs in and runs the script. How can I program it so that it recognizes character "Asher" instead of "Zelig" and uses their energy stat?

Link to comment
Share on other sites

The top of the page:

<html>

<head>

<title>The Worlds of Katarra</title>

<link rel=stylesheet type=text/css href=style.css>

<script language="javascript" type="text/javascript">

 

setTimeout(

function()

{

var mytext = document.getElementById("rptext");

mytext.focus();

mytext.select();

}

, 1);

</script>

</head>

 

 

Login Script:

 

$loginname = ucwords(strtolower($loginname));
if ($loginname == " ") die("You didn't enter your username. Please go back and do so, or create a new character <a href=\"index1.html?page=register\">here</a>.<br>\n");
if (!isuser($loginname)) die("That username does not exist. To create it, click <a href=\"index1.html?page=register?username=$loginname\">here</a>.<br>");
$username = $loginname;
$encrypted = md5($loginpass);
if (get("password") !== md5(md5($loginpass))) die("Incorrect password.<br>\n");
addlogin($loginname,$loginpass,$REMOTE_ADDR);
if(!is_numeric(get("admin"))){
$timelog=getfile("timelog");
$timelog.="$loginname:in:".time()."\n";
setfile("timelog",$timelog);
}
$asdf = 0;
$charsdata = getfile("online");
if (strpos($charsdata,"$loginname:") !== false) $asdf = 1;
$charsdata = str_replace("$loginname:","",$charsdata)."$loginname:";
setfile("online",$charsdata);
$framesize = get("frame");
$encrypted = md5($loginpass);
echo "<frameset rows=\"".$framesize."%,*,0\" border=0>\n<frame name=\"TOP\" ";
if ($asdf == 1){
echo "src=\"main.php?username=$loginname&password=$encrypted\"";
}else{
echo "src=\"main.php?username=$loginname&password=$encrypted&isloggingin=1\"";
}
echo " noresize>\n<frame name=\"BOTTOM\" src=\"command.php?x=$loginname&y=$encrypted\" noresize scrolling=no>\n<frame name=CHECKER src=chatchek.php?username=$loginname&password=$encrypted noresize></frameset>\n";
set("lasttell","");

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.