From dbee6480382f271a060c3e6260510bbfd555d12b Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 14 Jan 2001 02:43:14 +0000 Subject: [PATCH] Added templates for add.php, edit.php and inc/functions.inc.php. --- addressbook/add.php | 41 +--- addressbook/delete.php | 6 +- addressbook/edit.php | 91 ++++--- addressbook/inc/functions.inc.php | 319 +++++++++---------------- addressbook/index.php | 4 +- addressbook/oldadd.php | 135 +++++++++++ addressbook/olddelete.php | 53 ++++ addressbook/oldedit.php | 159 ++++++++++++ addressbook/templates/default/add.tpl | 27 +++ addressbook/templates/default/edit.tpl | 36 +++ addressbook/templates/default/form.tpl | 154 ++++++++++++ addressbook/templates/justweb/add.tpl | 27 +++ addressbook/templates/verdilak/add.tpl | 27 +++ 13 files changed, 788 insertions(+), 291 deletions(-) create mode 100755 addressbook/oldadd.php create mode 100755 addressbook/olddelete.php create mode 100755 addressbook/oldedit.php create mode 100644 addressbook/templates/default/add.tpl create mode 100644 addressbook/templates/default/edit.tpl create mode 100755 addressbook/templates/default/form.tpl create mode 100644 addressbook/templates/justweb/add.tpl create mode 100644 addressbook/templates/verdilak/add.tpl diff --git a/addressbook/add.php b/addressbook/add.php index 6fdf2e3693..06bd761dca 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -19,7 +19,9 @@ $phpgw_info["flags"]["currentapp"] = "addressbook"; $phpgw_info["flags"]["enable_addressbook_class"] = True; include("../header.inc.php"); - + + $t = new Template($phpgw_info["server"]["app_tpl"]); + $t->set_file(array( "add" => "add.tpl")); if ($AddVcard){ Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . @@ -101,35 +103,12 @@ "cd=14")); } -?> - - - - - - -
- - - - - - - - -
- "> - - "> - - " . lang("Cancel"); ?> -
-
- - - - + $t->set_var("lang_ok",lang("ok")); + $t->set_var("lang_clear",lang("clear")); + $t->set_var("lang_cancel",lang("cancel")); + $t->set_var("cancel_link",''); + $t->parse("out","add"); + $t->pparse("out","add"); -common->phpgw_footer(); -?> \ No newline at end of file +?> diff --git a/addressbook/delete.php b/addressbook/delete.php index 0e3da1c0e6..b9efccdcdb 100755 --- a/addressbook/delete.php +++ b/addressbook/delete.php @@ -21,7 +21,7 @@ include("../header.inc.php"); if (! $ab_id) { - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); + @Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); } if ($confirm != "true") { @@ -29,7 +29,7 @@ $phpgw->db->next_record(); if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"]) - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); + @Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); ?> @@ -46,7 +46,7 @@ $phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["account_id"] . "' and ab_id='$ab_id'"); - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", + @Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", "cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); } ?> diff --git a/addressbook/edit.php b/addressbook/edit.php index 905fd4d05b..ad92cbb405 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -20,6 +20,9 @@ $phpgw_info["flags"]["enable_addressbook_class"] = True; include("../header.inc.php"); + $t = new Template($phpgw_info["server"]["app_tpl"]); + $t->set_file(array( "edit" => "edit.tpl")); + if (! $ab_id) { Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", "cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); @@ -31,31 +34,30 @@ . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id"); $phpgw->db->next_record(); - $fields = array('ab_id' => $phpgw->db->f("ab_id"), - 'owner' => $phpgw->db->f("ab_owner"), - 'access' => $phpgw->db->f("ab_access"), - 'firstname' => $phpgw->db->f("ab_firstname"), - 'lastname' => $phpgw->db->f("ab_lastname"), - 'title' => $phpgw->db->f("ab_title"), - 'email' => $phpgw->db->f("ab_email"), - 'hphone' => $phpgw->db->f("ab_hphone"), - 'wphone' => $phpgw->db->f("ab_wphone"), - 'fax' => $phpgw->db->f("ab_fax"), - 'pager' => $phpgw->db->f("ab_pager"), - 'mphone' => $phpgw->db->f("ab_mphone"), - 'ophone' => $phpgw->db->f("ab_ophone"), - 'street' => $phpgw->db->f("ab_street"), - 'address2' => $phpgw->db->f("ab_address2"), - 'city' => $phpgw->db->f("ab_city"), - 'state' => $phpgw->db->f("ab_state"), - 'zip' => $phpgw->db->f("ab_zip"), - 'bday' => $phpgw->db->f("ab_bday"), - 'company' => $phpgw->db->f("ab_company"), - 'company_id' => $phpgw->db->f("ab_company_id"), - 'notes' => $phpgw->db->f("ab_notes") -, - 'url' => $phpgw->db->f("ab_url") - ); + $fields = array('ab_id' => $phpgw->db->f("ab_id"), + 'owner' => $phpgw->db->f("ab_owner"), + 'access' => $phpgw->db->f("ab_access"), + 'firstname' => $phpgw->db->f("ab_firstname"), + 'lastname' => $phpgw->db->f("ab_lastname"), + 'title' => $phpgw->db->f("ab_title"), + 'email' => $phpgw->db->f("ab_email"), + 'hphone' => $phpgw->db->f("ab_hphone"), + 'wphone' => $phpgw->db->f("ab_wphone"), + 'fax' => $phpgw->db->f("ab_fax"), + 'pager' => $phpgw->db->f("ab_pager"), + 'mphone' => $phpgw->db->f("ab_mphone"), + 'ophone' => $phpgw->db->f("ab_ophone"), + 'street' => $phpgw->db->f("ab_street"), + 'address2' => $phpgw->db->f("ab_address2"), + 'city' => $phpgw->db->f("ab_city"), + 'state' => $phpgw->db->f("ab_state"), + 'zip' => $phpgw->db->f("ab_zip"), + 'bday' => $phpgw->db->f("ab_bday"), + 'company' => $phpgw->db->f("ab_company"), + 'company_id' => $phpgw->db->f("ab_company_id"), + 'notes' => $phpgw->db->f("ab_notes"), + 'url' => $phpgw->db->f("ab_url") + ); form("","edit.php","Edit",$fields); @@ -127,33 +129,22 @@ $phpgw->common->phpgw_exit(); } -?> - - - - - + $t->set_var("ab_id",$ab_id); + $t->set_var("sort",$sort); + $t->set_var("order",$order); + $t->set_var("filter",$filter); + $t->set_var("start",$start); + $t->set_var("lang_ok",lang("ok")); + $t->set_var("lang_clear",lang("clear")); + $t->set_var("lang_cancel",lang("cancel")); + $t->set_var("lang_delete",lang("delete")); + $t->set_var("lang_submit",lang("submit")); + $t->set_var("cancel_link",'
'); + $t->set_var("delete_link",''); - - - - - - - - -
- "> - - " . lang("Cancel"); ?> - - " . lang("Delete"); ?> -
+ $t->parse("out","edit"); + $t->pparse("out","edit"); - - - -common->phpgw_footer(); ?> diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index 9fe588ea1c..b7ede56dae 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -36,24 +36,27 @@ function form($format,$action,$title,$fields) { global $phpgw, $phpgw_info; + + $t = new Template($phpgw_info["server"]["app_tpl"]); + $t->set_file(array( "form" => "form.tpl")); $email = $fields["email"]; $firstname = $fields["firstname"]; $lastname = $fields["lastname"]; $title = $fields["title"]; $hphone = $fields["hphone"]; - $wphone = $fields["wphone"]; - $fax = $fields["fax"]; - $pager = $fields["pager"]; - $mphone = $fields["mphone"]; - $ophone = $fields["ophone"]; - $street = $fields["street"]; + $wphone = $fields["wphone"]; + $faxi = $fields["fax"]; + $pager = $fields["pager"]; + $mphone = $fields["mphone"]; + $ophone = $fields["ophone"]; + $street = $fields["street"]; $address2 = $fields["address2"]; - $city = $fields["city"]; + $city = $fields["city"]; $state = $fields["state"]; - $zip = $fields["zip"]; - $bday = $fields["bday"]; - $notes = $fields["notes"]; + $zip = $fields["zip"]; + $bday = $fields["bday"]; + $notes = $fields["notes"]; $access = $fields["access"]; $ab_company = $fields["company"]; $company_id = $fields["company_id"]; @@ -112,8 +115,7 @@ . "" . "" . "" - . "" -; + . ""; $bday_day = '' ; $bday_year = ''; @@ -132,16 +134,12 @@ . "" . "" . "" - . "" -; - $bday_day = '' -; - $bday_year = '' -; + . ""; + $bday_day = ''; + $bday_year = ''; } - $notes = ''; + $notes = ''; } else { $notes = "
"; @@ -160,216 +158,125 @@ // test: //echo "Time track app status = " . $phpgw_info["apps"]["timetrack"]["enabled"]; + #$url .= 'common->dateformatorder($bday_year,$bday_month,$bday_day) + . '(e.g. 1969)'; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " . lang("Group access") . ":" - . "' + . '" - . "' + . ' + $access_link .= ' + '; } - ?> - - "; + $access_link .= ''; + $t->set_var("lang_access",lang("access")); + } else { + $access_link = ''; + $t->set_var("lang_access",''); } if ($format == "view") - echo "" - . "' + . ' - - - - - -
: - - - : - - -
- : - - - - - : - - - -
- : - - - - - : - - "> -
: - - - : - - -
: - - - : - - -
: - - - : - - -
: - - - : - common->dateformatorder($bday_year,$bday_month,$bday_day) - . '(e.g. 1969)'; - ?> -
: - - -
: - - -
: - - -
: - - -
" + $access_link .= ''.lang("Group access").':' . $phpgw->accounts->convert_string_to_names($access); } else { - echo "" . lang("access") . ":" + $access_link .= ''.lang("Access").':' . $access; } } else { - ?> - :'.lang("Access").': - "; + $access_link .= ' selected>'.lang("Group Public").''; + else + $access_link .= '>'.lang("Group Public").''; + + $access_link .= '
" . lang("Which groups") - . ":
' . lang("Which groups") + . ':
" . lang("Created by") . ":" + $create .= '
'.lang("Created by").':' . grab_owner_name($fields["owner"]); - - ?> -
: - - - - -
-set_var("lang_lastname",lang("Last Name")); + $t->set_var("lastname",$lastname); + $t->set_var("lang_firstname",lang("First Name")); + $t->set_var("firstname",$firstname); + $t->set_var("lang_company",lang("Company")); + $t->set_var("company",$company); + $t->set_var("lang_title",lang("Title")); + $t->set_var("title",$title); + $t->set_var("lang_email",lang("Email")); + $t->set_var("email",$email); + $t->set_var("lang_url",lang("url")); + $t->set_var("url",$url); + $t->set_var("lang_hphone",lang("Home Phone")); + $t->set_var("hphone",$hphone); + $t->set_var("lang_fax",lang("fax")); + $t->set_var("fax",$fax); + $t->set_var("lang_wphone",lang("Work Phone")); + $t->set_var("wphone",$wphone); + $t->set_var("lang_pager",lang("Pager")); + $t->set_var("pager",$pager); + $t->set_var("lang_mphone",lang("Mobile Phone")); + $t->set_var("mphone",$mphone); + $t->set_var("lang_ophone",lang("Other Phone")); + $t->set_var("ophone",$ophone); + $t->set_var("lang_street",lang("Street")); + $t->set_var("street",$street); + $t->set_var("lang_birthday",lang("Birthday")); + $t->set_var("birthday",$birthday); + $t->set_var("lang_address2",lang("Line 2")); + $t->set_var("address2",$address2); + $t->set_var("lang_city",lang("city")); + $t->set_var("city",$state); + $t->set_var("lang_state",lang("state")); + $t->set_var("state",$state); + $t->set_var("lang_zip",lang("Zip Code")); + $t->set_var("zip",$zip); + $t->set_var("access_link",$access_link); + $t->set_var("create",$create); + $t->set_var("lang_notes",lang("notes")); + $t->set_var("notes",$notes); + + $t->parse("out","form"); + $t->pparse("out","form"); } ?> diff --git a/addressbook/index.php b/addressbook/index.php index b4f1edbaf9..844f2b1d0c 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -202,7 +202,7 @@ - '.$phpgw->common->check_owner($phpgw->db->f("ab_owner"),"edit.php",lang("edit"),"ab_id=" . $phpgw->db->f("ab_id")).' + '.$phpgw->common->check_owner($phpgw->db->f("ab_owner"),"edit.php",lang("edit"),"ab_id=" . $phpgw->db->f("ab_id")."&start=".$start."&sort=".$sort."&order=".$order).' @@ -219,6 +219,8 @@ $t->set_var("lang_vcard",lang("VCard")); $t->set_var("lang_edit",lang("Edit")); $t->set_var("start",$start); + $t->set_var("sort",$sort); + $t->set_var("order",$order); $t->set_var("filter",$filter); $t->set_var("qfield",$qfield); $t->set_var("query",$query); diff --git a/addressbook/oldadd.php b/addressbook/oldadd.php new file mode 100755 index 0000000000..6fdf2e3693 --- /dev/null +++ b/addressbook/oldadd.php @@ -0,0 +1,135 @@ + * + * -------------------------------------------- * + * 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$ */ + + if ($submit || $AddVcard) { + $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True); + } + + $phpgw_info["flags"]["currentapp"] = "addressbook"; + $phpgw_info["flags"]["enable_addressbook_class"] = True; + include("../header.inc.php"); + + + if ($AddVcard){ + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . + "/addressbook/vcardin.php")); + } + else if ($add_email) { + list($fields["firstname"],$fields["lastname"]) = explode(" ", $name); + $fields["email"] = $add_email; + form("","add.php","Add",$fields); + } else if (! $submit && ! $add_email) { + form("","add.php","Add","","",""); + } else { + if (! $bday_month && ! $bday_day && ! $bday_year) { + $bday = ""; + } else { + $bday = "$bday_month/$bday_day/$bday_year"; + } + + if ($access != "private" && $access != "public") { + $access = $phpgw->accounts->array_to_string($access,$n_groups); + } + + if ($url == "http://") { + $url = ""; + } + + if ($phpgw_info["apps"]["timetrack"]["enabled"]) { + $sql = "insert into addressbook (ab_owner,ab_access,ab_firstname,ab_lastname,ab_title,ab_email," + . "ab_hphone,ab_wphone,ab_fax,ab_pager,ab_mphone,ab_ophone,ab_street,ab_address2,ab_city," + . "ab_state,ab_zip,ab_bday," + . "ab_notes,ab_company_id,ab_url) values ('" . $phpgw_info["user"]["account_id"] . "','$access','" + . addslashes($firstname). "','" + . addslashes($lastname) . "','" + . addslashes($title) . "','" + . addslashes($email) . "','" + . addslashes($hphone) . "','" + . addslashes($wphone) . "','" + . addslashes($fax) . "','" + . addslashes($pager) . "','" + . addslashes($mphone) . "','" + . addslashes($ophone) . "','" + . addslashes($street) . "','" + . addslashes($address2) . "','" + . addslashes($city) . "','" + . addslashes($state) . "','" + . addslashes($zip) . "','" + . addslashes($bday) . "','" + . addslashes($notes) . "','" + . addslashes($company) . "','" + . addslashes($url) . "')"; + } else { + $sql = "insert into addressbook (ab_owner,ab_access,ab_firstname,ab_lastname,ab_title,ab_email," + . "ab_hphone,ab_wphone,ab_fax,ab_pager,ab_mphone,ab_ophone,ab_street,ab_address2,ab_city," + . "ab_state,ab_zip,ab_bday," + . "ab_notes,ab_company,ab_url) values ('" . $phpgw_info["user"]["account_id"] . "','$access','" + . addslashes($firstname). "','" + . addslashes($lastname) . "','" + . addslashes($title) . "','" + . addslashes($email) . "','" + . addslashes($hphone) . "','" + . addslashes($wphone) . "','" + . addslashes($fax) . "','" + . addslashes($pager) . "','" + . addslashes($mphone) . "','" + . addslashes($ophone) . "','" + . addslashes($street) . "','" + . addslashes($address2) . "','" + . addslashes($city) . "','" + . addslashes($state) . "','" + . addslashes($zip) . "','" + . addslashes($bday) . "','" + . addslashes($notes) . "','" + . addslashes($company) . "','" + . addslashes($url) . "')"; + } + $phpgw->db->query($sql); + + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", + "cd=14")); + } + +?> + + + + + + +
+ + + + + + + + +
+ "> + + "> + + " . lang("Cancel"); ?> +
+
+ + + + + +common->phpgw_footer(); +?> \ No newline at end of file diff --git a/addressbook/olddelete.php b/addressbook/olddelete.php new file mode 100755 index 0000000000..0e3da1c0e6 --- /dev/null +++ b/addressbook/olddelete.php @@ -0,0 +1,53 @@ + * + * -------------------------------------------- * + * 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$ */ + + if ($confirm) { + $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True); + } + + $phpgw_info["flags"]["currentapp"] = "addressbook"; + $phpgw_info["flags"]["enable_addressbook_class"] = True; + include("../header.inc.php"); + + if (! $ab_id) { + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); + } + + if ($confirm != "true") { + $phpgw->db->query("select ab_owner from addressbook where ab_id='$ab_id'"); + $phpgw->db->next_record(); + + if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"]) + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); + + ?> + +
+
">         + ">
+ common->phpgw_footer(); + + } else { + + $phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["account_id"] + . "' and ab_id='$ab_id'"); + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", + "cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); + } +?> + diff --git a/addressbook/oldedit.php b/addressbook/oldedit.php new file mode 100755 index 0000000000..905fd4d05b --- /dev/null +++ b/addressbook/oldedit.php @@ -0,0 +1,159 @@ + * + * -------------------------------------------- * + * 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$ */ + + if ($submit || ! $ab_id) { + $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True); + } + + $phpgw_info["flags"]["currentapp"] = "addressbook"; + $phpgw_info["flags"]["enable_addressbook_class"] = True; + include("../header.inc.php"); + + if (! $ab_id) { + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/", + "cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); + $phpgw->common->phpgw_exit(); + } + + if (! $submit) { + $phpgw->db->query("SELECT * FROM addressbook WHERE ab_owner='" + . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id"); + $phpgw->db->next_record(); + + $fields = array('ab_id' => $phpgw->db->f("ab_id"), + 'owner' => $phpgw->db->f("ab_owner"), + 'access' => $phpgw->db->f("ab_access"), + 'firstname' => $phpgw->db->f("ab_firstname"), + 'lastname' => $phpgw->db->f("ab_lastname"), + 'title' => $phpgw->db->f("ab_title"), + 'email' => $phpgw->db->f("ab_email"), + 'hphone' => $phpgw->db->f("ab_hphone"), + 'wphone' => $phpgw->db->f("ab_wphone"), + 'fax' => $phpgw->db->f("ab_fax"), + 'pager' => $phpgw->db->f("ab_pager"), + 'mphone' => $phpgw->db->f("ab_mphone"), + 'ophone' => $phpgw->db->f("ab_ophone"), + 'street' => $phpgw->db->f("ab_street"), + 'address2' => $phpgw->db->f("ab_address2"), + 'city' => $phpgw->db->f("ab_city"), + 'state' => $phpgw->db->f("ab_state"), + 'zip' => $phpgw->db->f("ab_zip"), + 'bday' => $phpgw->db->f("ab_bday"), + 'company' => $phpgw->db->f("ab_company"), + 'company_id' => $phpgw->db->f("ab_company_id"), + 'notes' => $phpgw->db->f("ab_notes") +, + 'url' => $phpgw->db->f("ab_url") + ); + + form("","edit.php","Edit",$fields); + + } else { + if ($url == "http://") { + $url = ""; + } + + if (! $bday_month && ! $bday_day && ! $bday_year) { + $bday = ""; + } else { + $bday = "$bday_month/$bday_day/$bday_year"; + } + + if ($access != "private" && $access != "public") { + $access = $phpgw->accounts->array_to_string($access,$n_groups); + } + + if($phpgw_info["apps"]["timetrack"]["enabled"]) { + $sql = "UPDATE addressbook set ab_email='" . addslashes($email) + . "', ab_firstname='" . addslashes($firstname) + . "', ab_lastname='" . addslashes($lastname) + . "', ab_title='" . addslashes($title) + . "', ab_hphone='" . addslashes($hphone) + . "', ab_wphone='" . addslashes($wphone) + . "', ab_fax='" . addslashes($fax) + . "', ab_pager='" . addslashes($pager) + . "', ab_mphone='" . addslashes($mphone) + . "', ab_ophone='" . addslashes($ophone) + . "', ab_street='" . addslashes($street) + . "', ab_address2='" . addslashes($address2) + . "', ab_city='" . addslashes($city) + . "', ab_state='" . addslashes($state) + . "', ab_zip='" . addslashes($zip) + . "', ab_bday='" . addslashes($bday) + . "', ab_notes='" . addslashes($notes) + . "', ab_company_id='" . addslashes($company) + . "', ab_access='" . addslashes($access) + . "', ab_url='" . addslashes($url) + . "' WHERE ab_owner='" . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id"; + } else { + $sql = "UPDATE addressbook set ab_email='" . addslashes($email) + . "', ab_firstname='". addslashes($firstname) + . "', ab_lastname='" . addslashes($lastname) + . "', ab_title='" . addslashes($title) + . "', ab_hphone='" . addslashes($hphone) + . "', ab_wphone='" . addslashes($wphone) + . "', ab_fax='" . addslashes($fax) + . "', ab_pager='" . addslashes($pager) + . "', ab_mphone='" . addslashes($mphone) + . "', ab_ophone='" . addslashes($ophone) + . "', ab_street='" . addslashes($street) + . "', ab_address2='" . addslashes($address2) + . "', ab_city='" . addslashes($city) + . "', ab_state='" . addslashes($state) + . "', ab_zip='" . addslashes($zip) + . "', ab_bday='" . addslashes($bday) + . "', ab_notes='" . addslashes($notes) + . "', ab_company='" . addslashes($company) + . "', ab_access='" . addslashes($access) + . "', ab_url='" . addslashes($url) + . "' WHERE ab_owner='" . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id"; + } + + $phpgw->db->query($sql); + + Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=" + . "$filter&start=$start")); + $phpgw->common->phpgw_exit(); + } + +?> + + + + + + + + + + + + + + +
+ "> + + " . lang("Cancel"); ?> + + " . lang("Delete"); ?> +
+ + + + + +common->phpgw_footer(); +?> diff --git a/addressbook/templates/default/add.tpl b/addressbook/templates/default/add.tpl new file mode 100644 index 0000000000..df7e0ebc15 --- /dev/null +++ b/addressbook/templates/default/add.tpl @@ -0,0 +1,27 @@ + + + + + + + + +
+ + + + + + + + +
+ + + + + {cancel_link} +
+
+ + diff --git a/addressbook/templates/default/edit.tpl b/addressbook/templates/default/edit.tpl new file mode 100644 index 0000000000..cc8bea7d44 --- /dev/null +++ b/addressbook/templates/default/edit.tpl @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + +
+ + + {cancel_link} + + + + + + + + {delete_link} + + + + + + +
+ diff --git a/addressbook/templates/default/form.tpl b/addressbook/templates/default/form.tpl new file mode 100755 index 0000000000..b4f5387d1c --- /dev/null +++ b/addressbook/templates/default/form.tpl @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {access_link} + + + {create} + + + + + + + +
{lang_lastname}: + + {lastname} + {lang_firstname}: + + {firstname} +
+ {lang_title}: + + + {title} + + {lang_email}: + + + {email} +
+ {lang_company}: + + {company} + + {lang_url}: + + +
{lang_hphone}: + + {hphone} + {lang_fax}: + + {fax} +
{lang_wphone}: + + {wphone} + {lang_pager}: + + {pager} +
{lang_mphone}: + + {mphone} + {lang_ophone}: + + {ophone} +
{lang_street}: + + {street} + {lang_birthday}: + {birthday} +
{lang_address2}: + + {address2} +
{lang_city}: + + {city} +
{lang_state}: + + {state} +
{lang_zip}: + + {zip} +
+ +
{lang_notes}: + + {notes} +
+ diff --git a/addressbook/templates/justweb/add.tpl b/addressbook/templates/justweb/add.tpl new file mode 100644 index 0000000000..df7e0ebc15 --- /dev/null +++ b/addressbook/templates/justweb/add.tpl @@ -0,0 +1,27 @@ + + + + + + + + +
+ + + + + + + + +
+ + + + + {cancel_link} +
+
+ + diff --git a/addressbook/templates/verdilak/add.tpl b/addressbook/templates/verdilak/add.tpl new file mode 100644 index 0000000000..df7e0ebc15 --- /dev/null +++ b/addressbook/templates/verdilak/add.tpl @@ -0,0 +1,27 @@ + + + + + + + + +
+ + + + + + + + +
+ + + + + {cancel_link} +
+
+ +