PK

ADDRLIN : /home/anibklip/vpgldh.com/2020-21bk/members/admincp/
FLL :
Current File : //home/anibklip/vpgldh.com/2020-21bk/members/admincp/register.php

<?php
/**
 * Register.php
 * 
 * Displays the registration form if the user needs to sign-up,
 * or lets the user know, if he's already logged in, that he
 * can't register another name.
 *
 * jpWare php login system v.1.0.0
 * Copyright (C) 2009, Vlad Hristov (www.wonderwebware.com)
 * Copyright (C) 2004,2009  entity known as jpmaster77 (www.evolt.org/node/60384) and Ivan Novak (www.ivannovak.com)
 * Last Updated: Nov 26, 2009
 */
include("../include/session.php");
if(!$session->isAdmin()){
   header("Location: ../main.php");
}

?>

<?php include("../_header.html"); ?>
<div id="main" class="container_12">
<?php

/**
 * The user has submitted the registration form and the
 * results have been processed.
 */
 if(isset($_SESSION['regsuccess'])){
   /* Registration was successful */
   if($_SESSION['regsuccess']){
      echo "<h1>Registered!</h1>";
      if(EMAIL_WELCOME){
         echo "<p>A confirmation mail has been sent to <b>".$_SESSION['reguname']."</b> which should be arriving shortly.  User must confirm the registration before login.<br />Back to <a href='../main.php'>Main</a></p>";
      }else{
      echo "<p>User <b>".$_SESSION['reguname']."</b> has been added to the database, "
          ."he/she may now log in.</p>";
      }
   }
   /* Registration failed */
   else{
      echo "<h1>Registration Failed</h1>";
      echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
          ."could not be completed.<br>Please try again at a later time.</p>";
   }
   unset($_SESSION['regsuccess']);
   unset($_SESSION['reguname']);
}
/**
 * The user has not filled out the registration form yet.
 * Below is the page with the sign-up form, the names
 * of the input fields are important and should not
 * be changed.
 */
else{
?>

<h1>Register</h1>
<?php
if($form->num_errors > 0){
   echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
}
?>
<div id="register">
	<form action="../process.php" method="POST">
		<p class="textinput">Name: </p><p><input type="text" name="name" maxlength="30" value="<?php echo $form->value("name"); ?>"><?php echo $form->error("name"); ?></p>
		<p class="textinput">Username: </p><p><input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"><?php echo $form->error("user"); ?></p>
		<p class="textinput">Password: </p><p><input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"><?php echo $form->error("pass"); ?></p>
		<p class="textinput">Email: </p><p><input type="text" name="email" maxlength="50" value="<?php echo $form->value("email"); ?>"><?php echo $form->error("email"); ?></p>
		<p class="textinput"><input type="hidden" name="subjoin" value="1"><input type="submit" value="Join!"></p>
		<p><a href="../main.php">[Back to Main]</a> <a href="admin.php">[Back to Admin]</a></p>
	</form>
</div>
<?php
}
?>
</div>
<?php include("../_footer.html"); ?>


PK 99