Multilinguified Upgrade Schema

This commit is contained in:
Nate Jones
2013-06-06 23:09:07 +00:00
parent 6436f0e9a1
commit 857002490e
4 changed files with 74 additions and 20 deletions

View File

@@ -0,0 +1,25 @@
<?php
// Upgrade Schema
$text['title-upgrade_schema']['en-us'] = 'Upgrade Schema';
$text['header-database_type']['en-us'] = 'Database Type';
$text['header-message']['en-us'] = 'Message';
$text['label-sql_changes']['en-us'] = 'SQL Changes';
$text['label-table']['en-us'] = 'Table';
$text['label-exists']['en-us'] = 'Exists';
$text['label-details']['en-us'] = 'Details';
$text['label-name']['en-us'] = 'Name';
$text['label-type']['en-us'] = 'Type';
$text['label-upgrade']['en-us'] = 'Upgrade';
$text['label-database']['en-us'] = 'Database';
$text['label-schema']['en-us'] = 'Schema';
$text['label-no_change']['en-us'] = 'No Change';
$text['option-true']['en-us'] = 'True';
$text['option-false']['en-us'] = 'False';
$text['message-upgrade']['en-us'] = 'Upgrade Completed';
?>

View File

@@ -33,6 +33,12 @@
require_once "includes/require.php";
$_SERVER["DOCUMENT_ROOT"] = $document_root;
$display_type = 'text'; //html, text
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
}
else {
include "root.php";
@@ -45,6 +51,13 @@
echo "access denied";
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
}
//set the default
@@ -59,10 +72,10 @@
if ($display_type == 'text') {
echo "\n";
echo "Upgrade\n";
echo $text['label-upgrade']."\n";
echo "-----------------------------------------\n";
echo "\n";
echo "Database\n";
echo $text['label-database']."\n";
}
//upgrade the database schema
@@ -73,10 +86,10 @@ if ($display_type == 'text') {
echo "<div align='center'>\n";
echo "<table width='40%'>\n";
echo "<tr>\n";
echo "<th align='left'>Message</th>\n";
echo "<th align='left'>".$text['header-message']."</th>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='row_style1'><strong>Upgrade Completed</strong></td>\n";
echo "<td class='row_style1'><strong>".$text['message-upgrade']."</strong></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";

View File

@@ -33,6 +33,12 @@
require_once "includes/require.php";
$_SERVER["DOCUMENT_ROOT"] = $document_root;
$display_type = 'text'; //html, text
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
}
else {
include "root.php";
@@ -45,7 +51,16 @@
echo "access denied";
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
require_once "includes/header.php";
$page["title"] = $text['title-upgrade_schema'];
$display_type = 'html'; //html, text
}