Your IP : 216.73.216.65


Current Path : /home/a/t/a/ataenra/www/ATA/INTRANET/Admin/
Upload File :
Current File : /home/a/t/a/ataenra/www/ATA/INTRANET/Admin/Tables.php

<?php


if (isset($_POST['Table'])) {
$_SESSION['Table']=$_POST['Ftable'];
$list1 = $dbco->prepare("SELECT * FROM ".$_SESSION['Table'].""); 
$list1->execute();
}else{
$list1 = $dbco->prepare("SELECT * FROM ".$_SESSION['Table'].""); 
$list1->execute();
}

?>


<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <link href="./ATA/Intranet/outils/css/agcom.css" rel="stylesheet" type="text/css">
  <title>GESTION DES TABLES MATERIEL ATA</title>
</head>

<body>

<form method="post" autocomplete="off">
	<div class="containerPage"> 
    <div class="containerTitre">
    <div class="row">
            <div class="col-md-2">
            <img src="./ATA/Intranet/Outils/required/ATA-logo.jpg" alt="ISO" width=50% class= />
            </div>   
            <div class="col-md-8">
            <span class="align-middle">GESTION DES BASES MATERIEL</span>
            </div> 
            <div class="col-md-2">
            <a href="./index.php/aexploit" title="">
            <img alt="HOME" src="./ATA/Intranet/Outils/required/home1.png" alt="ISO" width=45% class="img-responsive" class="align-right"/> </a>
            </div>
            </div>
    </div>
    <div class="container1">
        <div class="row">
        <div class="col-md-6">
            <select class="form-control" name="Ftable">
            <option value="gest_pacae">Choisir une table</option>
            <?php $ll1= $dbco->prepare("SELECT * FROM gest_listetablemateriel"); $ll1->execute(); ?>
            <?php while($LL1 = $ll1->fetch(PDO::FETCH_OBJ)) { ?>
            <option><?php echo $LL1->TM_Nom; ?></option>
            <?php } ?></select>
            
            <input class="btn-la btn-info" type="submit" name="Table" Value="CHOISIR" >

        </div>
        
        <div class="col-md-6">
          
        <?php  if(isset($_POST['Table'])) { echo '<a class="btn btn-primary" href="./ATA/INTRANET/admin/Gestion_Materiel/New_Materiel.php?Tm='.$_POST['Ftable'].'">CREER UN ARTICLE</a>';} ?>

        </div>
        </div>


    </div>
	</form>

    <div class="container1">      
    <form method="post" autocomplete="off"> 
        
   
<?php if(isset($_SESSION['Table'])&&(isset($_POST['Choisir']))){ ?>
   <?php $ID = $_POST['Choisir']; ?>

    <?php $l2 = $dbco->prepare("SELECT * FROM ".$_SESSION['Table'].""); $l2->execute(); $R2=$l2->fetch(PDO::FETCH_OBJ)?>

    <?php $l3 = $dbco->prepare("SELECT * FROM gest_pacae P JOIN ".$R2->jointure." J ON P.IDm=J.ID_pac JOIN gest_detail_pacae D ON J.ID_detailpac=D.ID_detail_pacae WHERE P.IDm='$ID'"); $l3->execute(); ?>


        <div class="container1"> 
        <div class="row">
        <div class="col-md-12">  
            <h5 class="btn-lg btn-warning">DETAIL DE LA PAC N°<?php echo $_POST['Choisir']; ?></h5>
        </div>
        </div> 
            <div class="table-responsive">
                <div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 500px;">
                <br>
                <table class='table table-hover table-bordered table-condensed'>
                    <thead>
                    <tr>
                    <th>TYPE</th>
                    <th>REF</th>
                    <th>MODELE</th>
                    <th>PRIX VENTE</th>
                    <th>FOURNISSEUR</th>
                    <th>Diam Hyd Prim</th>
                    <th>Consomax</th>
                    <th>ACTION</th>
                    </tr>
                    </thead>

                    
                    <?php while ($R3 = $l3->fetch(PDO::FETCH_OBJ)) { ?>
                        
    

                    <tr>  
                    <td><?php echo $R3->Emp; ?></td>
                    <td><?php echo $R3->Ref; ?></td>
                    <td><?php echo $R3->modele; ?></td>
                    <td><?php echo $R3->pv; ?></td>
                    <td><?php echo $R3->FRS; ?></td>
                    <td><?php echo $R3->diamhydprim; ?></td>
                    <td><?php echo $R3->consomax; ?></td>
                    <td><input type="submit" name="Choisir" class="btn btn-success" value="Choisir">
                        <?php echo'<input type="hidden" name="IDpac" class="btn btn-success" value="'.$R3->ID_detail_pacae.'"';?>
                    </td>
                    </tr>
                    
                    
           

                  <?php } ?>  
                </table>
                </div> 
            </div>    
    
        </form>           
        </div>
    <?php } ?>

    <?php if(isset($_SESSION['Table'])&&(!isset($_POST['Choisir']))){ ?>   


    <div class="container1">  
            <div class="table-responsive">
                <div style="overflow-x: hidden; overflow-y: scroll; width: 100%; height: 500px;">
                <br>
                <table class='table table-hover table-bordered table-condensed'>
                    <thead>
                    <tr>
                    <th>ID</th>
                    <th>FABRICANT</th>
                    <th>MODELE</th>
                    <th>PUISSANCE</th>
                    <th>ELEC</th>
                    <th>FOURNISSEUR</th>
                    <th>ACTION</th>
                    </tr>
                    </thead>

                    
                    <?php while ($R1 = $list1->fetch(PDO::FETCH_OBJ)) { ?>
                        
    

                    <tr>  
                    <td><?php echo $R1->IDm; ?></td>
                    <td><?php echo $R1->Fabricant; ?></td>
                    <td><?php echo $R1->appel; ?></td>
                    <td><?php echo $R1->Puissance; ?></td>
                    <td><?php echo $R1->Elec; ?></td>
                    <td><?php echo $R1->FRS; ?></td>
                    <td><input type="submit" name="Choisir" class="btn btn-success" value="<?php echo $R1->IDm; ?>">
                        <?php echo'<input type="hidden" name="IDm'.$R1->IDm.'" class="btn btn-success" value="'.$R1->IDm.'">';?>
                    </td>
                    </tr>
                    
                    
           

                  <?php } ?>  
                </table>
                </div> 
            </div>    
    
        </form>           
        </div>

    <?php } ?>



    </div>

    





</div>    
</div>   
</body>
</html>