"; $translateoutput .= showTranslateAdminmenu($surveyid, $survey_title, $tolang, $scriptname); $translateoutput .= ""; $translateoutput .= "
\n"; //CSS Firefox 2 transition fix $translateoutput .= "\n"; // $tab_names=array("title", "description", "welcome", "end", "group", "group_desc", "question", "question_help", "answer"); // $tab_names=array("title", "description", "invitation", "reminder"); $tab_names=array("title", "welcome", "group", "question", "subquestion", "answer", "emailinvite", "emailreminder", "emailconfirmation", "emailregistration"); if ($tolang != "" && $actionvalue=="translateSave") // Saves translated values to database { $tab_names_full = ""; foreach($tab_names as $type) { $tab_names_full[] = $type; $amTypeOptions = setupTranslateFields($surveyid, $type, $tolang, $baselang); $type2 = $amTypeOptions["associated"]; if ($type2 != "") { $tab_names_full[] = $type2; } } foreach($tab_names_full as $type) { $size = 0; if(isset($_POST["{$type}_size"])) { $size = $_POST["{$type}_size"]; } // start a loop in order to update each record $i = 0; while ($i < $size) { // define each variable if (isset($_POST["{$type}_newvalue_{$i}"])) { $old = $_POST["{$type}_oldvalue_{$i}"]; $new = $_POST["{$type}_newvalue_{$i}"]; // check if the new value is different from old, and then update database if ($new != $old) { $id1 = $_POST["{$type}_id1_{$i}"]; $id2 = $_POST["{$type}_id2_{$i}"]; $amTypeOptions = setupTranslateFields($surveyid, $type, $tolang, $baselang, $id1, $id2, $new); $query = $amTypeOptions["queryupdate"]; $connect->execute($query); } } ++$i; } // end while } // end foreach $actionvalue = ""; } // end if if ($tolang != "") // Display tabs with fields to translate, as well as input fields for translated values { $sGoogleApiError = $clang->gT("There was an error using the Google API."); $sDetailedError = $clang->gT("Detailed Error"); $translateoutput .= "