Various clean-ups and added some missing features (charset).

This commit is contained in:
skeeter 2001-04-28 21:48:05 +00:00
parent a5b2acc3bb
commit 3d50e88071
11 changed files with 192 additions and 173 deletions

View File

@ -11,20 +11,18 @@
/* $Id$ */
if ($phpgw_info["server"]["htmlcompliant"]) {
$bodyheader = 'BGCOLOR="' . $phpgw_info["theme"]["bg_color"] . '" ALINK="'
. $phpgw_info["theme"]["alink"] . '" LINK="' . $phpgw_info["theme"]["link"]
. '" VLINK="' . $phpgw_info["theme"]["vlink"] . '"';
} else {
$bodyheader = 'BGCOLOR="' . $phpgw_info["theme"]["bg_color"] . '"';
$bodyheader = 'BGCOLOR="'.$phpgw_info['theme']['bg_color'].'"';
if ($phpgw_info['server']['htmlcompliant']) {
$bodyheader .= ' ALINK="'.$phpgw_info['theme']['alink'].'" LINK="'.$phpgw_info['theme']['link'].'" VLINK="'.$phpgw_info['theme']['vlink'].'"';
}
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$tpl->set_unknowns("remove");
$tpl->set_file(array("head" => "head.tpl"));
$tpl->set_unknowns('remove');
$tpl->set_file(array('head' => 'head.tpl'));
$tpl->set_var('font_family',$phpgw_info['theme']['font']);
$tpl->set_var('charset',lang('charset'));
$tpl->set_var("website_title", $phpgw_info["server"]["site_title"]);
$tpl->set_var("body_tags",$bodyheader);
echo $tpl->finish($tpl->parse("out","head"));
$tpl->set_var('website_title',$phpgw_info['server']['site_title']);
$tpl->set_var('body_tags',$bodyheader);
echo $tpl->finish($tpl->parse('out','head'));
unset($tpl);
?>

View File

@ -1,21 +1,20 @@
<!-- BEGIN head -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!-- BEGIN head -->
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset={charset}">
<META name="AUTHOR" content="phpGroupWare http://www.phpgroupware.org">
<META NAME="description" CONTENT="phpGroupWare">
<META NAME="keywords" CONTENT="phpGroupWare">
<STYLE type="text/css">
<!--
a { text-decoration:none; }
<!--
A:link{ text-decoration:none }
A:visted{ text-decoration:none }
A:active{ text-decoration:none }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px; font-family: {font_family} }
.tablink { color: #000000; }
-->
-->
</STYLE>
<TITLE>{website_title}</TITLE>
</HEAD>

View File

@ -94,7 +94,7 @@
if ($phpgw_info["flags"]["noheader"] && ! $phpgw_info["flags"]["noappheader"]) {
}
return $tpl->finish($tpl->parse("out","navbar"));
return $tpl->fp("out","navbar"));
}
function parse_navbar_end()
@ -110,6 +110,6 @@
$tpl->set_var("table_bg_color",$phpgw_info["theme"]["navbar_bg"]);
$tpl->set_var("msg",$msg);
$tpl->set_var("version",$phpgw_info["server"]["versions"]["phpgwapi"]);
echo $tpl->finish($tpl->parse("out","footer"));
$tpl->pfp("out","footer"));
}
}

View File

@ -1,4 +1,3 @@
<!-- BEGIN navbar -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="{navbar_color}">

View File

