Login   Register  
PHP Classes
elePHPant
Icontem

File: pages/p_sign_in.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Javier AP  >  Pergamus Publication Manager  >  pages/p_sign_in.php  >  Download  
File: pages/p_sign_in.php
Role: Auxiliary script
Content type: text/plain
Description: Sign-in page
Class: Pergamus Publication Manager
Web based manager for scientific publications
Author: By
Last change: Directory path added to filename
Date: 2005-01-14 01:27
Size: 4,969 bytes
 

Contents

Class file image Download
<?php include '../class/class_collection.php'?>
<?php 
include '../class/autentification.php'?>
<?php 
include '../class/users_sign_in.php'?>
<html>
<head>
<title>Pergamus publication manager</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html" charset="utf-8"">
</head>
<body>

 <div class="main">
 <?php  
    $validation 
form_validation($last_name$first_name$email$password$password_conf$username);
    if(
$validation == 'valid' &&  $confirmed == "false") {
 
?>
  <h1>Add a new user</h1>
  <?php include 'p_session_bar.php';?>
  <table width="100%"  border="0" cellpadding="0" cellspacing="5">  
    <tr>
      <td colspan="3"><h2>Sign-in confirmation </h2>  </td>
    </tr>
    <tr>
      <td colspan="3"><h3>Review your data... </h3>      </td>
    </tr>
    <tr>
      <td width="30%"><i><b>First name: </b></i></td>
      <td colspan="2"><?php echo($first_name);?> </td>
    </tr>
    <tr>
      <td><i><b>Last name: </b></i></td>
      <td colspan="2"><?php echo($last_name);?> </td>
    </tr>
    <tr>
      <td><i><b>E-mail: </b></i></td>
      <td colspan="2"><?php echo($email);?> </td>
    </tr>
    <tr>
      <td><i><b>Username: </b></i></td>
      <td colspan="2"><?php echo($username);?> </td>
    </tr>
    <tr>
      <td><i><b>Password: </b></i></td>
      <td colspan="2">
          <?php            
           
for($i=0$i<strlen($password); $i++) {
              echo(
'*');             
            }
          
?> 
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td width="20%">
      <form action="p_sign_in.php" method="post" target="_self">
        <input name="image" TYPE="image" SRC="../img/bt_aceptar.jpg" BORDER="0">    
        <input type="hidden" name="first_name" value="<?php echo("$first_name"?>">
        <input type="hidden" name="last_name" value="<?php echo("$last_name"?>">
        <input type="hidden" name="email" value="<?php echo("$email"?>">
        <input type="hidden" name="username" value="<?php echo("$username"?>">
        <input type="hidden" name="password" value="<?php echo("$password"?>">    
        <input type="hidden" name="confirmed" value="true">
        </form>
      </td>
      <td width="50%">
          <form action="p_sign_in.php" method="post" target="_self">
        <input name="image" TYPE="image" SRC="../img/bt_cancelar.jpg" BORDER="0">    
        <input type="hidden" name="confirmed" value="retry">
        </form>
      </td>
    </tr>
   </table>
     <br>

  <?php } else if($confirmed == "true") { 
          
register_user($last_name$first_name$email$password$username); ?>
  <h1>Sign-in completed! </h1> 
  <?php include 'p_session_bar.php';?>
  <p>&nbsp;</p>
  <br>
  <?php } else {
  
?>
  <h1>Add a new user</h1>
  <?php include 'p_session_bar.php';?>
  <table width="100%"  border="0" cellpadding="0" cellspacing="5">
    <form action="p_sign_in.php" method="post">
      <tr>
        <td colspan="3"><h2>Sign-in data </h2>          </td>
      </tr>

      <?php if($confirmed == "false" && $validation != 'valid') {?>
      <tr>
        <td><font color="#990000"><strong><em>Review your data...</em></strong></font></td>
        <td colspan="2"> <font color="#990000"> <?php echo($validation?> </font></td>
      </tr>    
      <?php ?>
      <tr>
        <td width="26%"> <strong><em>First name:</em> </strong> </td>
        <td colspan="2"><input name="first_name" type="text" size="40" value="<?php echo("$first_name"?>"/>          </td>
      </tr>
      <tr>
        <td><strong><em>Last name:</em> </strong></td>
        <td colspan="2"><input name="last_name" type="text" size="40" value="<?php echo("$last_name"?>"/>
        </td>
      </tr>
      <tr>
        <td><strong><em>E-mail:</em></strong> </td>
        <td colspan="2"><input name="email" type="text" size="40" value="<?php echo("$email"?>"/>
        </td>
      </tr>
      <tr>
        <td colspan="3"><hr noshade></td>
      </tr>     
      <tr>
        <td><strong><em>Username:</em></strong> </td>
        <td width="23%"> <input name="username" type="text" size="20" value="<?php echo("$username"?>"/>  </td>
        <td width="51%"></td>
      </tr>      
      <tr>
        <td><strong><em>Password:</em></strong> </td>
        <td><input name="password" type="password" size="20" value="<?php echo("$password"?>"/>        </td>
        <td rowspan="2"></td>
      </tr>
      <tr>
        <td><strong><em>Confirm your password:</em></strong></td>
        <td><input name="password_conf" type="password" size="20" value="<?php echo("$password_conf"?>"/>        </td>
      </tr>      
      <tr>
        <td>&nbsp;</td>
        <td colspan="2">
        <input type="hidden" name="confirmed" value="false">
        <input name="image" TYPE="image" SRC="../img/bt_enviar.jpg" width="59" height="20" BORDER="0">
        </td>
      </tr>
    </form>
 </table>
   <br>
  <?php ?>
  <?php include 'p_banner.php'?>
  <p>&nbsp;</p>
</div>
</body>
</html>