Cleaned up link() calls

This commit is contained in:
jengo 2001-03-08 09:56:18 +00:00
parent 6deda7f240
commit c264cdcea5
3 changed files with 79 additions and 66 deletions

View File

@ -9,31 +9,32 @@
* Free Software Foundation; either version 2 of the License, or (at your * * Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. * * option) any later version. *
\**************************************************************************/ \**************************************************************************/
/* $ Id $ */
/* $Id$ */
{ {
echo "<p>\n"; echo "<p>\n";
$imgfile = $phpgw->common->get_image_dir($appname)."/" . $appname .".gif"; $imgfile = $phpgw->common->get_image_dir($appname) . '/' . $appname . '.gif';
if (file_exists($imgfile)) { if (file_exists($imgfile)) {
$imgpath = $phpgw->common->get_image_path($appname)."/" . $appname .".gif"; $imgpath = $phpgw->common->get_image_path($appname) . '/' . $appname . '.gif';
} else { } else {
$imgfile = $phpgw->common->get_image_dir($appname)."/navbar.gif"; $imgfile = $phpgw->common->get_image_dir($appname) . '/navbar.gif';
if (file_exists($imgfile)) { if (file_exists($imgfile)) {
$imgpath = $phpgw->common->get_image_path($appname)."/navbar.gif"; $imgpath = $phpgw->common->get_image_path($appname) . '/navbar.gif';
} else { } else {
$imgpath = ""; $imgpath = '';
} }
} }
section_start(ucfirst($appname),$imgpath); section_start(ucfirst($appname),$imgpath);
$pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/preferences.php"); echo '<a href="' . $phpgw->link('/addressbook/preferences.php') . '">'
echo "<a href=".$pg.">" . lang("Addressbook preferences") . "</a><br>"; . lang('Addressbook preferences') . '</a><br>';
$pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/fields.php"); echo '<a href="' . $phpgw->link('/addressbook/fields.php') . '">'
echo "<a href=".$pg.">" . lang("Edit custom fields") . "</a><br>"; . lang('Edit custom fields') . '</a><br>';
$pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/acl_preferences.php"); echo '<a href="' . $phpgw->link('/addressbook/acl_preferences.php') . '">'
echo "<a href=".$pg.">" . lang("Grant Addressbook Access") . "</a>"; . lang('Grant Addressbook Access') . '</a>';
section_end(); section_end();
} }

View File

@ -13,25 +13,31 @@
{ {
echo "<p>\n"; echo "<p>\n";
$imgfile = $phpgw->common->get_image_dir($appname)."/" . $appname .".gif"; $imgfile = $phpgw->common->get_image_dir($appname) . '/' . $appname . '.gif';
if (file_exists($imgfile)) { if (file_exists($imgfile))
$imgpath = $phpgw->common->get_image_path($appname)."/" . $appname .".gif"; {
} else { $imgpath = $phpgw->common->get_image_path($appname) . '/' . $appname . '.gif';
$imgfile = $phpgw->common->get_image_dir($appname)."/navbar.gif"; }
if (file_exists($imgfile)) { else
$imgpath = $phpgw->common->get_image_path($appname)."/navbar.gif"; {
} else { $imgfile = $phpgw->common->get_image_dir($appname) . '/navbar.gif';
$imgpath = ""; 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 '<a href="' . $phpgw->link('/calendar/preferences.php') . '">' . lang('Calendar preferences')
echo "<a href=".$pg.">" . lang("Calendar preferences") . "</a><br>"; . '</a><br>';
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/acl_preferences.php"); echo '<a href="' . $phpgw->link('/calendar/acl_preferences.php') . '">'
echo "<a href=".$pg.">" . lang("Grant Calendar Access") . "</a>"; . lang('Grant Calendar Access') . '</a>';
section_end(); section_end();
} }

View File

@ -12,29 +12,35 @@
/* $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 // This func called by the includes to dump a row header
function section_start($name="",$icon="") { function section_start($name='',$icon='')
{
global $phpgw,$phpgw_info; global $phpgw,$phpgw_info;
//echo "<TABLE WIDTH=\"75%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">\n"; //echo "<TABLE WIDTH=\"75%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">\n";
echo "<TABLE WIDTH=\"75%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"; echo '<TABLE WIDTH="75%" BORDER="0" CELLSPACING="0" CELLPADDING="0">';
//echo "<TR BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">"; //echo "<TR BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">";
echo "<TR>"; echo '<TR>';
if ($icon != "") {
echo "<TD WIDTH='5%'><img src='".$icon."' ALT='[Icon]' align='middle'></TD>"; if ($icon)
echo "<TD><fontsize='+2'>".lang($name)."</font></TD>"; {
} else { echo '<TD WIDTH="5%"><img src="' . $icon . '" ALT="[Icon]" align="middle"></TD>';
echo "<TD colspan='2'><font size='+2'>$name</font></TD>"; echo '<TD><fontsize="+2">' . lang($name) . '</font></TD>';
} }
echo "</TR>\n"; else
echo "<TR><TD colspan='2'>\n"; {
echo '<TD colspan="2"><font size="+2">' . $name . '</font></TD>';
} }
function section_end() { echo '</TR>';
echo "</TD></TR></TABLE>\n\n"; echo '<TR><TD colspan="2">';
}
function section_end()
{
echo '</TD></TR></TABLE>';
echo "\n\n";
} }
$phpgw->common->hook(); $phpgw->common->hook();