<?
include ("../../../mainfile.php");
include_once(XOOPS_ROOT_PATH."/class/xoopsmodule.php");
include_once(XOOPS_ROOT_PATH."/include/cp_functions.php");
global $db, $_POST;
xoops_cp_header();
include (XOOPS_ROOT_PATH."/modules/directory/dbkey.php");
include (XOOPS_ROOT_PATH."/modules/directory/queries.php");
include (XOOPS_ROOT_PATH."/modules/directory/functions.php");
include (XOOPS_ROOT_PATH."/modules/directory/head.admin.php");
if ($action == "list") {
	edit_contact_list($action,$personid);
} elseif ($action == "edit") {
	edit_contact_upd($action,$lastname,$firstname,$title,$phone,$address,$department,$personid,$update_person,$update_phone);
} elseif ($action == "delete") {
	edit_contact_del($action,$personid,$select_edit);
} else {
    print "<td class=Highlight><center><b>Select a contact to edit first!</b></center></td>";
}
include	(XOOPS_ROOT_PATH."/modules/directory/footer.php");
xoops_cp_footer();
?>
