echo "<h2>Languages</h2>"; } require_once "../tools/translations/class/LanguageSet.class.php"; $langObj = new LanguageSet(); $langq = new SQLQuery($langObj->table); $langq->international = true; $langq->debug = $debug; $langq->reset_table($possibleLanguages, array("keycode")); if ($debug) { $langObj->testPrint(); } if ($debug) { echo "<h2>Text Elements</h2>"; } require_once "../tools/translations/class/SurveyTextElementSet.class.php"; $textObj = new SurveyTextElementSet(); $textObj->debug = $debug; $textObj->create(); if ($debug) { $textObj->testPrint(); } if ($debug) { echo "<h2>Translations</h2>"; } require_once "../tools/translations/class/TranslationSet.class.php"; $transObj = new TranslationSet(); $transObj->debug = $debug; $transObj->create(); if ($debug) { $transObj->testPrint(); }
<?php $root = realpath($_SERVER["DOCUMENT_ROOT"]); require_once "{$root}/shared/header.php"; echo printHeader(); echo "<div class='container'>"; echo "<a href='index.php' class='backlink'><< Translations Menu</a>"; // Create object require_once "class/SurveyTextElementSet.class.php"; $records = new SurveyTextElementSet(); $records->getCustomFormHeader($self); // Process submissions $translations_submitted = filter_input(INPUT_POST, 'translations_submitted'); if ($translations_submitted) { $element_id = filter_input(INPUT_POST, 'id'); $values = array(); foreach (array('text_name', 'text_description') as $field) { $value = filter_input(INPUT_POST, $field); if ($value) { $values[$field] = $value; } } if ($element_id) { // Update the metadata $update_ste = new SQLUpdate('survey_text_element'); $update_ste->values = $values; $update_ste->selectors['id'] = $element_id; $update_ste->execute(); } else { // Update the metadata $add_ste = new SQLInsert('survey_text_element');