From 93778506b7a2134820c7ebd8bbec254531f4bd75 Mon Sep 17 00:00:00 2001 From: chriskl Date: Sat, 31 May 2003 07:23:24 +0000 Subject: [PATCH] final printval run. mroe xhtml fixes. fixed some hard-coded English words --- BUGS | 2 - display.php | 4 +- functions.php | 46 ++++++++++---------- rules.php | 20 ++++----- sql.php | 4 +- tables.php | 116 ++++++++++++++++++++++++++------------------------ triggers.php | 43 ++++++++++--------- 7 files changed, 120 insertions(+), 115 deletions(-) diff --git a/BUGS b/BUGS index 156ecf4c..92ac8eaf 100644 --- a/BUGS +++ b/BUGS @@ -1,5 +1,3 @@ -* Lots more printVal()ing needs to be done. Whenever displaying user data, - it should use $misc->printVal($var) instead of htmlspecialchars($var). * Fix grant option/grantor stuff * Schema support for privileges * First and last links in browse table diff --git a/display.php b/display.php index 47be1b7d..04fe95c0 100644 --- a/display.php +++ b/display.php @@ -9,7 +9,7 @@ * @param $return_desc The return link name * @param $page The current page * - * $Id: display.php,v 1.19 2003/05/21 02:07:42 chriskl Exp $ + * $Id: display.php,v 1.20 2003/05/31 07:23:24 chriskl Exp $ */ // Include application functions @@ -23,7 +23,7 @@ $misc->printHeader($lang['strqueryresults']); $misc->printBody(); - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strqueryresults']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strqueryresults']}

\n"; // If current page is not set, default to first page if (!isset($_REQUEST['page'])) $_REQUEST['page'] = 1; diff --git a/functions.php b/functions.php index b0c331d0..e175dded 100644 --- a/functions.php +++ b/functions.php @@ -3,7 +3,7 @@ /** * Manage functions in a database * - * $Id: functions.php,v 1.15 2003/05/17 15:53:56 chriskl Exp $ + * $Id: functions.php,v 1.16 2003/05/31 07:23:24 chriskl Exp $ */ // Include application functions @@ -35,7 +35,7 @@ global $data, $localData, $misc; global $PHP_SELF, $lang; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strfunctions']}: ", htmlspecialchars($_REQUEST['function']), ": {$lang['stredit']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strfunctions']}: ", $misc->printVal($_REQUEST['function']), ": {$lang['stredit']}

\n"; $misc->printMsg($msg); $fndata = &$localData->getFunction($_REQUEST['function_oid']); @@ -59,23 +59,23 @@ echo "\n"; - echo "", htmlspecialchars($fndata->f[$data->fnFields['fnname']]), "\n"; + echo "", $misc->printVal($fndata->f[$data->fnFields['fnname']]), "\n"; echo "f[$data->fnFields['fnname']]),"\" />\n"; echo "\n"; - echo "", htmlspecialchars($fndata->f[$data->fnFields['fnarguments']]), "\n"; + echo "", $misc->printVal($fndata->f[$data->fnFields['fnarguments']]), "\n"; echo "f[$data->fnFields['fnarguments']]),"\" />\n"; echo "\n"; echo ""; if ($fndata->f[$data->fnFields['setof']]) echo "setof "; - echo htmlspecialchars($fndata->f[$data->fnFields['fnreturns']]), "\n"; + echo $misc->printVal($fndata->f[$data->fnFields['fnreturns']]), "\n"; echo "f[$data->fnFields['fnreturns']]), "\" />\n"; if ($fndata->f[$data->fnFields['setof']]) echo "\n"; echo "\n"; - echo "", htmlspecialchars($fndata->f[$data->fnFields['fnlang']]), "\n"; + echo "", $misc->printVal($fndata->f[$data->fnFields['fnlang']]), "\n"; echo "f[$data->fnFields['fnlang']]), "\" />\n"; echo "\n"; @@ -92,7 +92,7 @@ foreach ($v as $p) { echo "\n"; + ">", $misc->printVal($p), "\n"; } echo "
\n"; $i++; @@ -124,7 +124,7 @@ global $data, $localData, $misc; global $PHP_SELF, $lang; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strfunctions']}: ", htmlspecialchars($_REQUEST['function']), ": {$lang['strproperties']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strfunctions']}: ", $misc->printVal($_REQUEST['function']), ": {$lang['strproperties']}

