+++ /dev/null
-<?php
-// vim: smarttab tabstop=8 shiftwidth=2 expandtab
-//==============================================================
-//
-// login screen management
-//
-//==============================================================
-include_once "subrou.php";
-include_once "unienv.php";
-include_once "unilng.php";
-include_once "gesdis.php";
-include_once "gessql.php";
-
-//==============================================================
-//
-// To display the login screen
-//
-//==============================================================
-function login()
-
-{
-$STR = <<<EOT
-
-<table border="0" align="center" width="60%" cellpadding="0" cellspacing="0">
- <tr>
- <td align="center">
- <FONT SIZE=+2><STRONG>
- <span class="translatable" trkey="Authentication">Authentication</span>
- </STRONG></FONT>
- </td>
- </tr>
- <tr>
- <td align="center" bgcolor="#000000">
- <table width="100%" cellpadding="0" cellspacing="1" border="0">
- <tr>
- <td bgcolor="#FFFFFF" align="right">
- <form method="post"
- action="lvllog.php"
- enctype="application/x-www-form-urlencoded"
- name="login">
- <table align="center" border="0" cellspacing="5" cellpadding="0">
- <tr>
- <td align="left" nowrap="nowrap"><span class="translatable" trkey="Email">Email</span><span>:</span></td>
- <td>
- <input tabindex="1" type="text" name="email" size="40" onchange="" />
- <select id="first-choice" onchange="updateTranslations()">
- <option value="en">English</option>
- <option value="fr">Francais</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td align="left" nowrap="nowrap"><span class="translatable" trkey="Password">Password</span><span>:</span></td>
- <td>
- <input tabindex="2" type="password" name="passwd" size="40" id="myInput" />
- <input type="checkbox" onclick="showpass()">
- <span class="translatable" trkey="Show" >Show</span>
- </td>
- </tr>
- </table>
-
- <table width="100%" cellpadding="0" cellspacing="1" border="0">
- <tr>
- <td align="center" colspan="2">
- <input type="hidden" name="action" value="login" />
- <table>
- <tr>
- <td align="center">
- <input tabindex="3" type="submit" name="loginbutton" value="Login"
- class="translatable" trkey="Login" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </tr>
- </table>
- </td>
- </tr>
- </table>
-<br>
-<br>
-
-EOT;
-
-return $STR;
-}
-
-//==============================================================
-//
-// To display login screen body
-//
-//==============================================================
-function body()
-
-{
-global $isadmin;
-
-$start=starthtml("translations");
-$stop=endhtml();
-$top=topper($isadmin,NULL,"lvllog");
-$footer=footer("lvllog");
-$login=login();
-
-$STR = <<<EOT
-$start
-$top
-$login
-$footer
-$stop
-EOT;
-
-return $STR;
-}
-
-if ($_SERVER["REQUEST_METHOD"] == "POST") {
- $pass=$_POST["passwd"];
- $logname=$_POST["email"];
- $dbsql=sql_connect();
- $isok=sql_checkpassword($dbsql,$logname,$pass);
- sql_close($dbsql);
- switch ($isok) {
- case false : //trouble report
- echo "<script>";
- echo "alert('wrong username or password. Please try again.');";
- echo "</script>";
- break;
- default :
- header('Location: lvlmai.php');
- break;
- }
- }
-
-//display main screen
-echo body();
-?>
-
-
-