/* Decoded by unphp.net */ ?> "; echo " "; echo " "; echo " "; $user = ""; if ( !empty($numSalarie) ) { $table = "tblSalarie"; $condition = "NumSalarie = {$numSalarie}"; $fldSal = array( 'Matriculesalarie', 'Nom', 'Prenom' ); $lstSal = $obj->getFieldsById($table, $fldSal, $condition); $rstMatricule = $lstSal['Matriculesalarie']; $rstNom = $lstSal['Nom']; $rstPrenom = $lstSal['Prenom']; $user = $rstMatricule . " - " . $rstNom . " " . $rstPrenom; } // if ( !empty($numSalarie) ) $user = ( ($profil == 'admin') ? 'Administrateur' : $user ); $droitCSal = accesDroit( $profil, 4011, "Création" ); $createSal = $droitCSal ? NULL : 'disabled'; $droitMSal = accesDroit( $profil, 4012, "Modification" ); $modifSal = $droitMSal ? NULL : 'disabled'; ?>
Liste des salariés vide
"; } else { $reqNumRows = "SELECT MAX(ID) AS nbSalarie FROM (SELECT ROW_NUMBER() OVER(ORDER BY {$table}.NumSalarie DESC) AS ID FROM {$table} "; $txtSQL = "SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY {$table}.NumSalarie) AS ID, {$table}.NumSalarie, {$table}.MatriculeSalarie, "; $txtSQL .= "{$table}.Civilite, {$table}.Nom, {$table}.Prenom, {$table}.CodeFonctionEntreprise "; $txtSQL .= "FROM {$table} "; $salSQL = "INNER JOIN tblInfoScte ON {$table}.NumSalarie = tblInfoScte.NumSalarie "; if ( empty($valTriSalarie) ) { $_SESSION['combo'] = ''; $_SESSION['triSorti'] = 'present'; } else { $triSalarie = explode(";", $valTriSalarie); $choixSorti = $triSalarie[0]; $choixTri = $triSalarie[1]; $valeur = (count($triSalarie) > 2) ? $triSalarie[2] : NULL; } $query = NULL; if ( empty($choixSorti) || ($choixSorti == 'present') ) { $_SESSION['triSorti'] = 'present'; $salSQL .= "WHERE tblInfoScte.DateDepart IS NULL "; } else { $_SESSION['triSorti'] = 'Sorti'; $salSQL .= "WHERE tblInfoScte.DateDepart IS NOT NULL "; } $salSQL .= "AND tblInfoScte.InfoEnCours = 1 "; $txtSQL .= $salSQL; $reqNumRows.= $salSQL; if ( $choixTri == 'tous' || empty($valTriSalarie) ) { $_SESSION['valTriSalarie'] = ''; $_SESSION['choixTri'] = ''; $_SESSION['txtMatricule'] = ''; $_SESSION['txtValeur'] = ''; $_SESSION['combo'] = ''; $_SESSION['triSexe'] = ''; } else { if ( left($choixTri, 9) == 'matricule' ) { $matricule = explode("=", $choixTri); $_SESSION['valTriSalarie'] = $valTriSalarie; $_SESSION['choixTri'] = 'matricule'; $_SESSION['combo'] = ''; $_SESSION['txtMatricule'] = $matricule[1]; $_SESSION['txtValeur'] = ''; $_SESSION['triSexe'] = ''; $query = "AND MatriculeSalarie LIKE '". $matricule[1] . "%' "; } elseif ( left($choixTri, 8) == 'civilite' ) { $styleChamp = "style='display:none'"; $rechSexe = explode("=", $choixTri); $_SESSION['valTriSalarie'] = $valTriSalarie; $_SESSION['choixTri'] = 'tous'; $_SESSION['combo'] = 'civilite'; $_SESSION['txtMatricule'] = ''; $_SESSION['txtValeur'] = ''; $_SESSION['triSexe'] = ( ($rechSexe[1] == 0) ? 'Homme' : 'Femme'); if ( $rechSexe[1] == 0 ) { $hommeAttribute = 'checked="checked"'; } else { $femmeAttribute = 'checked="checked"'; } $civilite = ($rechSexe[1] == 0) ? "Civilite = 0 " : "({$table}.Civilite = 1 OR {$table}.Civilite = 2) "; $query = "AND {$civilite} "; } else { $champ = $choixTri; $_SESSION['choixTri'] = 'tous'; $_SESSION['txtMatricule'] = ''; $_SESSION['triSexe'] = ''; $_SESSION['txtValeur'] = $valeur; if ( $champ == 'codefonctionentreprise' ) { $_SESSION['combo'] = 'codefonctionentreprise'; $query = "AND {$table}.NumSalarie IN (SELECT NumSalarie FROM tblAffectation WHERE EmploiOccupe LIKE '" . str_replace("'", "''", $valeur) . "%' AND InfoEnCours = 1)"; } else { $_SESSION['combo'] = $champ; $query = "AND {$table}.{$champ} LIKE '" . str_replace("'", "''", $valeur) . "%'"; } } } $txtSQL .= $query . " and tblsalarie.numsalarie in($reqs) "; //echo $txtSQL; if ($matricule!= '') { $txtSQL .= " ) AS tblSalarie"; } else { $txtSQL .= " ) AS tblSalarie "; } $listeSalarie = $obj->showData($txtSQL); $reqNumRows .= $query; $reqNumRows .= " and tblsalarie.numsalarie in($reqs)) AS tblNbSalarie"; $sttNumRows = $obj->getData($reqNumRows); $numRows = $sttNumRows['nbSalarie']; echo " "; $triSalarie = isset($_SESSION['choixTri']) ? $_SESSION['choixTri'] : 'tous'; $sTriSexe = isset($_SESSION['triSexe']) ? $_SESSION['triSexe'] : 'homme'; $sTriSorti = isset($_SESSION['triSorti']) ? $_SESSION['triSorti'] : 'present'; $triMatricule = isset($_SESSION['txtMatricule']) ? $_SESSION['txtMatricule'] : ''; $triValeur = isset($_SESSION['txtValeur']) ? $_SESSION['txtValeur'] : ''; $selCombo = isset($_SESSION['combo']) ? $_SESSION['combo'] : ''; $matriculeAttribute = ""; $tousAttribute = ""; if ( ($triSalarie == 'matricule') ) { $matriculeAttribute = 'checked="checked"'; $grisValeur = "disabled=true"; $grisCombo = "disabled=true"; $grisMatricule = ""; } else { $tousAttribute = 'checked="checked"'; $grisMatricule = "disabled=true"; $grisValeur = "disabled"; $grisCombo = ""; } $selFonction = ""; $selNom = ""; $selPrenom = ""; $selSexe = ""; $hommeAttribute = ""; $femmeAttribute = ""; $presentAttribute = ""; $sortiAttribute = ""; $styleSexe = "style='display:none'"; $styleChamp = NULL; switch ( $selCombo ) { case 'codefonctionentreprise' : { $grisValeur = ""; $selFonction = "selected"; break; } case 'nom' : { $grisValeur = ""; $selNom = "selected"; break; } case 'prenom' : { $grisValeur = ""; $selPrenom = "selected"; break; } case 'civilite' : { $grisValeur = "disabled"; $selSexe = "selected"; $styleSexe = NULL; $styleChamp = "style='display:none'"; break; } } if ( $sTriSorti == 'present' ) { $presentAttribute = 'checked="checked"'; } else { $sortiAttribute = 'checked="checked"'; } if ( $sTriSexe == 'Homme' ) { $hommeAttribute = 'checked="checked"'; } else { $femmeAttribute = 'checked="checked"'; } ?>Matricule | Fonction | Civilité | Nom | Prénom(s) | Action |
---|---|---|---|---|---|
{$colorD}" . strtoupper($MatriculeSalarie) . "{$colorF} | "; echo "{$colorD} {$emploi} {$colorF} | "; echo "{$colorD} {$titre} {$colorF} | "; echo "{$colorD} {$Nom} {$colorF} | "; echo "{$colorD} {$Prenom} {$colorF} | "; echo ""; echo " | "; echo " "; echo " "; echo " "; echo " "; echo "