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

@ -12,27 +12,33 @@
/* $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"; {
} 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

@ -1,43 +1,49 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* phpGroupWare - preferences * * phpGroupWare - preferences *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* Written by Joseph Engo <jengo@phpgroupware.org> * * Written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * 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 * * 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 * * Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. * * 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"; // This func called by the includes to dump a row header
include("../header.inc.php"); function section_start($name='',$icon='')
{
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">';
//echo "<TR BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">";
echo '<TR>';
// This func called by the includes to dump a row header if ($icon)
function section_start($name="",$icon="") { {
global $phpgw,$phpgw_info; echo '<TD WIDTH="5%"><img src="' . $icon . '" ALT="[Icon]" align="middle"></TD>';
//echo "<TABLE WIDTH=\"75%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">\n"; echo '<TD><fontsize="+2">' . lang($name) . '</font></TD>';
echo "<TABLE WIDTH=\"75%\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"; }
//echo "<TR BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">"; else
echo "<TR>"; {
if ($icon != "") { echo '<TD colspan="2"><font size="+2">' . $name . '</font></TD>';
echo "<TD WIDTH='5%'><img src='".$icon."' ALT='[Icon]' align='middle'></TD>"; }
echo "<TD><fontsize='+2'>".lang($name)."</font></TD>"; echo '</TR>';
} else { echo '<TR><TD colspan="2">';
echo "<TD colspan='2'><font size='+2'>$name</font></TD>"; }
}
echo "</TR>\n";
echo "<TR><TD colspan='2'>\n";
}
function section_end() {
echo "</TD></TR></TABLE>\n\n";
}
$phpgw->common->hook(); function section_end()
{
echo '</TD></TR></TABLE>';
echo "\n\n";
}
$phpgw->common->phpgw_footer(); $phpgw->common->hook();
?>
$phpgw->common->phpgw_footer();
?>