<?php 


$query="SELECT did,name FROM ".$prefix."department ORDER BY name ASC";


$departmentType=mysqli_query($linkid,$query);


?>

<div id="contentwrapper">
  <div class="main_content">
    <nav>
      <div id="jCrumbs" class="breadCrumb module">
        <ul>
          <li> <a href="#"><i class="icon-home"></i></a> </li>
          <li> <a href="#">Account Manager</a> </li>
          <li> <a href="#">User Group</a> </li>
        </ul>
      </div>
    </nav>
    <div class="row-fluid">
      <div class="span6">
        <?php


		          	if(isset($_POST['submit']))


						{


						


						$code=$_POST['ucode'];


						$name=$_POST['gname'];	


						//echo $code.$name.$prefix."Hello";				


						


						$query = "INSERT INTO ".$prefix."usergroup values (null,'$code','$name',1)";


						$result=mysqli_query($linkid,$query) or die(mysqli_error());		


						


						if($result){


						?>
        <div class="alert alert-success"> <a data-dismiss="alert" class="close">x</a> <strong>User Group</strong> is saved. </div>
        <?php 


						


						 }


						}


							


					 //unlink($filename1);


					 


						 unset($_POST);


						 $_POST['submit']='';


						 $_POST='';


					?>
        <h3 class="heading">New User Group</h3>
        <form class="form_validation_reg" id="form_validation_reg" action=""  method="post">
          <div class="formSep">
            <div class="row-fluid">
              <div class="span4">
                <label>Code</label>
                <input type="text" name="ucode" id="ucode" class="span12" />
              </div>
              <div class="span4">
                <label>Group Name <span class="f_req">*</span></label>
                <input type="text" name="gname" id="gname" class="span12" />
              </div>
            </div>
          </div>
          <div class="form-actions">
            <input class="btn btn-inverse" name="submit" type="submit" value="Save Form" />
            <button class="btn">Cancel</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
