<?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-picture-o" aria-hidden="true"></i> Photos
							</h2>
						</div>
						<!-- /.panel-heading -->
						<div class="panel-body">
							<div class="table-responsive">
							
								<div class="col-md-12">

									 <form id="editPhotos" method="post" enctype="multipart/form-data" class="form-horizontal" name="editPhotos">
										
										<?php $csrf->echoInputField(); ?>
										
										<fieldset>
 
 										<!-- Text input-->
											<div class="form-group">
												<label class="col-md-2 control-label" for="category"><?php echo lang('CATEGORY');?></label>
												<div class='col-md-6'>
													<select class="form-control input-md" name="category"> 
													<option value="Other">Other</option>
													<option value="Activites">Activites</option> 
													</select>
												</div>
											</div> 
											
										<?php echo editPhotos($_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="editPhotos" class="btn btn-primary" value="<?php echo lang('UPDATE_INFO');?>" />
											</div>
										</div>

										</fieldset>
									</form>
									<?php
	
									  if(isset($_POST['editPhotos']))
									  {
										updatePhotos($_GET['id'],$_POST['category'],$_FILES['image'],$_POST['title']);
									  }

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


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

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

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

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