Permalink
Browse files

XHTML compliance.

  • Loading branch information...
1 parent f457dc0 commit 6545f12e3916e8b3fecf495d68dfd6f257ed776f soranzo committed Apr 23, 2007
Showing with 60 additions and 68 deletions.
  1. +26 −32 database.php
  2. +0 −1 functions.js
  3. +7 −5 functions.php
  4. +6 −6 operators.php
  5. +2 −2 plugin_slony.php
  6. +5 −7 privileges.php
  7. +8 −9 schemas.php
  8. +6 −6 views.php
View
@@ -3,7 +3,7 @@
/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.94 2007/04/22 00:41:58 mr-russ Exp $
+ * $Id: database.php,v 1.95 2007/04/23 18:48:06 soranzo Exp $
*/
// Include application functions
@@ -75,7 +75,7 @@ function doFind($confirm = true, $msg = '') {
echo "</select>\n";
echo "<input type=\"submit\" value=\"{$lang['strfind']}\" />\n";
echo $misc->form;
- echo "<input type=\"hidden\" name=\"action\" value=\"find\" />\n";
+ echo "<input type=\"hidden\" name=\"action\" value=\"find\" /></p>\n";
echo "</form>\n";
// Default focus
@@ -448,7 +448,7 @@ function doProcesses($msg = '') {
}
// Fetch the processes from the database
- echo "<br /><h3>{$lang['strprocesses']}</h3>\n";
+ echo "<h3>{$lang['strprocesses']}</h3>\n";
$processes = $data->getProcesses($_REQUEST['database']);
$columns = array(
@@ -567,7 +567,7 @@ function doAdmin($action = '', $msg = '') {
$misc->printTabs('database','admin');
$misc->printMsg($msg);
- echo "<table style=\"width: 60%\">\n";
+ echo "<table style=\"width: 50%\">\n";
echo "<tr>\n";
echo "<th class=\"data\">";
$misc->printHelp($lang['strvacuum'],'pg.admin.vacuum')."</th>\n";
@@ -590,59 +590,57 @@ function doAdmin($action = '', $msg = '') {
// Vacuum
echo "<tr>\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";
+ echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<p><input type=\"checkbox\" id=\"vacuum_analyze\" name=\"vacuum_analyze\" /><label for=\"vacuum_analyze\">{$lang['stranalyze']}</label>\n";
if ($data->hasFullVacuum()) {
- echo "<input type=\"checkbox\" id=\"vacuum_full\" name=\"vacuum_full\" /><label for=\"vacuum_full\">{$lang['strfull']}</label><br />\n";
- echo "<input type=\"checkbox\" id=\"vacuum_freeze\" name=\"vacuum_freeze\" /><label for=\"vacuum_freeze\">{$lang['strfreeze']}</label><br />\n";
+ echo "<br /><input type=\"checkbox\" id=\"vacuum_full\" name=\"vacuum_full\" /><label for=\"vacuum_full\">{$lang['strfull']}</label>\n";
+ echo "<br /><input type=\"checkbox\" id=\"vacuum_freeze\" name=\"vacuum_freeze\" /><label for=\"vacuum_freeze\">{$lang['strfreeze']}</label>\n";
}
- echo "<input type=\"submit\" value=\"{$lang['strvacuum']}\" />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"vacuum\" />\n";
echo $misc->form;
+ echo "<br /><input type=\"submit\" value=\"{$lang['strvacuum']}\" /></p>\n";
echo "</form>\n";
echo "</td>\n";
// Analyze
if ($data->hasAnalyze()) {
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";
+ echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<p><input type=\"hidden\" name=\"action\" value=\"analyze\" />\n";
echo $misc->form;
+ echo "<input type=\"submit\" value=\"{$lang['stranalyze']}\" /></p>\n";
echo "</form>\n";
echo "</td>\n";
}
// Recluster
if ($data->hasRecluster()){
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";
+ echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<p><input type=\"hidden\" name=\"action\" value=\"recluster\" />\n";
echo $misc->form;
+ echo "<input type=\"submit\" value=\"{$lang['strclusterindex']}\" /></p>\n";
echo "</form>\n";
echo "</td>\n";
}
// Reindex
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";
+ echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
+ echo "<p><input type=\"checkbox\" id=\"reindex_force\" name=\"reindex_force\" /><label for=\"reindex_force\">{$lang['strforce']}</label><br />\n";
echo "<input type=\"hidden\" name=\"action\" value=\"reindex\" />\n";
echo $misc->form;
+ echo "<input type=\"submit\" value=\"{$lang['strreindex']}\" /></p>\n";
echo "</form>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
- echo "<br />";
- echo "<br />";
-
+ // Autovacuum
if($data->hasAutovacuum()) {
$enabled = $data->getVariable('autovacuum');
- echo "<h3>{$lang['strautovacuum']} ". (($enabled->fields['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff'] ) ."</h3>";
- // Autovacuum
+ echo "<h3>{$lang['strautovacuum']}</h3>";
+ echo '<p>' . (($enabled->fields['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff'] ) . '</p>';
// Fetch the processes from the database
$autovac = $data->getAutovacuum();
@@ -860,30 +858,26 @@ function doSQL() {
echo "<form action=\"sql.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
echo "<p>{$lang['strsql']}<br />\n";
echo "<textarea style=\"width:100%;\" rows=\"20\" cols=\"50\" name=\"query\">",
- htmlspecialchars($_REQUEST['query']), "</textarea>\n";
+ htmlspecialchars($_REQUEST['query']), "</textarea></p>\n";
// Check that file uploads are enabled
if (ini_get('file_uploads')) {
// Don't show upload option if max size of uploads is zero
$max_size = $misc->inisizeToBytes(ini_get('upload_max_filesize'));
if (is_double($max_size) && $max_size > 0) {
- echo "<br /><br /><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"{$max_size}\" />\n";
- echo " {$lang['struploadscript']} <input name=\"script\" type=\"file\" /></p>\n";
+ echo "<p><input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"{$max_size}\" />\n";
+ echo "<label for=\"script\">{$lang['struploadscript']}</label> <input id=\"script\" name=\"script\" type=\"file\" /></p>\n";
}
}
- else echo "</p>\n";
- echo "<input type=\"checkbox\" id=\"paginate\" name=\"paginate\"", (isset($_REQUEST['paginate']) ? ' checked="checked"' : ''), " /><label for=\"paginate\">{$lang['strpaginate']}</label>\n";
- echo "<br />\n";
+ echo "<p><input type=\"checkbox\" id=\"paginate\" name=\"paginate\"", (isset($_REQUEST['paginate']) ? ' checked="checked"' : ''), " /><label for=\"paginate\">{$lang['strpaginate']}</label></p>\n";
echo "<p><input type=\"submit\" value=\"{$lang['strrun']}\" />\n";
if ($data->hasFullExplain()) {
echo "<input type=\"submit\" name=\"explain\" value=\"{$lang['strexplain']}\" />\n";
echo "<input type=\"submit\" name=\"explain_analyze\" value=\"{$lang['strexplainanalyze']}\" />\n";
}
- echo "<input type=\"reset\" value=\"{$lang['strreset']}\" /></p>\n";
-
echo $misc->form;
-
+ echo "<input type=\"reset\" value=\"{$lang['strreset']}\" /></p>\n";
echo "</form>\n";
// Default focus
View
@@ -57,7 +57,6 @@ function buildArgImages(orig_td) {
this.childNodes[0].title=g_lang_strargremove;
g_args++;
g_no_args = false;
- document.getElementById("formEmptyArgs").value="0";
}
}
}
View
@@ -3,7 +3,7 @@
/**
* Manage functions in a database
*
- * $Id: functions.php,v 1.61 2007/04/22 00:41:58 mr-russ Exp $
+ * $Id: functions.php,v 1.62 2007/04/23 18:48:06 soranzo Exp $
*/
// Include application functions
@@ -430,11 +430,12 @@ function doCreate($msg = '',$szJS="") {
} else {
$szJSTRArg = "";
}
- $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>";
+ $szJSAddTR = "<tr id=\"parent_add_tr\" onclick=\"addArg();\" onmouseover=\"this.style.cursor='pointer'\">\n<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>\n</tr>\n";
echo "<script src=\"functions.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
+ //<![CDATA[
var g_types_select = '<select name=\"formArgType[]\">{$szTypes}</select>{$szArgReturns}';
var g_modes_select = '{$szModes}';
var g_name = '';
@@ -446,9 +447,10 @@ function doCreate($msg = '',$szJS="") {
var g_lang_strargremoveconfirm = \"". addslashes($lang["strargremoveconfirm"]) ."\";
var g_lang_strargraise = \"". addslashes($lang["strargraise"]) ."\";
var g_lang_strarglower = \"". addslashes($lang["strarglower"]) ."\";
+ //]]>
</script>
";
- echo "<form action=\"$PHP_SELF\" method=post><input type=\"hidden\" name=\"formEmptyArgs\" id=\"formEmptyArgs\" value=\"1\" />\n";
+ echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo "<table><tbody id=\"args_table\">\n";
echo "<tr><th class=\"data required\">{$lang['strname']}</th>\n";
echo "<th class=\"data required\" colspan=\"2\">{$lang['strreturns']}</th>\n";
@@ -465,7 +467,6 @@ function doCreate($msg = '',$szJS="") {
echo "<th class=\"data required\" colspan=\"2\">{$lang['strargtype']}</th>\n";
echo "</tr>\n";
echo "{$szJSAddTR}\n";
- echo $szJSTRArg;
if ($fnlang == 'c') {
echo "<tr><th class=\"data required\" colspan=\"2\">{$lang['strobjectfile']}</th>\n";
@@ -476,7 +477,7 @@ function doCreate($msg = '',$szJS="") {
htmlspecialchars($_POST['formLinkSymbol']), "\" /></td></tr>\n";
} else if ($fnlang == 'internal') {
echo "<tr><th class=\"data\" colspan=\"4\">{$lang['strlinksymbol']}</th></tr>\n";
- echo "<td class=\"data1\" colspan=\"4\"><input type=\"text\" name=\"formLinkSymbol\" style=\"width:100%\" value=\"",
+ echo "<tr><td class=\"data1\" colspan=\"4\"><input type=\"text\" name=\"formLinkSymbol\" style=\"width:100%\" value=\"",
htmlspecialchars($_POST['formLinkSymbol']), "\" /></td></tr>\n";
} else {
echo "<tr><th class=\"data required\" colspan=\"4\">{$lang['strdefinition']}</th></tr>\n";
@@ -502,6 +503,7 @@ function doCreate($msg = '',$szJS="") {
echo "</td></tr>\n";
}
echo "</tbody></table>\n";
+ echo $szJSTRArg;
echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create\" />\n";
echo $misc->form;
echo "<input type=\"submit\" value=\"{$lang['strcreate']}\" />\n";
View
@@ -3,7 +3,7 @@
/**
* Manage operators in a database
*
- * $Id: operators.php,v 1.23 2007/01/15 15:48:17 soranzo Exp $
+ * $Id: operators.php,v 1.24 2007/04/23 18:48:06 soranzo Exp $
*/
// Include application functions
@@ -77,16 +77,16 @@ function doDrop($confirm) {
echo "<p>", sprintf($lang['strconfdropoperator'], $misc->printVal($_REQUEST['operator'])), "</p>\n";
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
- echo "<input type=\"hidden\" name=\"operator\" value=\"", htmlspecialchars($_REQUEST['operator']), "\" />\n";
- echo "<input type=\"hidden\" name=\"operator_oid\" value=\"", htmlspecialchars($_REQUEST['operator_oid']), "\" />\n";
- echo $misc->form;
// Show cascade drop option if supportd
if ($data->hasDropBehavior()) {
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n";
}
+ echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
+ echo "<input type=\"hidden\" name=\"operator\" value=\"", htmlspecialchars($_REQUEST['operator']), "\" />\n";
+ echo "<input type=\"hidden\" name=\"operator_oid\" value=\"", htmlspecialchars($_REQUEST['operator_oid']), "\" />\n";
+ echo $misc->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n";
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
+ echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
echo "</form>\n";
}
else {
View
@@ -3,7 +3,7 @@
/**
* Slony database tab plugin
*
- * $Id: plugin_slony.php,v 1.16 2007/04/22 00:41:58 mr-russ Exp $
+ * $Id: plugin_slony.php,v 1.17 2007/04/23 18:48:06 soranzo Exp $
*/
// Include application functions
@@ -517,7 +517,6 @@ function doCreateCluster($confirm, $msg = '') {
$misc->printMsg($msg);
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
- echo $misc->form;
echo "<table style=\"width: 100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strcluster']}</th>\n";
echo "\t\t<td class=\"data1\"><input name=\"cluster\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -531,6 +530,7 @@ function doCreateCluster($confirm, $msg = '') {
echo "</table>\n";
echo "<p>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"save_create_cluster\" />\n";
+ echo $misc->form;
echo "<input type=\"submit\" value=\"{$lang['strinitcluster']}\" />\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
echo "</p>\n";
View
@@ -3,7 +3,7 @@
/**
* Manage privileges in a database
*
- * $Id: privileges.php,v 1.40 2007/01/15 15:48:17 soranzo Exp $
+ * $Id: privileges.php,v 1.41 2007/04/23 18:48:06 soranzo Exp $
*/
// Include application functions
@@ -97,22 +97,20 @@ function doAlter($confirm, $mode, $msg = '') {
}
echo "</table>\n";
+ echo "<p><input type=\"hidden\" name=\"action\" value=\"save\" />\n";
+ echo "<input type=\"hidden\" name=\"mode\" value=\"", htmlspecialchars($mode), "\" />\n";
+ echo "<input type=\"hidden\" name=\"subject\" value=\"", htmlspecialchars($_REQUEST['subject']), "\" />\n";
if (isset($_REQUEST[$_REQUEST['subject'].'_oid']))
echo "<input type=\"hidden\" name=\"", htmlspecialchars($_REQUEST['subject'].'_oid'),
"\" value=\"", htmlspecialchars($_REQUEST[$_REQUEST['subject'].'_oid']), "\" />\n";
- echo "<input type=\"hidden\" name=\"action\" value=\"save\" />\n";
- echo "<input type=\"hidden\" name=\"mode\" value=\"", htmlspecialchars($mode), "\" />\n";
- echo "<input type=\"hidden\" name=\"subject\" value=\"", htmlspecialchars($_REQUEST['subject']), "\" />\n";
echo "<input type=\"hidden\" name=\"", htmlspecialchars($_REQUEST['subject']),
"\" value=\"", htmlspecialchars($_REQUEST[$_REQUEST['subject']]), "\" />\n";
echo $misc->form;
- echo "<p>";
if ($mode == 'grant')
echo "<input type=\"submit\" name=\"grant\" value=\"{$lang['strgrant']}\" />\n";
elseif ($mode == 'revoke')
echo "<input type=\"submit\" name=\"revoke\" value=\"{$lang['strrevoke']}\" />\n";
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />";
- echo "</p>\n";
+ echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>";
echo "</form>\n";
}
else {
View
@@ -3,7 +3,7 @@
/**
* Manage schemas in a database
*
- * $Id: schemas.php,v 1.12 2007/04/22 00:41:58 mr-russ Exp $
+ * $Id: schemas.php,v 1.13 2007/04/23 18:48:06 soranzo Exp $
*/
// Include application functions
@@ -100,7 +100,6 @@ function doCreate($msg = '') {
$misc->printMsg($msg);
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
- echo $misc->form;
echo "<table style=\"width: 100%\">\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -114,16 +113,16 @@ function doCreate($msg = '') {
($uname == $_POST['formAuth']) ? ' selected="selected"' : '', ">{$uname}</option>\n";
$users->moveNext();
}
- echo "\t\t\t</select>\n\t\t</td>\n\t\n";
+ echo "\t\t\t</select>\n\t\t</td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strcomment']}</th>\n";
echo "\t\t<td class=\"data1\"><textarea name=\"formComment\" rows=\"3\" cols=\"32\">",
htmlspecialchars($_POST['formComment']), "</textarea></td>\n\t</tr>\n";
- echo "\t</tr>\n";
echo "</table>\n";
echo "<p>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"create\" />\n";
echo "<input type=\"hidden\" name=\"database\" value=\"", htmlspecialchars($_REQUEST['database']), "\" />\n";
+ echo $misc->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$lang['strcreate']}\" />\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
echo "</p>\n";
@@ -219,16 +218,16 @@ function doDrop($confirm) {
echo "<p>", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['schema'])), "</p>\n";
echo "<form action=\"{$PHP_SELF}\" method=\"post\">\n";
- echo $misc->form;
- echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
- echo "<input type=\"hidden\" name=\"database\" value=\"", htmlspecialchars($_REQUEST['database']), "\" />\n";
- echo "<input type=\"hidden\" name=\"schema\" value=\"", htmlspecialchars($_REQUEST['schema']), "\" />\n";
// Show cascade drop option if supportd
if ($data->hasDropBehavior()) {
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n";
}
+ echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n";
+ echo "<input type=\"hidden\" name=\"database\" value=\"", htmlspecialchars($_REQUEST['database']), "\" />\n";
+ echo "<input type=\"hidden\" name=\"schema\" value=\"", htmlspecialchars($_REQUEST['schema']), "\" />\n";
+ echo $misc->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n";
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
+ echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
echo "</form>\n";
}
else {
Oops, something went wrong. Retry.

0 comments on commit 6545f12

Please sign in to comment.