\n"; $misc->printMsg($msg); $funcdata = &$localData->getFunction($_REQUEST['function_oid']); @@ -137,12 +137,12 @@ echo "{$lang['strarguments']}\n"; echo "{$lang['strreturns']}\n"; echo "{$lang['strlanguage']}\n"; - echo "", htmlspecialchars($funcdata->f[$data->fnFields['fnname']]), "\n"; - echo "", htmlspecialchars($funcdata->f[$data->fnFields['fnarguments']]), "\n"; + echo "", $misc->printVal($funcdata->f[$data->fnFields['fnname']]), "\n"; + echo "", $misc->printVal($funcdata->f[$data->fnFields['fnarguments']]), "\n"; echo ""; if ($funcdata->f[$data->fnFields['setof']]) echo "setof "; - echo htmlspecialchars($funcdata->f[$data->fnFields['fnreturns']]), "\n"; - echo "", htmlspecialchars($funcdata->f[$data->fnFields['fnlang']]), "\n"; + echo $misc->printVal($funcdata->f[$data->fnFields['fnreturns']]), "\n"; + echo "", $misc->printVal($funcdata->f[$data->fnFields['fnlang']]), "\n"; echo "{$lang['strdefinition']}\n"; echo "", $misc->printVal($funcdata->f[$data->fnFields['fndef']]), "\n"; if (is_array($data->funcprops) && sizeof($data->funcprops) > 0) { @@ -151,7 +151,7 @@ echo "{$lang['strproperties']}\n"; echo "\n"; foreach ($funcprops as $v) { - echo htmlspecialchars($v), "
\n"; + echo $misc->printVal($v), "
\n"; } echo "\n"; } @@ -174,9 +174,9 @@ global $PHP_SELF, $lang; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strfunctions']}: ", htmlspecialchars($_REQUEST['function']), ": {$lang['strdrop']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strfunctions']}: ", $misc->printVal($_REQUEST['function']), ": {$lang['strdrop']}

\n"; - echo "

", sprintf($lang['strconfdropfunction'], htmlspecialchars($_REQUEST['function'])), "

\n"; + echo "

", sprintf($lang['strconfdropfunction'], $misc->printVal($_REQUEST['function'])), "

\n"; echo "
\n"; echo "\n"; @@ -217,7 +217,7 @@ $types = &$localData->getTypes(true); $langs = &$localData->getLanguages(); - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strfunctions']}: {$lang['strcreatefunction']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strfunctions']}: {$lang['strcreatefunction']}

\n"; $misc->printMsg($msg); echo "\n"; @@ -249,7 +249,7 @@ while (!$types->EOF) { echo "\n"; + $misc->printVal($types->f[$data->typFields['typname']]), "\n"; $types->moveNext(); } echo "\n"; @@ -258,7 +258,7 @@ while (!$langs->EOF) { echo "\n"; + $misc->printVal($langs->f[$data->langFields['lanname']]), "\n"; $langs->moveNext(); } echo "\n"; @@ -277,7 +277,7 @@ foreach ($v as $p) { echo "\n"; + ">", $misc->printVal($p), "\n"; } echo "
\n"; $i++; @@ -324,7 +324,7 @@ global $data, $localData, $misc, $func; global $PHP_SELF, $lang; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strfunctions']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strfunctions']}

