<?php session_start();
      include('open_connection.php');
      include('header.php');  ?>

<html>
<link href='blue/style.css' rel='stylesheet' type='text/css' />

<style>
.myButton {
	-moz-box-shadow:inset 0px 1px 3px 0px #91b8b3;
	-webkit-box-shadow:inset 0px 1px 3px 0px #91b8b3;
	box-shadow:inset 0px 1px 3px 0px #91b8b3;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #768d87), color-stop(1, #6c7c7c));
	background:-moz-linear-gradient(top, #768d87 5%, #6c7c7c 100%);
	background:-webkit-linear-gradient(top, #768d87 5%, #6c7c7c 100%);
	background:-o-linear-gradient(top, #768d87 5%, #6c7c7c 100%);
	background:-ms-linear-gradient(top, #768d87 5%, #6c7c7c 100%);
	background:linear-gradient(to bottom, #768d87 5%, #6c7c7c 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#768d87', endColorstr='#6c7c7c',GradientType=0);
	background-color:#768d87;
	-moz-border-radius:5px;
	-webkit-border-radius:5px;
	border-radius:5px;
	border:1px solid #566963;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:arial;
	font-size:12px;
	font-weight:bold;
	padding:4px 20px;
	text-decoration:none;
	text-shadow:0px -1px 0px #2b665e;
}
.myButton:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #6c7c7c), color-stop(1, #768d87));
	background:-moz-linear-gradient(top, #6c7c7c 5%, #768d87 100%);
	background:-webkit-linear-gradient(top, #6c7c7c 5%, #768d87 100%);
	background:-o-linear-gradient(top, #6c7c7c 5%, #768d87 100%);
	background:-ms-linear-gradient(top, #6c7c7c 5%, #768d87 100%);
	background:linear-gradient(to bottom, #6c7c7c 5%, #768d87 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6c7c7c', endColorstr='#768d87',GradientType=0);
	background-color:#6c7c7c;
}
.myButton:active {
	position:relative;
	top:1px;
}
table.imagetable {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #999999;
	border-collapse: collapse;
}
table.imagetable th {
	background:#b5cfd2 url('cell-blue.jpg');
	border-width: 1px;
	padding: 5px;
	border-style: solid;
	border-color: #999999;
}
table.imagetable td {
	background:#dcddc0 url('cell-grey.jpg');
	border-width: 1px;
	padding:5px;
	border-style: solid;
	border-color: #999999;
}

</style>
<body bgcolor="#FFFF99">

<table width="100%">
<tr>
<td align="left">
<?php
echo 'Welcome: ' . $_SESSION['username'];
?>
</td>
<td align="right">
<a href="staff_logout.php"><img src="images/logout3.gif"></a>
</td>
</tr>
</table>

<h2 align="center">ADMIN PAGE</h2>

<form class="form-horizontal" method="post">
                        <fieldset>
                            <div class="control-group">
                                <label class="control-label" for="input01">UserName:</label>
                                <div class="controls">
                                    <input type="text" name="username" class="input-xlarge" id="input01"  placeholder="UserName">
 
                                </div>
                            </div>
 
                            <div class="control-group">
                                <label class="control-label" for="input01">Password:</label>
                                <div class="controls">
                                    <input type="text" name="user_password" class="input-xlarge" id="input01"  placeholder="Password">
 
                                </div>
                            </div>
                                                                                                                <div class="control-group">
                                <label class="control-label"  for="input01">Section :</label>
                                <div class="controls">
                                    <input type="text"  name="user_section" class="input-xlarge" id="input01"  placeholder="Staff ID:">
 
                                </div>
                            </div>
 
                            <div class="control-group">
                                <label class="control-label"  for="input01">Section Name :</label>
                                <div class="controls">
                                    <input type="text"  name="section_name" class="input-xlarge" id="input01"  placeholder="FirstName">
 
                                </div>
                            </div>
 
                                <div class="control-group">
                                <label class="control-label" for="input01">User Access:</label>
                                <div class="controls">
                                    <select class="span2" name="type">
                                        <option></option>
                                        <option>Admin</option>
                                        <option>User</option>
                                    </select>
 
                                </div>
                            </div>
 
                            <div class="control-group">
 
                                <div class="controls">
                                    <button class="btn btn-primary btn-large" name="save"><i class="icon-save icon-large"></i>&nbsp;Save</button>
 
                                </div>
                            </div>
 
                        </fieldset>
                    </form>
                </div>
            </div>
 
            <?php
                                                include('open_connection.php');
                if (isset($_POST['save'])){
 
                    $username=$_POST['username'];
                    $user_password=$_POST['user_password'];
                    $user_section=$_POST['user_section'];
                    $section_name=$_POST['section_name'];
                    $user_access=$_POST['user_access'];
                    
                    mysql_query("insert into user (User_Name,user_Password,user_section,section_name,user_access)
                        values ('$username','$user_password','$user_section','$section_name','$user_access')
                        ") or die(mysql_error());
                    header('location:user_account.php');
                }
            ?>
        </div>   
 
        <?php include('footer.php');?>
 