root/trunk/rms-web/index.php

Revision 4570, 2.5 kB (checked in by erijo, 2 years ago)

Undo r4567 since rms-web has not been replaced by licqweb.
Also fixed most of the images (they were broken) by copying them from
licqweb.

  • Property svn:eol-style set to native
Line 
1<?php
2include "check_session.php";
3include "config.php";
4include "rms.php";
5
6function printHeader()
7{
8  echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n" .
9    "\"http://www.w3.org/TR/REC-html40/loose.dtd\"><HTML>\n" . 
10    "<HEAD>\n" .
11    "<meta name=\"description\" content=\"\" >\n" .
12    "<meta name=\"author\" content=\"Jon Keating\">\n" .
13    "<meta name=\"keywords\" content=\"\" >\n" .
14    "<TITLE>Licq PHP Interface - Login</TITLE>\n" .
15    "</HEAD>\n". 
16    "<BODY>\n";
17}
18
19function printFooter()
20{
21  echo "\n</BODY></HTML>";
22}
23
24//----------------------------------------
25// Here is where we start the HTML coding
26//----------------------------------------
27 
28  printHeader();
29
30  // Logging in
31  $login_uin = $_POST["login_uin"];
32  $login_password = $_POST["login_password"];
33 
34  if (!empty($login_uin) && !empty($login_password))
35  {
36    $login_uin .= "\r\n";
37    $login_password .= "\r\n";
38     
39    if (!rmsLogin($login_uin, $login_password))
40    {
41      if (!empty($errmsg))
42      {
43        echo "<B><FONT color=\"red\">" . $errmsg . "</FONT></B><BR><BR>";
44      }
45
46      echo "UIN: &nbsp;&nbsp;&nbsp;&nbsp;\n";
47      echo "<INPUT type=\"text\" size=20 name=\"login_uin\" value=\"\"><BR><BR>\n";
48      echo "Password: &nbsp;&nbsp;&nbsp;&nbsp;\n";
49      echo "<INPUT type=\"password\" size=20 name=\"login_password\" value=\"\">\n";
50      echo "</DIV>\n";
51      echo "<BR><INPUT type=\"submit\" name=\"submit\" value=\"Login\">\n";
52      echo "</FORM>\n";
53      echo "</TD></TR></TABLE>\n";
54      echo "</CENTER>\n";
55     
56      printFooter();
57     
58      return;
59    }
60   
61    echo "<script>document.location.href='main.php'</script>";
62  }
63 
64  //if ((!empty($errmsg)) || empty($login_uin) || empty($login_password))
65  {
66    // Login failed or just loading this page
67    echo "<center>\n";
68    echo "<BR><BR><BR><BR><BR><BR>\n";
69    echo "<TABLE border=0><TR><TD align=\"center\">\n";
70    echo "<FORM method=\"POST\">\n";
71    echo "<DIV align=\"right\">\n";
72   
73    if (!empty($errmsg))
74    {
75      echo "<B><FONT color=\"red\">" . $errmsg . "</FONT></B><BR><BR>";
76    }
77
78    echo "UIN: &nbsp;&nbsp;&nbsp;&nbsp;\n";
79    echo "<INPUT type=\"text\" size=20 name=\"login_uin\" value=\"\"><BR><BR>\n";
80    echo "Password: &nbsp;&nbsp;&nbsp;&nbsp;\n";
81    echo "<INPUT type=\"password\" size=20 name=\"login_password\" value=\"\">\n";
82    echo "</DIV>\n";
83    echo "<BR><INPUT type=\"submit\" name=\"submit\" value=\"Login\">\n";
84    echo "</FORM>\n";
85    echo "</TD></TR></TABLE>\n";
86    echo "</CENTER>\n";
87  }
88 
89  printFooter()
90?>
Note: See TracBrowser for help on using the browser.