From 7c9e66478637c2028f34412737f5293084906d9c Mon Sep 17 00:00:00 2001 From: slubek Date: Thu, 20 Feb 2003 23:17:05 +0000 Subject: [PATCH] Removed all (I hope so ;-) ) hardcoded strings --- database.php | 16 ++++++------- functions.php | 57 +++++++++++++++++++++++---------------------- reports.php | 14 +++++------ tblproperties.php | 45 ++++++++++++++++++------------------ types.php | 8 +++---- views.php | 59 +++++++++++++++++++++++------------------------ 6 files changed, 101 insertions(+), 98 deletions(-) diff --git a/database.php b/database.php index 9080320e..52171937 100755 --- a/database.php +++ b/database.php @@ -3,7 +3,7 @@ /** * Manage schemas within a database * - * $Id: database.php,v 1.4 2003/02/09 10:22:38 chriskl Exp $ + * $Id: database.php,v 1.5 2003/02/20 23:17:05 slubek Exp $ */ // Include application functions @@ -18,7 +18,7 @@ */ function doSQL() { global $PHP_SELF, $localData, $misc; - global $strSQL, $strEnterSQL, $strGo; + global $strSQL, $strEnterSQL, $strGo, $strReset; if (!isset($_POST['query'])) $_POST['query'] = ''; @@ -35,7 +35,7 @@ echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; } @@ -45,7 +45,7 @@ */ function doDrop($confirm) { global $PHP_SELF, $data, $localData; - global $strDrop, $strConfDropSchema, $strSchemaDropped, $strSchemaDroppedBad; + global $strDrop, $strConfDropSchema, $strSchemaDropped, $strSchemaDroppedBad, $strYes, $strNo; if ($confirm) { echo "

", htmlspecialchars($_REQUEST['database']), ": ", @@ -57,7 +57,7 @@ echo "\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; } else { @@ -75,7 +75,7 @@ */ function doCreate($msg = '') { global $data, $misc; - global $PHP_SELF, $strName, $strOwner, $strCreateSchema, $strShowAllSchemas; + global $PHP_SELF, $strName, $strOwner, $strCreateSchema, $strShowAllSchemas, $strSave, $strReset; if (!isset($_POST['formName'])) $_POST['formName'] = ''; if (!isset($_POST['formAuth'])) $_POST['formAuth'] = $_SESSION['webdbUsername']; @@ -103,7 +103,7 @@ echo "

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

\n"; echo "\n"; @@ -189,7 +189,7 @@ doCreate(); break; case 'drop': - if ($_POST['choice'] == 'Yes') doDrop(false); + if ($_POST['choice'] == "{$strYes}") doDrop(false); else doDefault(); break; case 'confirm_drop': diff --git a/functions.php b/functions.php index 8fbd5a23..b7300856 100644 --- a/functions.php +++ b/functions.php @@ -3,7 +3,7 @@ /** * Manage functions in a database * - * $Id: functions.php,v 1.3 2003/02/09 10:22:38 chriskl Exp $ + * $Id: functions.php,v 1.4 2003/02/20 23:17:05 slubek Exp $ */ // Include application functions @@ -17,13 +17,13 @@ * Function to save after editing a function */ function doSaveEdit() { - global $localData; + global $localData, $strFunctionUpdated, $strFunctionUpdatedBad; $status = $localData->setFunction($_POST['original_function'], $_POST['original_arguments'] , $_POST['original_returns'] , $_POST['formDefinition'] , $_POST['original_lang'],0,true); if ($status == 0) - doProperties('Function updated.'); + doProperties($strFunctionUpdated); else - doEdit('Function update failed.'); + doEdit($strFunctionUpdatedBad); } /** @@ -32,8 +32,9 @@ function doEdit($msg = '') { global $data, $localData, $misc; global $PHP_SELF, $strFunction, $strArguments, $strReturns, $strActions, $strNoFunctions, $strDefinition, $strLanguage; + global $strSave, $strReset, $strNoData, $strFunctions, $strEdit, $strProperties, $strShowAllFunctions; - echo "

", htmlspecialchars($_REQUEST['database']), ": Functions: ", htmlspecialchars($_REQUEST['function']), ": Edit

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strFunctions}: ", htmlspecialchars($_REQUEST['function']), ": {$strEdit}

\n"; $misc->printMsg($msg); $fndata = &$localData->getFunction($_REQUEST['function_oid']); @@ -74,14 +75,14 @@ echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "\n"; } - else echo "

No data.

\n"; + else echo "

{$strNoData}

\n"; - echo "

href}\">Show All Functions |\n"; + echo "

