PHP Classes

File: back.office.php

Recommend this page to a friend!
  Classes of Johan Barbier   oLoc   back.office.php   Download  
File: back.office.php
Role: Application script
Content type: text/plain
Description: Back-Office application
Class: oLoc
Retrieve and edit internationalized texts
Author: By
Last change: Added a new functionality
Date: 17 years ago
Size: 3,023 bytes
 

Contents

Class file image Download
<?php
require_once 'inc/inc.main.php';

$sMsg = '';
if(!empty(
$_FILES['addedTranslation']['tmp_name']) && !empty($_POST['selectedWebsite'])) {
   
$oBo = new backoffice($_POST['selectedWebsite']);
   
$sParserClass = PARSER_CLASS;
   
$oParser = new $sParserClass($oBo);
   
$oParser->getTranslationFromFile($_POST['uploadEncoding']);
   
$_FILES = null;
   
$_POST = null;
   
$sMsg = 'File successfully processed';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <title>Localization BackOffice</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <link rel="stylesheet" href="css/back.office.css" type="text/css" />
    <script src="js/prototype.js" type="text/javascript"></script>
    <script src="js/back.office.js" type="text/javascript"></script>
    </head>
    <body>
        <h1>O-LOC BACKOFFICE</h1>
        <div id="toolzHelp">
            <p><span class="subtitle">HELP</span></p>
            <p>
                <img src="img/help32.png" alt="Help" title="Help" id="helpBtn" class="button" /><div id="help" style="display: none;"><?php $o = new ReflectionClass('backoffice'); echo nl2br($o->getDocComment()); ?></div>
            </p>
        </div>
        <div id="toolzMenu">
            <span class="subtitle">TOOLZ</span>
            <form method="post" action="" id="uplFrm" enctype="multipart/form-data">
                <p id="toolzMenuAddWebsite"><input type="text" name="addedWebsite" id="addedWebsite" value="" /><input type="button" id="btnAddWebsite" value="Add a website" class="button" /></p>
                <p id="toolzMenuAddLanguage"><input type="text" name="addedLanguage" id="addedLanguage" value="" /><input type="button" id="btnAddLanguage" value="Add a language" class="button" /></p>
                <p id="toolzMenuAddModule"><input type="text" name="addedModule" id="addedModule" value="" title="Chose a name for the module" />&nbsp;<input type="text" id="moduleEncoding" value="UTF-8" title="Chose a VALID encoding for the module" /><input type="button" id="btnAddModule" value="Add a module" class="button" /></p>
                <p id="toolzMenuSelectWebsite"></p>
                <p id="toolzMenuUploadTranslation"><input type="hidden" name="MAX_FILE_SIZE" value="9000000000000" /><input type="file" name="addedTranslation" id="addedTranslation" class="button" />&nbsp;<input type="text" name="uploadEncoding" id="uploadEncoding" value="UTF-8" title="Chose a VALID encoding for the uploaded translations" />&nbsp;<input type="button" id="uploadFileBtn" value="Upload" class="button" /></p>
            </form>
        </div>
        <p><span class="subtitle">MESSAGES</span></p>
        <div id="toolzMenuMainMessage"><?php echo $sMsg; ?></div>
        <p><span class="subtitle">LIST</span></p>
        <table>
            <tbody id="list">
                <tr id="toolzMenuTr">
                    <th><p id="toolzMenuModules"></p></th>
                    <th><p id="toolzMenuLanguageRef"></p></th>
                    <th><p id="toolzMenuLanguages"></p></th>
                    <th></th>
                </tr>
            </tbody>
        </table>
    </body>
</html>