\n"; $misc->printMsg($msg); $funcs = &$localData->getFunctions(); @@ -338,11 +338,11 @@ $funcs->f[$data->fnFields['setof']] = $data->phpBool($funcs->f[$data->fnFields['setof']]); $func_full = $funcs->f[$data->fnFields['fnname']] . "(". $funcs->f[$data->fnFields['fnarguments']] .")"; $id = (($i % 2) == 0 ? '1' : '2'); - echo "", htmlspecialchars($funcs->f[$data->fnFields['fnname']]), "\n"; + echo "", $misc->printVal($funcs->f[$data->fnFields['fnname']]), "\n"; echo ""; if ($funcs->f[$data->fnFields['setof']]) echo "setof "; - echo htmlspecialchars($funcs->f[$data->fnFields['fnreturns']]), "\n"; - echo "", htmlspecialchars($funcs->f[$data->fnFields['fnarguments']]), "\n"; + echo $misc->printVal($funcs->f[$data->fnFields['fnreturns']]), "\n"; + echo "", $misc->printVal($funcs->f[$data->fnFields['fnarguments']]), "\n"; echo "href}&function=", urlencode($func_full), "&function_oid=", $funcs->f[$data->fnFields['fnoid']], "\">{$lang['strproperties']}\n"; echo "href}&function=", diff --git a/rules.php b/rules.php index b1ce79c1..bbb1e6f0 100644 --- a/rules.php +++ b/rules.php @@ -3,7 +3,7 @@ /** * List rules on a table * - * $Id: rules.php,v 1.10 2003/04/30 07:02:20 chriskl Exp $ + * $Id: rules.php,v 1.11 2003/05/31 07:23:24 chriskl Exp $ */ // Include application functions @@ -26,8 +26,8 @@ if (!isset($_POST['raction'])) $_POST['raction'] = ''; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", - htmlspecialchars($_REQUEST['table']), ": {$lang['strcreaterule']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", + $misc->printVal($_REQUEST['table']), ": {$lang['strcreaterule']}

\n"; $misc->printMsg($msg); echo "\n"; @@ -87,11 +87,11 @@ global $PHP_SELF, $lang; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", - htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['rule']), ": Drop

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", + $misc->printVal($_REQUEST['table']), ": " , $misc->printVal($_REQUEST['rule']), ": {$lang['strdrop']}

\n"; - echo "

", sprintf($lang['strconfdroprule'], htmlspecialchars($_REQUEST['rule']), - htmlspecialchars($_REQUEST['table'])), "

\n"; + echo "

", sprintf($lang['strconfdroprule'], $misc->printVal($_REQUEST['rule']), + $misc->printVal($_REQUEST['table'])), "

\n"; echo "\n"; echo "\n"; @@ -124,7 +124,7 @@ global $lang; $misc->printTableNav(); - echo "

", htmlspecialchars($_REQUEST['database']), ": ", htmlspecialchars($_REQUEST['table']), ": {$lang['strrules']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['table']), ": {$lang['strrules']}

\n"; $misc->printMsg($msg); $rules = &$localData->getRules($_REQUEST['table']); @@ -136,8 +136,8 @@ while (!$rules->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); - echo "", htmlspecialchars( $rules->f[$data->rlFields['rulename']]), ""; - echo "", htmlspecialchars( $rules->f[$data->rlFields['ruledef']]), ""; + echo "", $misc->printVal( $rules->f[$data->rlFields['rulename']]), ""; + echo "", $misc->printVal( $rules->f[$data->rlFields['ruledef']]), ""; echo ""; echo "
href}&rule=", urlencode($rules->f[$data->rlFields['rulename']]), "&table=", urlencode($_REQUEST['table']), "\">{$lang['strdrop']}\n"; diff --git a/sql.php b/sql.php index 41a9212f..8c47660c 100644 --- a/sql.php +++ b/sql.php @@ -8,7 +8,7 @@ * @param $return_url The return URL * @param $return_desc The return link name * - * $Id: sql.php,v 1.5 2003/05/21 02:07:42 chriskl Exp $ + * $Id: sql.php,v 1.6 2003/05/31 07:23:24 chriskl Exp $ */ // Include application functions @@ -19,7 +19,7 @@ $misc->printHeader($lang['strqueryresults']); $misc->printBody(); $misc->printDatabaseNav(); - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strsql']}: {$lang['strqueryresults']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strsql']}: {$lang['strqueryresults']}

