<?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: profiles.php,v 1.4 2001/01/16 21:56:53 rschader Exp $ */
$phpgw_info["flags"]["enable_nextmatchs_class"] = "True";
$phpgw_info["flags"]["currentapp"] = "timetrack";
include("../header.inc.php");
echo "<center><h3>" . lang("employee profiles") . "</h3><table border=0 width=65%>"
. "<tr bgcolor=" . $phpgw_info["theme"]["th_bg"] . "><th>" . lang("Last name") . "</th><th>"
. lang("First name") . "</th><th> " . lang("Edit") . " </th> <th> "
. lang("View") . " </th></tr>";
$phpgw->db->query("select account_id,account_firstname,account_lastname,account_lid from accounts order by "
. "account_lastname, account_firstname");
while ($phpgw->db->next_record()) {
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$lastname = $phpgw->db->f("account_lastname");
$firstname = $phpgw->db->f("account_firstname");
if (! $lastname) $lastname = ' ';
if (! $firstname) $firstname = ' ';
echo "<tr bgcolor=$tr_color><td>$lastname</td><td>$firstname</td>"
. "<td width=5%><a href=\"" . $phpgw->link("editprofile.php",
"con=" . $phpgw->db->f("account_id")) . "\"> " . lang("Edit") . " </a></td>";
echo "<td width=5%><a href=\"" . $phpgw->link("viewprofile.php",
"con=" . $phpgw->db->f("account_id")) . "\"> " . lang("View") . " </a> </td></tr>";
}
echo '<form method=POST action="' . $phpgw->link("newprofile.php") . '"'
. "<tr><td colspan=5><input type=\"submit\" value=\"" . lang("Add")
. "\"></td></tr></form></table></center>";
$phpgw->common->phpgw_footer();
// So, I will need 4 other files as called out here. copy "editprofile" from edit account",
// deleteprofile from deleteaccount, viewprofile from viewaccount and newprofile from newaccount.