2016-10-06 15:57:01 +00:00
|
|
|
<?php
|
2023-02-10 09:57:30 +00:00
|
|
|
|
2016-10-06 15:57:01 +00:00
|
|
|
/**
|
|
|
|
* Project:
|
|
|
|
* Contenido Content Management System
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Stringlist for module translation
|
|
|
|
*
|
|
|
|
* Requirements:
|
|
|
|
* @con_php_req 5.0
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @package Contenido Backend includes
|
|
|
|
* @version 1.0.1
|
|
|
|
* @author unknown
|
|
|
|
* @copyright four for business AG <www.4fb.de>
|
|
|
|
* @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 unknown
|
|
|
|
* modified 2008-06-27, Frederic Schneider, add security fix
|
|
|
|
*
|
2019-07-03 11:58:28 +00:00
|
|
|
* $Id$:
|
2016-10-06 15:57:01 +00:00
|
|
|
* }}
|
|
|
|
*
|
|
|
|
*/
|
2023-02-10 09:57:30 +00:00
|
|
|
if (!defined('CON_FRAMEWORK')) {
|
|
|
|
die('Illegal call');
|
2016-10-06 15:57:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$translations = new cApiModuleTranslationCollection;
|
|
|
|
$translations->select("idmod = '$idmod' AND idlang='$lang'");
|
|
|
|
|
|
|
|
$page = new cPage;
|
2023-02-10 09:57:30 +00:00
|
|
|
$page->setHtml5();
|
|
|
|
$page->setEncoding('UTF-8');
|
2016-10-06 15:57:01 +00:00
|
|
|
$page->setMargin(0);
|
|
|
|
|
|
|
|
$v = '<table cellspacing="0" cellpadding="0" width="600">';
|
|
|
|
|
|
|
|
$link = new cHTMLLink;
|
|
|
|
$link->setCLink("mod_translate", 4, "");
|
|
|
|
|
|
|
|
$mylink = new cHTMLLink;
|
|
|
|
|
2023-02-10 09:57:30 +00:00
|
|
|
while ($translation = $translations->next()) {
|
|
|
|
|
|
|
|
$string = utf8_encode($translation->get("original"));
|
|
|
|
$tstring = utf8_encode($translation->get("translation"));
|
|
|
|
|
2016-10-06 15:57:01 +00:00
|
|
|
$link->setCustom("idmod", $idmod);
|
|
|
|
$link->setCustom("idmodtranslation", $translation->get("idmodtranslation"));
|
|
|
|
$href = $link->getHREF();
|
|
|
|
|
2023-02-10 09:57:30 +00:00
|
|
|
$mylink->setLink('javascript:parent.location="' . $href . '"');
|
|
|
|
$mylink->setContent($string);
|
2016-10-06 15:57:01 +00:00
|
|
|
|
2023-02-10 09:57:30 +00:00
|
|
|
$dark = !$dark;
|
|
|
|
|
|
|
|
if ($dark) {
|
|
|
|
$bgcol = $cfg["color"]["table_dark"];
|
|
|
|
} else {
|
|
|
|
$bgcol = $cfg["color"]["table_light"];
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($idmodtranslation == $translation->get("idmodtranslation")) {
|
|
|
|
$bgcol = $cfg["color"]["table_active"];
|
|
|
|
}
|
|
|
|
$v .= '<tr bgcolor="' . $bgcol . '">'."\n"
|
|
|
|
. '<td style="padding-left: 2px; padding-top:2px; padding-bottom: 2px;" width="50%">'."\n"
|
|
|
|
. '<a name="' . $translation->get("idmodtranslation") . '"></a>'."\n"
|
|
|
|
. $mylink->render() . '</td>'."\n"
|
|
|
|
. '<td style="padding-left: 2px;">' . $tstring . '</td>'."\n"
|
|
|
|
. '</tr>'."\n";
|
2016-10-06 15:57:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$v .= '</table>';
|
|
|
|
|
|
|
|
$page->setContent($v);
|
|
|
|
|
|
|
|
$clang = new cApiLanguage($lang);
|
|
|
|
$page->setEncoding($clang->get("encoding"));
|
|
|
|
|
|
|
|
$page->render();
|
|
|
|
?>
|