From 235ce3153daa4c455c4e27c0426bc82db1ed40e7 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 8 Apr 2001 08:19:38 +0000 Subject: [PATCH] Add some about this app info --- .../inc/hook_addressbook_about.inc.php | 46 +++++++++++++++++++ addressbook/templates/default/about.tpl | 16 +++++++ 2 files changed, 62 insertions(+) create mode 100644 addressbook/inc/hook_addressbook_about.inc.php create mode 100644 addressbook/templates/default/about.tpl diff --git a/addressbook/inc/hook_addressbook_about.inc.php b/addressbook/inc/hook_addressbook_about.inc.php new file mode 100644 index 0000000000..9f679d7826 --- /dev/null +++ b/addressbook/inc/hook_addressbook_about.inc.php @@ -0,0 +1,46 @@ +common->get_image_dir($appname) . '/' . $appname . '.gif'; + if (file_exists($imgfile)) + { + $imgpath = $phpgw->common->get_image_path($appname) . '/' . $appname . '.gif'; + } + else + { + $imgfile = $phpgw->common->get_image_dir($appname) . '/navbar.gif'; + if (file_exists($imgfile)) + { + $imgpath = $phpgw->common->get_image_path($appname) . '/navbar.gif'; + } + else + { + $imgpath = ''; + } + } + + $browser = CreateObject('phpgwapi.browser'); + $os = $browser->get_platform(); + $agent = ucfirst(strtolower($browser->get_agent())); + $version = $browser->get_version(); + + $tpl = new Template($phpgw->common->get_tpl_dir("addressbook")); + + $tpl->set_file(array("body" => "about.tpl")); + + $tpl->set_var("about_addressbook",'This is the phpgroupware core addressbook application. It makes use of the phpgroupware contacts class to store and retrieve contact information via SQL or LDAP.'); + + $tpl->set_var("url",$phpgw->link('/addressbook')); + $tpl->set_var("image",$imgpath); + $tpl->set_var("version",$version); + $tpl->set_var("agent",$agent); + $tpl->set_var("platform",$os); + $tpl->set_var("appear",lang('You appear to be running')); + $tpl->set_var("on",lang('on')); + + return $tpl->parse("out","body"); + } diff --git a/addressbook/templates/default/about.tpl b/addressbook/templates/default/about.tpl new file mode 100644 index 0000000000..0d89d21538 --- /dev/null +++ b/addressbook/templates/default/about.tpl @@ -0,0 +1,16 @@ + + + + + + + + + + + + + +
+ +
{about_addressbook}
{appear} {agent} {version} {on} {platform}.