\n"; $_POST['query'] = trim($_POST['query']); if ($_POST['query'] != '') { diff --git a/tables.php b/tables.php index 8b85b2b6..b789c26a 100644 --- a/tables.php +++ b/tables.php @@ -3,7 +3,7 @@ /** * List tables in a database * - * $Id: tables.php,v 1.25 2003/05/31 06:56:01 chriskl Exp $ + * $Id: tables.php,v 1.26 2003/05/31 07:23:24 chriskl Exp $ */ // Include application functions @@ -25,22 +25,23 @@ switch ($_REQUEST['stage']) { case 1: - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: {$lang['strcreatetable']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: {$lang['strcreatetable']}

\n"; $misc->printMsg($msg); - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "
{$lang['strname']}
_maxNameLen} maxlength={$data->_maxNameLen} value=\"", - htmlspecialchars($_REQUEST['name']), "\">
{$lang['strnumfields']}
_maxNameLen} value=\"", - htmlspecialchars($_REQUEST['fields']), "\">
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "
{$lang['strname']}
_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strnumfields']}
_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['fields']), "\" />
\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo $misc->form; - echo " \n"; + echo "\n"; + echo "\n"; echo "\n"; break; case 2: @@ -61,7 +62,7 @@ $types = &$localData->getTypes(true); - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: {$lang['strcreatetable']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: {$lang['strcreatetable']}

\n"; $misc->printMsg($msg); echo "
\n"; @@ -82,31 +83,32 @@ foreach ($localData->extraTypes as $v) { echo "\n"; + $misc->printVal($v), "\n"; } $types->moveFirst(); while (!$types->EOF) { $typname = $types->f[$data->typFields['typname']]; echo "\n"; + $misc->printVal($typname), "\n"; $types->moveNext(); } echo ""; - echo ""; - echo "\n"; - echo ""; + echo ""; + echo "\n"; + echo ""; } echo "\n"; - echo "

\n"; - echo "\n"; + echo "

\n"; + echo "\n"; echo $misc->form; - echo "\n"; - echo "\n"; - echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; echo "
\n"; break; @@ -150,7 +152,7 @@ echo "

{$lang['strinvalidparam']}

\n"; } - echo "

href}\">{$lang['strshowalltables']}

\n"; + echo "

href}\">{$lang['strshowalltables']}

\n"; } /** @@ -162,7 +164,7 @@ global $PHP_SELF; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": {$lang['strselect']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strselect']}

\n"; $misc->printMsg($msg); $attrs = &$localData->getTableAttributes($_REQUEST['table']); @@ -172,7 +174,9 @@ echo "\n"; // Output table header - echo ""; + echo ""; + echo ""; + echo ""; $i = 0; while (!$attrs->EOF) { @@ -183,19 +187,19 @@ // Continue drawing row $id = (($i % 2) == 0 ? '1' : '2'); echo "\n"; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo "f['attname']}]\"", + isset($_REQUEST['nulls'][$attrs->f['attname']]) ? ' checked' : '', " />"; else echo " "; - echo ""; echo "\n"; $i++; @@ -205,11 +209,11 @@ } else echo "

{$lang['strinvalidparam']}

\n"; - echo "

\n"; - echo "\n"; + echo "

\n"; + echo "\n"; echo $misc->form; - echo "\n"; - echo "

\n"; + echo "\n"; + echo "

