|
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/TEST/../MCPRO/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
if (isset($_POST['actionform']))
define('FERMER',true);
include_once 'code/init.php';
print_header ('', '', $BodyX );
// print_r($_POST);
//suppression
// if (isset($_GET['id'])&& !empty($_GET['id']) && isset($_GET['action'])) {
// $idfours=$_GET['id'];
// if($_GET['action']=='sup')
// {
// $sreussie=dbi_query("DELETE FROM ".fournisseur." WHERE Fournisseur_ID = $idfours") ;
// }
// }
//nouveau fournisseure
if (isset($_POST['actionform']) && isset($_POST['action']) && $_POST['action']=="Enregistrer")
{
extract($_POST);
//if(!empty($four_nom) || !empty($four_adr1) || !empty($four_cp) || !empty($four_ville) || !empty($four_cont) || !empty($four_cont_fonct) || !empty($four_cont_tel) || !empty($four_cont_mail) || !empty($four_franco) || !empty($refclient))
$sal_tauxH=str_replace(',', '.', $sal_tauxH);
$sql_ins = "INSERT INTO ".salaires." ";
$sql_ins.= "VALUES ('', '$sal_niveau', '$sal_position', '$sal_echelon' ,'$sal_tauxH')";
dbi_query ( $sql_ins );
} //nouveau fournisseure
//modifier fournisseure
if (isset($_POST['ids']) && isset($_POST['action']) && $_POST['action']=="Modifier")
{
// echo " TTTTTTTTTTTTTT ";
extract($_POST);
$sal_tauxH=str_replace(',', '.', $sal_tauxH);
$sqlm = "UPDATE ".salaires." SET sal_niveau='$sal_niveau', sal_position='$sal_position', sal_echelon='$sal_echelon' ,sal_tauxH='$sal_tauxH' WHERE sal_id = $ids";
dbi_query ( $sqlm );
}
?>
<script type="text/javascript">
function Confirme(URL)
{
if (confirm("Etes-vous certain de vouloir supprimer cette entrée ?"))
{
window.location = URL;
}
}
</script>
<?php if(isset($_GET['action'])) {
if($_GET['action']=='edit')
{
$message="Modifier un taux horaire ";
$ids=$_GET['id'];
$rs = dbi_query("select * from salaires where sal_id=$ids") ;
$ls = dbi_fetch_row($rs);
$sal_id = $ls['sal_id'];
$sal_niveau = $ls['sal_niveau'];
$sal_position = $ls['sal_position'];
$sal_echelon = $ls['sal_echelon'];
$sal_tauxH = $ls['sal_tauxH'];
}
else
{
$message="Ajouter un taux horaire ";
}
?>
<table>
<tr>
<td class="tdl">
<div id="frm" style="float:left;" >
<div id="sb" >
<form method="post" action="" >
<?php if(isset($ids)) echo'<input type="hidden" name="ids" value="'.$ids.'">';
if(isset($_GET['action']) && $_GET['action'] == 'new')
echo "<h3>Ajouter un taux horaire</h3>";
else
echo "<h3>Modifier un taux horaire</h3>";
?>
<table>
<tr>
<td class="tdl"><label for="nom" >Niveau : </label></td>
<td class="tdl"><select id="sal_niveau" name="sal_niveau";>
<?php
$Reqpos=dbi_query(" select * from poste_intitule ") or die(mysql_error());
while($listpos=dbi_fetch_row($Reqpos)){ ?>
<option value="<?=$listpos['poste_intitule_ID']?>" <?php if( $sal_niveau == $listpos['poste_intitule_ID']) echo 'selected="selected"'; ?>><?=$listpos['intitule'] ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td class="tdl"><label for="login_username" >POSITION :</label></td>
<td class="tdl"><select id="sal_position" name="sal_position";>
<?php
$Reqpo=dbi_query(" select * from position ") or die(mysql_error());
while($listpo=dbi_fetch_row($Reqpo)){ ?>
<option value="<?=$listpo['position_ID']?>" <?php if( $sal_position == $listpo['position_ID']) echo 'selected="selected"'; ?>><?=$listpo['Position'] ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td class="tdl"><label for="login_username" >ECHELON :</label></td>
<td class="tdl"><select id="sal_echelon" name="sal_echelon";>
<?php
$Reqe=dbi_query(" select * from echelon ") or die(mysql_error());
while($liste=dbi_fetch_row($Reqe)){ ?>
<option value="<?=$liste['echelon_ID']?>" <?php if( $sal_echelon == $liste['echelon_ID']) echo 'selected="selected"'; ?>><?=$liste['Echelon'] ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td class="tdl"><label for="login_username" >TAUX HORAIRE :</label></td>
<td class="tdl"><input type="text" name="sal_tauxH" id="sal_tauxH" value="<?=$sal_tauxH?>" class="field required" /></td>
</tr>
<tr>
<td class="tdl"></td>
<td class="tdl">
<?php if($_GET['action']=='new'){ ?>
<input type="submit" style="float:right;padding-top:0;" class="blubutton" name="actionform" value="Enregistrer"/>
<input type="hidden" name="action" value="Enregistrer"/>
<?php } elseif($_GET['action']=='edit'){ ?>
<input type="submit" style="float:right;padding-top:0;" class="blubutton" name="actionform" value="Modifier"/>
<input type="hidden" name="action" value="Modifier"/>
<?php } ?>
</td>
</tr>
</table>
</form>
</div>
</div>
</td>
</tr>
</table>
<?php } else {
?>
<TABLE width="90%" style="margin:0 auto;">
<TR>
<TH>
<P ALIGN="right">
<a class="modal" style="padding: 6px;background:#0092c8;
border: 2px solid #CCCCCC;
box-shadow: 0 0 5px #CCCCCC inset;
cursor:pointer; font-weight:bold;color: white; text-decoration:none;text-transform : uppercase;font-size: 14px;" href="admin_salaire.php?action=new" rel="{handler: 'iframe', size: {x: 600, y: 350}}"> Ajouter un taux horaire </a>
</p>
</TH>
</TR>
</table>
<?php
$q = dbi_query("select * from salaires s,echelon e,position p, poste_intitule po where e.echelon_ID=sal_echelon AND p.position_ID=s.sal_position AND s.sal_niveau=po.poste_intitule_ID") ;
?>
</br>
<div id="tab" >
<TABLE width="90%" style="margin:0 auto;">
<TR>
<TH align="center">NIVEAU</TH>
<TH align="center">POSITION</TH>
<TH align="center">ECHELON</TH>
<TH align="center">TAUX HORAIRE</TH>
<TH align="center">Modifier</TH>
</TR>
<?
$tdl="td_listing0";
$tdl0=true;
$tdl1=false;
if(mysql_num_rows($q)>0){
while($s = dbi_fetch_row($q)) {
?>
<TR>
<TD align="center" nowrap><?=$s['poste_intitule_ID']." ".$s['intitule']?></TD>
<TD align="center" nowrap><?=$s['Position']?></TD>
<TD align="center" nowrap><?=$s['Echelon']?></TD>
<TD align="center" nowrap><?=number_format($s['sal_tauxH'], 2, ",", " ").' '; ?></TD>
<TD align="center" nowrap>
<a href="?action=edit&id=<?=$s['sal_id']?>" class="modal" rel="{handler: 'iframe', size: {x: 600, y: 350}}"><img src="images/edit.png" alt="Modifier"/> </a>
</TD>
</TR>
<?
if($tdl1)
{
$tdl="td_listing0";
$tdl0=true;
$tdl1=false;
}
elseif($tdl0)
{
$tdl="td_listing1";
$tdl1=true;
$tdl0=false;
}else
{
$tdl="td_listing0";
$tdl0=true;
$tdl1=false;
}
}
}
?>
</TABLE>
</div>
<?php
?>
<?php } ?>
</body>
</html>