href}\">{$strShowAllFunctions} |\n"; echo "href}&function=", - urlencode($_REQUEST['function']), "&function_oid=", urlencode($_REQUEST['function_oid']), "\">Properties

\n"; + urlencode($_REQUEST['function']), "&function_oid=", urlencode($_REQUEST['function_oid']), "\">{$strProperties}

\n"; } /** @@ -90,8 +91,9 @@ function doProperties($msg = '') { global $data, $localData, $misc; global $PHP_SELF, $strFunctions, $strArguments, $strReturns, $strActions, $strNoFunctions, $strDefinition, $strLanguage; + global $strFunctions, $strProperties, $strNoData, $ShowAllFunctions, $strEdit; - echo "

", htmlspecialchars($_REQUEST['database']), ": Functions: ", htmlspecialchars($_REQUEST['function']), ": Properties

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strFunctions}: ", htmlspecialchars($_REQUEST['function']), ": {$strProperties}

\n"; $misc->printMsg($msg); $funcdata = &$localData->getFunction($_REQUEST['function_oid']); @@ -110,11 +112,11 @@ echo "", nl2br(htmlspecialchars($funcdata->f[$data->fnFields['fndef']])), "\n"; echo "\n"; } - else echo "

No data.

\n"; + else echo "

{$strNoData}

\n"; - echo "

href}\">Show All Functions |\n"; + echo "

href}\">{$strShowAllFunctions} |\n"; echo "href}&function=", - urlencode($_REQUEST['function']), "&function_oid=", urlencode($_REQUEST['function_oid']), "\">Edit

\n"; + urlencode($_REQUEST['function']), "&function_oid=", urlencode($_REQUEST['function_oid']), "\">{$strEdit}

\n"; } /** @@ -122,26 +124,25 @@ */ function doDrop($confirm) { global $localData, $database, $misc; - global $PHP_SELF; + global $PHP_SELF, $strFunctions, $strDrop, $strConfDropFunction, $strYes, $strNo, $strFunctionDropped, $strFunctionDroppedBad; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": Functions: ", htmlspecialchars($_REQUEST['function']), ": Drop

\n"; - - echo "

Are you sure you want to drop the function \"", htmlspecialchars($_REQUEST['function']), "\"?

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strFunctions}: ", htmlspecialchars($_REQUEST['function']), ": {$strDrop}

\n"; + echo "

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

\n"; echo "
\n"; echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "
\n"; } else { $status = $localData->dropFunction($_POST['function']); if ($status == 0) - doDefault('Function dropped.'); + doDefault($strFunctionDropped); else - doDefault('Function drop failed.'); + doDefault($strFunctionDroppedBad); } } @@ -152,6 +153,7 @@ function doCreate($msg = '') { global $data, $localData, $misc; global $PHP_SELF, $strName, $strArguments, $strReturns, $strDefinition, $strLanguage; + global $strFunctions, $strCreateFunction, $strSave, $strReset, $strShowAllFunctions; if (!isset($_POST['formFunction'])) $_POST['formFunction'] = ''; if (!isset($_POST['formArguments'])) $_POST['formArguments'] = ''; @@ -162,7 +164,7 @@ $types = &$localData->getTypes(true); $langs = &$localData->getLanguages(); - echo "

", htmlspecialchars($_REQUEST['database']), ": Functions: Create Function

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strFunctions}: {$strCreateFunction}

\n"; $misc->printMsg($msg); echo "
\n"; @@ -199,10 +201,10 @@ echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "
\n"; - echo "

href}\">Show All Functions

\n"; + echo "

href}\">{$strShowAllFunctions}

\n"; } /** @@ -210,6 +212,7 @@ */ function doSaveCreate() { global $localData, $strFunctionNeedsName, $strFunctionNeedsDef; + global $strFunctionCreated, $strFunctionCreatedBad; // Check that they've given a name and a definition if ($_POST['formFunction'] == '') doCreate($strFunctionNeedsName); @@ -217,9 +220,9 @@ else { $status = $localData->createFunction($_POST['formFunction'], $_POST['formArguments'] , $_POST['formReturns'] , $_POST['formDefinition'] , $_POST['formLanguage'],0); if ($status == 0) - doDefault('Function created.'); + doDefault($strFunctionCreated); else - doCreate('Function creation failed.'); + doCreate($strFunctionCreatedBad); } } @@ -231,7 +234,7 @@ global $PHP_SELF, $strFunctions, $strArguments, $strReturns, $strActions, $strNoFunctions; global $strCreateFunction, $strProperties, $strEdit, $strDrop, $strPrivileges; - echo "

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

