|
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 (0705) : /home/logmcpe/www/../www/MCPRO/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Data Tables</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="../../bower_components/Ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="../../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../../dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<?php
include_once 'code/init.php';
// print_header ();
?>
<script language="Javascript">
function GetIdBur()
{
var idbursel="";
idbursel = document.bureau_form.id_bureau.value ;
if( idbursel > 0 || idbursel=="INDEFINI" )
window.location = "c.php?idbursel="+idbursel;
else
window.location = "c.php";
}
</script>
<?php
$where1="";
$where2="";
$selected="";
if(isset($_GET['idbursel']) && !empty($_GET['idbursel']))
{
if($_GET['idbursel']>0)
{
$tabbursel=dbi_fetch_row((dbi_query('select * from bureau where id_bureau='.$_GET['idbursel'].' and agence_id='.$agence.''))) ;
$id_bureau=$tabbursel['id_bureau'];
$nom_bureau=$tabbursel['nom_agence'];
$where1=" AND ID_Bureau != $id_bureau ";
$where2=" AND inter_bureau=$id_bureau ";
}
elseif($_GET['idbursel']=="INDEFINI")
{
$id_bureau=$_GET['idbursel'];
$where2=" AND inter_bureau='0' ";
$selected='selected="selected"';
}
}
for ($l = 'A' ; strlen($l) == 1 ; $l++)
echo "<a href=\"c.php?col=-2&val=$l\">$l</a> " ;
echo "<a href=\"c.php\">Voir la liste complète</a> " ;
?>
<form action="c.php" method="get" >
<?php
// Lister les intervenants actifs ou non actifs.
if($_GET['inter_actif']=='on' || $_GET['inter_actif']=='off' ) $_SESSION['inter_actif']=$_GET['inter_actif'];
?>
<br><input type="radio" value="on" Onclick="submit()" name="inter_actif" <?=($_SESSION['inter_actif'] == 'on' || !isset($_SESSION['inter_actif'])) ? 'checked' : ''?> > Actifs
<input type="radio" value="off" Onclick="submit()" name="inter_actif" <?=$_SESSION['inter_actif'] == 'off' ? 'checked' : '' ?>> Tous
</form>
<form action="c.php" method="get" style="margin-top:10px">
<br/><br/><br/> <br/>
</form>
<?php if(!empty($_SESSION['admin'])){ ?>
<table style="position:absolute; top:100px; right:400px;">
<!-- <div style=" position:relative; top:0px; right:10;"> -->
<form id="suivi_form" name="bureau_form" method="POST" action="c.php">
<tr>
<td align="left" valign="top" class="td_listing0" >Bureau :</td>
<td align="left" valign="top" class="td_listing0">
<select class="form-control select2" id="id_bureau" name="id_bureau" onchange="GetIdBur()";>
<option selected="selected" value="TOUS">TOUS</option>
<?php if(isset($id_bureau) && isset($nom_bureau)) { ?>
<option selected="selected" value="<?=$id_bureau ?>" size="100"><?=$nom_bureau?></option>
<?php }
$Reqbureau=dbi_query("select * from bureau where agence_id=$agence $where1") or die(mysql_error());
while($listbureau=dbi_fetch_row($Reqbureau)){ ?>
<option value="<?php echo $listbureau['id_bureau']?>"><?php echo $listbureau['nom_agence'] ?></option>
<?php } ?>
<option <?=$selected ?> value="INDEFINI">INDEFINI</option>
</select>
</td>
</tr>
</form>
<!-- </div> -->
</table>
<?php }
elseif($bureau)
{
$where2=" AND inter_bureau = $bureau ";
}
if (empty($_GET['val']) || !isset($_GET['col']))
{
$_GET['col'] = -1 ;
$_GET['val'] = '' ;
}
error_reporting(E_ALL|E_STRICT) ;
$cols = array('inter_nom', 'inter_cp', 'inter_ville', -1 => '', -2 => 'inter_nom') ;
$soundex = array (1, 0, 1, -1 => 2, -2 => 3) ;
$queries = array("(SELECT *, 1 AS exact FROM ".TABLE_INTERV." WHERE %s = '%s' AND agence_id=$agence%s ".( isset($_SESSION['inter_actif'])&&$_SESSION['inter_actif']=='off' ? "" : " AND inter_actif='0' ")." ) UNION (SELECT *, 0 AS exact FROM ".TABLE_INTERV." WHERE %1\$s LIKE '%%%2$\s%%' AND %1\$s != '%2\$s' AND agence_id=$agence%3\$s ".( isset($_SESSION['inter_actif'])&&$_SESSION['inter_actif']=='off' ? "" : " AND inter_actif='0' ").")", "(SELECT *, 1 AS exact FROM ".TABLE_INTERV." WHERE %s = '%s' AND agence_id=$agence%s ".( isset($_SESSION['inter_actif'])&&$_SESSION['inter_actif']=='off' ? "" : " AND inter_actif='0' ").") UNION (SELECT *, 0 AS exact FROM ".TABLE_INTERV." WHERE (%1\$s LIKE '%%%2\$s%%' OR soundex(%1\$s) = soundex('%2\$s')) AND %1\$s != '%2\$s' AND agence_id=$agence%3\$s ".( isset($_SESSION['inter_actif'])&&$_SESSION['inter_actif']=='off' ? "" : " AND inter_actif='0' ").")", "SELECT *, 1 AS exact FROM ".TABLE_INTERV." WHERE agence_id=$agence%3\$s $where2".( isset($_SESSION['inter_actif'])&&$_SESSION['inter_actif']=='off' ? "" : " AND inter_actif='0' "), "SELECT *, 1 AS exact FROM ".TABLE_INTERV." WHERE %1\$s LIKE '%2\$s%%' AND agence_id=$agence%3\$s ".( isset($_SESSION['inter_actif'])&&$_SESSION['inter_actif']=='off' ? "" : " AND inter_actif='0' ")." ") ;
$q = dbi_query(sprintf($queries[$soundex[$_GET['col']]],$cols[$_GET['col']] , $_GET['val'], !empty($_GET['zone']) ? ' AND inter_zones_id REGEXP "['.join('', $_GET['zone']).']"' : '').' ORDER BY exact, inter_nom, inter_pnom') ;
//ajout de la condition '.( $_SESSION['inter_actif']=='off' ? "" : "AND inter_actif='0'").'
?>
<!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Nom</th>
<th>Adresse</th>
<th>Ville</th>
<th>Téléphone</th>
<th>E-mail</th>
<th>N°</th>
</TR>
</thead>
<tbody>
<?php
$compteur=0;
$previous=1;
$candidature=0;
while($c = dbi_fetch_row($q)) {
$next=$c['exact'];
// $candidature=$c['inter_candidature'];
if (!($compteur % 2)) $style='td_listing0';
else $style='td_listing1';
if (($previous)&&!($next))
echo '<tr><td colspan="7" style="padding-left:10px; height=20px">
<b>Orthographe approchée</b></td></tr>';
if (($candidature)&&!($candidaturep))
echo "<tr align=left > <TD colspan='7'><h2>Candidatures</h2></TD> </tr>";
?>
<TR>
<TD ><A href="top.php?link=interv&page=caf&id=<?=$c['inter_id']?>" target="ident"><?=ucwords($c['inter_nom'].' '.$c['inter_pnom'])?></A></TD>
<TD><?=ucwords($c['inter_adr1'])?></TD>
<TD ><?=$c['inter_cp'].' '.ucfirst(strtolower($c['inter_ville']))?></TD>
<TD ><?=preg_replace('/^(\+\d{2})(\d)|(\d{2})/', '\1 \2 \3', preg_replace('/[^\d+]/', '', empty($c['inter_telport']) ? $c['inter_teldomi'] : $c['inter_telport']))?></TD>
<TD><?=strtolower($c['inter_email'])?></TD>
<TD><?=sprintf('%05d',$c['inter_id'])?></TD>
</TR>
<?php
$compteur++;
$previous=$c['exact'];
$candidaturep=$c['inter_candidature'];
} ?>
</tbody>
</TABLE>
</div>
<?php
$nombre=mysql_num_rows($q);
if($nombre==0)
{
echo '<center>'.'<h3>'.'aucun intervenant trouvé ';
if(isset($nom_bureau)) echo 'pour le bureau '.$nom_bureau;
echo "</h3>".'</center>';
?>
<?php
}
else
{
echo '<center>'."<h3>".'<font color="green" font-weight=bold>'.$nombre.'</font> '." intervenants trouvés ";
if(isset($nom_bureau)) echo "pour le bureau $nom_bureau";
if(isset($id_bureau) && $id_bureau=="INDEFINI") echo "n'ont pas de bureau";
echo "</h3>".'</center>';
}
?>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- page script -->
<script>
$(function () {
$('#example1').DataTable()
$('#example2').DataTable({
'paging' : true,
'lengthChange': false,
'searching' : false,
'ordering' : true,
'info' : true,
'autoWidth' : false
})
})
</script>
</body>
</html>
