<?php

	include("template_top.php");
?>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>

			
					<!-- Main content -->
					<section class="content">
					
						<div class="container-fluid">
						
						
						<div id="new_project" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
            <div class="modal-dialog"> 
               <div class="modal-content modal-md">  
             
                  <div class="modal-header"> 
                     <h4 class="modal-title" id='head'>
                     <i class=""></i> New Project
                     </h4> 
                 
                  </div> 
                       <form method="POST" id='proj_form'  > 
 <div class="modal-body">

   
    <div class="form-horizontal">
        
        <div class="form-group" id="form-login">
            <div class="col-sm-12">
             <div id="retCode2">
               <div class="alert alert-success" id="suc_msg2">
               <h4><i class="fa fa-check"></i> Data successfully added.</h4>
             </div>
             <div class="alert alert-danger" id="err_msg2">
               <h4><i class="fa fa-times"></i> Data failed to add.</h4>
             </div>
             </div>
             </div>
        </div>
         <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Proposed Project:</label>
          <div class="col-sm-8">
           <select type="text" class="form-control input-sm" style="text-transform:capitalize" autocomplete="off" name="p_type" id="p_type" onchange="div_field()" required/>
          <option id="p_typ"></option>
          <option value="1">Building</option>
          <option value="2">House</option>
          <option value="3">Highways</option>
          <option value="4">Grand Stand</option>
          <option value="5">Covered Court</option>
          </select>
          </div>
        </div>
      <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Project Name:</label>
          <div class="col-sm-8">
            <input class="form-control" style="text-transform:capitalize" id="" name="pname" type="text"  required>
          </div>
        </div>
   
      <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Location:</label>
          <div class="col-sm-8">
            <textarea class="form-control" style="text-transform:capitalize" id="" name="location" type="text"  required></textarea>
          </div>
        </div> 

      <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Cost:</label>
          <div class="col-sm-6">
            <input class="form-control" style="text-align:right" id="cc" name="cost" type="text" placeholder="Php.">
          </div>
        </div>

      <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Starting Date:</label>
          <div class="col-sm-8">
            <input class="form-control"  id="" name="sdate" type="date"  required>
          </div>
        </div>

         <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Deadline:</label>
          <div class="col-sm-8">
            <input class="form-control"  id="" name="deadline" type="date"  required>
          </div>
        </div>

        <div class="form-group" id="form-login">
          <label class="col-sm-4 control-label">Foreman:</label>
          <div class="col-sm-8">
            <select class="form-control"  id="tid" name="tid" type="text" onchange="mem_list()"  required>
            <option></option>
            <?php
            include '../includes/db.php';
              $pos_query = mysqli_query($conn,"SELECT *,Concat(lastname,', ',firstname,' ',midname) as name FROM project_team left join employee on project_team.eid = employee.eid where pio='1' order by name ASC");
              while($pos_row = mysqli_fetch_assoc($pos_query)){
             ?>
            <option style="text-transform:capitalize" value="<?php echo $pos_row['tid'] ?>"><?php echo $pos_row['name'] ?></option>
            <?php } ?>
            </select>
          </div>
        </div>

        
            
            <div id="mem-field"></div>
            <div id="div-field"></div>

       
    
    </div>
   </div>
          <div class="modal-footer">
               <button type="submit" class="btn btn-info btn-sm" id="btn_sub"><i class="fa fa-save"></i> Save</button>
                <button data-dismiss="modal" class="btn btn-info btn-sm"><i class="glyphicon glyphicon-close"></i>Close</button>
            </form>
                     </div>
                     </div> 
            </div>
          </div>
		  
		  
		<!-- -->
		  
		<div class="modal fade" id="myModal" role="dialog">
			
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">&times;</button>
						<h4 class="modal-title">Modal Header</h4>
					</div>
					<div class="modal-body">
						<p>Some text in the modal.</p>
					</div>
					<div class="modal-footer">
					  <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					</div>
				</div>
			</div>
		</div>
		  
		<!-- -->

		  
						

                            <div class="row">
                                
                                <!--<div class="col-lg-12"> -->
                                <!--
									<div class="col-md-11 col-md-offset-10">
                                    <!--<div class="align-self-end ml-auto">   --> 
                       	        <!--    <a class="col-sm-2 btn btn-md btn-info" href="#new_project" data-toggle="modal"><center><i class="fa fa-plus"></i> New Project</center></a>
                                    </div>	
								-->
							
							<div class="d-flex flex-column"> <!-- text-white text-center border border-dark"> -->
        <!--
		<div class="bg-success p-2 m-2 align-self-start"> 
            align-self-start 
        </div> -->
								<div class=" p-2 m-2 align-self-end "> <!-- ml-auto" -->
                                <a  class =" btn btn-md btn-info  text-white text-center border border-dark" href="#new_project" data-toggle="modal"><center><i class="fa fa-plus"></i> New Project</center></a>
								</div> 
		
							</div>
		
		<!--
        <div class="bg-success p-2 m-2 align-self-center"> 
            align-self-center 
        </div> 
        <div class="bg-success p-2 m-2 align-self-baseline"> 
            align-self-baseline 
        </div> 
        <div class="bg-success p-2 m-2 align-self-stretch"> 
            align-self-stretch 
        </div> -->
    </div> 
                                
                            
                           

<!-- -->						
							<div class="row">
								<div class="col-12 col-sm-6 col-md-3">
									<div class="info-box">
										<span class="info-box-icon bg-info elevation-1"><i class="fas fa-users"></i></span>
										<div class="info-box-content">
										<span class="info-box-text">Clients</span>
										<span class="info-box-number"><?php echo "123"; ?></span>
										</div>
									</div>
								</div>
								
								
								<div class="col-12 col-sm-6 col-md-3">
									<div class="info-box mb-3">
										<span class="info-box-icon bg-danger elevation-1"><i class="fas fa-user-tie"></i></span>
										<div class="info-box-content">
										<span class="info-box-text">Staffs</span>
										<span class="info-box-number">
										<?php echo "coco"; ?></span>
										</div>
									</div>
								</div>
								
							</div><!-- ./ row -->
							

							<div class="row">
								<div class="col-md-12">
									<div class="card card-purple">
										<div class="card-header">
										<h3 class="card-title">xxxxxxxxxxxxxxxxxxx Création d'une catégorie</h3>
										</div>
                                
										<form method="post" enctype="multipart/form-data" role="form">
										<div class="card-body">
											<div class="row">
												<div class=" col-md-6 form-group">
													<label for="exampleInputEmail1">Nom</label>
													<input type="text" name="name" required class="form-control" id="exampleInputEmail1">
												</div>
											</div>

											<div class="row">
												<div class=" col-md-6 form-group">
													<label for="exampleInputEmail1">Staff Phone Number</label>
													<input type="text" name="phone" required class="form-control" id="exampleInputEmail1">
												</div>
                                            </div>

											<div class="row">
												<div class=" col-md-6 form-group">
													<label for="exampleInputEmail1">Staff Email</label>
													<input type="email" name="email" required class="form-control" id="exampleInputEmail1">
												</div>
											</div>

										<div class="clearfix"></div>

										</div> <!-- /.card-body -->

										<div class="card-footer">
											<button type="submit" name="ajouter_categorie" class="btn btn-success">Ajouter</button>
										</div>
										
										</form>
									</div>   <!-- /.card -->
								</div><!-- /.col -->
							</div> <!-- /.row -->
							
							
							
							
							
							
							
							

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

			

<?php

	//include("add_modal.php"); // prévoir un répertoire ("../includes/blabla");

	include("template_bottom.php");

?>


