From c264cdcea5a610081be715de0c2610d9d025f2cb Mon Sep 17 00:00:00 2001 From: jengo Date: Thu, 8 Mar 2001 09:56:18 +0000 Subject: [PATCH] Cleaned up link() calls --- addressbook/inc/hook_preferences.inc.php | 25 ++++---- calendar/inc/hook_preferences.inc.php | 42 +++++++------ preferences/index.php | 78 +++++++++++++----------- 3 files changed, 79 insertions(+), 66 deletions(-) diff --git a/addressbook/inc/hook_preferences.inc.php b/addressbook/inc/hook_preferences.inc.php index 1ad5872f96..decccd6136 100644 --- a/addressbook/inc/hook_preferences.inc.php +++ b/addressbook/inc/hook_preferences.inc.php @@ -9,31 +9,32 @@ * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ - /* $ Id $ */ + + /* $Id$ */ { echo "

\n"; - $imgfile = $phpgw->common->get_image_dir($appname)."/" . $appname .".gif"; + $imgfile = $phpgw->common->get_image_dir($appname) . '/' . $appname . '.gif'; if (file_exists($imgfile)) { - $imgpath = $phpgw->common->get_image_path($appname)."/" . $appname .".gif"; + $imgpath = $phpgw->common->get_image_path($appname) . '/' . $appname . '.gif'; } else { - $imgfile = $phpgw->common->get_image_dir($appname)."/navbar.gif"; + $imgfile = $phpgw->common->get_image_dir($appname) . '/navbar.gif'; if (file_exists($imgfile)) { - $imgpath = $phpgw->common->get_image_path($appname)."/navbar.gif"; + $imgpath = $phpgw->common->get_image_path($appname) . '/navbar.gif'; } else { - $imgpath = ""; + $imgpath = ''; } } section_start(ucfirst($appname),$imgpath); - $pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/preferences.php"); - echo "" . lang("Addressbook preferences") . "
"; + echo '' + . lang('Addressbook preferences') . '
'; - $pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/fields.php"); - echo "" . lang("Edit custom fields") . "
"; + echo '' + . lang('Edit custom fields') . '
'; - $pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/acl_preferences.php"); - echo "" . lang("Grant Addressbook Access") . ""; + echo '' + . lang('Grant Addressbook Access') . ''; section_end(); } diff --git a/calendar/inc/hook_preferences.inc.php b/calendar/inc/hook_preferences.inc.php index a44045b1bd..a3c9a60205 100644 --- a/calendar/inc/hook_preferences.inc.php +++ b/calendar/inc/hook_preferences.inc.php @@ -12,27 +12,33 @@ /* $Id$ */ { - echo "

\n"; - $imgfile = $phpgw->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 = ""; - } - } + echo "

\n"; + $imgfile = $phpgw->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 = ''; + } + } - section_start(ucfirst($appname),$imgpath); + section_start(ucfirst($appname),$imgpath); - $pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/preferences.php"); - echo "" . lang("Calendar preferences") . "
"; + echo '' . lang('Calendar preferences') + . '
'; - $pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/acl_preferences.php"); - echo "" . lang("Grant Calendar Access") . ""; + echo '' + . lang('Grant Calendar Access') . ''; - section_end(); + section_end(); } ?> diff --git a/preferences/index.php b/preferences/index.php index c49fadf3ec..cdd59f799f 100755 --- a/preferences/index.php +++ b/preferences/index.php @@ -1,43 +1,49 @@ * - * -------------------------------------------- * - * 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. * - \**************************************************************************/ + /**************************************************************************\ + * phpGroupWare - preferences * + * http://www.phpgroupware.org * + * Written by Joseph Engo * + * -------------------------------------------- * + * 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$ */ + /* $Id$ */ - //$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True); + $phpgw_info['flags']['currentapp'] = 'preferences'; + include('../header.inc.php'); - $phpgw_info["flags"]["currentapp"] = "preferences"; - include("../header.inc.php"); + // This func called by the includes to dump a row header + function section_start($name='',$icon='') + { + global $phpgw,$phpgw_info; + //echo "\n"; + echo '
'; + //echo ""; + echo ''; - // This func called by the includes to dump a row header - function section_start($name="",$icon="") { - global $phpgw,$phpgw_info; - //echo "
\n"; - echo "
\n"; - //echo ""; - echo ""; - if ($icon != "") { - echo ""; - echo ""; - } else { - echo ""; - } - echo "\n"; - echo "
[Icon]".lang($name)."$name
\n"; - } - function section_end() { - echo "
\n\n"; - } + if ($icon) + { + echo '[Icon]'; + echo '' . lang($name) . ''; + } + else + { + echo '' . $name . ''; + } + echo ''; + echo ''; + } - $phpgw->common->hook(); + function section_end() + { + echo ''; + echo "\n\n"; + } - $phpgw->common->phpgw_footer(); -?> + $phpgw->common->hook(); + + $phpgw->common->phpgw_footer(); +?> \ No newline at end of file