Esempio n. 1
0
*/
$neededObjAr = array(AMA_TYPE_SWITCHER => array('layout'));
$trackPageToNavigationHistory = false;
require_once ROOT_DIR . '/include/module_init.inc.php';
$self = "switcher";
include_once '../include/' . $self . '_functions.inc.php';
$self = "translation";
/*
 * Html Library containing forms used in this module.
 */
require_once ROOT_DIR . '/include/HtmlLibrary/AdminModuleHtmlLib.inc.php';
require_once ROOT_DIR . '/include/HtmlLibrary/UserModuleHtmlLib.inc.php';
require_once ROOT_DIR . '/include/Forms/TranslationForm.inc.php';
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $form = $form = new TranslationForm();
    $form->fillWithPostData();
    if ($form->isValid()) {
        $search_text = $_POST['t_name'];
        $language_code = $_POST['selectLanguage'];
        $common_dh = $GLOBALS['common_dh'];
        $thead_data = array(translateFN("Errore"));
        if (is_null($search_text) || $search_text == "") {
            $total_results = array();
            $msgEr = translateFN("Nessun input sottomesso");
            $temp_results = array(translateFN("") => $msgEr);
            array_push($total_results, $temp_results);
            $result_table = BaseHtmlLib::tableElement('id:table_result', $thead_data, $total_results);
            $result = $result_table->getHtml();
            $retArray = array("status" => "ERROR", "msg" => translateFN("Nessun input sottomesso"), "html" => $result);
        } else {
            //$result = $common_dh->find_translation_for_message($search_text, $language_code, ADA_SYSTEM_MESSAGES_SHOW_SEARCH_RESULT_NUM);