From 8e4e2bd50f9237481b77500feb27470a5ffc3473 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 23 Oct 2008 08:42:43 +0000 Subject: More work on addressbook, now almost finished. --- forum/utils/addressbook.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 forum/utils/addressbook.php (limited to 'forum') diff --git a/forum/utils/addressbook.php b/forum/utils/addressbook.php new file mode 100644 index 0000000..43477dd --- /dev/null +++ b/forum/utils/addressbook.php @@ -0,0 +1,41 @@ +add($contact); + $contacts->write(); +} elseif($name) { + // Add + $cid = $contacts->getNextCID(); + $contact = new Contact($cid, + $name, + $address, + $phone, + $phone2, + $email, + $url); + $contacts->add($contact); + $contacts->write(); +} + +if($cid) { + $contact = $contacts->getContact($cid); + $contact->show(); +} else { + $contacts->show(); + + // TODO: Editorbox for adding new contact + +} + +?> \ No newline at end of file -- cgit v1.2.3