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/TMCPRO/pages/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TMCPRO/pages/NFC.php
<?php
include 'includes/config_tmcpro.php' ;
include 'includes/stable_functions_tmcpro.php' ;
?>
<?php





// echo "<pre>" ;
// print_r($_GET) ; 
// echo "</pre>" ; 

if($_GET['action'] ==  "editer"){
	
	$res=dbi_fetch_row(dbi_query("SELECT * FROM `telephone_NFC` WHERE `telephone_NFC_id` = ".$_GET['telephone_NFC_id'])) ; 
	
}

if($_GET['action'] ==  "sup"){
	
	dbi_query("DELETE FROM `telephone_NFC` WHERE `telephone_NFC`.`telephone_NFC_id` = ".$_GET['telephone_NFC_id']) ; 
	
		 header('Location:NFC.php?msg=le numéro bien supprimé&color=success');
	
	
}

if(!empty($_POST['Modifier']) and $_POST['Modifier'] == "Modifier"){
	
	// echo "<pre>" ;
// print_r($_POST) ; 
// echo "</pre>" ; 

// exit() ;
	$salarie_id=$_POST['matricule'] ;
$Num_Tel=$_POST['Num_Tel'] ;
$Code_pin1=$_POST['Code_pin1'] ;
$Code_pin2=$_POST['Code_pin2'] ;
$Puk1=$_POST['Puk1'] ;
$Puk2=$_POST['Puk2'] ;
$Model_tel=$_POST['Model_tel'] ;
$IMEI_1=$_POST['IMEI_1'] ;
$IMEI_2=$_POST['IMEI_2'] ;

dbi_query("UPDATE `telephone_NFC` SET `salarie_id` = '$salarie_id', `Num_tel` = '".$_POST['Num_Tel']."',
 `Code_pin1` = '".$_POST['Code_pin1']."', `Code_pin2` = '".$_POST['Code_pin2']."',
 `Puk1` = '".$_POST['Puk1']."', `Puk2` = '".$_POST['Puk2']."',
 `Model_tel` = '".$_POST['Model_tel']."', `IMEI_1` = '".$_POST['IMEI_1']."',
`IMEI_2` = '".$_POST['IMEI_2']."' WHERE `telephone_NFC`.`telephone_NFC_id` = ".$_POST['telephone_NFC_id']) ; 

header('Location:NFC.php?msg=le numéro bien modifié&color=success');

}
if(!empty($_POST['Enregistrer']) and $_POST['Enregistrer'] == "Enregistrer"){
$salarie_id=$_POST['matricule'] ;
$Num_Tel=$_POST['Num_Tel'] ;
$Code_pin1=$_POST['Code_pin1'] ;
$Code_pin2=$_POST['Code_pin2'] ;
$Puk1=$_POST['Puk1'] ;
$Puk2=$_POST['Puk2'] ;
$Model_tel=$_POST['Model_tel'] ;
$IMEI_1=$_POST['IMEI_1'] ;
$IMEI_2=$_POST['IMEI_2'] ;

dbi_query(" INSERT INTO telephone_NFC (

salarie_id,
Num_Tel,
Code_pin1,
Code_pin2,
Puk1,
Puk2,
Model_tel,
IMEI_1,
IMEI_2)

VALUES (

'$salarie_id',
'$Num_Tel',
'$Code_pin1',
'$Code_pin2',
'$Puk1',
'$Puk2',
'$Model_tel',
'$IMEI_1',
'$IMEI_2'


)") ;
}


?>



<!DOCTYPE html>
<html>
	<head>
		<?php include('header.php'); ?>
		
		<!-- header -->

<link rel="stylesheet" href="../plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
<!-- header -->													
		
	</head>

		<body class="hold-transition sidebar-mini">
			<div class="wrapper">


				<nav class="main-header navbar navbar-expand navbar-white navbar-light">
					<ul class="navbar-nav">
							<li class="nav-item">
									<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
							</li>

				</ul>
				</nav>


				<aside class="main-sidebar sidebar-dark-primary elevation-4">
					<a href="index3.html" class="brand-link">
						<img src="dist/img/logomcpro.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
								 style="opacity: .8">
							<span class="brand-text font-weight-light">MC PRO</span>
					</a>


						<div class="sidebar">
							<div class="user-panel mt-3 pb-3 mb-3 d-flex">
								<div class="image">
									<img src="dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image">
								</div>
								<div class="info">
										<a href="index.php" class="d-block">Steeven ROBLOT</a>
								</div>
							</div>

					<?php include('menu.php'); ?>

					</div>
				</aside>

					<div class="content-wrapper">

						<section class="content-header">
						 <div class="container-fluid">
							 <div class="row mb-2">
								 <div class="col-sm-6">
									 <h1>Téléphones NFC</h1>
								 </div>
								 <div class="col-sm-6">
									 <ol class="breadcrumb float-sm-right">
										 <li class="breadcrumb-item"><a href="index.php">Accueil</a></li>

										 <li class="breadcrumb-item"><a href="fourinc.php">Pointages</a></li>
										 <li class="breadcrumb-item active">Téléphones NFC </li>
									 </ol>
								 </div>
							 </div>
						 </div><!-- /.container-fluid -->
						</section>








				<section class="content">
					<div class="row">
						<div class="col-12">
							<div class="card">






									<div class="card-body">
									
									  <?php
			      if(isset($_GET["msg"])){
        ?>
        <div class="alert alert-<?php echo $_GET["color"]; ?>  alert-dismissible col-12" role="alert">
          <strong><?php echo $_GET["color"].': '; ?></strong><?php echo $_GET["msg"]; ?>.
          <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <?php
        }
       ?>





							<form id="client_statu_form" name="client_statu_form" method="POST"  action="">

								<div class="form-row">
									   	<?php
	 $req =dbi_query("SELECT *  FROM `salarie` WHERE `salarie_statut` = '1' ORDER BY `salarie`.`salarie_nom` ASC") ; 
	   $resq =  dbi_query("SELECT * FROM `telephone_NFC`")  ; 
	  
	?>
	       <div class="form-group col-md-4" ><!-- Liste déroulante jour -->  
                <select  class="form-control js-example-basic-single select2"  style="width: 100%;" name="matricule">
				<option value="-1" selected="selected" disabled="disabled">-Salarié-</option>
				<?php 
				while(  $sal=dbi_fetch_row($req))
				{
				?>
				
                  
					
					<option value="<?php echo $sal['salarie_id'] ; ?>" <?php if( $sal['salarie_id']== $res['salarie_id']) echo "SELECTED"  ; ?> ><?php echo $sal['salarie_nom']." ".$sal['salarie_prenom']; ?></option>
												
					
					<?php 
				}
				?>
                </select>
    </div>
	
	                     <input id="prodId" name="telephone_NFC_id" type="hidden" value="<?=$res['telephone_NFC_id']?>" />
							 		<div class="form-group col-md-4">
										<input type="text" class="form-control" id="Num_Tel"  name="Num_Tel"  value="<?=$res['Num_tel']?>" placeholder="Numéro de Téléphone"  >
									</div>
									<div class="form-group col-md-4">
										<input type="text" class="form-control" id="Model_tel"  name="Model_tel"   value="<?=$res['Model_tel']?>" placeholder="Modèle"  >
						 			</div>
								</div>

								<div class="form-row">
									<div class="form-group col-md-3">
							 			<input type="text" class="form-control" id="Code_pin1"  name="Code_pin1" value="<?=$res['Code_pin1']?>"  placeholder="Code PIN 1"  >
									</div>
									<div class="form-group col-md-3">
							 			<input type="text" class="form-control" id="Code_pin2"  name="Code_pin2" value="<?=$res['Code_pin2']?>"  placeholder="Code PIN 2"  >
									</div>
									<div class="form-group col-md-3">
										<input type="text" class="form-control" id="Puk1"  name="Puk1" value="<?=$res['Puk1']?>" placeholder="Code PUK 1"  >
									</div>
									<div class="form-group col-md-3">
										<input type="text" class="form-control" id="Puk2"  name="Puk2" value="<?=$res['Puk2']?>" placeholder="Code PUK 2"  >
									</div>
								</div>

								<div class="form-row">
									<div class="form-group col-md-4">
						      	<input type="text" class="form-control" id="IMEI_1"  name="IMEI_1"  value="<?=$res['IMEI_1']?>" placeholder="IMEI 1"  >
						   		</div>
							 		<div class="form-group col-md-4">
										<input type="text" class="form-control" id="IMEI_2"  name="IMEI_2" value="<?=$res['IMEI_2']?>" placeholder="IMEI 2"  >
									</div>

								</div>

							<div>
							<?if($_GET['action'] ==  "editer"){ ?>
							<button type="submit" name="Modifier"  value ="Modifier" class="btn btn-primary">Modifier</button>
							<?}else{?>
							  <button type="submit" name="Enregistrer"  value ="Enregistrer" class="btn btn-primary">Enregistrer</button>
							<?}?>
						</div>
							</form>
						</br>


											<div style="width:100%; float:left; vertical-align:top" class="header_ray">
												<div id="tab">
													<div class="box-body">
														<table id="example1" class="table table-bordered table-striped">
															<thead>
																<TR>
																  <th align="center">Salarié</th>
																  <th align="center">N° Téléphone</th>
																	<th align="center">Modèle</th>
 															   	<th align="center">Pin 1</th>
																  <th align="center">Pin 2</th>
																  <th align="center">Puk 1</th>
																	<th align="center">Puk 2</th>
																  <th align="center">IMEI 1</th>
																	<th align="center">IMEI 2</th>
																	<th align="center"></th>

																</TR>
															</thead>
                                                            <tbody>
				
                                                <?php  while(  $f_resq=dbi_fetch_row($resq)){
														  list($salarie_nom , $salarie_prenom) =  dbi_fetch_row(dbi_query("SELECT salarie_nom , salarie_prenom  FROM `salarie` WHERE `salarie_id` = ".$f_resq['salarie_id'])) ; 
													?>
															<tr>
															<td>
															<?php echo $salarie_nom." ".$salarie_prenom ;  ?></td>
															<td> <?php echo $f_resq['Num_tel'] ;  ?></td>
															<td> <?php echo $f_resq['Model_tel'] ;  ?></td>
															<td> <?php echo $f_resq['Code_pin1'] ;  ?></td>
															<td> <?php echo $f_resq['Code_pin2'] ;  ?></td>
															<td> <?php echo $f_resq['Puk1'] ;  ?></td>
															<td> <?php echo $f_resq['Puk2'] ;  ?></td>
															<td> <?php echo $f_resq['IMEI_1'] ;  ?></td>
															<td> <?php echo $f_resq['IMEI_2'] ;  ?></td>
																	  <TD align="center" nowrap>
 <a class="btn btn-info btn-sm" href="?action=editer&telephone_NFC_id=<?=$f_resq['telephone_NFC_id']?>" >   <i class="fas fa-pencil-alt"></i> Editer </a>



 </a>







   <a class="btn btn-danger btn-sm" href="?action=sup&telephone_NFC_id=<?=$f_resq['telephone_NFC_id']?>"  onclick="return confirm('Voulez-vous vraiment supprimer cet ligne ?');">

				   <i class="fas fa-trash"></i> Supprimer

				   </a>

  </TD>


															</tr>
												<?php  }?>



															</tbody>
														</table><!-- /.table -->
													</div><!-- /.box-body -->
												</div><!-- /.tab -->
											</div><!-- /.header_ray -->
										</div><!-- /.onglet_dotted -->
								    </div><!-- /.card-body -->
							    </div><!-- /.card card-primary card-outline -->
							</div> <!-- /.col-12 -->
						</div>  <!-- /.row -->
				</section> <!-- /.section -->




	</div>
	
	
	


<?php include('footerr.php'); ?>

<script type="text/javascript">
$(document).ready(function(){
    $('#myModal').on('show.bs.modal', function (e) {
        var rowid = $(e.relatedTarget).data('id');
        $.ajax({
            type : 'post',
            url : 'ajaxModifierParametrage.php', //Here you will fetch records
            data :  'rowid='+ rowid, //Pass $id
            success : function(data){
            $('#fetch').html(data);//Show fetched data from database
            }
        });
     });
});


</script>

<script src="../plugins/select2/js/select2.full.min.js"></script>
<!-- header -->	

<script>
  $(function () {
	    $('.select2').select2()

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })
    // Summernote
    $('.textarea').summernote()
  })
</script>


</body>
</html>

AnonSec - 2021