<script src="js/ajax.js" type="text/javascript"></script>
<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title"><?php echo 'Add Salary'; ?></div>
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.html">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="">Staff</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">Add Salary</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header>Admin Users</header>                                    
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	<?php if(isset($error) && $error!='') { ?> 
                                	<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } else if(isset($success) && $success!=''){ ?>                                		
                                		<div class="alert alert-success"><?php echo $success; ?></div>
                                	<?php } else if(isset($_REQUEST['success'])){ ?>                                		
                                		<div class="alert alert-success"><?php echo $_REQUEST['success']; ?></div>
                                	<?php } ?>
                                    
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0"  align="center">
							        <td colspan="3"><table width="100%" border="0" cellspacing="2" cellpadding="0" style="line-height:20px;">
							              <tr>
							                <td colspan="4"><span style="color:#F00;"><?php echo isset($error)?$error[0]:''; ?></span></td>
							              </tr>
							              <tr>
							                <td colspan="4" align="left" class="black-bold" style="font-size:13px;"><h5>Add User</h5></td>
							              </tr>
							              <form name="add_user_form" method="post" action="" class="form label-inline">
							                <tr>
							                  <td class="black-bold">User Name</td>
							                  <td class="black-bold">Password</td>
							                  <td>&nbsp;</td>
							                  <td>&nbsp;</td>
							                </tr>
							                <tr>
							                  <td class="black-bold"><input name="user_name" type="text" id="user_name" value="<?php echo isset($user_name)?$user_name:''; ?>" /></td>
							                  <td class="black-bold"><input name="user_password" type="password" id="user_password" value="" /></td>
							                  <td>
							                    
												<button class="btn btn-primary" type="submit" name="add_user">Add</button>
							                 </td>
							                  <td>&nbsp;</td>
							                </tr>
							              </form>
							              
							              <tr>
							                <td colspan="4" class="black-bold"><hr /></td>
							              </tr>
							              
							              <tr>
							                <td width="18%" class="black-bold"><strong>Admin Username</strong></td>
							                <td width="15%" align="left" class="black-bold"><strong>Change Password</strong></td>
							                <td width="7%">&nbsp;</td>
							                <td width="60%">&nbsp;</td>
							              </tr>
							              <?php while($row = mysqli_fetch_assoc($getAdmin)) { ?>
							              <form action="" method="post" name="form<?php echo $row['admin_id']; ?>">
							                <tr>
							                  <td class="black-bold"><?php echo $row['ad_username']; ?></td>
							                  <td><input type="password" value="" name="password<?php echo $row['admin_id']; ?>" /></td>
							                  <td>
											  <button class="btn btn-info" type="submit" name="submit_pass[]" value="Change">Change</button>
							                    <input type="hidden" value="<?php echo $row['admin_id']; ?>" name="admin_id[]" /></td>
							                  <td>
											  <button class="btn btn-default" type="submit" name="delete_user[]" value="Delete">Delete</button>&nbsp;&nbsp;
											  <button class="btn btn-primary" type="submit" name="access_control[]" value="Access Control">Access Control</button>
											  </td>
							                </tr>
							              </form>
							              <?php } ?>
							              <tr>
							                <td>&nbsp;</td>
							                <td>&nbsp;</td>
							                <td>&nbsp;</td>
							                <td>&nbsp;</td>
							              </tr>
							          </table></td>
							        </tr>
							      </table>
      
                                </div>
                            </div>
                        </div>
                    </div>
	</div>
</div>
