<?php include 'header.php'; ?>

<?php include 'sidebar.php'; ?>

<div id="page-wrapper">

    <div class="container-fluid">

		<br/>

         <div class="row">

             <div class="col-lg-12">
				<div class="panel panel-default dash">
					<div class="panel panel-primary">
						<div class="panel-heading">
							<h2 class="sub-header">
								<i class="fa fa-graduation-cap" aria-hidden="true"></i> Rank List
							</h2>
						</div>
						<!-- /.panel-heading -->
						<div class="panel-body">
							<div class="table-responsive">
							
								<div class="col-md-12">

									 <form id="editRank" method="post" enctype="multipart/form-data" class="form-horizontal" name="editRank">
										
										<?php $csrf->echoInputField(); ?>
										
										<fieldset>
											
										<?php echo editRank($_GET['id']); ?>

										<!-- Button -->
										<div class="form-group">
											<label class="col-md-9 control-label" for="singlebutton"></label>
											<div class="col-md-3">
												<input type="submit" name="editRank" class="btn save btn-primary" value="<?php echo lang('UPDATE_INFO');?>" />
											</div>
										</div>

										</fieldset>
									</form>
									<?php
	
									  if(isset($_POST['editRank']))
									  {
										updateRank($_GET['id'],mysqli_real_escape_string($conection, $_POST['name']), mysqli_real_escape_string($conection, $_POST['ranks']), mysqli_real_escape_string($conection, $_POST['r_leader']));
									  }

									?>

								</div>    
							</div>
						</div>
					</div>
				</div>
			</div>
        </div>
        <!-- /.row -->

<?php include 'copyright.php'; ?> 

    </div>
    <!-- /.container-fluid -->

</div>
<!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<?php include 'footer.php'; ?>