\n"; echo "\n"; } else { @@ -243,7 +247,7 @@ global $PHP_SELF; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": {$lang['strinsertrow']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strinsertrow']}

\n"; $misc->printMsg($msg); $attrs = &$localData->getTableAttributes($_REQUEST['table']); @@ -270,9 +274,9 @@ // Continue drawing row $id = (($i % 2) == 0 ? '1' : '2'); echo "\n"; - echo ""; + echo ""; echo ""; echo "\n"; - echo ""; + echo ""; echo ""; echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "
{$lang['strshow']}{$lang['strfield']}{$lang['strtype']}{$lang['strnull']}{$lang['strvalue']}
{$lang['strshow']}{$lang['strfield']}{$lang['strtype']}{$lang['strnull']}{$lang['strvalue']}
"; + echo ""; echo "f['attname']), "]\"", - isset($_REQUEST['show'][$attrs->f['attname']]) ? ' checked' : '', ">", htmlspecialchars($attrs->f['attname']), "", htmlspecialchars($attrs->f['type']), ""; + isset($_REQUEST['show'][$attrs->f['attname']]) ? ' checked' : '', " />", $misc->printVal($attrs->f['attname']), "", $misc->printVal($attrs->f['type']), ""; // Output null box if the column allows nulls (doesn't look at CHECKs or ASSERTIONS) if (!$attrs->f['attnotnull']) - echo "f['attname']}]\"", - isset($_REQUEST['nulls'][$attrs->f['attname']]) ? ' checked' : '', ">", $localData->printField("values[{$attrs->f['attname']}]", + echo "", $localData->printField("values[{$attrs->f['attname']}]", $_REQUEST['values'][$attrs->f['attname']], $attrs->f['type']), "
", htmlspecialchars($attrs->f['attname']), "", $misc->printVal($attrs->f['attname']), "\n"; - echo htmlspecialchars($attrs->f['type']); + echo $misc->printVal($attrs->f['type']); echo "f['attname']), "]\" value=\"", htmlspecialchars($attrs->f['type']), "\" />\n"; @@ -335,9 +339,9 @@ global $PHP_SELF; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": {$lang['strempty']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strempty']}

\n"; - echo "

", sprintf($lang['strconfemptytable'], htmlspecialchars($_REQUEST['table'])), "

\n"; + echo "

", sprintf($lang['strconfemptytable'], $misc->printVal($_REQUEST['table'])), "

\n"; echo "
\n"; echo "\n"; @@ -365,9 +369,9 @@ global $PHP_SELF; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": {$lang['strdrop']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strdrop']}

\n"; - echo "

", sprintf($lang['strconfdroptable'], htmlspecialchars($_REQUEST['table'])), "

\n"; + echo "

", sprintf($lang['strconfdroptable'], $misc->printVal($_REQUEST['table'])), "

\n"; echo "\n"; echo "\n"; @@ -403,7 +407,7 @@ $key = $_REQUEST['key']; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": {$lang['streditrow']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['streditrow']}

\n"; $misc->printMsg($msg); $attrs = &$localData->getTableAttributes($_REQUEST['table']); @@ -430,9 +434,9 @@ $_REQUEST['format'][$attrs->f['attname']] = 'VALUE'; echo "
", htmlspecialchars($attrs->f['attname']), "", $misc->printVal($attrs->f['attname']), "\n"; - echo htmlspecialchars($attrs->f['type']); + echo $misc->printVal($attrs->f['type']); echo "f['attname']), "]\" value=\"", htmlspecialchars($attrs->f['type']), "\" />\n"; @@ -498,7 +502,7 @@ global $PHP_SELF; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$lang['strtables']}: ", htmlspecialchars($_REQUEST['table']), ": {$lang['strdeleterow']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", $misc->printVal($_REQUEST['table']), ": {$lang['strdeleterow']}

\n"; echo "

{$lang['strconfdeleterow']}

\n"; @@ -532,7 +536,7 @@ global $data, $localData, $misc, $conf; global $PHP_SELF, $lang; - echo "

", htmlspecialchars($_REQUEST['database']), ": ", htmlspecialchars($_REQUEST['table']), ": {$lang['strbrowse']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['table']), ": {$lang['strbrowse']}

\n"; $misc->printMsg($msg); if (!isset($_REQUEST['page'])) $_REQUEST['page'] = 1; @@ -638,7 +642,7 @@ global $data, $misc, $localData; global $PHP_SELF, $lang; - echo "

", htmlspecialchars($_REQUEST['database']), "

\n"; + echo "

", $misc->printVal($_REQUEST['database']), "

\n"; $tables = &$localData->getTables(); @@ -648,8 +652,8 @@ $i = 0; while (!$tables->EOF) { $id = (($i % 2) == 0 ? '1' : '2'); - echo "
", htmlspecialchars($tables->f[$data->tbFields['tbname']]), "", htmlspecialchars($tables->f[$data->tbFields['tbowner']]), "
", $misc->printVal($tables->f[$data->tbFields['tbname']]), "", $misc->printVal($tables->f[$data->tbFields['tbowner']]), "href}&table=", urlencode($tables->f[$data->tbFields['tbname']]), "\">{$lang['strbrowse']}href}&table=", diff --git a/triggers.php b/triggers.php index 5700b243..1f28c5e4 100644 --- a/triggers.php +++ b/triggers.php @@ -3,7 +3,7 @@ /** * List triggers on a table * - * $Id: triggers.php,v 1.13 2003/05/17 15:55:23 chriskl Exp $ + * $Id: triggers.php,v 1.14 2003/05/31 07:23:24 chriskl Exp $ */ // Include application functions @@ -21,22 +21,23 @@ global $PHP_SELF, $lang; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": Tables: ", - htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['trigger']), ": {$lang['strdrop']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": {$lang['strtables']}: ", + $misc->printVal($_REQUEST['table']), ": " , $misc->printVal($_REQUEST['trigger']), ": {$lang['strdrop']}

