Jump to content

reportingsjr

Members
  • Posts

    1,183
  • Joined

  • Last visited

Everything posted by reportingsjr

  1. hmm, okay.session_redirect function: function session_redirect ($url = "") { function _safe_set (&$var_true, $var_false = "") { if (!isset ($var_true)) $var_true = $var_false; } $parse_url = parse_url ($url); _safe_set ($parse_url["scheme"], $_SERVER["HTTPS"] ? "https" : "http"); _safe_set ($parse_url["host"], $_SERVER['HTTP_HOST']); _safe_set ($parse_url["path"], ""); _safe_set ($parse_url["query"], ""); _safe_set ($parse_url["fragment"], ""); if (substr ($parse_url["path"], 0, 1) != "/") { $parse_url["path"] = dirname ($_SERVER['PHP_SELF']) . "/" . $parse_url["path"]; } if ($parse_url["query"] != "") { $parse_url["query"] = $parse_url["query"] . "&"; } $parse_url["query"] = "?" . $parse_url["query"] . session_name () . "=" . strip_tags (session_id ()); if ($parse_url["fragment"] != "") { $parse_url["fragment"] = "#" . $parse_url["fragment"]; } $url = $parse_url["scheme"] . "://" . $parse_url["host"] . $parse_url["path"] . $parse_url["query"] . $parse_url["fragment"]; #session_write_close (); write_session(); header ("Location: " . $url); exit; } login function: /** * procLogin - Processes the user submitted login form, if errors * are found, the user is redirected to correct the information, * if not, the user is effectively logged in to the system. */ function procLogin(){ global $session, $form; /* Login attempt */ $retval = $session->login($_POST['user'], $_POST['pass'], isset($_POST['remember'])); echo "<font color='gray'>"; /* Login successful */ if($retval){ session_redirect("excibius/index.php"); echo "Sucessful login!"; echo "<br />We are sorry for the trouble, but while trying to make this game work for Internet Explorer we have had to do the way we redirect to pages. Right now it isnt working, so you will just need to hit the \"home\" button above this text. Either that, or you can refresh the page or go to Excibius.com<br />Again, we are sorry and we are trying to get this fixed! You will see other various problems with the site while we try to make it compatible with Internet Explorer. Sorry!"; } /* Login failed */ else{ $_SESSION['value_array'] = $_POST; $_SESSION['error_array'] = $form->getErrorArray(); session_redirect("/welcome.php"); echo "Login failed :(."; } echo "</font>"; } Ummm, thats all that really deals with login! I will try several things here..
  2. Wow.. I looked at that and was like, is that really me? I guess I didnt know PHP as well . Here is the corrected full script: ?php//start sessionsession_start();//create login variable$_SESSION['login']='no';//get inputted username and password$username = $_POST['username'];$password = $_POST['password'];//check username and password and set login variable if correctif($username == 'DarkElf'){ if($password == 'Spoon'){ $_SESSION['login'] = 'yes'; }}?>DOCTYPE....HTML headers.....<body><?php//check login variable and display content accordinglyif($_SESSION['login'] == 'no'){ echo '<p>Sorry, you are not a recognised user, please go back and try again.</p>';}elseif($_SESSION['login'] == 'yes'){ echo '<p>Welcome user..... more page content etc.</p>';}?></body></html> enjoi
  3. Do'h! Ill try that. Some times you just forget..link to site:http://excibius.comsorry! Right now I would just like it to be IE accessible so more people will play my game .EDIT:Nope, that doesnt work either . I think it might be the function... Let me check again.Thanks so far though!
  4. It should be in another set of pages, maybe in another folder and to get it to work you will have to edit certain things that pertain to the server you are on. If you want to integrate it into your own template(s) and page(s) you will have to go through all of the code and copy and paste it into whatever page you want. You will want to rename the pages so your SMS stills links together or go through the painstaking process of editing all of your links so they work.Have fun .
  5. Thats exactly what I did, check out my site (log in name is blehe and password is blehe) and try to log in. It doesnt redirect...
  6. You cant, why would you need to anyways?
  7. Well, it works in IE now, but its not redirecting at all. Plus its not displaying any of the text I have .
  8. hmm, ill try it. Thanks! ut why does it exit?
  9. I have a login script and works fine, at least in every rowser but IE. For some reason it doesnt set the user as login, it says on my login page "login succesful" but when it tries to redirect, it is logged out. Is this because IE uses its own sessions and cookies? Anyways, here is my scripts:auto login script (says yes): /* Login attempt */ $retval = $session->login($_POST['user'], $_POST['pass'], isset($_POST['remember'])); echo "<font color='gray'>"; /* Login successful */ if($retval){ header("Location: excibius/index.php"); echo "<meta http-equiv='refresh' content='0;excibius/index.php'>"; echo "Sucessful login!"; } /* Login failed */ else{ $_SESSION['value_array'] = $_POST; $_SESSION['error_array'] = $form->getErrorArray(); header("Location: /welcome.php"); echo "Login failed :(."; echo "<meta http-equiv='refresh' content='0;/welcome.php'>"; } echo "</font>"; actual logging in script: global $database, $form; //The database and form object /* Username error checking */ $field = "user"; //Use field name for username if(!$subuser || strlen($subuser = trim($subuser)) == 0){ $form->setError($field, "* Username not entered"); } else{ /* Check if username is not alphanumeric */ if(!eregi("^([0-9a-z])*$", $subuser)){ $form->setError($field, "* Username not alphanumeric"); } } /* Password error checking */ $field = "pass"; //Use field name for password if(!$subpass){ $form->setError($field, "* Password not entered"); } /* Return if form errors exist */ if($form->num_errors > 0){ return false; } /* Checks that username is in database and password is correct */ $subuser = stripslashes($subuser); $result = $database->confirmUserPass($subuser, md5($subpass)); /* Check error codes */ if($result == 1){ $field = "user"; $form->setError($field, "* Username not found"); } else if($result == 2){ $field = "pass"; $form->setError($field, "* Invalid password"); } /* Return if form errors exist */ if($form->num_errors > 0){ return false; } /* Username and password correct, register session variables */ $this->userinfo = $database->getUserInfo($subuser); $this->username = $_SESSION['username'] = $this->userinfo['username']; $this->userid = $_SESSION['userid'] = $this->generateRandID(); $this->userlevel = $this->userinfo['userlevel']; /* Insert userid into database and update active users table */ $database->updateUserField($this->username, "userid", $this->userid); $database->addActiveUser($this->username, $this->time); $database->removeActiveGuest($_SERVER['REMOTE_ADDR']); /** * This is the cool part: the user has requested that we remember that * he's logged in, so we set two cookies. One to hold his username, * and one to hold his random value userid. It expires by the time * specified in constants.php. Now, next time he comes to our site, we will * log him in automatically, but only if he didn't log out before he left. */ if($subremember){ setcookie("cookname", $this->username, time()+COOKIE_EXPIRE, COOKIE_PATH); setcookie("cookid", $this->userid, time()+COOKIE_EXPIRE, COOKIE_PATH); } /* Login completed successfully */ return true; Now, to check if its logged in it checks if the variable $logged_in (in the session class) is true, appparently its getting set as false. Can anyone seee why?
  10. I dont care about "other life forms", I just love space and the way it looks. Dont care about all that other stuff . So Erich vön Daniken?
  11. thanks justsomeguy! those pictures are awesome!
  12. reportingsjr

    Mail

    oh whoops! Sorry man!! That was my bad. Mind if I try out your site? BTW: registration didnt work =\
  13. reportingsjr

    Whoa...

    I was just going along on another forum and came upon a topic of how big earth is compared to other things. Someone posted this link:http://atinyglimpse.ytmnd.com/I wish I could see all the text, but its still amazing. I want the picture of those galaxies!!! Tell me what you think of it. I hope this is the right place!
  14. reportingsjr

    Mail

    Heres your issue: <a href='http:\\www.wasper-rocker.co.uk/activate.php?act_num=$random'title='http:\\www.wasper-rocker.co.uk/activate.php?act_num=$random'></a>. It doesnt recognize the variables, at least it doesnt expect them. Try this: <a href='http:\\www.wasper-rocker.co.uk/activate.php?act_num={$random}'title='http:\\www.wasper-rocker.co.uk/activate.php?act_num={$random}'></a>. Then it will work. Also, to display HTML in an email you will need to set the correct mime. I forget what exactly it is but its been posted on here about 10 bajillion times lol.
  15. nonono . The GET method just means the variables get stored in the URL: e.g. http://domain.com/?variablename=something, then to get the vairable from the url you do this:$_GET['variablename']You would need to put each variable you want into the forms action and have the method be GET until the last for, you would want to have hidden fields on the last one and use the post method .
  16. thats exactly the point! Its to see what you are putting into the database.By manually running the query against your server, which I do constantly, he means going to like phpmyadmin on your server, and copy and pasting a specific query into it. You could also just put it in another file and run it. You then do this with every query on your page until you find the erronous one(s) and tweak them until they work! Its pretty simple. Just copy and paste until you find which one is giving the error.
  17. Man, ive been hacked so many times.. I just get used to it lol. I actually got hacked mainly on the game called runescape. If you have heard of it or palyed it you know the people there. They are all kids that are ages 9-25 mainly, then when they see someone that is alot better than them they go pretty much crazy and go to extremes like keyloggers (the main hacking program they use). I got hacked several times but I didnt care since nothing was really lost from my life. But I guess other things could be issues!
  18. nice, what secrets you found lol?I live close to the Cincinnati public library, very large.. I think like 5 or 6 floors of books. Tons and tons of books!
  19. reportingsjr

    Mail : : From

    headers.... Just add it into the headers
  20. put this on the image: <a href="" onmouseover="this.innerHTML='<img src=\"blah.png\"' />"><img blah... /></a>
  21. whats the function for addToFavorites()? You dont specify that so it has no use.
  22. Yeah, just add the new line return which is \n for a line break. Jhechts' script is bugged also, right here: if(fwrite($fh,$dateum.$IP."\n")){There is no variable called $dateum, its $datum
  23. or a header ... header("location: shoutbox.php");OR a meta tag lol<meta http-equiv="refresh" content="1;shoutbox.php" />
  24. sooo, you are 14 as well akula? Cool! Nice website , I wont taunt...
  25. are you just using the $no variable or $no = $_GET['no']; ? You would need to use $_GET to get the value.
×
×
  • Create New...