\n"; + echo "

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

\n"; $misc->printMsg($msg); $funcs = &$localData->getFunctions(); @@ -280,7 +283,7 @@ doCreate(); break; case 'drop': - if ($_POST['choice'] == 'Yes') doDrop(false); + if ($_POST['choice'] == "{$strYes}") doDrop(false); else doDefault(); break; case 'confirm_drop': diff --git a/reports.php b/reports.php index aeefac64..6263557a 100644 --- a/reports.php +++ b/reports.php @@ -3,7 +3,7 @@ /** * List reports in a database * - * $Id: reports.php,v 1.1 2003/02/16 05:30:53 chriskl Exp $ + * $Id: reports.php,v 1.2 2003/02/20 23:17:05 slubek Exp $ */ // Include application functions @@ -22,7 +22,7 @@ function doCreate($msg = '') { global $reportsdb, $misc; global $PHP_SELF, $strName, $strDatabase, $strComment, $strSQL; - global $strCreateReport, $strReports; + global $strCreateReport, $strReports, $strSave, $strReset, $strShowAllViews; if (!isset($_POST['report_name'])) $_POST['report_name'] = ''; if (!isset($_POST['db_name'])) $_POST['db_name'] = ''; @@ -43,17 +43,17 @@ echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "\n"; - echo "

href}\">Show All Views

\n"; + echo "

href}\">{$strShowAllViews}

\n"; } /** * Actually creates the new view in the database */ function doSaveCreate() { - global $localData, $strViewNeedsName, $strViewNeedsDef; + global $localData, $strViewNeedsName, $strViewNeedsDef, $strViewCreated, $strViewCreatedBad; // Check that they've given a name and a definition if ($_POST['formView'] == '') doCreate($strViewNeedsName); @@ -61,9 +61,9 @@ else { $status = $localData->createView($_POST['formView'], $_POST['formDefinition']); if ($status == 0) - doDefault('View created.'); + doDefault($strViewCreated); else - doCreate('View creation failed.'); + doCreate($strViewCreatedBad); } } diff --git a/tblproperties.php b/tblproperties.php index 06419786..ec4f3dcd 100644 --- a/tblproperties.php +++ b/tblproperties.php @@ -3,7 +3,7 @@ /** * List tables in a database * - * $Id: tblproperties.php,v 1.2 2003/02/07 17:34:35 xzilla Exp $ + * $Id: tblproperties.php,v 1.3 2003/02/20 23:17:05 slubek Exp $ */ // Include application functions @@ -15,7 +15,7 @@ function doTriggers($msg = '') { global $data, $localData, $misc; global $PHP_SELF; - global $strTriggers, $strNoTriggers, $strCreateTrigger, $strActions, $strName, $strPrivileges; + global $strTriggers, $strNoTriggers, $strCreateTrigger, $strActions, $strName, $strPrivileges, $strProperties, $strDrop, $strPrivileges; $misc->printTableNav(); echo "

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

\n"; @@ -32,11 +32,11 @@ $id = ( ($i % 2 ) == 0 ? '1' : '2' ); echo "", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), ""; echo ""; - echo "href}&trigger=", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "\">Properties\n"; + echo "href}&trigger=", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "\">{$strProperties}\n"; echo ""; - echo "href}&trigger=", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "\">Drop\n"; + echo "href}&trigger=", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "\">{$strDrop}\n"; echo ""; - echo "href}&trigger=", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "\">Privileges\n"; + echo "href}&trigger=", htmlspecialchars( $triggers->f[$data->tgFields['tgname']]), "\">{$strPrivileges}\n"; $triggers->movenext(); $i++; @@ -93,9 +93,9 @@ switch ($_REQUEST['stage']) { case 1: - global $strField, $strType, $strNotNull, $strDefault, $strAlter; + global $strField, $strType, $strNotNull, $strDefault, $strAlter, $strReset, $strAlterColumn; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strTables}: Alter Column: ", + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strTables}: {$strAlterColumn}: ", htmlspecialchars($_REQUEST['column']), "

\n"; $misc->printMsg($msg); @@ -128,32 +128,32 @@ echo "\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; break; case 2: - global $localData; + global $localData, $strFieldNeedsName, $strColumnAltered, $strColumnAlteredBad, $strInvalidScriptParam; // Check inputs if (trim($_REQUEST['field']) == '') { $_REQUEST['stage'] = 1; - doProperties('You must name your field.'); + doProperties($strFieldNeedsName); return; } $status = $localData->alterColumn($_REQUEST['table'], $_REQUEST['column'], $_REQUEST['field'], isset($_REQUEST['notnull']), $_REQUEST['default'], $_REQUEST['olddefault']); if ($status == 0) - doDefault('Column altered.'); + doDefault($strColumnAltered); else { $_REQUEST['stage'] = 1; - doProperties('Column altering failed.'); + doProperties($strColumnAlteredBad); return; } break; default: - echo "

