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 *
* option) any later version. *
\**************************************************************************/
/* $ Id $ */
/* $Id$ */
{
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)) {
$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 "<a href=".$pg.">" . lang("Addressbook preferences") . "</a><br>";
echo '<a href="' . $phpgw->link('/addressbook/preferences.php') . '">'
. lang('Addressbook preferences') . '</a><br>';
$pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/fields.php");
echo "<a href=".$pg.">" . lang("Edit custom fields") . "</a><br>";
echo '<a href="' . $phpgw->link('/addressbook/fields.php') . '">'
. lang('Edit custom fields') . '</a><br>';
$pg=$phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/acl_preferences.php");
echo "<a href=".$pg.">" . lang("Grant Addressbook Access") . "</a>";
echo '<a href="' . $phpgw->link('/addressbook/acl_preferences.php') . '">'
. lang('Grant Addressbook Access') . '</a>';
section_end();
}

View File

@ -12,27 +12,33 @@
/* $Id$ */
{
echo "<p>\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 "<p>\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 "<a href=".$pg.">" . lang("Calendar preferences") . "</a><br>";
echo '<a href="' . $phpgw->link('/calendar/preferences.php') . '">' . lang('Calendar preferences')
. '</a><br>';
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/".$appname."/acl_preferences.php");
echo "<a href=".$pg.">" . lang("Grant Calendar Access") . "</a>";
echo '<a href="' . $phpgw->link('/calendar/acl_preferences.php') . '">'
. lang('Grant Calendar Access') . '</a>';
section_end();
section_end();
}
?>

View File

@ -1,43 +1,49 @@
<?php
/**************************************************************************\
* phpGroupWare - preferences *
* http://www.phpgroupware.org *
* Written by Joseph Engo <jengo@phpgroupware.org> *
* -------------------------------------------- *
* 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 <jengo@phpgroupware.org> *
* -------------------------------------------- *
* 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 "<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
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\">\n";
//echo "<TR BGCOLOR=\"".$phpgw_info["theme"]["navbar_bg"]."\">";
echo "<TR>";
if ($icon != "") {
echo "<TD WIDTH='5%'><img src='".$icon."' ALT='[Icon]' align='middle'></TD>";
echo "<TD><fontsize='+2'>".lang($name)."</font></TD>";
} else {
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";
}
if ($icon)
{
echo '<TD WIDTH="5%"><img src="' . $icon . '" ALT="[Icon]" align="middle"></TD>';
echo '<TD><fontsize="+2">' . lang($name) . '</font></TD>';
}
else
{
echo '<TD colspan="2"><font size="+2">' . $name . '</font></TD>';
}
echo '</TR>';
echo '<TR><TD colspan="2">';
}
$phpgw->common->hook();
function section_end()
{
echo '</TD></TR></TABLE>';
echo "\n\n";
}
$phpgw->common->phpgw_footer();
?>
$phpgw->common->hook();
$phpgw->common->phpgw_footer();
?>