102 lines
No EOL
2.9 KiB
PHP
102 lines
No EOL
2.9 KiB
PHP
<?php
|
|
|
|
|
|
if(isset($_GET['a']))
|
|
$action=$_GET['a'];
|
|
else
|
|
$action='load_free_cars';
|
|
switch($action):
|
|
|
|
case 'save_calc_h';
|
|
$GLOBALS['mysql']->insert("UPDATE ma_lohn_ges SET grund_h='".$_POST['calc_h']."' WHERE mid='".$_POST['maID']."'");
|
|
$back['success'] = true; $back['lastnote']="Stunden CALC auf ".$_POST['calc_h']." h geändert."; $back['alt'] = 5;
|
|
echo json_encode($back);
|
|
break;
|
|
|
|
case 'save_calc_n1';
|
|
$GLOBALS['mysql']->insert("UPDATE ma_lohn_ges SET grund_n1='".$_POST['calc_n1']."' WHERE mid='".$_POST['maID']."'");
|
|
$back['success'] = true; $back['lastnote']="Stunden CALC auf ".$_POST['calc_n1']." h geändert."; $back['alt'] = 5;
|
|
echo json_encode($back);
|
|
break;
|
|
|
|
case 'save_calc_n2';
|
|
$GLOBALS['mysql']->insert("UPDATE ma_lohn_ges SET grund_n2='".$_POST['calc_n2']."' WHERE mid='".$_POST['maID']."'");
|
|
$back['success'] = true; $back['lastnote']="Stunden CALC auf ".$_POST['calc_n2']." h geändert."; $back['alt'] = 5;
|
|
echo json_encode($back);
|
|
break;
|
|
|
|
|
|
|
|
case 'glohn_save';
|
|
$GLOBALS['mysql']->insert("UPDATE mitarbeiter SET tarifg='".$_POST['info']."' WHERE id='".$_POST['maID']."'");
|
|
$GLOBALS['mysql']->insert("INSERT INTO ma_glohn (mid,monat,jahr,glohn)
|
|
VALUES(
|
|
'".$_POST['maID']."',
|
|
'".(int)date('m')."',
|
|
'".(int)date('Y')."',
|
|
'".$_POST['info']."')
|
|
");
|
|
$back['success'] = true;
|
|
$back['lastnote']="Grundlohn auf ".$_POST['info']." € geändert.";
|
|
$back['alt'] = 5;
|
|
echo json_encode($back);
|
|
|
|
break;
|
|
//--- Nachtzuschläge
|
|
case 'nz1_save';
|
|
$GLOBALS['mysql']->insert("UPDATE ma_lohn_ges SET grund_n1='".$_POST['info']."' WHERE mid='".$_POST['maID']."' and monat='".$_POST['monat']."' and jahr='".$_POST['jahr']."'");
|
|
$GLOBALS['mysql']->insert("INSERT INTO ma_lohn_ges (mid,monat,jahr,glohn)
|
|
VALUES(
|
|
'".$_POST['maID']."',
|
|
'".(int)date('m')."',
|
|
'".(int)date('Y')."',
|
|
'".$_POST['info']."')
|
|
");
|
|
$back['success'] = true;
|
|
$back['lastnote']="Grundlohn auf ".$_POST['info']." € geändert.";
|
|
$back['alt'] = 5;
|
|
echo json_encode($back);
|
|
|
|
break;
|
|
|
|
case 'lohntyp_save'; //---------------------------------------------- save lohntyp ---------------------------------
|
|
$GLOBALS['mysql']->insert("UPDATE mitarbeiter SET tarifgtyp='".$_POST['info']."' WHERE id='".$_POST['maID']."'");
|
|
$back['success'] = true;
|
|
$back['lastnote']="Information: Lohntyp auf ".$_POST['info']." geändert.";
|
|
$back['alt'] = 5;
|
|
echo json_encode($back);
|
|
|
|
break;
|
|
|
|
case 'lohngeld_save';
|
|
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$_POST['info']."' WHERE id='".$_POST['maID']."'");
|
|
$back['success'] = true;
|
|
$back['lastnote']="Lohnpreis auf ".$_POST['info']." € gespeichert.";
|
|
$back['alt'] = 5;
|
|
echo json_encode($back);
|
|
|
|
|
|
break;
|
|
|
|
case 'lohnstunden_save';
|
|
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$_POST['info']."' WHERE id='".$_POST['maID']."'");
|
|
$back['success'] = true;
|
|
$back['lastnote']="Stunden auf ".$_POST['info']." gespeichert.";
|
|
$back['alt'] = 5;
|
|
echo json_encode($back);
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
|
|
endswitch;
|
|
|
|
|
|
|
|
?>
|