Thread: login/signup
View Single Post
  #1  
Old 10th September 2019, 13:04
bizzarre13 bizzarre13 is offline
Member
 
Join Date: Apr 2013
P2P
Posts: 10
Default login/signup
How come users that are already logged in, can access these pages?
How can i redirect already logged in users if they try to access these pages?
login script:
Code:
<?
require_once("include/bittorrent.php");
dbconn();

unset($returnto);
if (!empty($_GET["returnto"])) {
	$returnto = $_GET["returnto"];
	if (!$_GET["nowarn"]) {

	}
}

?>
<title>.:: Login ::. </title> 
<style type="text/css">
<!--
.error {color:#A80000}
a, a:visited { color: #ffffff; text-decoration: none; }
a:hover { color: #FFF; text-decoration: none; }
body {
	background: #333;
	font-size:11px;
	font-family: Tahoma, Arial, sans-serif;
	color: #333333;
	margin: 0;
	padding: 0;
	margin-top: 0px;
margin-bottom: 0px;
background: url('/pic/login/loginbg.png');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
	
	background-color:#000000;

}
#layer03_holder {
margin-top: 150px;
margin-bottom: 0px;
padding-left: 0px;
padding-right: 0px;


}
#layer03_2 {
margin-top: 230px;
margin-bottom: 0px;
padding-left: 0px;
padding-right: 0px;

}
#wrapper {width:100%; border: none; text-align: center; margin:20px auto 0 auto; }
#main { text-align:left;padding:15px }
#header { margin: auto; width: 162px; height: 150px; margin-bottom: 5px; background-image: url('/pic/header2.jpg'); }
#footer { }
input.text { 
background: transparent;
border: #000000 0px solid;

}
}

u { text-decoration: none; color: #7bccff; }
.style4 {color: #CCCCCC}
.style9 {color: #FFFFFF}
.style20 {
	font-size: 9px;
	font-weight: bold;
}
.style21 {font-size: 10px}
.style22 {font-size: 12px}
.style23 {font-size: 12px; color: #FFFFFF; }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body>

<form method="post" action="takelogin.php">

  <div id="layer03_holder" align="center">
    
    <table width="400"  height="400" background="pic/login/login.box.png" border="0">
      <tr>
        <td>

          <center id="layer03_2">
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
              <input class="text" size="25" name="username" type="text">   
            </p>
            <p>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="text" size="25" name="password" type="password">            
            <p>
            <table  border="0">
              <tr>
                <td height="41">
                  <span class="style9"><span class="style20"><span class="style21"><span class="style22"><a href="signup.php">Signup</a></span></span></span></span> <span class="style23">| <strong><a href="recover.php">Recover</a></strong></span><span class="style9">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input src="pic/login/login.png" class="submit" value="Log in!" border="0" type="image"></td>
              </tr>
            </table>
          </center>

		</td>
      </tr>
    </table>
  </div>
    <p class="style4">&nbsp;</p>
 
    </table>

</div>
</form></body></html>
<?

if (isset($returnto))
	print("<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($returnto) . "\" />\n");



?>
Reply With Quote