diff --git a/edit-vacation.php b/edit-vacation.php index 5a1cebc1..afd1a9d0 100644 --- a/edit-vacation.php +++ b/edit-vacation.php @@ -1,162 +1,162 @@ -remove()) { - $error = 1; - } - } - - - //Set the vacation data for $fUsername - if (!empty ($fChange)) - { - if(!$vh->set_away($fSubject, $fBody, $tActiveFrom, $tActiveUntil)) { - $error = 1; - } - - } -} - -if($error == 0) { - if(!empty ($fBack)) { - flash_info($PALANG['pVacation_result_removed']); - } - if(!empty($fChange)) { - flash_info($PALANG['pVacation_result_added']); - } -} -else { - flash_error($PALANG['pVacation_result_error']); -} -if (empty ($tActiveFrom)) - $tActiveFrom = date ("Y-m-d"); -if (empty ($tActiveUntil)) - $tActiveUntil = date ("Y-m-d"); - -$smarty->assign ('tUseremail', $tUseremail); -$smarty->assign ('tSubject', $tSubject); -$smarty->assign ('tBody', $tBody ,false); -$smarty->assign ('tActiveFrom', date ("d.m.Y", strtotime ($tActiveFrom))); -$smarty->assign ('tActiveUntil', date ("d.m.Y", strtotime ($tActiveUntil))); -$smarty->assign ('fCanceltarget', $fCanceltarget); -$smarty->assign ('smarty_template', 'edit-vacation'); -$smarty->display ('index.tpl'); - -/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ -?> +remove()) { + $error = 1; + } + } + + + //Set the vacation data for $fUsername + if (!empty ($fChange)) + { + if(!$vh->set_away($fSubject, $fBody, $tActiveFrom, $tActiveUntil)) { + $error = 1; + } + + } +} + +if($error == 0) { + if(!empty ($fBack)) { + flash_info($PALANG['pVacation_result_removed']); + } + if(!empty($fChange)) { + flash_info($PALANG['pVacation_result_added']); + } +} +else { + flash_error($PALANG['pVacation_result_error']); +} +if (empty ($tActiveFrom)) + $tActiveFrom = date ("Y-m-d"); +if (empty ($tActiveUntil)) + $tActiveUntil = date ("Y-m-d"); + +$smarty->assign ('tUseremail', $tUseremail); +$smarty->assign ('tSubject', $tSubject); +$smarty->assign ('tBody', $tBody ,false); +$smarty->assign ('tActiveFrom', date ("d.m.Y", strtotime ($tActiveFrom))); +$smarty->assign ('tActiveUntil', date ("d.m.Y", strtotime ($tActiveUntil))); +$smarty->assign ('fCanceltarget', $fCanceltarget); +$smarty->assign ('smarty_template', 'edit-vacation'); +$smarty->display ('index.tpl'); + +/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ +?>