authentication.php

Go to the documentation of this file.
00001 <?php
00002 /****************************************************************************
00003  * Util_PrintAuthentication                                                 *
00004  ****************************************************************************
00005  *                                                                          *
00006  * Print Authentication screen, this is the first screen shown to the user  *
00007  *                                                                          *
00008  ***************************************************************************/
00009 
00010 function Util_PrintAuthentication()
00011 {
00012 /*
00013         // To redirect the user after login completion (with Apache):
00014         $schema = "http".(isset($_GET['HTTPS'])?($_GET['HTTPS'] ==  "on" ? "s" : ""):"")."://";
00015         $orig_dest_url = str_replace('URL=', $schema, strstr(str_replace('%3f', '?',$_SERVER['QUERY_STRING']),'URL'));
00016 
00017         $orig_dest_ip = gethostbyname(strtok((isset($_GET['URL'])?$_GET['URL']:""), '/?'));
00018         $orig_dest_url_with_ip = preg_replace('/^(http:\/\/)([^\\\]*)\\/(.*)/', '${1}'.$orig_dest_ip.'/${3}', $orig_dest_url );
00019 */
00020 ?>
00021 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00022 <html xmlns="http://www.w3.org/1999/xhtml">
00023 <head>
00024 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
00025 <title>Authentication</title>
00026 <style type="text/css">
00027 <!--
00028 .Style12 {font-size: 16px}
00029 .Style15 {font-family: "Century Gothic"; font-size: 12px; }
00030 .Style16 {font-family: "Century Gothic"; font-size: 16px;  font-weight: bold;}
00031 .Style19 {
00032         font-family: "Century Gothic";
00033         font-size: 14px;
00034 }
00035 -->
00036 </style>
00037 </head>
00038 
00039 <body>
00040 <table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="" bordercolordark="" bgcolor="#FFFFFF">
00041   <tr>
00042     <th height="503" valign="top" scope="col"><table width="760" height="366" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="" bordercolorlight="" bordercolordark="">
00043       <tr>
00044         <th height="96" align="left" valign="top">Authentication</th>
00045         </tr>
00046       <tr>
00047         <th align="center" valign="top"><span class="Style12"><b>
00048           <br />
00049           <span class="Style19"><h1 class="Style19">
00050           <?php echo (isset($_SERVER['URL'])?$_SERVER['URL']:""); ?>
00051         <span class="Style16">WELCOME!<br /><form action="<?php echo (isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].$_SERVER['PHP_SELF'] ?>" method=post></span><br />
00052 <?php
00053         /*
00054                 See comment above.
00055 ?>
00056             <input type="hidden" name="orig_dest_url" value="<?php echo $orig_dest_url;?>" />
00057           <input type="hidden" name="orig_dest_ip" value="<?php echo $orig_dest_ip;?>" />
00058           <input type="hidden" name="orig_dest_url_with_ip" value="<?php echo $orig_dest_url_with_ip;?>" />
00059  <?php
00060           */
00061 ?>
00062           </h1>
00063             <table border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#ffffff">
00064               <tr valign="middle">
00065                 <td width="61" align="right"><span class="Style15"> Username: </span></td>
00066                 <td width="123" align="right"><input type="text" name="username" length="206" width="20" value="" />                </td>
00067               </tr>
00068               <tr valign="middle">
00069                 <td align="right"><span class="Style15"> Password:</span></td>
00070                 <td align="left"><input name="password" type="password" value="" width="20" length="206" />                </td>
00071               </tr>
00072               <tr valign="middle">
00073                 <td colspan="2" align="center"><input name="login" type="submit" value="Send" />                </td>
00074               </tr>
00075               </form>
00076           </table>
00077           <br /></th>
00078                 <tr><td>
00079                 <tr><td align=center>
00080                  </tr>
00081       <tr><td>&nbsp;</tr>
00082     </table></th>
00083   </tr>
00084 </table>
00085 <br />
00086 </body>
00087 </html>
00088 <?php
00089 }
00090 ?>

Generated on Sat Nov 22 04:00:37 2008 for NuFW by  doxygen 1.4.7