Invalid script parameter.

\n"; + echo "

{$strInvalidScriptParam}

\n"; } echo "

href}\">{$strShowAllTables}

\n"; @@ -164,29 +164,30 @@ */ function doDrop($confirm) { global $localData, $database, $misc; - global $PHP_SELF; + global $PHP_SELF, $strTables, $strDrop, $strConfDropColumn, $strYes, $strNo, $strColumnDropped, $strColumnDroppedBad; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": Tables: ", - htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['column']), ": Drop

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strTables}: ", + htmlspecialchars($_REQUEST['table']), ": " , htmlspecialchars($_REQUEST['column']), ": {$strDrop}

\n"; - echo "

Are you sure you want to drop the column \"", htmlspecialchars($_REQUEST['column']), - "\" from table \"", htmlspecialchars($_REQUEST['table']), "\"?

\n"; + echo "

", sprintf($strConfDropColumn, htmlspecialchars($_REQUEST['column']), + htmlspecialchars($_REQUEST['table'])), "

\n"; + echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "
\n"; } else { $status = $localData->dropColumn($_POST['table'], $_POST['column'], 'RESTRICT'); if ($status == 0) - doDefault('Column dropped.'); + doDefault($strColumnDropped); else - doDefault('Column drop failed.'); + doDefault($strColumnDroppedBad); } } @@ -253,7 +254,7 @@ doProperties(); break; case 'drop': - if ($_POST['choice'] == 'Yes') doDrop(false); + if ($_POST['choice'] == "{$strYes}") doDrop(false); else doDefault(); break; case 'confirm_drop': diff --git a/types.php b/types.php index 64724fb1..748f5ad0 100644 --- a/types.php +++ b/types.php @@ -3,7 +3,7 @@ /** * Manage types in a database * - * $Id: types.php,v 1.2 2003/02/07 17:34:35 xzilla Exp $ + * $Id: types.php,v 1.3 2003/02/20 23:17:05 slubek Exp $ */ // Include application functions @@ -86,7 +86,7 @@ global $data, $localData, $misc; global $PHP_SELF, $strName, $strTypes, $strCreateType, $strShowAllTypes; global $strInputFn, $strOutputFn, $strLength, $strDefault; - global $strElement, $strDelimiter, $strPassByVal, $strAlignment, $strStorage; + global $strElement, $strDelimiter, $strPassByVal, $strAlignment, $strStorage, $strSave, $strReset; if (!isset($_POST['typname'])) $_POST['typname'] = ''; if (!isset($_POST['typin'])) $_POST['typin'] = ''; @@ -168,7 +168,7 @@ echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "\n"; echo "

href}\">{$strShowAllTypes}

\n"; @@ -254,7 +254,7 @@ doCreate(); break; case 'drop': - if ($_POST['choice'] == 'Yes') doDrop(false); + if ($_POST['choice'] == "{$strYes}") doDrop(false); else doDefault(); break; case 'confirm_drop': diff --git a/views.php b/views.php index 20f9461c..4b4ebbeb 100644 --- a/views.php +++ b/views.php @@ -3,7 +3,7 @@ /** * Manage views in a database * - * $Id: views.php,v 1.3 2003/02/09 10:22:38 chriskl Exp $ + * $Id: views.php,v 1.4 2003/02/20 23:17:05 slubek Exp $ */ // Include application functions @@ -17,13 +17,13 @@ * Function to save after editing a view */ function doSaveEdit() { - global $localData; + global $localData, $strViewUpdated, $strViewUpdatedBad; $status = $localData->setView($_POST['view'], $_POST['formDefinition']); if ($status == 0) - doProperties('View updated.'); + doProperties($strViewUpdated); else - doEdit('View update failed.'); + doEdit($strViewUpdatedBad); } /** @@ -31,9 +31,9 @@ */ function doEdit($msg = '') { global $data, $localData, $misc; - global $PHP_SELF, $strName, $strDefinition, $strViews ; + global $PHP_SELF, $strName, $strDefinition, $strViews, $strEdit, $strSave, $strReset, $strNoData, $strShowAllViews, $strProperties ; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: ", htmlspecialchars($_REQUEST['view']), ": Edit

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: ", htmlspecialchars($_REQUEST['view']), ": {$strEdit}

