<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 Project Type';} else { echo 'Add Project Type'; }?></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="">Projects</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">Add Type</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 Type';} else { echo 'Add Type'; }?></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 urldecode($_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">Enter Type<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>                                        
                                      	<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 } ?>     
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-12">
                            <div class="card card-topline-red">
                                <div class="card-head">
                                    <header>Project Types</header>
                                    <div class="tools">                                        
	                                    <a class="t-collapse btn-color fa fa-chevron-down" href="javascript:;"></a>
	                                    <a class="t-close btn-color fa fa-times" href="javascript:;"></a>
                                    </div>
                                </div>
                                <div class="card-body ">
                                    <div class="row p-b-20">
                                        <div class="col-md-12 col-sm-12 col-12">
                                            <!--<div class="btn-group">
                                                <button onclick="location.href = 'index.php?page=add_purchase_order';" id="addRow1" class="btn btn-info">
                                                    Add Purchase Order <i class="fa fa-plus"></i>
                                                </button>
                                            </div>-->
                                        </div>                                        
                                    </div>
                                    <?php /*if(isset($_REQUEST['success'])){ ?><div class="alert alert-success"><?php echo urldecode($_REQUEST['success']); ?></div></div><?php }*/ ?>
                                    <?php if(mysqli_num_rows($typeRs)>0) { ?>
                                    <table class="table table-striped table-bordered table-hover table-checkable order-column" style="width: 100%" id="example4">
                                        <thead>
                                            <tr>  
                                            	<th width="60%" align="left"> Type </th>                                               
                                                <th> Actions </th>
                                            </tr>
                                        </thead>
                                        <tbody>                                        	
											<?php	while($typeRec = mysqli_fetch_array($typeRs)) {	?>
                                            <tr class="odd gradeX">               
                                                <td><?php echo $typeRec['name']; ?></td>                                                        
                                                <td class="valigntop">
                                                    <div class="btn-group">
                                                        <button class="btn btn-xs deepPink-bgcolor dropdown-toggle no-margin" type="button" data-toggle="dropdown" aria-expanded="false"> Actions
                                                            <i class="fa fa-angle-down"></i>
                                                        </button>
                                                        <ul class="dropdown-menu pull-left" role="menu">     
                                                        	<li>
                                                                <a href="index.php?page=add_task_type&id=<?php echo $typeRec['id']; ?>">
                                                                    <i class="icon-docs"></i> Edit Type </a>
                                                            </li>                                                           
                                                            <li>
                                                                <a  onclick="return confirm('Are you sure to delete this item?');" href="index.php?page=add_task_type&action=delete&id=<?php echo $typeRec['id']; ?>">
                                                                    <i class="icon-docs"></i> Delete </a>
                                                            </li>                                                           
                                                        </ul>
                                                    </div>
                                                </td>
                                            </tr>
                                            <?php } ?>                                            
                                        </tbody>
                                    </table>                                    
                                    <?php } else { ?>
                                    	<div class="alert alert-danger">Sorry! No Results Found.</div>					        		
					        		<?php }	?> 
                                </div>
                            </div>
                        </div>
	</div>
</div>
