<?php
/**************************************************************************\
* phpgwtimetrack - phpGroupWare addon application *
* http://phpgwtimetrack.sourceforge.net *
* Written by Robert Schader <hide@address.com> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id: deletedetail.php,v 1.4 2001/01/08 21:28:45 rschader Exp $ */
if ($confirm) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
}
$phpgw_info["flags"]["enable_nextmatchs_class"] = "True";
$phpgw_info["flags"]["currentapp"] = "timetrack";
include("../header.inc.php");
if (($jd_id) && (! $confirm)) {
?>
<center>
<table border=0 with=65%>
<tr colspan=2>
<td align=center>
<?php echo lang("Are you sure you want to delete this Timesheet Entry?"); ?>
<td>
</tr>
<tr>
<td>
<a href="<?php
echo $phpgw->link("timesheets.php",
"year=$year&month=$month&day=$day&n_employee=$n_employee")
. "\">" . lang("No"); ?></a>
</td>
<td>
<a href="<?php
echo $phpgw->link("deletedetail.php",
"jd_id=$jd_id&confirm=true&year=$year&month=$month&day=$day&n_employee=$n_employee")
. "\">" . lang("Yes"); ?></a>
</td>
</tr>
</table>
</center>
<?
$phpgw->common->phpgw_footer();
}
if ($confirm) {
$table_locks = array('job_details');
$phpgw->db->lock($table_locks);
$phpgw->db->query("delete from job_details where detail_id='$jd_id'");
$phpgw->db->unlock();
Header("Location: " . $phpgw->link("timesheets.php",
"year=$year&month=$month&day=$day&n_employee=$n_employee"));
}
?>