\n"; $misc->printMsg($msg); $viewdata = &$localData->getView($_REQUEST['view']); @@ -50,14 +50,14 @@ echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "\n"; } - else echo "

No data.

\n"; + else echo "

{$strNoData}

\n"; - echo "

href}\">Show All Views |\n"; + echo "

href}\">{$strShowAllViews} |\n"; echo "href}&view=", - urlencode($_REQUEST['view']), "\">Properties

\n"; + urlencode($_REQUEST['view']), "\">{$strProperties}

\n"; } /** @@ -65,9 +65,9 @@ */ function doProperties($msg = '') { global $data, $localData, $misc; - global $PHP_SELF, $strName, $strDefinition, $strViews; + global $PHP_SELF, $strName, $strDefinition, $strViews, $strShowAllViews, $strEdit, $strProperties, $strNoData; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: ", htmlspecialchars($_REQUEST['view']), ": Properties

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: ", htmlspecialchars($_REQUEST['view']), ": {$strProperties}

\n"; $misc->printMsg($msg); $viewdata = &$localData->getView($_REQUEST['view']); @@ -80,11 +80,11 @@ echo "", nl2br(htmlspecialchars($viewdata->f[$data->vwFields['vwdef']])), "\n"; echo "\n"; } - else echo "

No data.

\n"; + else echo "

{$strNoData}

\n"; - echo "

href}\">Show All Views |\n"; + echo "

href}\">{$strShowAllViews} |\n"; echo "href}&view=", - urlencode($_REQUEST['view']), "\">Edit

\n"; + urlencode($_REQUEST['view']), "\">{$strEdit}

\n"; } /** @@ -92,26 +92,25 @@ */ function doDrop($confirm) { global $localData, $misc; - global $PHP_SELF, $strViews; + global $PHP_SELF, $strViews, $strDrop, $strYes, $strNo, $strConfDropView, $strViewDropped, $strViewDroppedBad; if ($confirm) { - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: ", htmlspecialchars($_REQUEST['view']), ": Drop

\n"; - - echo "

Are you sure you want to drop the view \"", htmlspecialchars($_REQUEST['view']), "\"?

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: ", htmlspecialchars($_REQUEST['view']), ": {$strDrop}

\n"; + echo "

", sprintf($strConfDropView, htmlspecialchars($_REQUEST['view'])), "

\n"; echo "
\n"; echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "
\n"; } else { $status = $localData->dropView($_POST['view']); if ($status == 0) - doDefault('View dropped.'); + doDefault($strViewDropped); else - doDefault('View drop failed.'); + doDefault($strViewDroppedBad); } } @@ -121,12 +120,12 @@ */ function doCreate($msg = '') { global $data, $localData, $misc; - global $PHP_SELF, $strName, $strDefinition, $strViews; + global $PHP_SELF, $strName, $strDefinition, $strViews, $strCreateView, $strSave, $strReset, $strShowAllViews; if (!isset($_POST['formView'])) $_POST['formView'] = ''; if (!isset($_POST['formDefinition'])) $_POST['formDefinition'] = ''; - echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: Create View

\n"; + echo "

", htmlspecialchars($_REQUEST['database']), ": {$strViews}: {$strCreateView}

\n"; $misc->printMsg($msg); echo "
\n"; @@ -140,17 +139,17 @@ echo "\n"; echo "\n"; echo $misc->form; - echo " \n"; + echo " \n"; echo "
\n"; - echo "

href}\">Show All Views

\n"; + echo "

href}\">{$strShowAllViews}

\n"; } /** * Actually creates the new view in the database */ function doSaveCreate() { - global $localData, $strViewNeedsName, $strViewNeedsDef; + global $localData, $strViewNeedsName, $strViewNeedsDef, $strViewCreated, $strViewCreatedBad; // Check that they've given a name and a definition if ($_POST['formView'] == '') doCreate($strViewNeedsName); @@ -158,9 +157,9 @@ else { $status = $localData->createView($_POST['formView'], $_POST['formDefinition']); if ($status == 0) - doDefault('View created.'); + doDefault($strViewCreated); else - doCreate('View creation failed.'); + doCreate($strViewCreatedBad); } } @@ -220,7 +219,7 @@ doCreate(); break; case 'drop': - if ($_POST['choice'] == 'Yes') doDrop(false); + if ($_POST['choice'] == "{$strYes}") doDrop(false); else doDefault(); break; case 'confirm_drop': -- 2.39.5