@ -11,14 +11,19 @@
/* $Id$ */
$bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\" ALINK=\"".$phpgw_info["theme"]["alink"]."\" LINK=\"".$phpgw_info["theme"]["link"]."\" VLINK=\"".$phpgw_info["theme"]["vlink"]."\"";
if (!$phpgw_info["server"]["htmlcompliant"]) {
$bodyheader .= "topmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" leftmargin=\"0\"";
$bodyheader = 'BGCOLOR="'.$phpgw_info['theme']['bg_color'].'" ALINK="'.$phpgw_info['theme']['alink'].'" LINK="'.$phpgw_info['theme']['link'].'" VLINK="'.$phpgw_info['theme']['vlink'].'"';
if (!$phpgw_info['server']['htmlcompliant'])
{
$bodyheader .= ' topmargin="0" marginheight="0" marginwidth="0" leftmargin="0"';
}
$tpl = new Template($phpgw_info["server"]["template_dir"]);
$tpl->set_unknowns("remove");
$tpl->set_file(array("head" => "head.tpl"));
$tpl->set_var("website_title", $phpgw_info["server"]["site_title"]);
$tpl->set_var("body_tags",$bodyheader);
echo $tpl->finish($tpl->parse("out","head"));
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$tpl->set_unknowns('remove');
$tpl->set_file(array('head' => 'head.tpl'));
$tpl->set_var('charset',lang('charset'));
$tpl->set_var('font_family',$phpgw_info['theme']['font']);
$tpl->set_var('website_title',$phpgw_info['server']['site_title']);
$tpl->set_var('body_tags',$bodyheader);
$tpl->pfp('out','head');
unset($tpl);
?>

View File

@ -1,16 +1,20 @@
<!-- BEGIN head -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!-- BEGIN head -->
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset={charset}">
<META name="AUTHOR" content="phpGroupWare http://www.phpgroupware.org">
<META NAME="description" CONTENT="phpGroupWare">
<META NAME="keywords" CONTENT="phpGroupWare">
<STYLE type="text/css">
<!--
a { text-decoration:none; }
<!--
A:link{ text-decoration:none }
A:visted{ text-decoration:none }
A:active{ text-decoration:none }
body { margin-top: 0px; margin-right: 0px; font-family: verdana; margin-left: 0px }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px; font-family: {font_family} }
.tablink { color: #000000; }
-->
-->
</STYLE>
<script language="javascript">
<!--
@ -28,5 +32,5 @@ function MM_preloadImages() {
<TITLE>{website_title}</TITLE>
</HEAD>
<BODY {body_tags}>
<!-- END Head -->

View File

@ -13,32 +13,36 @@
function parse_navbar($force = False)
{
global $phpgw_info, $phpgw, $PHP_SELF;
global $phpgw_info, $phpgw;
$tpl = new Template($phpgw_info["server"]["template_dir"]);
$tpl->set_unknowns("remove");
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$tpl->set_unknowns('remove');
$tpl->set_file(array("navbar" => "navbar.tpl"));
$templates = Array('navbar' => 'navbar.tpl');
$tpl->set_file($templates);
$tpl->set_var("img_root",$phpgw_info["server"]["webserver_url"] . "/phpgwapi/templates/idsociety/images");
$tpl->set_var("img_root_roll",$phpgw_info["server"]["webserver_url"] . "/phpgwapi/templates/idsociety/images/rollover");
$tpl->set_var("table_bg_color",$phpgw_info["theme"]["navbar_bg"]);
$tpl->set_var('img_root',PHPGW_IMAGES_DIR);
$tpl->set_var('img_root_roll',PHPGW_IMAGES_DIR . '/rollover');
$tpl->set_var('table_bg_color',$phpgw_info['theme']['navbar_bg']);
if ($phpgw_info["flags"]["navbar_target"]) {
$target = ' target="' . $phpgw_info["flags"]["navbar_target"] . '"';
if ($phpgw_info['flags']['navbar_target'])
{
$target = ' target="' . $phpgw_info['flags']['navbar_target'] . '"';
}
# echo '<pre>'; print_r($phpgw_info['navbar']); echo '</pre>';
while ($app = each($phpgw_info["navbar"])) {
if ($app[1]["title"] != "Home" && $app[1]["title"] != "preferences" && ! ereg("About",$app[1]["title"]) && $app[1]["title"] != "Logout") {
$title = '<img src="' . $app[1]["icon"] . '" alt="' . $app[1]["title"] . '" title="'
. lang($app[1]["title"]) . '" border="0" name="' . $app[0] . '">';
while ($app = each($phpgw_info['navbar']))
{
if ($app[1]['title'] != 'Home' && $app[1]['title'] != 'preferences' && ! ereg('About',$app[1]['title']) && $app[1]['title'] != 'Logout')
{
$title = '<img src="' . $app[1]['icon'] . '" alt="' . $app[1]['title'] . '" title="'
. lang($app[1]['title']) . '" border="0" name="' . $app[0] . '">';
$img_src_over = $phpgw_info['server']['webserver_url'] . '/' . $app[0] . '/templates/idsociety/images/navbar-over.gif';
$img_src_out = $phpgw_info['server']['webserver_url'] . '/' . $app[0] . '/templates/idsociety/images/navbar.gif';
// onMouseOver="two.src='rollover/admin_over.gif'" onMouseOut="two.src='images/admin.gif'"><img src="images/admin.gif" border="0" name="two"
$applications .= '<tr><td><a href="' . $app[1]["url"] . '"' . $target . ' onMouseOver="'
$applications .= '<tr><td><a href="' . $app[1]['url'] . '"' . $target . ' onMouseOver="'
. $app[0] . '.src=\'' . $img_src_over . '\'" onMouseOut="' . $app[0] . '.src=\'' . $img_src_out . '\'">';
$applications .= $title . '</a></td></tr>';
@ -49,75 +53,88 @@
$tpl->set_var('app_images',implode("','",$pre_load));
$tpl->set_var("applications",$applications);
$tpl->set_var('applications',$applications);
$tpl->set_var("home_link",$phpgw_info["navbar"]["home"]["url"]);
$tpl->set_var("preferences_link",$phpgw_info["navbar"]["preferences"]["url"]);
$tpl->set_var("logout_link",$phpgw_info["navbar"]["logout"]["url"]);
$tpl->set_var("help_link",$phpgw_info["navbar"]["about"]["url"]);
$tpl->set_var('home_link',$phpgw_info['navbar']['home']['url']);
$tpl->set_var('preferences_link',$phpgw_info['navbar']['preferences']['url']);
$tpl->set_var('logout_link',$phpgw_info['navbar']['logout']['url']);
$tpl->set_var('help_link',$phpgw_info['navbar']['about']['url']);
$ir = $phpgw_info["server"]["webserver_url"] . "/phpgwapi/templates/idsociety/images";
if ($phpgw_info["flags"]["currentapp"] == "home") {
$tpl->set_var("welcome_img",$ir . "/welcome-red.gif");
} else {
$tpl->set_var("welcome_img",$ir . "/welcome-grey.gif");
if ($phpgw_info['flags']['currentapp'] == 'home')
{
$tpl->set_var('welcome_img',PHPGW_IMAGES_DIR . '/welcome-red.gif');
}
else
{
$tpl->set_var('welcome_img',PHPGW_IMAGES_DIR . '/welcome-grey.gif');
}
if ($phpgw_info["flags"]["currentapp"] == "preferences") {
$tpl->set_var("preferences_img",$ir . "/preferences-red.gif");
} else {
$tpl->set_var("preferences_img",$ir . "/preferences-grey.gif");
if ($phpgw_info['flags']['currentapp'] == 'preferences')
{
$tpl->set_var('preferences_img',PHPGW_IMAGES_DIR . '/preferences-red.gif');
}
$tpl->set_var("logout_img",$ir . "/logout-grey.gif");
else
{
$tpl->set_var('preferences_img',PHPGW_IMAGES_DIR . '/preferences-grey.gif');
}
$tpl->set_var('logout_img',PHPGW_IMAGES_DIR . '/logout-grey.gif');
/* if ($phpgw_info["server"]["showpoweredbyon"] == "top") {
$tpl->set_var("powered_by",lang("Powered by phpGroupWare version x",$phpgw_info["server"]["versions"]["phpgwapi"]));
/* if ($phpgw_info['server']['showpoweredbyon'] == 'top')
{
$tpl->set_var('powered_by',lang('Powered by phpGroupWare version x',$phpgw_info['server']['versions']['phpgwapi']));
}
*/
if (isset($phpgw_info["navbar"]["admin"]) && isset($phpgw_info["user"]["preferences"]["common"]["show_currentusers"])) {
if (isset($phpgw_info['navbar']['admin']) && isset($phpgw_info['user']['preferences']['common']['show_currentusers']))
{
$db = $phpgw->db;
$db->query("select count(*) from phpgw_sessions");
$db->query('select count(*) from phpgw_sessions');
$db->next_record();
$tpl->set_var("current_users",'<a href="' . $phpgw->link("/admin/currentusers.php") . '">&nbsp;'
. lang("Current users") . ': ' . $db->f(0) . '</a>');
$tpl->set_var("current_users",'<a href="' . $phpgw->link('/admin/currentusers.php') . '">&nbsp;'
. lang('Current users') . ': ' . $db->f(0) . '</a>');
}
$tpl->set_var("user_info",$phpgw->common->display_fullname() . " - "
. lang($phpgw->common->show_date(time(),"l")) . " "
. lang($phpgw->common->show_date(time(),"F")) . " "
. $phpgw->common->show_date(time(),"d, Y"));
$tpl->set_var('user_info',$phpgw->common->display_fullname() . ' - '
. lang($phpgw->common->show_date(time(),'l')) . ' '
. lang($phpgw->common->show_date(time(),'F')) . ' '
. $phpgw->common->show_date(time(),'d, Y'));
// Maybe we should create a common function in the phpgw_accounts_shared.inc.php file
// to get rid of duplicate code.
/* if ($phpgw_info["user"]["lastpasswd_change"] == 0) {
$api_messages = lang("You are required to change your password during your first login")
/* if ($phpgw_info['user']['lastpasswd_change'] == 0)
{
$api_messages = lang('You are required to change your password during your first login')
. '<br> Click this image on the navbar: <img src="'
. $phpgw_info["server"]["webserver_url"] . '/preferences/templates/'
. $phpgw_info["server"]["template_set"] . '/images/navbar.gif">';
} else if ($phpgw_info["user"]["lastpasswd_change"] < time() - (86400*30)) {
$api_messages = lang("it has been more then x days since you changed your password",30);
. $phpgw->common->get_image_path('preferences').'/navbar.gif">';
}
elseif ($phpgw_info['user']['lastpasswd_change'] < time() - (86400*30))
{
$api_messages = lang('it has been more then x days since you changed your password',30);
}
// This is gonna change
if (isset($cd)) {
$tpl->set_var("messages",$api_messages . "<br>" . checkcode($cd));
} */
if (isset($cd))
{
$tpl->set_var('messages',$api_messages . '<br>' . checkcode($cd));
}
*/
// If the application has a header include, we now include it
if ($phpgw_info["flags"]["noheader"] && ! $phpgw_info["flags"]["noappheader"]) {
if ($phpgw_info['flags']['noheader'] && ! $phpgw_info['flags']['noappheader'])
{
}
return $tpl->finish($tpl->parse("out","navbar"));
return $tpl->fp('out','navbar');
}
function parse_navbar_end()
{
global $phpgw_info, $phpgw;
$tpl = new Template($phpgw_info["server"]["template_dir"]);
$tpl->set_unknowns("remove");
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$tpl->set_unknowns('remove');
$tpl->set_file(array("footer" => "footer.tpl"));
$tpl->set_var("img_root",$phpgw_info["server"]["webserver_url"] . "/phpgwapi/templates/idsociety/images");
$tpl->set_var("table_bg_color",$phpgw_info["theme"]["navbar_bg"]);
$tpl->set_var("version",$phpgw_info["server"]["versions"]["phpgwapi"]);
echo $tpl->finish($tpl->parse("out","footer"));
$templates = Aarray('footer' => 'footer.tpl');
$tpl->set_file($templates);
$tpl->set_var('img_root',PHPGW_IMAGES_DIR);
$tpl->set_var('table_bg_color',$phpgw_info['theme']['navbar_bg']);
$tpl->set_var('version',$phpgw_info['server']['versions']['phpgwapi']);
$tpl->pfp('out','footer');
}

View File

@ -11,29 +11,29 @@
/* $Id$ */
if ($phpgw_info["server"]["htmlcompliant"])
$bodyheader = 'BGCOLOR="'.$phpgw_info['theme']['bg_color'].'"';
if ($phpgw_info['server']['htmlcompliant'])
{
$bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\" ALINK=\"".$phpgw_info["theme"]["alink"]."\" LINK=\"".$phpgw_info["theme"]["link"]."\" VLINK=\"".$phpgw_info["theme"]["vlink"]."\"";
}
else
{
$bodyheader = "BGCOLOR=\"".$phpgw_info["theme"]["bg_color"]."\"";
$bodyheader .= ' BGCOLOR="'.$phpgw_info['theme']['bg_color'].'" ALINK="'.$phpgw_info['theme']['alink'].'" LINK="'.$phpgw_info['theme']['link'].'" VLINK="'.$phpgw_info['theme']['vlink'].'"';
}
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
$tpl->set_unknowns("remove");
$tpl->set_file(array("head" => "head.tpl"));
$tpl->set_unknowns('remove');
$tpl->set_file(array('head' => 'head.tpl'));
$tpl->set_var("webserver_url", $phpgw_info["server"]["webserver_url"]);
$tpl->set_var("home",$phpgw->link('/'));
$tpl->set_var("appt",$phpgw->link('/calendar/day.php'));
$tpl->set_var("todo",$phpgw->link('/todo/add.php'));
$tpl->set_var("prefs",$phpgw->link('/preferences'));
$tpl->set_var("email",$phpgw->link('/email/preferences.php'));
$tpl->set_var("calendar",$phpgw->link('/calendar/preferences.php'));
$tpl->set_var("addressbook",$phpgw->link('/addressbook/preferences.php'));
$tpl->set_var("website_title", $phpgw_info["server"]["site_title"]);
$tpl->set_var("body_tags",$bodyheader);
echo $tpl->finish($tpl->parse("out","head"));
$tpl->set_var('webserver_url', $phpgw_info['server']['webserver_url']);
$tpl->set_var('home',$phpgw->link('/'));
$tpl->set_var('appt',$phpgw->link('/calendar/day.php'));
$tpl->set_var('todo',$phpgw->link('/todo/add.php'));
$tpl->set_var('prefs',$phpgw->link('/preferences'));
$tpl->set_var('email',$phpgw->link('/email/preferences.php'));
$tpl->set_var('calendar',$phpgw->link('/calendar/preferences.php'));
$tpl->set_var('addressbook',$phpgw->link('/addressbook/preferences.php'));
$tpl->set_var('charset',lang('charset'));
$tpl->set_var('font_family',$phpgw_info['theme']['font']);
$tpl->set_var('website_title', $phpgw_info['server']['site_title']);
$tpl->set_var('body_tags',$bodyheader);
echo $tpl->finish($tpl->parse('out','head'));
unset($tpl);
?>

View File

@ -1,28 +1,26 @@
<!-- BEGIN head -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!-- BEGIN head -->
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META http-equiv="Content-Type" content="text/html; charset={charset}">
<META name="AUTHOR" content="phpGroupWare http://www.phpgroupware.org">
<META NAME="description" CONTENT="phpGroupWare">
<META NAME="keywords" CONTENT="phpGroupWare">
<STYLE type="text/css">
<!--
a { text-decoration:none; }
<!--
A:link{ text-decoration:none }
A:visted{ text-decoration:none }
A:active{ text-decoration:none }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px; font-family: {font_family} }
.tablink { color: #000000; }
-->
-->
</STYLE>
<TITLE>{website_title}</TITLE>
<script language="JavaScript" src="{webserver_url}/phpgwapi/templates/justweb/navcond.js"></script>
<script language="JavaScript">
<!--
var myNavBar1 = new NavBar(0);
var dhtmlMenu;
@ -74,13 +72,10 @@ function init() {
myNavBar1.create();
myNavBar1.setzIndex(2);
}
-->
</script>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="init();" {body_tags}>
<!-- END Head -->
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="init();" {body_tags}>

View File

@ -24,7 +24,9 @@
$tpl->set_unknowns('remove');
$tpl->set_file(array('head' => 'head.tpl'));
$tpl->set_var('charset',lang('charset'));
$tpl->set_var('font_family',$phpgw_info['theme']['font']);
$tpl->set_var('website_title', $phpgw_info['server']['site_title']);
$tpl->set_var('body_tags',$bodyheader);
$tpl->pfp('out','head');
unset($tpl);
?>

View File

@ -1,6 +1,6 @@
<!-- BEGIN head -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<!-- BEGIN head -->
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset={charset}">
@ -8,14 +8,14 @@
<META NAME="description" CONTENT="phpGroupWare">
<META NAME="keywords" CONTENT="phpGroupWare">
<STYLE type="text/css">
<!--
a { text-decoration:none; }
<!--
A:link{ text-decoration:none }
A:visted{ text-decoration:none }
A:active{ text-decoration:none }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px }
body { margin-top: 0px; margin-right: 0px; margin-left: 0px; font-family: {font_family} }
.tablink { color: #000000; }
-->
-->
</STYLE>
<TITLE>{website_title}</TITLE>
</HEAD>