root/EMS/edituser.php

Revision 2, 1.2 kB (checked in by evilbunny, 2 years ago)

Initial import

Line 
1 <?
2     require_once("common.php");
3
4     if($_SESSION['_config']['access'] < 90)
5     {
6         header("location: login.php");
7         exit;
8     }
9
10     $user = trim($_REQUEST['user']);
11     $secret = trim($_REQUEST['secret']);
12
13     if($_POST['process'])
14     {
15         $fp = @fsockopen($hostname, $hostport);
16         if(!$fp)
17             die("Please contact your system administrator as the server has gone missing.");
18         fputs($fp, "adduser|$user|$secret\n");
19         fclose($fp);
20         header("location: users.php");
21         exit;
22     }
23
24     include_once("header.php");
25 ?>
26 <div class="bodytext" style="padding:12px;" align="justify">
27     <p>Please enter the username and shared secret below for a new user account.</p>
28     <form method="post" action="<?=$_SERVER['REQUEST_URI']?>">
29         <label for="username" style="width:75px;float:left;clear:left;">Username:</label> <input type="text" name="username" value="<?=$user?>" readonly disabled><br />
30         <label for="secret" style="width:75px;float:left;clear:left;">Secret:</label> <input type="text" name="secret" value="<?=$secret?>"><br />
31         <label for="process" style="width:75px;float:left;clear:left;">&nbsp;</label> <input type="submit" value="Update"><br />
32         <input type="hidden" name="process" value="1">
33     </form>
34 </div>
35 <? include_once("footer.php"); ?>
36
Note: See TracBrowser for help on using the browser.