Switch doctype to HTML5

Properly float the important dates div
Remove table from page heading icon/title/help icon and use divs/floats instead
Temporarily make the login form post to the login.php page so one can still login
This commit is contained in:
james 2010-07-12 19:40:06 +00:00
parent 8c12e443b0
commit 2c6a491710
2 changed files with 20 additions and 29 deletions

View File

@ -435,10 +435,9 @@ function send_header($title="", $nav=null, $icon=null, $titletranslated=false)
if($HEADER_SENT) return;
else $HEADER_SENT=true;
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<!doctype html>
<html>
<head><title><? if($title && !$titletranslated) echo i18n($title); else if($title) echo $title; else echo i18n($config['fairname']); ?></title>
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/theme/<?=$config['theme']?>/jquery-ui-1.7.2.custom.css" type="text/css" media="all" />
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/theme/<?=$config['theme']?>/sfiab.css" type="text/css" media="all" />
@ -549,10 +548,10 @@ if(isset($_SESSION['users_type'])) {
} else {
?>
<form method="post" action="user_login.php">
<form method="post" action="login.php">
<input type="hidden" name="action" value="login" />
<table cellspacing=1 cellpadding=1><tr><td>
<?=i18n("Username")?>:</td><td><input type="text" size="14" name="user" />
<?=i18n("Username")?>:</td><td><input type="email" size="14" name="user" />
</td></tr><tr><td>
<?=i18n("Password")?>:</td><td><input type="password" size="14" name="pass" />
</td></tr>
@ -696,20 +695,18 @@ if(committee_auth_has_access("config"))
if(committee_auth_has_access("admin"))
admin_warnings();
echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>";
if(substr(getcwd(),-6)!="/admin" && substr(getcwd(),-7)!="/config" && substr(getcwd(),-6)!="/super") {
?>
<div id="importantdatesbox">
</div>
<?
}
if($icon && theme_icon($icon)) {
echo "<td width=\"40\">";
echo theme_icon($icon);
echo "</td><td>";
echo "<div style=\"float: left; margin-right: 5px;\">";
echo theme_icon($icon);
echo "</div>";
}
else
echo "<td>";
if($title && !$titletranslated)
echo "<h2>".i18n($title)."</h2>";
else if($title)
echo "<h2>".$title."</h2>";
//if we're under /admin or /config then we want to show the ? help icon
if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config" || substr(getcwd(),-6)=="/super") {
@ -717,16 +714,13 @@ if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config" || substr(get
$fname=substr($_SERVER['REDIRECT_SCRIPT_URL'],strlen($config['SFIABDIRECTORY'])+1);
else
$fname=substr($_SERVER['PHP_SELF'],strlen($config['SFIABDIRECTORY'])+1);
echo "</td><td align=\"right\"><a target=\"_sfiabhelp\" href=\"http://www.sfiab.ca/wiki/index.php/Help_$fname\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/32/help.".$config['icon_extension']."\"></a>";
} else {
?>
<div id="importantdatesbox">
</div>
<?
echo "<div style=\"float: right;\"<a target=\"_sfiabhelp\" href=\"http://www.sfiab.ca/wiki/index.php/Help_$fname\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/32/help.".$config['icon_extension']."\"></a></div>";
}
echo "</td></tr>";
echo "</table>";
if($title && !$titletranslated)
echo "<h2>".i18n($title)."</h2>";
else if($title)
echo "<h2>".$title."</h2>";
display_messages();
}

View File

@ -116,10 +116,7 @@ table tr.odd {
}
#importantdatesbox {
position: absolute;
float: right;
right: 0px;
top: 141px;
width: 280px;
border: 2px solid silver;
background-color: #E0E0FF;
@ -155,8 +152,8 @@ h1 {
h2 {
font-size: 1.6em;
font-weight: bold;
margin-top: 0;
margin-bottom: .3em;
margin-top: 0.10em;
margin-bottom: 0.80em;
}
h3 {
font-size: 1.4em;