linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file login.php

Documentation is available at login.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage admin
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. include_once("../config/define.php");
  12. include_once("../config/server.php");
  13. include_once("../lib/no_cache.php");
  14. include_once('../languages/' . LANGUAGE . '/lang_common.'. CHARSET .'.php');
  15. include_once("../class/system/class." . SQL . ".php");
  16.  
  17. $sql_entity = SQL;
  18. $sql_object = new $sql_entity;
  19. $sql_object->DBInitialise();
  20. $sql_object->DBConnexion();
  21.  
  22. include_once(SQL . ".inc.php");
  23. // ////////////////////////////////////
  24. // TENTATIVE D'AUTHENTIFICATION
  25. // ////////////////////////////////////
  26. if (isset($_POST['valid'])) {
  27.     include_once("../lib/functions_auth.php");
  28.  
  29.     $auth_res = AuthenthificationProcess($_POST['login'], $_POST['password'], 'ADMIN');
  30.     if ($auth_res === true) {
  31.         header("Location: index.php");
  32.     } 
  33. } 
  34.  
  35. ?>
  36.  
  37. <?php
  38. echo '<?xml version="1.0" encoding="' . CHARSET . '"?>' . END_LINE;
  39. ?>
  40. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  41.  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  42. <html xmlns="http://www.w3.org/1999/xhtml">
  43. <head>
  44. <title><?php echo $GLOBALS['lang']['header']['title']; ?></title>
  45. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>" />
  46. <meta http-equiv="content-language" content="<?php echo LANGUAGE; ?>" />
  47. <link rel="icon" type="image/gif" href="../gfx/<?php echo THEME_ADMIN; ?>/images/admin/favicon.gif" />
  48. <link type="text/css" rel="StyleSheet" href="../gfx/<?php echo THEME_ADMIN; ?>/css/admin_common.css" />
  49. <link type="text/css" rel="StyleSheet" href="../gfx/<?php echo THEME_ADMIN; ?>/css/admin_login.css" />
  50. </head>
  51. <body>
  52. <div id="content_auth">
  53.     <h1 style="display:none;"><?php echo $lang['divers']['auth']; ?></h1>
  54.     <img src="../gfx/<?php echo THEME_ADMIN; ?>/images/admin/auth_logo.png" id="logo" alt="logo" />
  55.     <div id="title">
  56.         <p><?php echo $lang['divers']['title_login']; ?></p>
  57.     </div>
  58.     <div id="auth">
  59.         <p class="error_auth">
  60.         <?php
  61.         if(isset($auth_res)) echo $auth_res;
  62.         ?>
  63.         </p>
  64.     <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
  65.         <div id="formu">
  66.             <label for="login"><?php echo $lang['divers']['login']; ?> : </label>
  67.             <input type="text" maxlength="20" class="loginfield" name="login" id="login" /><br /><br />
  68.             <label for="password"><?php echo $lang['divers']['password']; ?> : </label>
  69.             <input type="password" maxlength="20" class="loginfield" name="password" id="password" />
  70.             <div class="validation">
  71.             <input type="submit" value="<?php echo $GLOBALS['lang']['btn']['valid'] ?>" size="15" name="valid" id="valid" class="button" />
  72.             </div>
  73.         </div>
  74.     </form>
  75.     </div>
  76.     <p class="bottom">
  77.     <?php echo $lang['divers']['auth_mess1']; ?>
  78.     </p>
  79.     <p class="bottom">
  80.     <?php echo $lang['divers']['auth_mess2']; ?>
  81.     <a href="mailto:<?php echo SITE_CITY_MAIL; ?>" class="emphase"><?php echo SITE_CITY_MAIL; ?></a>
  82.     </p>
  83. </div>
  84. </body>
  85. </html>

Documentation generated on Sat, 08 Nov 2008 14:53:06 +0100 by phpDocumentor 1.4.1