<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 if($isEdit){ echo 'Edit Staff';} else { echo 'Add Staff'; }?></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>
                                <?php if(isset($_REQUEST['id'])){ ?>
                                	<li><a class="parent-item" href="index.php?page=view_staff&id=<?php echo $_REQUEST['id']; ?>">Staff</a>&nbsp;
                                <?php } else { ?>
                                	<li><a class="parent-item" href="index.php?page=manage_staff">Manage Staff</a>&nbsp;
                                <?php }?>
                                <i class="fa fa-angle-right"></i></li><li class="active">Add Staff</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><?php if($isEdit){ echo 'Edit Staff';} else { echo 'Add Staff'; }?></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 } ?>
                                	                                	
                                    <form action="" id="form_staff_add" class="form-horizontal" method="post" enctype="multipart/form-data">
                                        <div class="form-body">
                                        	                                        	 
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Staff Name<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <input name="name" type="text" id="name" data-required="1" class="form-control" value="<?php if(isset($_POST['name'])) { echo htmlentities(($_POST['name']), ENT_QUOTES); } else if(isset($resEdit['name']) && $resEdit['name']!=''){ echo $resEdit['name'];} ?>"/>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Email Address<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                                                                                                                                   
                                                        <input name="email" type="text" id="email" class="form-control" value="<?php if(isset($_POST['email'])) { echo htmlentities(($_POST['email']), ENT_QUOTES); } else if(isset($resEdit['email']) && $resEdit['email']!=''){ echo $resEdit['email'];} ?>" placeholder="Email Address" />
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Phone Number<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <input name="phone" type="text" id="phone" data-required="1" class="form-control" value="<?php if(isset($_POST['phone'])) { echo htmlentities(($_POST['phone']), ENT_QUOTES); } else if(isset($resEdit['phone']) && $resEdit['phone']!=''){ echo $resEdit['phone'];} ?>"/>
                                                </div>
                                            </div>                                            
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Address<span class="required"> * </span></label>
                                                <div class="col-md-4">        
                                                	<textarea name="address" id="address"><?php if(isset($_POST['address'])) { echo htmlentities(($_POST['address']), ENT_QUOTES); } else if(isset($resEdit['address']) && $resEdit['address']!=''){ echo $resEdit['address'];} ?></textarea>                                            
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Designation<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <input name="designation" type="text" id="designation" data-required="1" class="form-control" value="<?php if(isset($_POST['designation'])) { echo htmlentities(($_POST['designation']), ENT_QUOTES); } else if(isset($resEdit['designation']) && $resEdit['designation']!=''){ echo $resEdit['designation'];} ?>"/>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Salary<span class="required"> * </span></label>
                                                <div class="col-md-4">                                                    
                                                    <input name="salary" type="text" id="salary" data-required="1" class="form-control" value="<?php if(isset($_POST['salary'])) { echo htmlentities(($_POST['salary']), ENT_QUOTES); } else if(isset($resEdit['salary']) && $resEdit['salary']!=''){ echo $resEdit['salary'];} ?>"/>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Upload Photo</label>
                                                <div class="col-md-4">        
                                                	<input type="file" name="photo" id="photo">                                            
                                                </div>                                                
                                            </div>
                                            <?php if(isset($resEdit['image']) && $resEdit['image']!=''){ ?>
                                            <div class="form-group row">
                                            	<label class="control-label col-md-3"></label>
		                                        <div class="col-md-4">
		                                        	<img src="<?php echo STAFF_IMG_URL.$resEdit['image']; ?>" style="width:150px;" >
		                                        	<a class="t-close btn-color fa fa-times" href="index.php?page=add_staff&action=del_image&id=<?php echo $resEdit['id']; ?>"></a>
		                                        </div>
		                                    </div>
		                                    <?php } ?>
                                        </div>                                        
                                      	<div class="form-group">
                                            <div class="offset-md-3 col-md-9">
                                            	<?php if($isEdit){ ?>
                                            		<button type="submit" name="update" class="btn btn-info">Update</button>
                                            	<?php } else { ?>
                                            		<button type="submit" name="add" class="btn btn-info">Submit</button>
                                            	<?php } ?>                                                
                                                <!--<button type="button" class="btn btn-default">Cancel</button>-->
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
	</div>
</div>
