<?php



//collect user header privileges
$privileges = get_user_group_header_menu_privileges($user_id);

?>



<div class="navbar navbar-default" role="navigation">
		<!--<div class="container">-->
			<div class="navbar-header">
				<button class="navbar-toggle collapsed" data-target=".navbar-collapse" data-toggle="collapse" type="button">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				</button>

			</div>
			<div class="navbar-collapse collapse" style="height: 1px;">

                <!-- header menu -->
                <ul class="nav navbar-nav">

                <!-- Print  The Function of header menu here -->

                <?php echo header_menu($privileges); ?>



				</ul>

                <!-- /end of function nav bar /header menu -->


				<ul class="nav navbar-nav navbar-right">
                	<!-- <li class="dropdown messages-dropdown">

                      <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                         <i class="glyphicon glyphicon-envelope"></i> Messages  <span class="badge"> 7 </span> <b class="caret"></b>
                      </a>
                      <ul class="dropdown-menu">
                          <li class="dropdown-header">7 New Messages </li>
                          <li class="message-preview">
                              <a href="#">
                                  <span class="avatar"> <img src="http://placehold.it/50x50"></img></span>
                                  <span class="name">John Smith:</span>
                                  <span class="message"> Hey there, I wanted to ask you something...</span>
                                  <span class="time"><i class="glyphicon glyphicon-time"></i>4:34 PM </span>
                              </a>
                          </li>
                          <li class="divider"></li>
                          <li><a href="#">   View Inbox <span class="badge">7</span></a></li>
                      </ul>

                  </li> -->



                  <!-- <li class="dropdown alerts-dropdown">

                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="glyphicon glyphicon-bell"></i>

                         Alerts

                        <span class="badge">

                            3

                        </span>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="#">

                                Default

                                <span class="label label-default">

                                    Default

                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="#">

                                Primary

                                <span class="label label-primary">

                                    Primary

                                </span>
                            </a>
                        </li>
                        <li></li>
                        <li></li>
                        <li></li>
                        <li>
                            <a href="#">

                                Danger

                                <span class="label label-danger">

                                    Danger

                                </span>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">

                                View All

                            </a>
                        </li>
                    </ul>

                </li>


-->


                <li class="dropdown user-dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                      <i class="glyphicon glyphicon-user"></i> Welcome,  <?php echo get_staff_name($user_id); ?>  <b class="caret"></b> </a>


                  <ul class="dropdown-menu">


										<?php if(is_admin($user_id))
										{ ?>
										  <li>
												<a href="#" data-toggle="modal" data-target="#myModalC"><i class="glyphicon glyphicon-lock"></i> Controls </a>

											</li>
											<?php
										} ?>
												<li>
											  <li class="divider"></li>
                      <li>
                          <a href="#" data-toggle="modal" data-target="#myModal"><i class="glyphicon glyphicon-cog"></i> Settings </a>
                      </li>
                      <li class="divider"></li>
                      <li>
                          <a href="landing.php?act=logout"><i class="glyphicon glyphicon-off"></i> Logout

                          </a>
                      </li>
                  </ul>

              	</li>


				</ul>
			</div>
		<!--</div>-->
</div>



<!-- modal for changing password s -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel"> <img src="images/change_password.png" /> &nbsp;Change Password</h4>
      </div>
      <div class="modal-body">
        <form>
          <div id="feedback_message" class="text-center text-success"></div><!-- feed back message if successful or not -->
          <div class="form-group">
            <label for="recipient-name" class="control-label">Old Password</label>
            <input type="password" class="form-control" id="old_password" name="old_password" required>
            <span class="error_msg_old_pw help-block text-danger"> This field cannot be blank</span>
          </div>


           <div class="form-group">
            <label for="recipient-name" class="control-label">New Password</label>
            <input type="password" class="form-control" id="new_password" name="new_password" required>
            <span class="error_msg_new_pw help-block text-danger"> This field cannot be blank</span>
          </div>

           <div class="form-group">
            <label for="recipient-name" class="control-label">Confirm New Password</label>
            <input type="password" class="form-control" id="confirm_new_password" id="confirm_new_password" required>

             <span class="error_msg_cm_pw help-block text-danger">Confirmed Password doesnt match</span>
          </div>

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-success change_password" >Update</button>
      </div>


      <div id="flash" class="label label-success pull-right"></div>
      <div style="height:20px;"></div>
    </div>
  </div>
</div>







<!-- modal for controls  -->
<div class="modal fade" id="myModalC" tabindex="-1" role="dialog" aria-labelledby="myModalLabelControls" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabelControls"> &nbsp;Switch Controls</h4>
      </div>
      <div class="modal-body">
        <form>
          <div id="feedback_message2" class="text-center text-success"></div><!-- feed back message if successful or not -->



           <div class="form-group">
            <label for="recipient-name" class="control-label">Staff Login Control</label>


						 <table class="table  display table-bordered table-hover table-striped" style="font-size:12px;" width="100%" cellspacing="0">
						<thead>
						<tr>
						<th>Activities</th>
						<th><label class="label label-info pull-right"> Controls</label> </th>
					  </tr></thead>
		  			<tbody>

						 <tr>
							<td width="70%">Lecturer Logins  </td>
						 <td width="30%">

									 <div class="btn-group" data-toggle="buttons">
									   <label class="btn btn-success btn-small">
									   		 <input id="option" value="1" type="radio" name="activate" autocomplete="off">Activate

									   </label>

									   <label class="btn btn-success btn-small active">
									   		 <input id="option" value="0" type="radio" name="activate" autocomplete="off" checked=""> Block

									   </label>

									 </div>

								 </td>
							 </tr/>
						 </tbody>
					 </table>


          </div>


        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-success change_control" >Save</button>
      </div>


      <div id="flash2" class="label label-success pull-right"></div>
      <div style="height:20px;"></div>
    </div>
  </div>
</div>