\n"; - echo "

", sprintf($lang['strconfdroptrigger'], htmlspecialchars($_REQUEST['trigger']), - htmlspecialchars($_REQUEST['table'])), "

\n"; + echo "

", sprintf($lang['strconfdroptrigger'], $misc->printVal($_REQUEST['trigger']), + $misc->printVal($_REQUEST['table'])), "

\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo $misc->form; // Show cascade drop option if supportd if ($localData->hasDropBehavior()) { - echo "

{$lang['strcascade']}

\n"; + echo "

{$lang['strcascade']}

\n"; } - echo " \n"; + echo "\n"; + echo "\n"; echo "\n"; } else { @@ -84,7 +85,7 @@ echo "
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo " \n"; echo " \n"; @@ -96,11 +97,12 @@ echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
{$lang['strname']}
{$lang['strwhen']}{$lang['strevent']}
{$lang['strfunction']}{$lang['strarguments']}
", $sel0->fetch(), "()()
\n"; - echo "

\n"; - echo "\n"; - echo "\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; echo $misc->form; echo "
\n"; } @@ -140,25 +142,26 @@ global $lang; $misc->printTableNav(); - echo "

", htmlspecialchars($_REQUEST['database']), ": ", htmlspecialchars($_REQUEST['table']), ": {$lang['strtriggers']}

\n"; + echo "

", $misc->printVal($_REQUEST['database']), ": ", $misc->printVal($_REQUEST['table']), ": {$lang['strtriggers']}

\n"; $misc->printMsg($msg); $triggers = &$localData->getTriggers($_REQUEST['table']); if ($triggers->recordCount() > 0) { echo "\n"; - echo "\n"; + echo ""; + echo "\n"; $i = 0; while (!$triggers->EOF) { $id = ( ($i % 2 ) == 0 ? '1' : '2' ); - echo ""; + echo ""; echo "\n\n"; -- 2.39.5
{$lang['strname']}{$lang['strdefinition']}{$lang['stractions']}
{$lang['strname']}{$lang['strdefinition']}{$lang['stractions']}
", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "
", $misc->printVal( $triggers->f[$data->tgFields['tgname']]), ""; // Nasty hack to support pre-7.4 PostgreSQL if ($triggers->f[$data->tgFields['tgdef']] !== null) - echo htmlspecialchars($triggers->f[$data->tgFields['tgdef']]); + echo $misc->printVal($triggers->f[$data->tgFields['tgdef']]); else - echo htmlspecialchars($localData->getTriggerDef($triggers->f)); + echo $misc->printVal($localData->getTriggerDef($triggers->f)); echo ""; echo "href}&trigger=", urlencode( $triggers->f[$data->tgFields['tgname']]), "&table=", urlencode($_REQUEST['table']), "\">{$lang['strdrop']}