Skip to content

Commit

Permalink
Changed width, align and nowrap to be styles to increase STRICT compl…
Browse files Browse the repository at this point in the history
…iance
  • Loading branch information
mr-russ committed Apr 22, 2007
1 parent 3d7db75 commit 92cedde
Show file tree
Hide file tree
Showing 16 changed files with 120 additions and 120 deletions.
6 changes: 3 additions & 3 deletions aggregates.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Manage aggregates in a database
*
* $Id: aggregates.php,v 1.17 2007/01/15 15:48:17 soranzo Exp $
* $Id: aggregates.php,v 1.18 2007/04/22 00:41:58 mr-russ Exp $
*/

// Include application functions
Expand Down Expand Up @@ -227,8 +227,8 @@ function doProperties($msg = '') {
// Display aggregate's info
echo "<table>\n";
echo "<tr>\n\t<th class=\"data\">Description</th>\n\t<th class=\"data\">Value</th>\n</tr>\n";
echo "<tr>\n\t<td class=\"data1\" width=\"160\">{$lang['strname']}</td>\n";
echo "\t<td class=\"data1\" width=\"120\">", htmlspecialchars($_REQUEST['aggrname']), "</td>\n</tr>\n";
echo "<tr>\n\t<td class=\"data1\" style=\"width: 160px\">{$lang['strname']}</td>\n";
echo "\t<td class=\"data1\" style=\"width: 120px\">", htmlspecialchars($_REQUEST['aggrname']), "</td>\n</tr>\n";
echo "<tr>\n\t<td class=\"data2\">{$lang['straggrbasetype']}</td>\n";
echo "\t<td class=\"data2\">", htmlspecialchars($_REQUEST['aggrtype']), "</td>\n</tr>\n";
echo "<tr>\n\t<td class=\"data1\">{$lang['straggrsfunc']}</td>\n";
Expand Down
14 changes: 7 additions & 7 deletions classes/Misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Class to hold various commonly used functions
*
* $Id: Misc.php,v 1.144 2007/04/18 16:33:59 mr-russ Exp $
* $Id: Misc.php,v 1.145 2007/04/22 00:41:58 mr-russ Exp $
*/

class Misc {
Expand Down Expand Up @@ -234,7 +234,7 @@ function printVal($str, $type = null, $params = array()) {
if (!isset($tag) && (isset($class) || isset($align))) $tag = 'div';

if (isset($tag)) {
$alignattr = isset($align) ? " align=\"{$align}\"" : '';
$alignattr = isset($align) ? " style=\"text-align: {$align};\"" : '';
$classattr = isset($class) ? " class=\"{$class}\"" : '';
$out = "<{$tag}{$alignattr}{$classattr}>{$out}</{$tag}>";
}
Expand Down Expand Up @@ -461,7 +461,7 @@ function printTabs($tabs, $activetab) {

$tablink .= "<span class=\"label\">{$tab['title']}</span></a>";

echo "<td width=\"{$width}\" class=\"tab{$active}\">";
echo "<td style=\"width: {$width}\" class=\"tab{$active}\">";
#echo "<span class=\"tab{$active}\" style=\"white-space:nowrap;\">";

if (isset($tab['help']))
Expand Down Expand Up @@ -1030,7 +1030,7 @@ function printTopbar() {

$server_info = $this->getServerInfo();

echo "<div class=\"topbar\"><table width=\"100%\"><tr><td>";
echo "<div class=\"topbar\"><table style=\"width: 100%\"><tr><td>";

if ($server_info && isset($server_info['platform']) && isset($server_info['username'])) {
echo sprintf($lang['strtopbar'],
Expand All @@ -1050,7 +1050,7 @@ function printTopbar() {

$window_id = htmlspecialchars('sqledit:'.$_REQUEST['server']);

echo "<td align=\"right\">";
echo "<td style=\"text-align: right\">";

echo "<a class=\"toplink\" href=\"{$url}sql\" target=\"sqledit\" onclick=\"window.open('{$url}sql','{$window_id}','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;\">{$lang['strsql']}</a> | ";

Expand All @@ -1061,7 +1061,7 @@ function printTopbar() {
echo "</td>";
}
/*
echo "<td align=\"right\" width=\"1%\">";
echo "<td style=\"text-align: right; width: 1%\">";
echo "<form method=\"get\"><select name=\"language\" onchange=\"this.form.submit()\">\n";
$language = isset($_SESSION['webdbLanguage']) ? $_SESSION['webdbLanguage'] : 'english';
Expand Down Expand Up @@ -1674,7 +1674,7 @@ function printTable(&$tabledata, &$columns, &$actions, $nodata = null, $pre_fn =
if (isset($multiactions)) {
echo "<table>\n";
echo "<tr>\n";
echo "<th class=\"data\" align=\"left\" colspan=\"3\">{$lang['stractionsonmultiplelines']}</th>\n";
echo "<th class=\"data\" style=\"text-align: left\" colspan=\"3\">{$lang['stractionsonmultiplelines']}</th>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=\"data1\">";
Expand Down
8 changes: 4 additions & 4 deletions constraints.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* List constraints on a table
*
* $Id: constraints.php,v 1.44 2007/01/15 15:48:17 soranzo Exp $
* $Id: constraints.php,v 1.45 2007/04/22 00:41:58 mr-russ Exp $
*/

// Include application functions
Expand Down Expand Up @@ -80,7 +80,7 @@ function addForeignKey($stage, $msg = '') {
echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>";
echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\">&nbsp;</th><th class=data>{$lang['strfkcolumnlist']}</th></tr>\n";
echo "<tr><td class=\"data1\">" . $selColumns->fetch() . "</td>\n";
echo "<td class=\"data1\" align=\"center\">" . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>";
echo "<td class=\"data1\" style=\"text-align: center\">" . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>";
echo "<td class=\"data1\">" . $selIndex->fetch() . "</td></tr>\n";
echo "<tr><th class=\"data\" colspan=\"3\">{$lang['stractions']}</th></tr>";
echo "<tr>";
Expand Down Expand Up @@ -184,7 +184,7 @@ function addForeignKey($stage, $msg = '') {
echo "<tr><td class=\"data1\" colspan=\"3\"><input type=\"text\" name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" /></td></tr>\n";
echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\">&nbsp;</th><th class=\"data required\">{$lang['strfkcolumnlist']}</th></tr>\n";
echo "<tr><td class=\"data1\">" . $selColumns->fetch() . "</td>\n";
echo "<td class=\"data1\" align=\"center\">" . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>\n";
echo "<td class=\"data1\" style=\"text-align: center\">" . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>\n";
echo "<td class=data1>" . $selIndex->fetch() . "</td></tr>\n";
echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>";
echo "<tr>";
Expand Down Expand Up @@ -279,7 +279,7 @@ function addPrimaryOrUniqueKey($type, $confirm, $msg = '') {
"\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" /></td></tr>";
echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\">&nbsp;</th><th class=\"data required\">{$lang['strindexcolumnlist']}</th></tr>\n";
echo "<tr><td class=\"data1\">" . $selColumns->fetch() . "</td>\n";
echo "<td class=\"data1\" align=\"center\">" . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>";
echo "<td class=\"data1\" style=\"text-align: center\">" . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>";
echo "<td class=data1>" . $selIndex->fetch() . "</td></tr>\n";

// Tablespace (if there are any)
Expand Down
20 changes: 10 additions & 10 deletions database.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Manage schemas within a database
*
* $Id: database.php,v 1.93 2007/04/20 15:56:39 ioguix Exp $
* $Id: database.php,v 1.94 2007/04/22 00:41:58 mr-russ Exp $
*/

// Include application functions
Expand Down Expand Up @@ -567,7 +567,7 @@ function doAdmin($action = '', $msg = '') {
$misc->printTabs('database','admin');
$misc->printMsg($msg);

echo "<table width=\"60%\">\n";
echo "<table style=\"width: 60%\">\n";
echo "<tr>\n";
echo "<th class=\"data\">";
$misc->printHelp($lang['strvacuum'],'pg.admin.vacuum')."</th>\n";
Expand All @@ -589,7 +589,7 @@ function doAdmin($action = '', $msg = '') {

// Vacuum
echo "<tr>\n";
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n";
echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
echo "<input type=\"checkbox\" id=\"vacuum_analyze\" name=\"vacuum_analyze\" /><label for=\"vacuum_analyze\">{$lang['stranalyze']}</label><br />\n";
if ($data->hasFullVacuum()) {
Expand All @@ -604,7 +604,7 @@ function doAdmin($action = '', $msg = '') {

// Analyze
if ($data->hasAnalyze()) {
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n";
echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
echo "<input type=\"submit\" value=\"{$lang['stranalyze']}\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"analyze\" />\n";
Expand All @@ -615,7 +615,7 @@ function doAdmin($action = '', $msg = '') {

// Recluster
if ($data->hasRecluster()){
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n";
echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
echo "<input type=\"submit\" value=\"{$lang['strclusterindex']}\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"recluster\" />\n";
Expand All @@ -625,7 +625,7 @@ function doAdmin($action = '', $msg = '') {
}

// Reindex
echo "<td class=\"data1\" align=\"center\" valign=\"bottom\">\n";
echo "<td class=\"data1\" style=\"text-align: center; vertical-align: bottom\">\n";
echo "<form name=\"adminfrm\" id=\"adminfrm\" action=\"{$PHP_SELF}\" method=\"post\">\n";
echo "<input type=\"checkbox\" id=\"reindex_force\" name=\"reindex_force\" /><label for=\"reindex_force\">{$lang['strforce']}</label><br />\n";
echo "<input type=\"submit\" value=\"{$lang['strreindex']}\" />\n";
Expand Down Expand Up @@ -752,20 +752,20 @@ function doEditAutovacuum($confirm, $msg = '') {
$_REQUEST['format'][$attrs->fields['attname']] = 'VALUE';

echo "<tr>\n";
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">", $misc->printVal($attrs->fields['attname']), "</td>";
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">\n";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">", $misc->printVal($attrs->fields['attname']), "</td>";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">\n";
echo $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod']));
echo "<input type=\"hidden\" name=\"types[", htmlspecialchars($attrs->fields['attname']), "]\" value=\"",
htmlspecialchars($attrs->fields['type']), "\" /></td>";
$elements++;
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">\n";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">\n";
echo "<select name=\"format[", htmlspecialchars($attrs->fields['attname']), "]\">\n";
echo "<option value=\"VALUE\"", ($_REQUEST['format'][$attrs->fields['attname']] == 'VALUE') ? ' selected="selected"' : '', ">{$lang['strvalue']}</option>\n";
echo "<option value=\"EXPRESSION\"", ($_REQUEST['format'][$attrs->fields['attname']] == 'EXPRESSION') ? ' selected="selected"' : '', ">{$lang['strexpression']}</option>\n";
echo "</select>\n</td>\n";
$elements++;

echo "<td class=\"data{$id}\" id=\"aciwp{$i}\" nowrap=\"nowrap\">";
echo "<td class=\"data{$id}\" id=\"aciwp{$i}\" style=\"white-space:nowrap;\">";
echo $data->printField($szValueName, $rs->fields[$attrs->fields['attname']], $attrs->fields['type'],array(),$szEvents) . $szDivPH;
echo "</td>";
$elements++;
Expand Down
14 changes: 7 additions & 7 deletions display.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @param $return_desc The return link name
* @param $page The current page
*
* $Id: display.php,v 1.60 2007/04/16 16:59:46 soranzo Exp $
* $Id: display.php,v 1.61 2007/04/22 00:41:58 mr-russ Exp $
*/

// Prevent timeouts on large exports (non-safe mode only)
Expand Down Expand Up @@ -96,19 +96,19 @@ function doEditRow($confirm, $msg = '') {
$_REQUEST['format'][$attrs->fields['attname']] = 'VALUE';

echo "<tr>\n";
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">", $misc->printVal($attrs->fields['attname']), "</td>";
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">\n";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">", $misc->printVal($attrs->fields['attname']), "</td>";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">\n";
echo $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod']));
echo "<input type=\"hidden\" name=\"types[", htmlspecialchars($attrs->fields['attname']), "]\" value=\"",
htmlspecialchars($attrs->fields['type']), "\" /></td>";
$elements++;
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">\n";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">\n";
echo "<select name=\"format[", htmlspecialchars($attrs->fields['attname']), "]\">\n";
echo "<option value=\"VALUE\"", ($_REQUEST['format'][$attrs->fields['attname']] == 'VALUE') ? ' selected="selected"' : '', ">{$lang['strvalue']}</option>\n";
echo "<option value=\"EXPRESSION\"", ($_REQUEST['format'][$attrs->fields['attname']] == 'EXPRESSION') ? ' selected="selected"' : '', ">{$lang['strexpression']}</option>\n";
echo "</select>\n</td>\n";
$elements++;
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">";
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">";
// Output null box if the column allows nulls (doesn't look at CHECKs or ASSERTIONS)
if (!$attrs->fields['attnotnull']) {
// Set initial null values
Expand All @@ -122,7 +122,7 @@ function doEditRow($confirm, $msg = '') {
else
echo "&nbsp;</td>";

echo "<td class=\"data{$id}\" id=\"aciwp{$i}\" nowrap=\"nowrap\">";
echo "<td class=\"data{$id}\" id=\"aciwp{$i}\" style=\"white-space:nowrap;\">";
// If the column allows nulls, then we put a JavaScript action on the data field to unset the
// NULL checkbox as soon as anything is entered in the field. We use the $elements variable to
// keep track of which element offset we're up to. We can't refer to the null checkbox by name
Expand Down Expand Up @@ -403,7 +403,7 @@ function doBrowse($msg = '') {
if (isset($_REQUEST['table']) && $k == $data->id && !$conf['show_oids']) continue;
elseif ($v !== null && $v == '') echo "<td class=\"data{$id}\">&nbsp;</td>";
else {
echo "<td class=\"data{$id}\" nowrap=\"nowrap\">",
echo "<td class=\"data{$id}\" style=\"white-space:nowrap;\">",
$misc->printVal($v, $finfo->type, array('null' => true, 'clip' => ($_REQUEST['strings']=='collapsed'))), "</td>";
}
}
Expand Down
8 changes: 4 additions & 4 deletions domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Manage domains in a database
*
* $Id: domains.php,v 1.25 2007/01/26 17:55:42 soranzo Exp $
* $Id: domains.php,v 1.26 2007/04/22 00:41:58 mr-russ Exp $
*/

// Include application functions
Expand Down Expand Up @@ -55,7 +55,7 @@ function doAlter($msg = '') {
// Display domain info
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\" width=\"70\">{$lang['strname']}</th>\n";
echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\">", $misc->printVal($domaindata->fields['domname']), "</td></tr>\n";
echo "<tr><th class=\"data left required\">{$lang['strtype']}</th>\n";
echo "<td class=\"data1\">", $misc->printVal($domaindata->fields['domtype']), "</td></tr>\n";
Expand Down Expand Up @@ -191,7 +191,7 @@ function doProperties($msg = '') {
// Display domain info
$domaindata->fields['domnotnull'] = $data->phpBool($domaindata->fields['domnotnull']);
echo "<table>\n";
echo "<tr><th class=\"data left\" width=\"70\">{$lang['strname']}</th>\n";
echo "<tr><th class=\"data left\" style=\"width: 70px\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\">", $misc->printVal($domaindata->fields['domname']), "</td></tr>\n";
echo "<tr><th class=\"data left\">{$lang['strtype']}</th>\n";
echo "<td class=\"data1\">", $misc->printVal($domaindata->fields['domtype']), "</td></tr>\n";
Expand Down Expand Up @@ -298,7 +298,7 @@ function doCreate($msg = '') {

echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo "<table>\n";
echo "<tr><th class=\"data left required\" width=\"70\">{$lang['strname']}</th>\n";
echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$lang['strname']}</th>\n";
echo "<td class=\"data1\"><input name=\"domname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
htmlspecialchars($_POST['domname']), "\" /></td></tr>\n";
echo "<tr><th class=\"data left required\">{$lang['strtype']}</th>\n";
Expand Down
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Manage functions in a database
*
* $Id: functions.php,v 1.60 2007/04/16 16:59:46 soranzo Exp $
* $Id: functions.php,v 1.61 2007/04/22 00:41:58 mr-russ Exp $
*/

// Include application functions
Expand Down Expand Up @@ -85,7 +85,7 @@ function doEdit($msg = '') {

$func_full = $fndata->fields['proname'] . "(". $fndata->fields['proarguments'] .")";
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo "<table width=\"90%\">\n";
echo "<table style=\"width: 90%\">\n";
echo "<tr>\n";
echo "<th class=\"data required\">{$lang['strfunction']}</th>\n";
echo "<th class=\"data\">{$lang['strarguments']}</th>\n";
Expand Down Expand Up @@ -206,7 +206,7 @@ function doProperties($msg = '') {

$funcdata->fields['proretset'] = $data->phpBool($funcdata->fields['proretset']);
$func_full = $funcdata->fields['proname'] . "(". $funcdata->fields['proarguments'] .")";
echo "<table width=\"90%\">\n";
echo "<table style=\"width: 90%\">\n";
echo "<tr><th class=\"data\">{$lang['strfunction']}</th>\n";
echo "<th class=\"data\">{$lang['strarguments']}</th>\n";
echo "<th class=\"data\">{$lang['strreturns']}</th>\n";
Expand Down Expand Up @@ -430,7 +430,7 @@ function doCreate($msg = '',$szJS="") {
} else {
$szJSTRArg = "";
}
$szJSAddTR = "<tr id=\"parent_add_tr\" onclick=\"addArg();\" onmouseover=\"this.style.cursor='pointer'\"><td align=\"right\" colspan=\"6\" class=\"data3\"><table><tr><td class=\"data3\"><img src=\"{$szImgPath}/AddArguments.png\" alt=\"Add Argument\" /></td><td class=\"data3\"><span style=\"font-size:8pt\">{$lang['strargadd']}</span></td></tr></table></td></tr>";
$szJSAddTR = "<tr id=\"parent_add_tr\" onclick=\"addArg();\" onmouseover=\"this.style.cursor='pointer'\"><td style=\"text-align: right\" colspan=\"6\" class=\"data3\"><table><tr><td class=\"data3\"><img src=\"{$szImgPath}/AddArguments.png\" alt=\"Add Argument\" /></td><td class=\"data3\"><span style=\"font-size:8pt\">{$lang['strargadd']}</span></td></tr></table></td></tr>";


echo "<script src=\"functions.js\" type=\"text/javascript\"></script>
Expand Down
Loading

0 comments on commit 92cedde

Please sign in to comment.