* @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org * @since file available since contenido release <= 4.6 * * {@internal * created 2003-04-02 * modified 2008-06-27, Frederic Schneider, add security fix * * $Id$: * }} * */ if (!defined('CON_FRAMEWORK')) { die('Illegal call'); } $area = "lang"; if (!isset($action)) $action = ""; if (!is_numeric($targetclient)) { $targetclient = $client; } $iGetIdlang = $idlang; $sql = "SELECT * FROM " . $cfg["tab"]["lang"] . " AS A, " . $cfg["tab"]["clients_lang"] . " AS B WHERE A.idlang=B.idlang AND B.idclient='" . Contenido_Security::toInteger($targetclient) . "' ORDER BY A.idlang"; $db->query($sql); $tpl->set('s', 'TARGETCLIENT', $targetclient); $iLangCount = 0; while ($db->next_record()) { $iLangCount++; $idlang = $db->f("idlang"); if ($db->f("active") == 0) { //activate $message = i18n("Activate language"); $active = "url("main.php?area=$area&action=lang_activatelanguage&frame=$frame&targetclient=$targetclient&idlang=" . $db->f("idlang")) . "#clickedhere\">"; } else { //deactivate $message = i18n("Deactivate language"); $active = "url("main.php?area=$area&action=lang_deactivatelanguage&frame=$frame&targetclient=$targetclient&idlang=" . $db->f("idlang")) . "#clickedhere\">"; } // Delete Button $deleteMsg = sprintf(i18n("Do you really want to delete the language %s?"), clHtmlSpecialChars($db->f("name"))); $deleteAct = i18n("Delete language"); $deletebutton = ''; $bgcolor = ( is_int($tpl->dyn_cnt / 2) ) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"]; $tpl->set('d', 'BGCOLOR', $bgcolor); $tpl->set('d', 'LANGUAGE', '' . $db->f("name") . ' (' . $idlang . ')'); $tpl->set('d', 'ACTIVATEBUTTON', $active); $tpl->set('d', 'DELETEBUTTON', $deletebutton); //$tpl->set('d', 'ICON', ''); $tpl->set('d', 'ICON', ''); if ($iGetIdlang == $idlang) { $tpl->set('d', 'MARKED', ' id="marked" '); } else { $tpl->set('d', 'MARKED', ''); } $tpl->next(); } $newlanguageform = '