Add function to read last id on submission, then redirect to view.php

This commit is contained in:
Miles Lott 2001-02-19 03:35:43 +00:00
parent 1e23bb9861
commit ebf3e7b0e0

View File

@ -13,7 +13,10 @@
/* $Id$ */ /* $Id$ */
if ($submit || $AddVcard) { if ($submit || $AddVcard) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True); $phpgw_info["flags"] = array(
"noheader" => True,
"nonavbar" => True
);
} }
$phpgw_info["flags"]["currentapp"] = "addressbook"; $phpgw_info["flags"]["currentapp"] = "addressbook";
@ -78,8 +81,11 @@
$fields["notes"] = $notes; $fields["notes"] = $notes;
addressbook_add_entry($phpgw_info["user"]["account_id"],$fields); addressbook_add_entry($phpgw_info["user"]["account_id"],$fields);
$ab_id = addressbook_get_lastid();
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]."/addressbook/","cd=14")); //Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]."/addressbook/","cd=14"));
Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start"));
$phpgw->common->phpgw_exit();
} }
$t->set_var("lang_ok",lang("ok")); $t->set_var("lang_ok",lang("ok"));