News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

External Page Redirect

Started by persianprez, October 17, 2010, 03:02:00 PM

Previous topic - Next topic

persianprez

I want the page to basically reload or stay on the same page when a user logs in from the page.  Here is the page:
http://www.ifailhard.com/tmobile/freet.php

All it does when a user logs in is takes them to the forum.  It doesn't happen all the time, but happens most of the time.  Anybody know whats wrong with my code?

Here is the code behind it
<?php include_once('/home/pedrum/public_html/ifailhard.com/tmobile/forum/SSI.php'); 

$_SESSION['login_url']= 'http://www.ifailhard.com/tmobile/freet.php';

$_SESSION['logout_url'] = 'http://www.ifailhard.com/tmobile/freet.php';

?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">







<head>



<meta content="yes" name="apple-mobile-web-app-capable" />

<meta content="index,follow" name="robots" />

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

<link href="pics/homescreen.gif" rel="apple-touch-icon" />

<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />

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

<script src="javascript/functions.js" type="text/javascript"></script>

<title>Free T-Mobile Internet</title>

<meta content="iPod,iPhone,ifailhard,tmobile,internet" name="keywords" />

</head>



<body>



<div id="topbar">

<div id="title">

Free T-Mobile Internet</div>

<div id="leftnav">

<a href="index.html"><img alt="home" src="images/home.png" /></a> </div>

</div>

<center>

<?php 



ssi_login
($_SESSION['login_url']);

if(!empty(
$context['user']['is_guest']))

{

echo 
"You must be logged in to use this feature!<br><br>\n";



echo 
"<br><br>";

echo 
"Not registered? No problem!";

echo 
" <a href=\"forum/?action=register\">Click Here</a>, it's free!<br><br>\n";



}





else if(
$context['user']['is_logged'])

?>


<form method="post" action="internet/">

<!-- Make sure you leave the two input fields the same! -->

<input type="hidden" name="__proxy_action" value="redirect_browse" />

<input type="text" name="__proxy_url" value="iFailHard.com" id="proxy_url" /><br><br>

<div id="proxy_options">

<label for="__no_javascript">

<input type="checkbox" name="__no_javascript" id="__no_javascript" />

Disable JavaScript

</label><br><br>

<label for="__no_images">

<input type="checkbox" name="__no_images" id="__no_images" />

Disable Images

</label><br><br>

<label for="__no_title">

<input type="checkbox" name="__no_title" id="__no_title" />

Strip Title

</label><br><br>

<label for="__no_meta">

<input type="checkbox" name="__no_meta" id="__no_meta" />

Strip Meta

</label>

</div><br><br>

<input type="submit" value="Browse!" id="proxy_button" />

</form>





<?php

   
}

   

else

{

echo 
"<center>We are currently running a donation block, please visit <a href=\"http://ifailhard.com/tmobile/forum/index.php?topic=87&wap2\">this link for more details.</a>  You can make a donation by visiting <a href=\"http://ifailhard.com/tmobile/forum/index.php?action=treasury&wap2\">this link.</a>  Thank you.\n"

echo 
"\n";

echo 
"<br><br>Donors still can access the free internet option\n";

 } 
?>


<br>

<?php ssi_logout(); ?>

</body>



</html>



xenovanis

Moving this to the SMF Coding Discussion board. Probably a better place to ask this ;)
"Insanity: doing the same thing over and over again and expecting different results."

IchBin™

The way you've coded it doesn't make much sense. You don't even check to see if the user is logged in before you call the ssi_login() function. You should perhaps read this doc to get a better understand.

How to use the SMF user system outside of SMF
IchBin™        TinyPortal

Advertisement: