Multilinquified core/apps. App Edit and Delete buttons hidden (for now, at least).

This commit is contained in:
Nate Jones 2013-05-15 02:19:44 +00:00
parent 4c142bb790
commit b207aa26db
4 changed files with 133 additions and 26 deletions

View File

@ -0,0 +1,72 @@
<?php
//Apps
$text['title-apps']['en-us'] = 'App Manager';
$text['title-apps']['pt-pt'] = '';
$text['header-apps']['en-us'] = 'App Manager';
$text['header-apps']['pt-pt'] = '';
$text['description-apps']['en-us'] = 'Manage the applications that are installed.';
$text['description-apps']['pt-pt'] = '';
//------
$text['title-app-edit']['en-us'] = 'App Edit';
$text['title-app-edit']['pt-pt'] = '';
$text['header-app-edit']['en-us'] = 'App Edit';
$text['header-app-edit']['pt-pt'] = '';
$text['description-app-edit']['en-us'] = 'Manage the applications that are installed.';
$text['description-app-edit']['pt-pt'] = '';
//------
$text['label-name']['en-us'] = 'Name';
$text['label-name']['pt-pt'] = '';
$text['label-category']['en-us'] = 'Category';
$text['label-category']['pt-pt'] = '';
$text['label-subcategory']['en-us'] = 'Subcategory';
$text['label-subcategory']['pt-pt'] = '';
$text['label-version']['en-us'] = 'Version';
$text['label-version']['pt-pt'] = '';
$text['label-description']['en-us'] = 'Description';
$text['label-description']['pt-pt'] = '';
$text['button-add']['en-us'] = 'Add';
$text['button-add']['pt-pt'] = '';
$text['button-edit']['en-us'] = 'Edit';
$text['button-edit']['pt-pt'] = '';
$text['button-delete']['en-us'] = 'Delete';
$text['button-delete']['pt-pt'] = '';
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
$text['confirm-delete']['pt-pt'] = '';
$text['button-save']['en-us'] = 'Save';
$text['button-save']['pt-pt'] = 'Guardar';
$text['button-back']['en-us'] = 'Back';
$text['button-back']['pt-pt'] = 'Voltar';
$text['message-message']['en-us'] = 'Message';
$text['message-message']['pt-pt'] = '';
$text['message-add']['en-us'] = 'Add Completed';
$text['message-add']['pt-pt'] = '';
$text['message-update']['en-us'] = 'Update Completed';
$text['message-update']['pt-pt'] = '';
$text['message-delete']['en-us'] = 'Delete Completed';
$text['message-delete']['pt-pt'] = '';
?>

View File

@ -33,7 +33,16 @@ else {
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-apps'];
require_once "includes/paging.php";
//get variables used to control the order
@ -57,12 +66,12 @@ require_once "includes/paging.php";
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo " <td width='50%' align='left' nowrap><b>App Manager</b></td>\n";
echo " <td width='50%' align='left' nowrap><b>".$text['header-apps']."</b></td>\n";
echo " <td width='50%' align='right'>&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";
echo " Manage the applications that are installed.<br /><br />\n";
echo " ".$text['description-apps']."<br /><br />\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
@ -74,13 +83,13 @@ require_once "includes/paging.php";
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo " <th>Name</th>\n";
echo " <th>Category</th>\n";
echo " <th>Subcategory</th>\n";
echo " <th>Version</th>\n";
echo " <th>Description</th>\n";
echo " <th>".$text['label-name']."</th>\n";
echo " <th>".$text['label-category']."</th>\n";
echo " <th>".$text['label-subcategory']."</th>\n";
echo " <th>".$text['label-version']."</th>\n";
echo " <th>".$text['label-description']."</th>\n";
//echo "<td align='right' width='42'>\n";
//echo " <a href='apps_edit.php' alt='add'>$v_link_label_add</a>\n";
//echo " <a href='apps_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
//echo "</td>\n";
echo "<tr>\n";
@ -92,10 +101,12 @@ require_once "includes/paging.php";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['subcategory']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['version']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' width='35%'>".$row['description']['en-us']."&nbsp;</td>\n";
/* // temporarily disabled
echo " <td valign='top' align='left' nowrap='nowrap' width='42'>\n";
echo " &nbsp;<a href='apps_edit.php?id=".$row['uuid']."' alt='edit'>$v_link_label_edit</a>\n";
echo " <a href='apps_delete.php?id=".$row['uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
echo " &nbsp;<a href='apps_edit.php?id=".$row['uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
echo " <a href='apps_delete.php?id=".$row['uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
echo " </td>\n";
*/
echo "</tr>\n";
}
if ($c==0) { $c=1; } else { $c=0; }

View File

@ -34,6 +34,12 @@ else {
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
if (count($_GET) > 0) {
$id = check_str($_GET["id"]);
}
@ -82,12 +88,12 @@ if (strlen($id)>0) {
}
}
}
//redirect the browser
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=apps.php\">\n";
echo "<div align='center'>\n";
echo "Delete Complete\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;

View File

@ -34,6 +34,12 @@ else {
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
@ -87,7 +93,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=apps.php\">\n";
echo "<div align='center'>\n";
echo "Add Complete\n";
echo $text['message-add']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
@ -103,16 +109,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=apps.php\">\n";
echo "<div align='center'>\n";
echo "Update Complete\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//show the header
require_once "includes/header.php";
if ($action == "update") {
$page["title"] = $text['title-app-edit'];
}
if ($action == "add") {
$page["title"] = $text['title-app-add'];
}
//pre-populate the form
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
@ -135,9 +147,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
}
//show the header
require_once "includes/header.php";
//show the content
echo "<div align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
@ -149,18 +158,27 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>$name</b></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='apps.php'\" value='Back'></td>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['header-app-edit']."</b></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='apps.php'\" value='".$text['button-back']."'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='left' colspan='2'>\n";
echo "Manage the applications that are installed.<br /><br />\n";
echo $text['description-app-edit']."<br /><br />\n";
echo "</td>\n";
echo "</tr>\n";
echo " <tr>\n";
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
echo " Category:\n";
echo " ".$text['label-name'].":\n";
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " $name &nbsp;\n";
echo " </td>\n";
echo " </tr>";
echo " <tr>\n";
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-category'].":\n";
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " $category &nbsp;\n";
@ -169,7 +187,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <tr>\n";
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
echo " Subcategory:\n";
echo " ".$text['label-subcategory'].":\n";
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " $subcategory &nbsp;\n";
@ -178,7 +196,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <tr>\n";
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
echo " Version:\n";
echo " ".$text['label-version'].":\n";
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " $version &nbsp;\n";
@ -187,7 +205,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <tr>\n";
echo " <td class='vncell' valign='top' align='left' nowrap>\n";
echo " Description:\n";
echo " ".$text['label-description'].":\n";
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " $description &nbsp;\n";
@ -199,7 +217,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "update") {
echo " <input type='hidden' name='app_uuid' value='$app_uuid'>\n";
}
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo " </td>\n";
echo " </tr>";
echo "</table>";