Debian Codegraph @

contrib/mrtg_php_portal/www/login.php

raw
1 <html>
2 <script>
3 <!--
4 function setfocus() { document.login.form_password.focus(); }
5 -->
6 </script>
7
8
9 <head>
10 <meta http-equiv="Content-Language" content="en-us">
11 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
12 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
13 <meta name="ProgId" content="FrontPage.Editor.Document">
14 <title>MRTG Admin login</title>
15 </head>
16
17 <body onLoad=setfocus()>
18 <p><b><u>MRTG Admin login</u></b></p>
19 <FORM name=login ACTION=login.php METHOD=POST>
20 <table border="0" width="100%">
21 <tr>
22 <td width="12%">Admin Password:</td>
23 <td width="88%"><input type="password" name="form_password" size="20" tabindex="1"></td>
24 </tr>
25 </table>
26 <p><input type="submit" value="Login" name="B1" tabindex="2"></p>
27 </form>
28
29 </body></html>
30
31 <?php
32
33 // Replace this path with the path to the config.inc.php file
34 include ("e:\\mrtg\\conf\\config.inc.php");
35
36 if ($pass_wrong == "1"){
37 echo "Wrong password !!!<br>";
38 }
39 if($REQUEST_METHOD == "POST"){
40 if($form_password){
41 if($form_password == $admin_password1 or $form_password == $admin_password2){
42 ?>
43 <script language="JavaScript">
44 location="./admin.php";
45 </script>
46 <?php
47 }else{
48 ?>
49 <script language="JavaScript">
50 location="./login.php?pass_wrong=1";
51 </script>
52 <?php
53 }
54 }
55 }
56 ?>