fixed and close #22
Dieser Commit ist enthalten in:
Ursprung
dbaaa6ffa5
Commit
8278e52a89
|
@ -201,7 +201,11 @@ if ($action == "lang_newlanguage" || $action == "lang_deletelanguage") {
|
|||
$eselect = new cHTMLSelectElement("sencoding");
|
||||
$eselect->setStyle('width:255px');
|
||||
$eselect->autoFill($charsets);
|
||||
if($db->f("encoding")) {
|
||||
$eselect->setDefault($db->f("encoding"));
|
||||
} else {
|
||||
$eselect->setDefault('utf-8');
|
||||
}
|
||||
|
||||
$languagecode = new cHTMLSelectElement("languagecode");
|
||||
$languagecode->setStyle('width:255px');
|
||||
|
@ -256,9 +260,7 @@ if ($action == "lang_newlanguage" || $action == "lang_deletelanguage") {
|
|||
if ($_REQUEST['action'] != '') {
|
||||
$page->addScript('reload', $sReload);
|
||||
}
|
||||
|
||||
$page->render();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Project:
|
||||
* Contenido Content Management System
|
||||
|
@ -27,17 +28,16 @@
|
|||
* }}
|
||||
*
|
||||
*/
|
||||
|
||||
if(!defined('CON_FRAMEWORK')) {
|
||||
if (!defined('CON_FRAMEWORK')) {
|
||||
die('Illegal call');
|
||||
}
|
||||
|
||||
$area="lang";
|
||||
$area = "lang";
|
||||
|
||||
if (!isset($action)) $action = "";
|
||||
if (!isset($action))
|
||||
$action = "";
|
||||
|
||||
if (!is_numeric($targetclient))
|
||||
{
|
||||
if (!is_numeric($targetclient)) {
|
||||
$targetclient = $client;
|
||||
}
|
||||
|
||||
|
@ -46,16 +46,16 @@ $iGetIdlang = $idlang;
|
|||
$sql = "SELECT
|
||||
*
|
||||
FROM
|
||||
".$cfg["tab"]["lang"]." AS A,
|
||||
".$cfg["tab"]["clients_lang"]." AS B
|
||||
" . $cfg["tab"]["lang"] . " AS A,
|
||||
" . $cfg["tab"]["clients_lang"] . " AS B
|
||||
WHERE
|
||||
A.idlang=B.idlang AND
|
||||
B.idclient='".Contenido_Security::toInteger($targetclient)."'
|
||||
B.idclient='" . Contenido_Security::toInteger($targetclient) . "'
|
||||
ORDER BY A.idlang";
|
||||
|
||||
$db->query($sql);
|
||||
|
||||
$tpl->set('s','TARGETCLIENT',$targetclient);
|
||||
$tpl->set('s', 'TARGETCLIENT', $targetclient);
|
||||
|
||||
$iLangCount = 0;
|
||||
while ($db->next_record()) {
|
||||
|
@ -66,22 +66,22 @@ while ($db->next_record()) {
|
|||
if ($db->f("active") == 0) {
|
||||
//activate
|
||||
$message = i18n("Activate language");
|
||||
$active = "<a title=\"$message\" href=\"".$sess->url("main.php?area=$area&action=lang_activatelanguage&frame=$frame&targetclient=$targetclient&idlang=".$db->f("idlang"))."#clickedhere\"><img src=\"".$cfg["path"]["images"]."offline.gif"."\" border=\"0\" title=\"$message\" alt=\"$message\"></a>";
|
||||
$active = "<a title=\"$message\" href=\"" . $sess->url("main.php?area=$area&action=lang_activatelanguage&frame=$frame&targetclient=$targetclient&idlang=" . $db->f("idlang")) . "#clickedhere\"><img src=\"" . $cfg["path"]["images"] . "offline.gif" . "\" border=\"0\" title=\"$message\" alt=\"$message\"></a>";
|
||||
} else {
|
||||
//deactivate
|
||||
$message = i18n("Deactivate language");
|
||||
$active = "<a title=\"$message\" class=action href=\"".$sess->url("main.php?area=$area&action=lang_deactivatelanguage&frame=$frame&targetclient=$targetclient&idlang=".$db->f("idlang"))."#clickedhere\"><img src=\"".$cfg["path"]["images"]."online.gif"."\" border=\"0\" title=\"$message\" alt=\"$message\"></a>";
|
||||
$active = "<a title=\"$message\" class=action href=\"" . $sess->url("main.php?area=$area&action=lang_deactivatelanguage&frame=$frame&targetclient=$targetclient&idlang=" . $db->f("idlang")) . "#clickedhere\"><img src=\"" . $cfg["path"]["images"] . "online.gif" . "\" border=\"0\" title=\"$message\" alt=\"$message\"></a>";
|
||||
}
|
||||
|
||||
// Delete Button
|
||||
$deleteMsg = sprintf(i18n("Do you really want to delete the language %s?"),clHtmlSpecialChars($db->f("name")));
|
||||
$deleteMsg = sprintf(i18n("Do you really want to delete the language %s?"), clHtmlSpecialChars($db->f("name")));
|
||||
$deleteAct = i18n("Delete language");
|
||||
$deletebutton = '<a title="'.$deleteAct.'" href="javascript://" onclick="box.confirm(\''.$deleteAct.'\', \''.$deleteMsg.'\', \'deleteLang('.$db->f("idlang").')\')"><img src="'.$cfg['path']['images'].'delete.gif" border="0" title="'.$deleteAct.'" alt="'.$deleteAct.'"></a>';
|
||||
$deletebutton = '<a title="' . $deleteAct . '" href="javascript://" onclick="box.confirm(\'' . $deleteAct . '\', \'' . $deleteMsg . '\', \'deleteLang(' . $db->f("idlang") . ')\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $deleteAct . '" alt="' . $deleteAct . '"></a>';
|
||||
|
||||
$bgcolor = ( is_int($tpl->dyn_cnt / 2) ) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];
|
||||
|
||||
$tpl->set('d', 'BGCOLOR', $bgcolor);
|
||||
$tpl->set('d', 'LANGUAGE', '<a target="right_bottom" href="'.$sess->url("main.php?area=lang_edit&idlang=$idlang&frame=4").'">'.$db->f("name").'</a> <span style="font-size:10px">('.$idlang.')</span>');
|
||||
$tpl->set('d', 'LANGUAGE', '<a target="right_bottom" href="' . $sess->url("main.php?area=lang_edit&idlang=$idlang&frame=4") . '">' . $db->f("name") . '</a> <span style="font-size:10px">(' . $idlang . ')</span>');
|
||||
$tpl->set('d', 'ACTIVATEBUTTON', $active);
|
||||
$tpl->set('d', 'DELETEBUTTON', $deletebutton);
|
||||
//$tpl->set('d', 'ICON', '<a target="right_bottom" href="'.$sess->url("main.php?area=lang_edit&idlang=$idlang&frame=4").'"><img src="images/language.gif" border="0"></a>');
|
||||
|
@ -96,35 +96,32 @@ while ($db->next_record()) {
|
|||
$tpl->next();
|
||||
}
|
||||
|
||||
$newlanguageform = '<form name=newlanguage method="post" action="'.$sess->url("main.php?area=$area&frame=$frame").'">
|
||||
'.$sess->hidden_session(true).'
|
||||
$newlanguageform = '<form name=newlanguage method="post" action="' . $sess->url("main.php?area=$area&frame=$frame") . '">
|
||||
' . $sess->hidden_session(true) . '
|
||||
<input type="hidden" name="action" value="lang_newlanguage">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr><td class="text_medium">'.i18n("New language").':
|
||||
<tr><td class="text_medium">' . i18n("New language") . ':
|
||||
<INPUT type="text" name="name">
|
||||
<INPUT type="image" src="'.$cfg['path']['images'].'but_ok.gif" border="0">
|
||||
<INPUT type="image" src="' . $cfg['path']['images'] . 'but_ok.gif" border="0">
|
||||
</td></tr></table></from>';
|
||||
|
||||
$tpl->set('s', 'NEWLANGUAGEFORM', $newlanguageform);
|
||||
$tpl->set('s', 'SID', $sess->id);
|
||||
|
||||
if ( $tmp_notification ) {
|
||||
if ($tmp_notification) {
|
||||
|
||||
$noti_html = '<tr><td colspan="3">'.$tmp_notification.'</td></tr>';
|
||||
$noti_html = '<tr><td colspan="3">' . $tmp_notification . '</td></tr>';
|
||||
$tpl->set('s', 'NOTIFICATION', $noti_html);
|
||||
|
||||
} else {
|
||||
|
||||
$tmp_notification = $notification->returnNotification("info", i18n("Language deleted"));
|
||||
|
||||
$noti_html = '<tr><td colspan="3">'.$tmp_notification.'</td></tr>';
|
||||
$noti_html = '<tr><td colspan="3">' . $tmp_notification . '</td></tr>';
|
||||
$tpl->set('s', 'NOTIFICATION', '');
|
||||
|
||||
}
|
||||
|
||||
$tpl->set('s', 'LANG_COUNT', $iLangCount);
|
||||
|
||||
# Generate template
|
||||
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['lang_overview']);
|
||||
|
||||
?>
|
Laden…
In neuem Issue referenzieren