Dieser Commit ist enthalten in:
Oldperl 2019-08-19 03:13:29 +00:00
Ursprung 7e98507e86
Commit 2e57859f6e
6 geänderte Dateien mit 199 neuen und 212 gelöschten Zeilen

Datei anzeigen

@ -160,7 +160,7 @@ class cApiModule extends Item {
} catch (Exception $ex) {
$oWriter = cLogWriter::factory("File", array('destination' => 'contenido.log'));
$oLog = new cLog($oWriter);
$log->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
$oLog->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
}
}
if ($this->_aModFileEditConf['use'] == TRUE && is_writable($this->_aModFileEditConf['modPath'])) {

Datei anzeigen

@ -246,20 +246,23 @@ function dbUpgradeTable($db, $table, $field, $type, $null, $key, $default, $extr
$structure = dbGetColumns($db, $table);
// Third check: Compare field properties
if (($structure[$field]['Type'] != $type) ||
($structure[$field]['Null'] != $null) ||
($structure[$field]['Key'] != $key) ||
($structure[$field]['Default'] != $default) ||
($structure[$field]['Extra'] != $extra)) {
if (($structure[$field]['Type'] != $type) || ($structure[$field]['Null'] != $null) || ($structure[$field]['Key'] != $key) || ($structure[$field]['Default'] != $default) || ($structure[$field]['Extra'] != $extra)) {
if ($structure[$field]['Key'] == "PRI") {
$alterField = " ALTER TABLE " . Contenido_Security::escapeDB($table, $db) . " ADD PRIMARY KEY ('" . Contenido_Security::escapeDB($field, $db) . "') ";
} else {
if($type == "datetime" || $type == "date") {
$db->query("SET SESSION sql_mode='ALLOW_INVALID_DATES'");
}
$alterField = " ALTER TABLE " . Contenido_Security::escapeDB($table, $db) . " CHANGE COLUMN $field $field $type " . $parameter['NULL'] . " " . $parameter['DEFAULT'] . " " . $parameter['KEY'];
}
$db->query($alterField);
if ($bDebug) {
$sDebugData = sprintf("%s:ErrorNo. %s:%s\n", $alterField, $db->getErrorNumber(), $db->getErrorMessage());
file_put_contents('../data/logs/setup_queries.txt', $sDebugData, FILE_APPEND);
echo 'updateField:' . $alterField . '<br />';
}
$columnCache[$table] = "";
}

Datei anzeigen

@ -459,18 +459,12 @@ function langDuplicateFromFirstLanguage($client, $idlang) {
* @copyright four for business AG <www.4fb.de>
*/
function langDeleteLanguage($idlang, $idclient = "") {
global $db, $sess, $client, $cfg, $notification;
global $db, $cfg, $notification;
$deleteok = 1;
// Bugfix: New idclient parameter introduced, as Administration -> Languages
// is used for different clients to delete the language
// Use global client id, if idclient not specified (former behaviour)
// Note, that this check also have been added for the action in the database
// - just to be equal to langNewLanguage
if (!is_numeric($idclient)) {
$idclient = $client;
$idclient = cRegistry::getClientId();
}
//************ check if there are still arts online

Datei anzeigen

@ -87,7 +87,7 @@ function statsArchive($yearmonth) {
".Contenido_Security::toInteger($db->f(1)).",
".Contenido_Security::toInteger($db->f(2)).",
".Contenido_Security::toInteger($db->f(3)).",
'".Contenido_Security::escapeDB($db->f(4), $db2)."')";
".Contenido_Security::escapeDB($db->f(4), $db2).")";
$db2->query($insertSQL);
}

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -28,9 +29,8 @@
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -49,226 +49,216 @@ $sReload = '<script language="javascript">
if (left_bottom) {
var href = left_bottom.location.href;
href = href.replace(/&idlang[^&]*/, \'\');
left_bottom.location.href = href+"&idlang="+"'.$idlang.'";
left_bottom.location.href = href+"&idlang="+"' . $idlang . '";
}
</script>';
if ($action == "lang_newlanguage" || $action == "lang_deletelanguage")
{
$page = new UI_Page;
if ($action == "lang_deletelanguage")
{
// finally delete from dropdown in header
$newOption = '<script>
if ($action == "lang_newlanguage" || $action == "lang_deletelanguage") {
$page = new UI_Page;
if ($action == "lang_deletelanguage") {
// finally delete from dropdown in header
$newOption = '<script>
var langList = top.header.document.getElementById("cLanguageSelect");
var thepos="";
for(var i=0;i<langList.length;i++) {
if(langList.options[i].value == '.$idlang.') {
if(langList.options[i].value == ' . $idlang . ') {
thepos = langList.options[i].index;
}
}
langList.remove(thepos);
</script>';
}
if ($action == "lang_newlanguage") {
// update language dropdown in header
$new_idlang = 0;
$db->query( 'SELECT max(idlang) as newlang FROM '.$cfg["tab"]["lang"].';' );
if ($db->next_record()) {
$new_idlang = $db->f('newlang');
}
}
$newOption = '<script language="javascript">
var newLang = new Option("'.i18n("New language").' ('.$new_idlang.')", "'.$new_idlang.'", false, false);
if ($action == "lang_newlanguage") {
// update language dropdown in header
$new_idlang = 0;
$db->query('SELECT max(idlang) as newlang FROM ' . $cfg["tab"]["lang"] . ';');
if ($db->next_record()) {
$new_idlang = $db->f('newlang');
}
$newOption = '<script language="javascript">
var newLang = new Option("' . i18n("New language") . ' (' . $new_idlang . ')", "' . $new_idlang . '", false, false);
var langList = top.header.document.getElementById("cLanguageSelect");
langList.options[langList.options.length] = newLang;
</script>';
$idlang = $new_idlang;
}
if ($targetclient == $client) {
$page->addScript('refreshHeader', $newOption);
}
$page->addScript('reload', $sReload);
$page->render();
} else
{
if ($action == "lang_edit")
{
callPluginStore("languages");
$language = new cApiLanguage($idlang);
$language->setProperty("dateformat", "full", stripslashes($datetimeformat));
$language->setProperty("dateformat", "date", stripslashes($dateformat));
$language->setProperty("dateformat", "time", stripslashes($timeformat));
$language->setProperty("language", "code", stripslashes($languagecode) );
$language->setProperty("country", "code", stripslashes($countrycode) );
$idlang = $new_idlang;
}
if ($targetclient == $client) {
$page->addScript('refreshHeader', $newOption);
}
$page->addScript('reload', $sReload);
$page->render();
} else {
if ($action == "lang_edit") {
callPluginStore("languages");
$language = new cApiLanguage($idlang);
$language->setProperty("dateformat", "full", stripslashes($datetimeformat));
$language->setProperty("dateformat", "date", stripslashes($dateformat));
$language->setProperty("dateformat", "time", stripslashes($timeformat));
$language->setProperty("language", "code", stripslashes($languagecode));
$language->setProperty("country", "code", stripslashes($countrycode));
// update dropdown in header
$newOption = '<script language="javascript">
var langList = top.header.document.getElementById("cLanguageSelect");
var thepos="";
for(var i=0;i<langList.length;i++)
{
if(langList.options[i].value == '.$idlang.')
if(langList.options[i].value == ' . $idlang . ')
{
langList.options[i].innerHTML = \''.$langname.' ('.$idlang.')\';
langList.options[i].innerHTML = \'' . $langname . ' (' . $idlang . ')\';
}
}
</script>';
}
if(!$perm->have_perm_area_action($area, $action))
{
$notification->displayNotification("error", i18n("Permission denied"));
}
if (!$perm->have_perm_area_action($area, $action)) {
$notification->displayNotification("error", i18n("Permission denied"));
} else {
if ( !isset($idlang) && $action != "lang_new")
{
$notification->displayNotification("error", "no language id given. Usually, this shouldn't happen, except if you played around with your system. if you didn't play around, please report a bug.");
} else {
if (($action == "lang_edit") && ($perm->have_perm_area_action($area, $action)))
{
langEditLanguage($idlang, $langname, $sencoding, $active, $direction);
$noti = $notification->returnNotification("info", i18n("Changes saved"))."<br>";
}
$tpl->reset();
$sql = "SELECT
if (!isset($idlang) && $action != "lang_new") {
$notification->displayNotification("error", "no language id given. Usually, this shouldn't happen, except if you played around with your system. if you didn't play around, please report a bug.");
} else {
if (($action == "lang_edit") && ($perm->have_perm_area_action($area, $action))) {
langEditLanguage($idlang, $langname, $sencoding, $active, $direction);
$noti = $notification->returnNotification("info", i18n("Changes saved")) . "<br>";
}
$tpl->reset();
$sql = "SELECT
A.idlang AS idlang, A.name AS name, A.active as active, A.encoding as encoding, A.direction as direction,
B.idclient AS idclient
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 = '".Contenido_Security::toInteger($idlang)."' AND
B.idlang = '".Contenido_Security::toInteger($idlang)."'";
$db->query($sql);
$db->next_record();
$form = new UI_Table_Form("lang_properties");
$form->setVar("idlang", $idlang);
$form->setVar("targetclient", $db->f("idclient"));
$form->setVar("action", "lang_edit");
$form->setVar("area", $area);
$form->setVar("frame", $frame);
$charsets = array();
foreach ($cfg['AvailableCharsets'] as $charset)
{
$charsets[$charset] = $charset;
}
if ($error) {
echo $error;
}
$iso_639_2_tags = array('aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'am' => 'Amharic', 'ar' => 'Arabic', 'as' => 'Assamese', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'be' => 'Byelorussian', 'bg' => 'Bulgarian', 'bh' => 'Bihari', 'bi' => 'Bislama', 'bn' => 'Bengali',
'bo' => 'Tibetan', 'br' => 'Breton', 'ca' => 'Catalan', 'co' => 'Corsican', 'cs' => 'Czech', 'cy' => 'Welsh', 'da' => 'Danish', 'de' => 'German', 'dz' => 'Bhutani', 'el' => 'Greek', 'en' => 'English', 'eo' => 'Esperanto', 'es' => 'Spanish', 'et' => 'Estonian', 'eu' => 'Basque', 'fa' => 'Persian',
'fi' => 'Finnish', 'fj' => 'Fiji', 'fo' => 'Faeroese', 'fr' => 'French', 'fy' => 'Frisian', 'ga' => 'Irish', 'gd' => 'Gaelic', 'gl' => 'Galician', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ha' => 'Hausa', 'hi' => 'Hindi', 'hr' => 'Croatian', 'hu' => 'Hungarian', 'hy' => 'Armenian',
'ia' => 'Interlingua', 'ie' => 'Interlingue', 'ik' => 'Inupiak', 'in' => 'Indonesian', 'is' => 'Icelandic', 'it' => 'Italian', 'iw' => 'Hebrew', 'ja' => 'Japanese', 'ji' => 'Yiddish', 'jw' => 'Javanese', 'ka' => 'Georgian', 'kk' => 'Kazakh', 'kl' => 'Greenlandic', 'km' => 'Cambodian',
'kn' => 'Kannada', 'ko' => 'Korean', 'ks' => 'Kashmiri', 'ku' => 'Kurdish', 'ky' => 'Kirghiz', 'la' => 'Latin', 'ln' => 'Lingala', 'lo' => 'Laothian', 'lt' => 'Lithuanian', 'lv' => 'Latvian', 'mg' => 'Malagasy', 'mi' => 'Maori', 'mk' => 'Macedonian', 'ml' => 'Malayalam', 'mn' => 'Mongolian',
'mo' => 'Moldavian', 'mr' => 'Marathi', 'ms' => 'Malay', 'mt' => 'Maltese', 'my' => 'Burmese', 'na' => 'Nauru', 'ne' => 'Nepali', 'nl' => 'Dutch', 'no' => 'Norwegian', 'oc' => 'Occitan', 'om' => 'Oromo', 'or' => 'Oriya', 'pa' => 'Punjabi', 'pl' => 'Polish', 'ps' => 'Pashto', 'pt' => 'Portuguese',
'qu' => 'Quechua', 'rm' => 'Rhaeto-Romance', 'rn' => 'Kirundi', 'ro' => 'Romanian', 'ru' => 'Russian', 'rw' => 'Kinyarwanda', 'sa' => 'Sanskrit', 'sd' => 'Sindhi', 'sg' => 'Sangro', 'sh' => 'Serbo-Croatian', 'si' => 'Singhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'sm' => 'Samoan',
'sn' => 'Shona', 'so' => 'Somali', 'sq' => 'Albanian', 'sr' => 'Serbian', 'ss' => 'Siswati', 'st' => 'Sesotho', 'su' => 'Sudanese', 'sv' => 'Swedish', 'sw' => 'Swahili', 'ta' => 'Tamil', 'te' => 'Tegulu', 'tg' => 'Tajik', 'th' => 'Thai', 'ti' => 'Tigtinya', 'tk' => 'Turkmen', 'tl' => 'Tagalog',
'tn' => 'Setswana', 'to' => 'Tonga', 'tr' => 'Turkish', 'ts' => 'Tsonga', 'tt' => 'Tatar', 'tw' => 'Twi', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 'vi' => 'Vietnamese', 'vo' => 'Volapuk', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yo' => 'Yoruba', 'zh' => 'Chinese', 'zu' => 'Zulu' );
$iso_3166_codes = array('af' => 'Afghanistan', 'al' => 'Albania', 'dz' => 'Algeria', 'as' => 'American Samoa', 'ad' => 'Andorra', 'ao' => 'Angola', 'ai' => 'Anguilla', 'aq' => 'Antarctica', 'ag' => 'Antigua/Barbuda', 'ar' => 'Argentina', 'am' => 'Armenia', 'aw' => 'Aruba', 'au' => 'Australia', 'at' => 'Austria',
'az' => 'Azerbaijan', 'bs' => 'Bahamas', 'bh' => 'Bahrain', 'bd' => 'Bangladesh', 'bb' => 'Barbados', 'by' => 'Belarus', 'be' => 'Belgium', 'bz' => 'Belize', 'bj' => 'Benin', 'bm' => 'Bermuda', 'bt' => 'Bhutan', 'bo' => 'Bolivia', 'ba' => 'Bosnia/Herzegowina', 'bw' => 'Botswana',
'bv' => 'Bouvet Island', 'br' => 'Brazil', 'io' => 'British Indian Ocean Territory', 'bn' => 'Brunei Darussalam', 'bg' => 'Bulgaria', 'bf' => 'Burkina Faso', 'bi' => 'Burundi', 'kh' => 'Cambodia', 'cm' => 'Cameroon', 'ca' => 'Canada', 'cv' => 'Cape verde', 'ky' => 'Cayman Islands',
'cf' => 'Central African Republic', 'td' => 'Chad', 'cl' => 'Chile', 'cn' => 'China', 'cx' => 'Christmas Island', 'cc' => 'Cocos -Keeling- Islands', 'co' => 'Colombia', 'km' => 'Comoros', 'cd' => 'Congo, Democratic Republic of/Zaire', 'cg' => 'Congo, Peoples Republic of',
'ck' => 'Cook Islands', 'cr' => 'Costa Rica', 'ci' => 'Cote D\'ivoire', 'hr' => 'Croatia/Hrvatska', 'cu' => 'Cuba', 'cy' => 'Cyprus', 'cz' => 'Czech Republic', 'dk' => 'Denmark', 'dj' => 'Djibouti', 'dm' => 'Dominica', 'do' => 'Dominica Republic', 'tl' => 'East Timor', 'ec' => 'Ecuador',
'eg' => 'Egypt', 'sv' => 'El Salvador', 'gq' => 'Equatorial Guinea', 'er' => 'Eritrea', 'ee' => 'Estonia', 'et' => 'Ethiopia', 'fk' => 'Falkland Islands/Malvinas', 'fo' => 'Faroe Islands', 'fj' => 'Fiji', 'fi' => 'Finland', 'fr' => 'France', 'fx' => 'France, Metropolitan',
'gf' => 'French Guinea', 'pf' => 'French Polynesia', 'tf' => 'French Southern Territories', 'ga' => 'Gabon', 'gm' => 'Gambia', 'ge' => 'Georgia', 'de' => 'Germany', 'gh' => 'Ghana', 'gi' => 'Gibraltar', 'gr' => 'Greece', 'gl' => 'Greenland', 'gd' => 'Grenada', 'gp' => 'Guadeloupe',
'gu' => 'Guam', 'gt' => 'Guatemala', 'gn' => 'Guinea', 'gw' => 'Guinea-Bissau', 'gy' => 'Guyana', 'ht' => 'Haiti', 'hm' => 'Heard and Mc Donald Islands', 'hn' => 'Honduras', 'hk' => 'Hong Kong', 'hu' => 'Hungary', 'is' => 'Iceland', 'in' => 'India', 'id' => 'Indonesia',
'ir' => 'Iran, Islamic Republic of', 'iq' => 'Iraq', 'ie' => 'Ireland', 'il' => 'Israel', 'it' => 'Italy', 'jm' => 'Jamaica', 'jp' => 'Japan', 'jo' => 'Jordan', 'kz' => 'Kazakhstan', 'ke' => 'Kenya', 'ki' => 'Kiribati', 'kp' => 'Korea, Democratic Peoples Republic of',
'kr' => 'Korea, Republic of', 'kw' => 'Kuwait', 'kg' => 'Kyrgyzstan', 'la' => 'Lao Peples Democratic Republic', 'lv' => 'Latvia', 'lb' => 'Lebanon', 'ls' => 'Lesotho', 'lr' => 'Liberia', 'ly' => 'Libyan Arab Jamahiriya', 'li' => 'Liechtenstein', 'lt' => 'Lithuania', 'lu' => 'Luxembourg',
'mo' => 'Macau', 'mk' => 'Macedonia, The Former Yugoslav Republic Of', 'mg' => 'Madagascar', 'mw' => 'Malawi', 'my' => 'Malaysia', 'mv' => 'Maldives', 'ml' => 'Mali', 'mt' => 'Malta', 'mh' => 'Marshall Islands', 'mq' => 'Martinique', 'mr' => 'Mauritania', 'mu' => 'Mauritius',
'yt' => 'Mayotte', 'mx' => 'Mexico', 'fm' => 'Micronesia, Federated States Of', 'md' => 'Moldova, Republic Of', 'mc' => 'Monaco', 'mn' => 'Mongolita', 'ms' => 'Montserrat', 'ma' => 'Morocco', 'mz' => 'Mozambique', 'mm' => 'Myanmar', 'na' => 'Nambia', 'nr' => 'Nauru', 'np' => 'Nepal',
'nl' => 'Netherlands', 'an' => 'Netherlands Antilles', 'nc' => 'New Caledonia', 'nz' => 'New Zealand', 'ni' => 'Nicaragua', 'ne' => 'Niger', 'ng' => 'Nigeria', 'nu' => 'Niue', 'nf' => 'Norfolk Islands', 'mp' => 'Northern Mariana Islands', 'no' => 'Norway', 'om' => 'Oman',
'pk' => 'Pakistan', 'pw' => 'Palau', 'ps' => 'Palestinian Territory, Occupied', 'pa' => 'Panama', 'pg' => 'Papua New Guinea', 'py' => 'Paraguay', 'pe' => 'Peru', 'ph' => 'Philippines', 'pn' => 'Pitcairn', 'pl' => 'Poland', 'pt' => 'Portugal', 'pr' => 'Puerto Rico', 'qa' => 'Qatar',
're' => 'Reunion', 'ro' => 'Romania', 'ru' => 'Russian Federation', 'rw' => 'Rwanda', 'kn' => 'Saint Kitts/Nevis', 'lc' => 'Saint Lucia', 'vc' => 'Saint Vincent/Grenadines', 'ws' => 'Samoa', 'sm' => 'San Marino', 'st' => 'Sao Tome/Principe', 'sa' => 'Saudi Arabia', 'sn' => 'Senegal',
'sc' => 'Seychelles', 'sl' => 'Sierra Leone', 'sg' => 'Singapore', 'sk' => 'Slovakia/Slovak Republic', 'si' => 'Slovenia', 'sb' => 'Solomon Islands', 'so' => 'Somalia', 'za' => 'South Africa', 'gs' => 'South Georgia/South Sandwich Islands', 'es' => 'Spain', 'lk' => 'Sri Lanka',
'sh' => 'Santa Helena', 'pm' => 'Santa Pierre/Miquelon', 'sd' => 'Sudan', 'sr' => 'Suriname', 'sj' => 'Svalbard/Jan Mayen Islands', 'sz' => 'Swaziland', 'se' => 'Sweden', 'ch' => 'Switzerland', 'sy' => 'Syrian Arab Republic', 'tw' => 'Taiwan', 'tj' => 'Tajikistan',
'tz' => 'Tanzania, United Republic Of', 'th' => 'Thailand', 'tg' => 'Togo', 'tk' => 'Tokelau', 'to' => 'Tonga', 'tt' => 'Trinidad/Tobago', 'tn' => 'Tunisia', 'tr' => 'Turkey', 'tm' => 'Turkmenistan', 'tc' => 'Turks/Caicos Islands', 'tv' => 'Tuvalu', 'ug' => 'Uganda', 'ua' => 'Ukraine',
'ae' => 'United Arab Emirates', 'gb' => 'United Kingdom', 'us' => 'United States', 'um' => 'United States Minor Outlying Islands', 'uy' => 'Uruguay', 'uz' => 'Uzbekistan', 'vu' => 'Vanuatu', 'va' => 'Vatican City State -Holy See-', 've' => 'Venezuela', 'vn' => 'Viet Nam',
'vg' => 'Virgin Islands, British', 'vi' => 'Virgin Islands, U.S.', 'wf' => 'Wallis/Futuna Islands', 'eh' => 'Western Sahara', 'ye' => 'Yemen', 'yu' => 'Yougoslavia', 'zm' => 'Zambia', 'zw' => 'Zimbabwe' );
$eselect = new cHTMLSelectElement("sencoding");
$eselect->setStyle('width:255px');
$eselect->autoFill($charsets);
$eselect->setDefault($db->f("encoding"));
$languagecode = new cHTMLSelectElement("languagecode");
$languagecode->setStyle('width:255px');
$languagecode->autoFill($iso_639_2_tags);
$languagecode->setDefault($clang->getProperty("language", "code"));
$countrycode = new cHTMLSelectElement("countrycode");
$countrycode->setStyle('width:255px');
$countrycode->autoFill($iso_3166_codes);
$countrycode->setDefault($clang->getProperty("country", "code"));
$directionSelect = new cHTMLSelectElement("direction");
$directionSelect->setStyle('width:255px');
$directionSelect->autoFill(array("ltr" => i18n("Left to right"), "rtl" => i18n("Right to left")));
$directionSelect->setDefault($db->f("direction"));
$fulldateformat = new cHTMLTextbox("datetimeformat", $clang->getProperty("dateformat", "full"), 40);
$dateformat = new cHTMLTextbox("dateformat", $clang->getProperty("dateformat", "date"), 40);
$timeformat = new cHTMLTextbox("timeformat", $clang->getProperty("dateformat", "time"), 40);
displayPlugin("languages", $form);
$form->addHeader(i18n("Edit language"));
$form->add(i18n("Language name"), formGenerateField ("text", "langname", clHtmlSpecialChars($db->f("name")), 40, 255));
$form->add(i18n("Active"), formGenerateCheckbox ("active", "1",$db->f("active")));
$form->addSubHeader(i18n("Language"));
$form->add(i18n("Encoding"), $eselect);
$form->add(i18n("Language"), $languagecode->render());
$form->add(i18n("Country"), $countrycode->render());
$form->add(i18n("Text direction"), $directionSelect);
$form->addSubHeader(i18n("Time format"));
$form->add(i18n("Date/Time format"), $fulldateformat->render());
$form->add(i18n("Date format"), $dateformat->render());
$form->add(i18n("Time format"), $timeformat->render());
$page = new UI_Page;
$page->setContent($noti.$form->render());
if ($targetclient == $client) {
$page->addScript('refreshHeader', $newOption);
}
if ($_REQUEST['action'] != '') {
$page->addScript('reload', $sReload);
}
$page->render();
}
}
A.idlang = '" . Contenido_Security::toInteger($idlang) . "' AND
B.idlang = '" . Contenido_Security::toInteger($idlang) . "'";
$db->query($sql);
$db->next_record();
$form = new UI_Table_Form("lang_properties");
$form->setVar("idlang", $idlang);
$form->setVar("targetclient", $db->f("idclient"));
$form->setVar("action", "lang_edit");
$form->setVar("area", $area);
$form->setVar("frame", $frame);
$charsets = array();
foreach ($cfg['AvailableCharsets'] as $charset) {
$charsets[$charset] = $charset;
}
if ($error) {
echo $error;
}
$iso_639_2_tags = array('aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'am' => 'Amharic', 'ar' => 'Arabic', 'as' => 'Assamese', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'be' => 'Byelorussian', 'bg' => 'Bulgarian', 'bh' => 'Bihari', 'bi' => 'Bislama', 'bn' => 'Bengali',
'bo' => 'Tibetan', 'br' => 'Breton', 'ca' => 'Catalan', 'co' => 'Corsican', 'cs' => 'Czech', 'cy' => 'Welsh', 'da' => 'Danish', 'de' => 'German', 'dz' => 'Bhutani', 'el' => 'Greek', 'en' => 'English', 'eo' => 'Esperanto', 'es' => 'Spanish', 'et' => 'Estonian', 'eu' => 'Basque', 'fa' => 'Persian',
'fi' => 'Finnish', 'fj' => 'Fiji', 'fo' => 'Faeroese', 'fr' => 'French', 'fy' => 'Frisian', 'ga' => 'Irish', 'gd' => 'Gaelic', 'gl' => 'Galician', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ha' => 'Hausa', 'hi' => 'Hindi', 'hr' => 'Croatian', 'hu' => 'Hungarian', 'hy' => 'Armenian',
'ia' => 'Interlingua', 'ie' => 'Interlingue', 'ik' => 'Inupiak', 'in' => 'Indonesian', 'is' => 'Icelandic', 'it' => 'Italian', 'iw' => 'Hebrew', 'ja' => 'Japanese', 'ji' => 'Yiddish', 'jw' => 'Javanese', 'ka' => 'Georgian', 'kk' => 'Kazakh', 'kl' => 'Greenlandic', 'km' => 'Cambodian',
'kn' => 'Kannada', 'ko' => 'Korean', 'ks' => 'Kashmiri', 'ku' => 'Kurdish', 'ky' => 'Kirghiz', 'la' => 'Latin', 'ln' => 'Lingala', 'lo' => 'Laothian', 'lt' => 'Lithuanian', 'lv' => 'Latvian', 'mg' => 'Malagasy', 'mi' => 'Maori', 'mk' => 'Macedonian', 'ml' => 'Malayalam', 'mn' => 'Mongolian',
'mo' => 'Moldavian', 'mr' => 'Marathi', 'ms' => 'Malay', 'mt' => 'Maltese', 'my' => 'Burmese', 'na' => 'Nauru', 'ne' => 'Nepali', 'nl' => 'Dutch', 'no' => 'Norwegian', 'oc' => 'Occitan', 'om' => 'Oromo', 'or' => 'Oriya', 'pa' => 'Punjabi', 'pl' => 'Polish', 'ps' => 'Pashto', 'pt' => 'Portuguese',
'qu' => 'Quechua', 'rm' => 'Rhaeto-Romance', 'rn' => 'Kirundi', 'ro' => 'Romanian', 'ru' => 'Russian', 'rw' => 'Kinyarwanda', 'sa' => 'Sanskrit', 'sd' => 'Sindhi', 'sg' => 'Sangro', 'sh' => 'Serbo-Croatian', 'si' => 'Singhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'sm' => 'Samoan',
'sn' => 'Shona', 'so' => 'Somali', 'sq' => 'Albanian', 'sr' => 'Serbian', 'ss' => 'Siswati', 'st' => 'Sesotho', 'su' => 'Sudanese', 'sv' => 'Swedish', 'sw' => 'Swahili', 'ta' => 'Tamil', 'te' => 'Tegulu', 'tg' => 'Tajik', 'th' => 'Thai', 'ti' => 'Tigtinya', 'tk' => 'Turkmen', 'tl' => 'Tagalog',
'tn' => 'Setswana', 'to' => 'Tonga', 'tr' => 'Turkish', 'ts' => 'Tsonga', 'tt' => 'Tatar', 'tw' => 'Twi', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 'vi' => 'Vietnamese', 'vo' => 'Volapuk', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yo' => 'Yoruba', 'zh' => 'Chinese', 'zu' => 'Zulu');
$iso_3166_codes = array('af' => 'Afghanistan', 'al' => 'Albania', 'dz' => 'Algeria', 'as' => 'American Samoa', 'ad' => 'Andorra', 'ao' => 'Angola', 'ai' => 'Anguilla', 'aq' => 'Antarctica', 'ag' => 'Antigua/Barbuda', 'ar' => 'Argentina', 'am' => 'Armenia', 'aw' => 'Aruba', 'au' => 'Australia', 'at' => 'Austria',
'az' => 'Azerbaijan', 'bs' => 'Bahamas', 'bh' => 'Bahrain', 'bd' => 'Bangladesh', 'bb' => 'Barbados', 'by' => 'Belarus', 'be' => 'Belgium', 'bz' => 'Belize', 'bj' => 'Benin', 'bm' => 'Bermuda', 'bt' => 'Bhutan', 'bo' => 'Bolivia', 'ba' => 'Bosnia/Herzegowina', 'bw' => 'Botswana',
'bv' => 'Bouvet Island', 'br' => 'Brazil', 'io' => 'British Indian Ocean Territory', 'bn' => 'Brunei Darussalam', 'bg' => 'Bulgaria', 'bf' => 'Burkina Faso', 'bi' => 'Burundi', 'kh' => 'Cambodia', 'cm' => 'Cameroon', 'ca' => 'Canada', 'cv' => 'Cape verde', 'ky' => 'Cayman Islands',
'cf' => 'Central African Republic', 'td' => 'Chad', 'cl' => 'Chile', 'cn' => 'China', 'cx' => 'Christmas Island', 'cc' => 'Cocos -Keeling- Islands', 'co' => 'Colombia', 'km' => 'Comoros', 'cd' => 'Congo, Democratic Republic of/Zaire', 'cg' => 'Congo, Peoples Republic of',
'ck' => 'Cook Islands', 'cr' => 'Costa Rica', 'ci' => 'Cote D\'ivoire', 'hr' => 'Croatia/Hrvatska', 'cu' => 'Cuba', 'cy' => 'Cyprus', 'cz' => 'Czech Republic', 'dk' => 'Denmark', 'dj' => 'Djibouti', 'dm' => 'Dominica', 'do' => 'Dominica Republic', 'tl' => 'East Timor', 'ec' => 'Ecuador',
'eg' => 'Egypt', 'sv' => 'El Salvador', 'gq' => 'Equatorial Guinea', 'er' => 'Eritrea', 'ee' => 'Estonia', 'et' => 'Ethiopia', 'fk' => 'Falkland Islands/Malvinas', 'fo' => 'Faroe Islands', 'fj' => 'Fiji', 'fi' => 'Finland', 'fr' => 'France', 'fx' => 'France, Metropolitan',
'gf' => 'French Guinea', 'pf' => 'French Polynesia', 'tf' => 'French Southern Territories', 'ga' => 'Gabon', 'gm' => 'Gambia', 'ge' => 'Georgia', 'de' => 'Germany', 'gh' => 'Ghana', 'gi' => 'Gibraltar', 'gr' => 'Greece', 'gl' => 'Greenland', 'gd' => 'Grenada', 'gp' => 'Guadeloupe',
'gu' => 'Guam', 'gt' => 'Guatemala', 'gn' => 'Guinea', 'gw' => 'Guinea-Bissau', 'gy' => 'Guyana', 'ht' => 'Haiti', 'hm' => 'Heard and Mc Donald Islands', 'hn' => 'Honduras', 'hk' => 'Hong Kong', 'hu' => 'Hungary', 'is' => 'Iceland', 'in' => 'India', 'id' => 'Indonesia',
'ir' => 'Iran, Islamic Republic of', 'iq' => 'Iraq', 'ie' => 'Ireland', 'il' => 'Israel', 'it' => 'Italy', 'jm' => 'Jamaica', 'jp' => 'Japan', 'jo' => 'Jordan', 'kz' => 'Kazakhstan', 'ke' => 'Kenya', 'ki' => 'Kiribati', 'kp' => 'Korea, Democratic Peoples Republic of',
'kr' => 'Korea, Republic of', 'kw' => 'Kuwait', 'kg' => 'Kyrgyzstan', 'la' => 'Lao Peples Democratic Republic', 'lv' => 'Latvia', 'lb' => 'Lebanon', 'ls' => 'Lesotho', 'lr' => 'Liberia', 'ly' => 'Libyan Arab Jamahiriya', 'li' => 'Liechtenstein', 'lt' => 'Lithuania', 'lu' => 'Luxembourg',
'mo' => 'Macau', 'mk' => 'Macedonia, The Former Yugoslav Republic Of', 'mg' => 'Madagascar', 'mw' => 'Malawi', 'my' => 'Malaysia', 'mv' => 'Maldives', 'ml' => 'Mali', 'mt' => 'Malta', 'mh' => 'Marshall Islands', 'mq' => 'Martinique', 'mr' => 'Mauritania', 'mu' => 'Mauritius',
'yt' => 'Mayotte', 'mx' => 'Mexico', 'fm' => 'Micronesia, Federated States Of', 'md' => 'Moldova, Republic Of', 'mc' => 'Monaco', 'mn' => 'Mongolita', 'ms' => 'Montserrat', 'ma' => 'Morocco', 'mz' => 'Mozambique', 'mm' => 'Myanmar', 'na' => 'Nambia', 'nr' => 'Nauru', 'np' => 'Nepal',
'nl' => 'Netherlands', 'an' => 'Netherlands Antilles', 'nc' => 'New Caledonia', 'nz' => 'New Zealand', 'ni' => 'Nicaragua', 'ne' => 'Niger', 'ng' => 'Nigeria', 'nu' => 'Niue', 'nf' => 'Norfolk Islands', 'mp' => 'Northern Mariana Islands', 'no' => 'Norway', 'om' => 'Oman',
'pk' => 'Pakistan', 'pw' => 'Palau', 'ps' => 'Palestinian Territory, Occupied', 'pa' => 'Panama', 'pg' => 'Papua New Guinea', 'py' => 'Paraguay', 'pe' => 'Peru', 'ph' => 'Philippines', 'pn' => 'Pitcairn', 'pl' => 'Poland', 'pt' => 'Portugal', 'pr' => 'Puerto Rico', 'qa' => 'Qatar',
're' => 'Reunion', 'ro' => 'Romania', 'ru' => 'Russian Federation', 'rw' => 'Rwanda', 'kn' => 'Saint Kitts/Nevis', 'lc' => 'Saint Lucia', 'vc' => 'Saint Vincent/Grenadines', 'ws' => 'Samoa', 'sm' => 'San Marino', 'st' => 'Sao Tome/Principe', 'sa' => 'Saudi Arabia', 'sn' => 'Senegal',
'sc' => 'Seychelles', 'sl' => 'Sierra Leone', 'sg' => 'Singapore', 'sk' => 'Slovakia/Slovak Republic', 'si' => 'Slovenia', 'sb' => 'Solomon Islands', 'so' => 'Somalia', 'za' => 'South Africa', 'gs' => 'South Georgia/South Sandwich Islands', 'es' => 'Spain', 'lk' => 'Sri Lanka',
'sh' => 'Santa Helena', 'pm' => 'Santa Pierre/Miquelon', 'sd' => 'Sudan', 'sr' => 'Suriname', 'sj' => 'Svalbard/Jan Mayen Islands', 'sz' => 'Swaziland', 'se' => 'Sweden', 'ch' => 'Switzerland', 'sy' => 'Syrian Arab Republic', 'tw' => 'Taiwan', 'tj' => 'Tajikistan',
'tz' => 'Tanzania, United Republic Of', 'th' => 'Thailand', 'tg' => 'Togo', 'tk' => 'Tokelau', 'to' => 'Tonga', 'tt' => 'Trinidad/Tobago', 'tn' => 'Tunisia', 'tr' => 'Turkey', 'tm' => 'Turkmenistan', 'tc' => 'Turks/Caicos Islands', 'tv' => 'Tuvalu', 'ug' => 'Uganda', 'ua' => 'Ukraine',
'ae' => 'United Arab Emirates', 'gb' => 'United Kingdom', 'us' => 'United States', 'um' => 'United States Minor Outlying Islands', 'uy' => 'Uruguay', 'uz' => 'Uzbekistan', 'vu' => 'Vanuatu', 'va' => 'Vatican City State -Holy See-', 've' => 'Venezuela', 'vn' => 'Viet Nam',
'vg' => 'Virgin Islands, British', 'vi' => 'Virgin Islands, U.S.', 'wf' => 'Wallis/Futuna Islands', 'eh' => 'Western Sahara', 'ye' => 'Yemen', 'yu' => 'Yougoslavia', 'zm' => 'Zambia', 'zw' => 'Zimbabwe');
$eselect = new cHTMLSelectElement("sencoding");
$eselect->setStyle('width:255px');
$eselect->autoFill($charsets);
$eselect->setDefault($db->f("encoding"));
$languagecode = new cHTMLSelectElement("languagecode");
$languagecode->setStyle('width:255px');
$languagecode->autoFill($iso_639_2_tags);
$languagecode->setDefault($clang->getProperty("language", "code"));
$countrycode = new cHTMLSelectElement("countrycode");
$countrycode->setStyle('width:255px');
$countrycode->autoFill($iso_3166_codes);
$countrycode->setDefault($clang->getProperty("country", "code"));
$directionSelect = new cHTMLSelectElement("direction");
$directionSelect->setStyle('width:255px');
$directionSelect->autoFill(array("ltr" => i18n("Left to right"), "rtl" => i18n("Right to left")));
$directionSelect->setDefault($db->f("direction"));
$fulldateformat = new cHTMLTextbox("datetimeformat", $clang->getProperty("dateformat", "full"), 40);
$dateformat = new cHTMLTextbox("dateformat", $clang->getProperty("dateformat", "date"), 40);
$timeformat = new cHTMLTextbox("timeformat", $clang->getProperty("dateformat", "time"), 40);
displayPlugin("languages", $form);
$form->addHeader(i18n("Edit language"));
$form->add(i18n("Language name"), formGenerateField("text", "langname", clHtmlSpecialChars($db->f("name")), 40, 255));
$form->add(i18n("Active"), formGenerateCheckbox("active", "1", $db->f("active")));
$form->addSubHeader(i18n("Language"));
$form->add(i18n("Encoding"), $eselect);
$form->add(i18n("Language"), $languagecode->render());
$form->add(i18n("Country"), $countrycode->render());
$form->add(i18n("Text direction"), $directionSelect);
$form->addSubHeader(i18n("Time format"));
$form->add(i18n("Date/Time format"), $fulldateformat->render());
$form->add(i18n("Date format"), $dateformat->render());
$form->add(i18n("Time format"), $timeformat->render());
$page = new UI_Page;
$page->setContent($noti . $form->render());
if ($targetclient == $client) {
$page->addScript('refreshHeader', $newOption);
}
if ($_REQUEST['action'] != '') {
$page->addScript('reload', $sReload);
}
$page->render();
}
}
}
?>

Datei anzeigen

@ -70,7 +70,7 @@ function cecCreateMetatags($metatags) {
if (file_exists($cachefilename)) {
$fileexists = true;
$diff = mktime() - filemtime($cachefilename);
$diff = time() - filemtime($cachefilename);
if ($diff > $cachetime) {
$reload = true;