Exemplo n.º 1
0
function showconfig($confightml, &$database, $option)
{
    global $database, $mosConfig_absolute_path, $adminLanguage;
    $row = new mosConfig();
    $row->bindGlobals();
    // compile list of the languages
    $langs = array();
    $alangs = array();
    $menuitems = array();
    if ($handle = opendir("{$mosConfig_absolute_path}/language/")) {
        $i = 0;
        while (false !== ($file = readdir($handle))) {
            if (!strcasecmp(substr($file, -4), ".php") && $file != "." && $file != ".." && strcasecmp(substr($file, -11), ".ignore.php") && strcasecmp(substr($file, 0, 6), "admin_")) {
                $langs[] = mosHTML::makeOption(substr($file, 0, -4));
            }
            if (!strcasecmp(substr($file, 0, 6), "admin_")) {
                $alangs[] = mosHTML::makeOption(substr(substr($file, 6), 0, -4));
            }
        }
    }
    // sort list of languages
    sort($langs);
    reset($langs);
    sort($alangs);
    reset($alangs);
    // compile list of the editors
    $query = "SELECT id AS value, name AS text" . "\n FROM #__mambots" . "\n WHERE folder='editors' AND published >= 0" . "\n ORDER BY ordering, name";
    $database->setQuery($query);
    $edits = $database->loadObjectList();
    $query = "SELECT id" . "\n FROM #__mambots" . "\n WHERE folder='editors' AND published = 1" . "\n LIMIT 1";
    $database->setQuery($query);
    $editor = $database->loadResult();
    $lists = array();
    // build the html select list
    $lists['editor'] = mosHTML::selectList($edits, 'editor', 'class="inputbox" size="1"', 'value', 'text', $editor);
    // build the html select list
    $lists['lang'] = mosHTML::selectList($langs, 'config_lang', 'class="inputbox" size="1"', 'value', 'text', $row->config_lang);
    //adminLanguage select language
    $lists['alang'] = mosHTML::selectList($alangs, 'config_alang', 'class="inputbox" size="1"', 'value', 'text', $row->config_alang);
    // make a generic -24 - 24 list
    for ($i = -24; $i <= 24; $i++) {
        $timeoffset[] = mosHTML::makeOption($i, $i);
    }
    // get list of menuitems
    $query = "SELECT id AS value, name AS text FROM #__menu" . "\n WHERE (type='content_section' OR type='components' OR type='content_typed')" . "\n AND published=1" . "\n AND access=0" . "\n ORDER BY name";
    $database->setQuery($query);
    $menuitems = array_merge($menuitems, $database->loadObjectList());
    $show_hide = array(mosHTML::makeOption(1, $adminLanguage->A_COMP_CONF_HIDE), mosHTML::makeOption(0, $adminLanguage->A_COMP_CONF_SHOW));
    $show_hide_r = array(mosHTML::makeOption(0, $adminLanguage->A_COMP_CONF_HIDE), mosHTML::makeOption(1, $adminLanguage->A_COMP_CONF_SHOW));
    $list_length = array(mosHTML::makeOption(5, 5), mosHTML::makeOption(10, 10), mosHTML::makeOption(15, 15), mosHTML::makeOption(20, 20), mosHTML::makeOption(25, 25), mosHTML::makeOption(30, 30), mosHTML::makeOption(50, 50));
    $errors = array(mosHTML::makeOption(-1, $adminLanguage->A_COMP_CONF_DEFAULT), mosHTML::makeOption(0, $adminLanguage->A_COMP_NONE), mosHTML::makeOption(E_ERROR | E_WARNING | E_PARSE, $adminLanguage->A_COMP_CONF_SIMPLE), mosHTML::makeOption(E_ALL, $adminLanguage->A_COMP_CONF_MAX));
    $mailer = array(mosHTML::makeOption('mail', $adminLanguage->A_COMP_CONF_MAIL_FC, true), mosHTML::makeOption('sendmail', $adminLanguage->A_COMP_CONF_SEND, true), mosHTML::makeOption('smtp', $adminLanguage->A_COMP_CONF_SMTP, true));
    // build the html select lists
    $lists['offline'] = mosHTML::yesnoRadioList('config_offline', 'class="inputbox"', $row->config_offline);
    $lists['auth'] = mosHTML::yesnoRadioList('config_auth', 'class="inputbox"', $row->config_auth);
    $lists['metaauthor'] = mosHTML::yesnoRadioList('config_metaauthor', 'class="inputbox"', $row->config_metaauthor);
    $lists['metatitle'] = mosHTML::yesnoRadioList('config_metatitle', 'class="inputbox"', $row->config_metatitle);
    $lists['useractivation'] = mosHTML::yesnoRadioList('config_useractivation', 'class="inputbox"', $row->config_useractivation);
    $lists['uniquemail'] = mosHTML::yesnoRadioList('config_uniquemail', 'class="inputbox"', $row->config_uniquemail);
    $lists['allowuserregistration'] = mosHTML::yesnoRadioList('config_allowUserRegistration', 'class="inputbox"', $row->config_allowUserRegistration);
    $lists['debug'] = mosHTML::yesnoRadioList('config_debug', 'class="inputbox"', $row->config_debug);
    $lists['offset'] = mosHTML::selectList($timeoffset, 'config_offset', 'class="inputbox" size="1"', 'value', 'text', $row->config_offset);
    $lists['hideauthor'] = mosHTML::RadioList($show_hide, 'config_hideauthor', 'class="inputbox"', $row->config_hideauthor, 'value', 'text');
    $lists['hidecreate'] = mosHTML::RadioList($show_hide, 'config_hidecreate', 'class="inputbox"', $row->config_hidecreate, 'value', 'text');
    $lists['hidemodify'] = mosHTML::RadioList($show_hide, 'config_hidemodify', 'class="inputbox"', $row->config_hidemodify, 'value', 'text');
    if (is_writable("{$mosConfig_absolute_path}/media/")) {
        $lists['hidepdf'] = mosHTML::RadioList($show_hide, 'config_hidepdf', 'class="inputbox"', $row->config_hidepdf, 'value', 'text');
    } else {
        $lists['hidepdf'] = '<input type="hidden" name="config_hidepdf" value="1" /><strong>Yes</strong>';
    }
    $lists['hideprint'] = mosHTML::RadioList($show_hide, 'config_hideprint', 'class="inputbox"', $row->config_hideprint, 'value', 'text');
    $lists['hideemail'] = mosHTML::RadioList($show_hide, 'config_hideemail', 'class="inputbox"', $row->config_hideemail, 'value', 'text');
    $lists['log_items'] = mosHTML::yesnoRadioList('config_enable_log_items', 'class="inputbox"', $row->config_enable_log_items);
    $lists['log_searches'] = mosHTML::yesnoRadioList('config_enable_log_searches', 'class="inputbox"', $row->config_enable_log_searches);
    $lists['enable_stats'] = mosHTML::yesnoRadioList('config_enable_stats', 'class="inputbox"', $row->config_enable_stats);
    $lists['sef'] = mosHTML::yesnoRadioList('config_sef', 'class="inputbox" onclick="javascript: if (document.adminForm.config_sef[1].checked) { alert(\'Remember to rename htaccess.txt to .htaccess\') }"', $row->config_sef);
    $lists['vote'] = mosHTML::RadioList($show_hide_r, 'config_vote', 'class="inputbox"', $row->config_vote, 'value', 'text');
    $lists['gzip'] = mosHTML::yesnoRadioList('config_gzip', 'class="inputbox"', $row->config_gzip);
    $lists['multipage_toc'] = mosHTML::RadioList($show_hide_r, 'config_multipage_toc', 'class="inputbox"', $row->config_multipage_toc, 'value', 'text');
    $lists['pagetitles'] = mosHTML::yesnoRadioList('config_pagetitles', 'class="inputbox"', $row->config_pagetitles);
    $lists['error_reporting'] = mosHTML::selectList($errors, 'config_error_reporting', 'class="inputbox" size="1"', 'value', 'text', $row->config_error_reporting);
    $lists['link_titles'] = mosHTML::yesnoRadioList('config_link_titles', 'class="inputbox"', $row->config_link_titles);
    $lists['caching'] = mosHTML::yesnoRadioList('config_caching', 'class="inputbox"', $row->config_caching);
    $lists['mailer'] = mosHTML::selectList($mailer, 'config_mailer', 'class="inputbox" size="1"', 'value', 'text', $row->config_mailer);
    $lists['smtpauth'] = mosHTML::yesnoRadioList('config_smtpauth', 'class="inputbox"', $row->config_smtpauth);
    $lists['list_length'] = mosHTML::selectList($list_length, 'config_list_limit', 'class="inputbox" size="1"', 'value', 'text', $row->config_list_limit ? $row->config_list_limit : 50);
    $lists['back_button'] = mosHTML::RadioList($show_hide_r, 'config_back_button', 'class="inputbox"', $row->config_back_button, 'value', 'text');
    $lists['item_navigation'] = mosHTML::RadioList($show_hide_r, 'config_item_navigation', 'class="inputbox"', $row->config_item_navigation, 'value', 'text');
    $lists['readmore'] = mosHTML::RadioList($show_hide_r, 'config_readmore', 'class="inputbox"', $row->config_readmore, 'value', 'text');
    $lists['hits'] = mosHTML::RadioList($show_hide_r, 'config_hits', 'class="inputbox"', $row->config_hits, 'value', 'text');
    $lists['icons'] = mosHTML::RadioList($show_hide_r, 'config_icons', 'class="inputbox"', $row->config_icons, 'value', 'text');
    $confightml->showconfig($row, $lists, $option);
}
Exemplo n.º 2
0
function showconfig($confightml, &$database, $option)
{
    global $database, $mosConfig_absolute_path, $mosConfig_locale;
    $row = new mosConfig();
    $row->bindGlobals();
    // compile list of the languages
    $langs = array();
    // menuitems appears never to be used - so commented out by Martin Brampton 15 Dec 2005
    //	$menuitems = array();
    $language =& new mamboLanguage($mosConfig_locale);
    $files = $language->getLanguages();
    foreach ($files as $file) {
        $langs[] = mosHTML::makeOption($file->name);
    }
    // sort list of languages
    sort($langs);
    reset($langs);
    // compile list of the editors
    $query = "SELECT id AS value, name AS text" . "\n FROM #__mambots" . "\n WHERE folder='editors' AND published >= 0" . "\n ORDER BY ordering, name";
    $database->setQuery($query);
    $edits = $database->loadObjectList();
    $query = "SELECT id" . "\n FROM #__mambots" . "\n WHERE folder='editors' AND published = 1" . "\n LIMIT 1";
    $database->setQuery($query);
    $editor = $database->loadResult();
    $lists = array();
    // build the html select list
    $lists['editor'] = mosHTML::selectList($edits, 'editor', 'class="inputbox" size="1"', 'value', 'text', $editor);
    // build the html select list
    $lists['lang'] = mosHTML::selectList($langs, 'config_locale', 'class="inputbox" size="1"', 'value', 'text', $row->config_locale);
    // make a generic -24 - 24 list
    for ($i = -12; $i <= 12; $i++) {
        $timeoffset[] = mosHTML::makeOption($i, $i);
    }
    // menuitems appears not to be used anywhere - so commented out Martin Brampton 15 Dec 2005
    // get list of menuitems
    //	$query = "SELECT id AS value, name AS text FROM #__menu"
    //	. "\n WHERE (type='content_section' OR type='components' OR type='content_typed')"
    //	. "\n AND published=1"
    //	. "\n AND access=0"
    //	. "\n ORDER BY name"
    //	;
    //	$database->setQuery( $query );
    //	$menuitems = array_merge( $menuitems, $database->loadObjectList() );
    $show_hide = array(mosHTML::makeOption(1, T_('Hide')), mosHTML::makeOption(0, T_('Show')));
    $show_hide_r = array(mosHTML::makeOption(0, T_('Hide')), mosHTML::makeOption(1, T_('Show')));
    $list_length = array(mosHTML::makeOption(5, 5), mosHTML::makeOption(10, 10), mosHTML::makeOption(15, 15), mosHTML::makeOption(20, 20), mosHTML::makeOption(25, 25), mosHTML::makeOption(30, 30), mosHTML::makeOption(50, 50));
    $errors = array(mosHTML::makeOption(-1, T_('System Default')), mosHTML::makeOption(0, T_('None')), mosHTML::makeOption(E_ERROR | E_WARNING | E_PARSE, T_('Simple')), mosHTML::makeOption(E_ALL, T_('Maximum')));
    $register_globals = array(mosHTML::makeOption(1, T_('On')), mosHTML::makeOption(0, T_('Off')));
    $locale_debug = array(mosHTML::makeOption(1, T_('On')), mosHTML::makeOption(0, T_('Off')));
    $locale_use_gettext = array(mosHTML::makeOption(1, T_('Yes')), mosHTML::makeOption(0, T_('No')));
    $mailer = array(mosHTML::makeOption('mail', T_('PHP mail function'), true), mosHTML::makeOption('sendmail', T_('Sendmail'), true), mosHTML::makeOption('smtp', T_('SMTP Server'), true));
    // build the html select lists
    $lists['offline'] = mosHTML::yesnoRadioList('config_offline', 'class="inputbox"', $row->config_offline);
    $lists['auth'] = mosHTML::yesnoRadioList('config_auth', 'class="inputbox"', $row->config_auth);
    $lists['metaauthor'] = mosHTML::yesnoRadioList('config_metaauthor', 'class="inputbox"', $row->config_metaauthor);
    $lists['metatitle'] = mosHTML::yesnoRadioList('config_metatitle', 'class="inputbox"', $row->config_metatitle);
    $lists['useractivation'] = mosHTML::yesnoRadioList('config_useractivation', 'class="inputbox"', $row->config_useractivation);
    $lists['uniquemail'] = mosHTML::yesnoRadioList('config_uniquemail', 'class="inputbox"', $row->config_uniquemail);
    $lists['usecaptcha'] = mosHTML::yesnoRadioList('config_use_captcha', 'class="inputbox"', $row->config_use_captcha);
    $lists['allowuserregistration'] = mosHTML::yesnoRadioList('config_allowUserRegistration', 'class="inputbox"', $row->config_allowUserRegistration);
    $lists['debug'] = mosHTML::yesnoRadioList('config_debug', 'class="inputbox"', $row->config_debug);
    $lists['offset'] = mosHTML::selectList($timeoffset, 'config_offset', 'class="inputbox" size="1"', 'value', 'text', $row->config_offset);
    $lists['hideauthor'] = mosHTML::RadioList($show_hide, 'config_hideauthor', 'class="inputbox"', $row->config_hideauthor, 'value', 'text');
    $lists['hidecreate'] = mosHTML::RadioList($show_hide, 'config_hidecreate', 'class="inputbox"', $row->config_hidecreate, 'value', 'text');
    $lists['hidemodify'] = mosHTML::RadioList($show_hide, 'config_hidemodify', 'class="inputbox"', $row->config_hidemodify, 'value', 'text');
    if (is_writable("{$mosConfig_absolute_path}/media/")) {
        $lists['hidepdf'] = mosHTML::RadioList($show_hide, 'config_hidepdf', 'class="inputbox"', $row->config_hidepdf, 'value', 'text');
    } else {
        $lists['hidepdf'] = '<input type="hidden" name="config_hidepdf" value="1" /><strong>' . T_('Yes') . '</strong>';
    }
    $lists['hideprint'] = mosHTML::RadioList($show_hide, 'config_hideprint', 'class="inputbox"', $row->config_hideprint, 'value', 'text');
    $lists['hideemail'] = mosHTML::RadioList($show_hide, 'config_hideemail', 'class="inputbox"', $row->config_hideemail, 'value', 'text');
    $lists['log_items'] = mosHTML::yesnoRadioList('config_enable_log_items', 'class="inputbox"', $row->config_enable_log_items);
    $lists['log_searches'] = mosHTML::yesnoRadioList('config_enable_log_searches', 'class="inputbox"', $row->config_enable_log_searches);
    $lists['enable_stats'] = mosHTML::yesnoRadioList('config_enable_stats', 'class="inputbox"', $row->config_enable_stats);
    $lists['sef'] = mosHTML::yesnoRadioList('config_sef', 'class="inputbox" onclick="javascript: if (document.adminForm.config_sef[1].checked) { alert(\'' . T_('Remember to rename htaccess.txt to .htaccess') . '\') }"', $row->config_sef);
    $lists['vote'] = mosHTML::RadioList($show_hide_r, 'config_vote', 'class="inputbox"', $row->config_vote, 'value', 'text');
    $lists['gzip'] = mosHTML::yesnoRadioList('config_gzip', 'class="inputbox"', $row->config_gzip);
    $lists['multipage_toc'] = mosHTML::RadioList($show_hide_r, 'config_multipage_toc', 'class="inputbox"', $row->config_multipage_toc, 'value', 'text');
    $lists['pagetitles'] = mosHTML::yesnoRadioList('config_pagetitles', 'class="inputbox"', $row->config_pagetitles);
    $lists['error_reporting'] = mosHTML::selectList($errors, 'config_error_reporting', 'class="inputbox" size="1"', 'value', 'text', $row->config_error_reporting);
    $lists['register_globals'] = mosHTML::RadioList($register_globals, 'config_register_globals', 'class="inputbox" size="1"', $row->config_register_globals, 'value', 'text');
    $lists['locale_debug'] = mosHTML::RadioList($locale_debug, 'config_locale_debug', 'class="inputbox" size="1"', $row->config_locale_debug, 'value', 'text');
    $disabled = extension_loaded('gettext') ? '' : 'disabled="disabled" ';
    $lists['locale_use_gettext'] = mosHTML::RadioList($locale_use_gettext, 'config_locale_use_gettext', $disabled . 'class="inputbox" size="1"', $row->config_locale_use_gettext, 'value', 'text');
    $lists['link_titles'] = mosHTML::yesnoRadioList('config_link_titles', 'class="inputbox"', $row->config_link_titles);
    $lists['caching'] = mosHTML::yesnoRadioList('config_caching', 'class="inputbox"', $row->config_caching);
    $lists['mailer'] = mosHTML::selectList($mailer, 'config_mailer', 'class="inputbox" size="1"', 'value', 'text', $row->config_mailer);
    $lists['smtpauth'] = mosHTML::yesnoRadioList('config_smtpauth', 'class="inputbox"', $row->config_smtpauth);
    $lists['list_length'] = mosHTML::selectList($list_length, 'config_list_limit', 'class="inputbox" size="1"', 'value', 'text', $row->config_list_limit ? $row->config_list_limit : 50);
    $lists['back_button'] = mosHTML::RadioList($show_hide_r, 'config_back_button', 'class="inputbox"', $row->config_back_button, 'value', 'text');
    $lists['item_navigation'] = mosHTML::RadioList($show_hide_r, 'config_item_navigation', 'class="inputbox"', $row->config_item_navigation, 'value', 'text');
    $lists['ml_support'] = mosHTML::yesnoRadioList('config_ml_support', 'class="inputbox" onclick="javascript: if (document.adminForm.config_ml_support[1].checked) { alert(\'' . T_('Remember to install the MambelFish component.') . '\') }"', $row->config_ml_support);
    $lists['readmore'] = mosHTML::RadioList($show_hide_r, 'config_readmore', 'class="inputbox"', $row->config_readmore, 'value', 'text');
    $lists['hits'] = mosHTML::RadioList($show_hide_r, 'config_hits', 'class="inputbox"', $row->config_hits, 'value', 'text');
    $lists['icons'] = mosHTML::RadioList($show_hide_r, 'config_icons', 'class="inputbox"', $row->config_icons, 'value', 'text');
    //	$lists['favicon'] 				= mosHTML::RadioList( $show_hide_r, 'config_icons', 'class="inputbox"', $row->config_icons, 'value', 'text' );
    $confightml->showconfig($row, $lists, $option);
}
Exemplo n.º 3
0
/**
 * Show the configuration edit form
 * @param string The URL option
 */
function showconfig($option)
{
    global $database, $mosConfig_absolute_path, $mosConfig_editor;
    $row = new mosConfig();
    $row->bindGlobals();
    // compile list of the languages
    $langs = array();
    $menuitems = array();
    $lists = array();
    // PRE-PROCESS SOME LISTS
    // -- Languages --
    if ($handle = opendir($mosConfig_absolute_path . '/language/')) {
        $i = 0;
        while (false !== ($file = readdir($handle))) {
            if (!strcasecmp(substr($file, -4), ".php") && $file != "." && $file != ".." && strcasecmp(substr($file, -11), ".ignore.php")) {
                $langs[] = mosHTML::makeOption(substr($file, 0, -4));
            }
        }
    }
    // sort list of languages
    sort($langs);
    reset($langs);
    // -- Editors --
    // compile list of the editors
    $query = "SELECT element AS value, name AS text" . "\n FROM #__mambots" . "\n WHERE folder = 'editors'" . "\n AND published = 1" . "\n ORDER BY ordering, name";
    $database->setQuery($query);
    $edits = $database->loadObjectList();
    // -- Show/Hide --
    $show_hide = array(mosHTML::makeOption(1, 'Ocultar'), mosHTML::makeOption(0, 'Exibir'));
    $show_hide_r = array(mosHTML::makeOption(0, 'Ocultar'), mosHTML::makeOption(1, 'Exibir'));
    // -- menu items --
    $query = "SELECT id AS value, name AS text FROM #__menu" . "\n WHERE ( type='content_section' OR type='components' OR type='content_typed' )" . "\n AND published = 1" . "\n AND access = 0" . "\n ORDER BY name";
    $database->setQuery($query);
    $menuitems = array_merge($menuitems, $database->loadObjectList());
    // SITE SETTINGS
    $lists['offline'] = mosHTML::yesnoRadioList('config_offline', 'class="inputbox"', $row->config_offline);
    if (!$row->config_editor) {
        $row->config_editor = '';
    }
    // build the html select list
    $lists['editor'] = mosHTML::selectList($edits, 'config_editor', 'class="inputbox" size="1"', 'value', 'text', $row->config_editor);
    $listLimit = array(mosHTML::makeOption(5, 5), mosHTML::makeOption(10, 10), mosHTML::makeOption(15, 15), mosHTML::makeOption(20, 20), mosHTML::makeOption(25, 25), mosHTML::makeOption(30, 30), mosHTML::makeOption(50, 50));
    $lists['list_limit'] = mosHTML::selectList($listLimit, 'config_list_limit', 'class="inputbox" size="1"', 'value', 'text', $row->config_list_limit ? $row->config_list_limit : 50);
    $lists['frontend_login'] = mosHTML::yesnoRadioList('config_frontend_login', 'class="inputbox"', $row->config_frontend_login);
    // DEBUG
    $lists['debug'] = mosHTML::yesnoRadioList('config_debug', 'class="inputbox"', $row->config_debug);
    // DATABASE SETTINGS
    // SERVER SETTINGS
    $lists['gzip'] = mosHTML::yesnoRadioList('config_gzip', 'class="inputbox"', $row->config_gzip);
    $session = array(mosHTML::makeOption(0, 'Nivel 3 segurança - Padrão & Mais Alto'), mosHTML::makeOption(1, 'Nivel 2 segurança - Permite IPs com proxy'), mosHTML::makeOption(2, 'Nivel 1 segurança - Modo Compatível'));
    $lists['session_type'] = mosHTML::selectList($session, 'config_session_type', 'class="inputbox" size="1"', 'value', 'text', $row->config_session_type);
    $errors = array(mosHTML::makeOption(-1, 'Padrão do Sistema'), mosHTML::makeOption(0, 'Nenhum'), mosHTML::makeOption(E_ERROR | E_WARNING | E_PARSE, 'Simples'), mosHTML::makeOption(E_ALL, 'Máximo'));
    $lists['error_reporting'] = mosHTML::selectList($errors, 'config_error_reporting', 'class="inputbox" size="1"', 'value', 'text', $row->config_error_reporting);
    $lists['admin_expired'] = mosHTML::yesnoRadioList('config_admin_expired', 'class="inputbox"', $row->config_admin_expired);
    // LOCALE SETTINGS
    $lists['lang'] = mosHTML::selectList($langs, 'config_lang', 'class="inputbox" size="1"', 'value', 'text', $row->config_lang);
    $timeoffset = array(mosHTML::makeOption(-12, '(UTC -12:00) Linha Internacional de Mudança de data'), mosHTML::makeOption(-11, '(UTC -11:00) Ilhas Midway, Samoa'), mosHTML::makeOption(-10, '(UTC -10:00) Havai'), mosHTML::makeOption(-9.5, '(UTC -09:30) Taiohae, Ilhas Marquesas'), mosHTML::makeOption(-9, '(UTC -09:00) Alasca'), mosHTML::makeOption(-8, '(UTC -08:00) Hora do Pacífico (EUA &amp; Canadá))'), mosHTML::makeOption(-7, '(UTC -07:00) Hora das Regiões Montanhosas (Hora do Pacífico (EUA &amp; Canadá))'), mosHTML::makeOption(-6, '(UTC -06:00) Hora Central (EUA &amp; Canadá), Cidade do México'), mosHTML::makeOption(-5, '(UTC -05:00) Hora do Leste (EUA &amp; Canadá), Bogotá, Lima'), mosHTML::makeOption(-4, '(UTC -04:00) Hora do Atlântico (Canadá), Caracas, La Paz'), mosHTML::makeOption(-3.5, '(UTC -03:30) St. John, Newfoundland e Labrador'), mosHTML::makeOption(-3, '(UTC -03:00) Brasil, Buenos Aires, Georgetown'), mosHTML::makeOption(-2, '(UTC -02:00) Atlântico Central'), mosHTML::makeOption(-1, '(UTC -01:00 hour) Açores, Cabo Verde'), mosHTML::makeOption(0, '(UTC 00:00) Meridiano de Greenwich, Lisboa, Londres, Casablanca'), mosHTML::makeOption(1, '(UTC +01:00 hour) Amesterdão, Berlim, Bruxelas, Copenhaga, Madrid, Paris'), mosHTML::makeOption(2, '(UTC +02:00) Jerusalém, Kalininegrado, África do Sul'), mosHTML::makeOption(3, '(UTC +03:00) Bagdade, Riade, Moscovo, São Petersburgo'), mosHTML::makeOption(3.5, '(UTC +03:30) Teerão'), mosHTML::makeOption(4, '(UTC +04:00) Abu Dhabi, Muscat, Baku, Tbilisi'), mosHTML::makeOption(4.5, '(UTC +04:30) Cabul'), mosHTML::makeOption(5, '(UTC +05:00) Ekaterimburgo, Islamabad, Karachi, Tashkent'), mosHTML::makeOption(5.5, '(UTC +05:30) Bombaim, Calcutá, Madras, Nova Deli'), mosHTML::makeOption(5.75, '(UTC +05:45) Catmandu'), mosHTML::makeOption(6, '(UTC +06:00) Almaty, Dhaka, Colombo'), mosHTML::makeOption(6.5, '(UTC +06:30) Yagoon'), mosHTML::makeOption(7, '(UTC +07:00) Banguecoque, Hanói, Jacarta'), mosHTML::makeOption(8, '(UTC +08:00) Pequim, Perth, Singapura, Hong Kong'), mosHTML::makeOption(8.75, '(UTC +08:45) Austrália Ocidental'), mosHTML::makeOption(9, '(UTC +09:00) Tóquio, Seul, Osaka, Sapporo, Yakutsk'), mosHTML::makeOption(9.5, '(UTC +09:30) Adelaide, Darwin, Yakutsk'), mosHTML::makeOption(10, '(UTC +10:00) Leste Australiano, Guam, Vladivostoque'), mosHTML::makeOption(10.5, '(UTC +10:30) Ilha de Lord Howe (Australia)'), mosHTML::makeOption(11, '(UTC +11:00) Magadã, Ilhas de Salomão, Nova Caledónia'), mosHTML::makeOption(11.5, '(UTC +11:30) Ilha de Norfolk'), mosHTML::makeOption(12, '(UTC +12:00) Auckland, Wellington, Fiji, Kamchatka'), mosHTML::makeOption(12.75, '(UTC +12:45) Ilha de Chatham'), mosHTML::makeOption(13, '(UTC +13:00) Tonga'), mosHTML::makeOption(14, '(UTC +14:00) Kiribati'));
    $lists['offset'] = mosHTML::selectList($timeoffset, 'config_offset_user', 'class="inputbox" size="1"', 'value', 'text', $row->config_offset_user);
    // MAIL SETTINGS
    $mailer = array(mosHTML::makeOption('mail', 'Função mail do PHP'), mosHTML::makeOption('sendmail', 'Servidor Sendmail'), mosHTML::makeOption('smtp', 'Servidor SMTP'));
    $lists['mailer'] = mosHTML::selectList($mailer, 'config_mailer', 'class="inputbox" size="1"', 'value', 'text', $row->config_mailer);
    $lists['smtpauth'] = mosHTML::yesnoRadioList('config_smtpauth', 'class="inputbox"', $row->config_smtpauth);
    // CACHE SETTINGS
    $lists['caching'] = mosHTML::yesnoRadioList('config_caching', 'class="inputbox"', $row->config_caching);
    // USER SETTINGS
    $lists['allowUserRegistration'] = mosHTML::yesnoRadioList('config_allowUserRegistration', 'class="inputbox"', $row->config_allowUserRegistration);
    $lists['useractivation'] = mosHTML::yesnoRadioList('config_useractivation', 'class="inputbox"', $row->config_useractivation);
    $lists['uniquemail'] = mosHTML::yesnoRadioList('config_uniquemail', 'class="inputbox"', $row->config_uniquemail);
    $lists['shownoauth'] = mosHTML::yesnoRadioList('config_shownoauth', 'class="inputbox"', $row->config_shownoauth);
    $lists['frontend_userparams'] = mosHTML::yesnoRadioList('config_frontend_userparams', 'class="inputbox"', $row->config_frontend_userparams);
    // META SETTINGS
    $lists['MetaAuthor'] = mosHTML::yesnoRadioList('config_MetaAuthor', 'class="inputbox"', $row->config_MetaAuthor);
    $lists['MetaTitle'] = mosHTML::yesnoRadioList('config_MetaTitle', 'class="inputbox"', $row->config_MetaTitle);
    // STATISTICS SETTINGS
    $lists['log_searches'] = mosHTML::yesnoRadioList('config_enable_log_searches', 'class="inputbox"', $row->config_enable_log_searches);
    $lists['enable_stats'] = mosHTML::yesnoRadioList('config_enable_stats', 'class="inputbox"', $row->config_enable_stats);
    $lists['log_items'] = mosHTML::yesnoRadioList('config_enable_log_items', 'class="inputbox"', $row->config_enable_log_items);
    // SEO SETTINGS
    $lists['sef'] = mosHTML::yesnoRadioList('config_sef', 'class="inputbox" onclick="javascript: if (document.adminForm.config_sef[1].checked) { alert(\'Lembre-se de renomear o arquivo htaccess.txt para .htaccess\') }"', $row->config_sef);
    $lists['pagetitles'] = mosHTML::yesnoRadioList('config_pagetitles', 'class="inputbox"', $row->config_pagetitles);
    // CONTENT SETTINGS
    $lists['link_titles'] = mosHTML::yesnoRadioList('config_link_titles', 'class="inputbox"', $row->config_link_titles);
    $lists['readmore'] = mosHTML::RadioList($show_hide_r, 'config_readmore', 'class="inputbox"', $row->config_readmore, 'value', 'text');
    $lists['vote'] = mosHTML::RadioList($show_hide_r, 'config_vote', 'class="inputbox"', $row->config_vote, 'value', 'text');
    $lists['hideAuthor'] = mosHTML::RadioList($show_hide, 'config_hideAuthor', 'class="inputbox"', $row->config_hideAuthor, 'value', 'text');
    $lists['hideCreateDate'] = mosHTML::RadioList($show_hide, 'config_hideCreateDate', 'class="inputbox"', $row->config_hideCreateDate, 'value', 'text');
    $lists['hideModifyDate'] = mosHTML::RadioList($show_hide, 'config_hideModifyDate', 'class="inputbox"', $row->config_hideModifyDate, 'value', 'text');
    $lists['hits'] = mosHTML::RadioList($show_hide_r, 'config_hits', 'class="inputbox"', $row->config_hits, 'value', 'text');
    if (is_writable("{$mosConfig_absolute_path}/media/")) {
        $lists['hidePdf'] = mosHTML::RadioList($show_hide, 'config_hidePdf', 'class="inputbox"', $row->config_hidePdf, 'value', 'text');
    } else {
        $lists['hidePdf'] = '<input type="hidden" name="config_hidePdf" value="1" /><strong>Ocultar</strong>';
    }
    $lists['hidePrint'] = mosHTML::RadioList($show_hide, 'config_hidePrint', 'class="inputbox"', $row->config_hidePrint, 'value', 'text');
    $lists['hideEmail'] = mosHTML::RadioList($show_hide, 'config_hideEmail', 'class="inputbox"', $row->config_hideEmail, 'value', 'text');
    $lists['icons'] = mosHTML::RadioList($show_hide_r, 'config_icons', 'class="inputbox"', $row->config_icons, 'value', 'text');
    $lists['back_button'] = mosHTML::RadioList($show_hide_r, 'config_back_button', 'class="inputbox"', $row->config_back_button, 'value', 'text');
    $lists['item_navigation'] = mosHTML::RadioList($show_hide_r, 'config_item_navigation', 'class="inputbox"', $row->config_item_navigation, 'value', 'text');
    $lists['multipage_toc'] = mosHTML::RadioList($show_hide_r, 'config_multipage_toc', 'class="inputbox"', $row->config_multipage_toc, 'value', 'text');
    $itemid_compat = array(mosHTML::makeOption('11', 'Joomla! 1.0.11 and before'), mosHTML::makeOption('0', 'Joomla! 1.0.12 and after'));
    $lists['itemid_compat'] = mosHTML::selectList($itemid_compat, 'config_itemid_compat', 'class="inputbox" size="1"', 'value', 'text', $row->config_itemid_compat);
    // SHOW EDIT FORM
    HTML_config::showconfig($row, $lists, $option);
}
Exemplo n.º 4
0
function configure_backend($option)
{
    global $my, $booklibrary_configuration, $acl;
    global $mosConfig_absolute_path;
    $yesno[] = mosHTML::makeOption('1', _BOOKLIBRARY_YES);
    $yesno[] = mosHTML::makeOption('0', _BOOKLIBRARY_NO);
    $gtree[] = mosHTML::makeOption('-2', 'Everyone');
    $gtree = get_group_children_tree_bl();
    $lists = array();
    $f = array();
    $s = explode(',', $booklibrary_configuration['review_added_email']['registrationlevel']);
    for ($i = 0; $i < count($s); $i++) {
        $f[] = mosHTML::makeOption($s[$i]);
    }
    $lists['review_added_email']['registrationlevel'] = mosHTML::selectList($gtree, 'review_added_email_registrationlevel[]', 'size="4" multiple="multiple"', 'value', 'text', $f);
    $lists['review_added_email']['show'] = mosHTML::RadioList($yesno, 'review_added_email_show', 'class="inputbox"', $booklibrary_configuration['review_added_email']['show'], 'value', 'text');
    $f = array();
    $s = explode(',', $booklibrary_configuration['suggest_added_email']['registrationlevel']);
    for ($i = 0; $i < count($s); $i++) {
        $f[] = mosHTML::makeOption($s[$i]);
    }
    $lists['suggest_added_email']['show'] = mosHTML::RadioList($yesno, 'suggest_added_email_show', 'class="inputbox"', $booklibrary_configuration['suggest_added_email']['show'], 'value', 'text', $booklibrary_configuration['suggest_added_email']['show']);
    $lists['suggest_added_email']['registrationlevel'] = mosHTML::selectList($gtree, 'suggest_added_email_registrationlevel[] ', 'size="4" multiple="multiple"', 'value', 'text', $f);
    $f = array();
    $s = explode(',', $booklibrary_configuration['lendrequest_email']['registrationlevel']);
    for ($i = 0; $i < count($s); $i++) {
        $f[] = mosHTML::makeOption($s[$i]);
    }
    $lists['lendrequest_email']['show'] = mosHTML::RadioList($yesno, 'lendrequest_email_show', 'class="inputbox"', $booklibrary_configuration['lendrequest_email']['show'], 'value', 'text');
    $lists['lendrequest_email']['registrationlevel'] = mosHTML::selectList($gtree, 'lendrequest_email_registrationlevel[]', 'size="4" multiple="multiple"', 'value', 'text', $f);
    $f = array();
    $s = explode(',', $booklibrary_configuration['addbook_email']['registrationlevel']);
    for ($i = 0; $i < count($s); $i++) {
        $f[] = mosHTML::makeOption($s[$i]);
    }
    $lists['addbook_email']['show'] = mosHTML::RadioList($yesno, 'addbook_email_show', 'class="inputbox"', $booklibrary_configuration['addbook_email']['show'], 'value', 'text');
    $lists['addbook_email']['registrationlevel'] = mosHTML::selectList($gtree, 'addbook_email_registrationlevel[]', 'size="4" multiple="multiple"', 'value', 'text', $f);
    $lists['review_email']['address'] = '<input type="text" name="review_email_address" value="' . $booklibrary_configuration['review_email']['address'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    //back--1
    $lists['suggest_email']['address'] = '<input type="text" name="suggest_email_address" value="' . $booklibrary_configuration['suggest_email']['address'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['lendrequest_email']['address'] = '<input type="text" name="lendrequest_email_address" value="' . $booklibrary_configuration['lendrequest_email']['address'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['addbook_email']['address'] = '<input type="text" name="addbook_email_address" value="' . $booklibrary_configuration['addbook_email']['address'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['bookid']['auto-increment']['boolean'] = mosHTML::RadioList($yesno, 'bookid_auto_increment_boolean', 'class="inputbox"', $booklibrary_configuration['bookid']['auto-increment']['boolean'], 'value', 'text');
    //********   begin add merge description   ************************/
    $f = array();
    $s = explode(',', $booklibrary_configuration['merge_description']['registrationlevel']);
    for ($i = 0; $i < count($s); $i++) {
        $f[] = mosHTML::makeOption($s[$i]);
    }
    $lists['merge_description']['use'] = mosHTML::RadioList($yesno, 'merge_description_use', 'class="inputbox"', $booklibrary_configuration['merge_description']['use'], 'value', 'text');
    $lists['merge_description']['registrationlevel'] = mosHTML::selectList($gtree, 'merge_description_registrationlevel[]', 'size="4" multiple="multiple"', 'value', 'text', $f);
    //********   end add merge description  **********************/
    $lists['fetchImages']['boolean'] = mosHTML::RadioList($yesno, 'fetchImages_boolean', 'class="inputbox"', $booklibrary_configuration['fetchImages']['boolean'], 'value', 'text');
    $lists['fetchImages']['location'] = '<input disabled="disabled" type="text" name="fetchImages_location" value="' . $booklibrary_configuration['fetchImages']['location'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['ebooks']['allow'] = mosHTML::RadioList($yesno, 'ebooks_allow', 'class="inputbox"', $booklibrary_configuration['ebooks']['allow'], 'value', 'text');
    $lists['ebooks']['location'] = '<input disabled="disabled" type="text" name="ebooks_location" value="' . $booklibrary_configuration['ebooks']['location'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['ws']['amazon']['tag'] = '<input type="text" name="ws_amazon_tag" value="' . $booklibrary_configuration['ws']['amazon']['tag'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['ws']['amazon']['devtag'] = '<input type="text" name="ws_amazon_devtag" value="' . $booklibrary_configuration['ws']['amazon']['devtag'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    $lists['ws']['amazon']['secret_key'] = '<input type="text" name="ws_amazon_secret_key" value="' . $booklibrary_configuration['ws']['amazon']['secret_key'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    @($lists['editbook']['check']['isbn'] = mosHTML::RadioList($yesno, 'editbook_check_isbn', 'class="inputbox"', $booklibrary_configuration['editbook']['check']['isbn'], 'value', 'text'));
    //back--7
    /////////////////////////////////ANTON CODE////////////////////////////////////
    /////////////Proxy Relase
    $lists['proxy_server']['address'] = '<input type="text" name="proxy_server_adress" value="' . $booklibrary_configuration['proxy_server']['address'] . '"class="inputbox" size="50" maxlength="50" title="" />';
    $lists['port_proxy_server']['address'] = '<input type="text" name="port_proxy_server_adress" value="' . $booklibrary_configuration['port_proxy_server']['address'] . '"class="inputbox" size="50" maxlength="50" title="" />';
    $lists['login_proxy_server']['address'] = '<input type="text" name="login_proxy_server_adress" value="' . $booklibrary_configuration['login_proxy_server']['address'] . '"class="inputbox" size="50" maxlength="50" title="" />';
    $lists['password_proxy_server']['address'] = '<input type="text" name="password_proxy_server_adress" value="' . $booklibrary_configuration['password_proxy_server']['address'] . '"class="inputbox" size="50" maxlength="50" title="" />';
    /////////////////////////////////ANTON CODE////////////////////////////////////
    $lists['yaz']['connection_string'] = '<input class="inputbox" type="file" name="yaz_connection_file" value="" size="50" maxlength="250" />';
    $lists['update'] = mosHTML::RadioList($yesno, 'update', 'class="inputbox"', $booklibrary_configuration['update'], 'value', 'text');
    //get language List
    $retVal1 = mosBooklibraryOthers::getLanguageArray();
    $lang = null;
    for ($i = 0, $n = count($retVal1); $i < $n; $i++) {
        $help = $retVal1[$i];
        $lang[] = mosHTML::makeOption($help[0], $help[1]);
    }
    $lists['editbook']['default']['lang'] = mosHTML::selectList($lang, 'editbook_default_lang', 'class="inputbox" size="1"', 'value', 'text', $booklibrary_configuration['editbook']['default']['lang']);
    //get host List
    $retVal = mosBooklibraryWS::getArray();
    $ws = null;
    for ($i = 0, $n = count($retVal); $i < $n; $i++) {
        $help = $retVal[$i];
        $ws[] = mosHTML::makeOption($help[0], $help[1]);
    }
    $lists['editbook']['default']['host'] = mosHTML::selectList($ws, 'editbook_default_host', 'class="inputbox" size="1"', 'value', 'text', intval($booklibrary_configuration['editbook']['default']['host']));
    $lists['lend_answer'] = mosHTML::RadioList($yesno, 'lend_answer', 'class="inputbox"', $booklibrary_configuration['lend_answer'], 'value', 'text');
    $lists['lend_form'] = $booklibrary_configuration['lend_form'];
    $lists['ebooks']['registrationlevel'] = mosHTML::selectList($gtree, 'ebooks_registrationlevel', 'size="4"', 'value', 'text', $my->id);
    //(rus)--i tam i tam nado navernoe!
    $lists['lend_before_end_notify'] = mosHTML::RadioList($yesno, 'lend_before_end_notify', 'class="inputbox"', $booklibrary_configuration['lend_before_end_notify'], 'value', 'text');
    $lists['lend_before_end_notify_days'] = '<input type="text" name="lend_before_end_notify_days" value="' . $booklibrary_configuration['lend_before_end_notify_days'] . '" class="inputbox" size="2" maxlength="2" title="" />';
    $lists['lend_before_end_notify_email'] = '<input type="text" name="lend_before_end_notify_email" value="' . $booklibrary_configuration['lend_before_end_notify_email'] . '" class="inputbox" size="50" maxlength="50" title="" />';
    HTML_booklibrary::showConfiguration_backend($lists, $option);
}
Exemplo n.º 5
0
/**
 * Show the configuration edit form
 * @param string The URL option
 */
function showconfig($option)
{
    global $database, $mosConfig_absolute_path, $mosConfig_editor;
    $row = new mosConfig();
    $row->bindGlobals();
    // compile list of the languages
    $langs = array();
    $menuitems = array();
    $lists = array();
    // PRE-PROCESS SOME LISTS
    // -- Languages --
    if ($handle = opendir($mosConfig_absolute_path . '/language/')) {
        $i = 0;
        while (false !== ($file = readdir($handle))) {
            if (!strcasecmp(substr($file, -4), ".php") && $file != "." && $file != ".." && strcasecmp(substr($file, -11), ".ignore.php")) {
                $langs[] = mosHTML::makeOption(substr($file, 0, -4));
            }
        }
    }
    // sort list of languages
    sort($langs);
    reset($langs);
    // -- Editors --
    // compile list of the editors
    $query = "SELECT element AS value, name AS text" . "\n FROM #__mambots" . "\n WHERE folder = 'editors'" . "\n AND published = 1" . "\n ORDER BY ordering, name";
    $database->setQuery($query);
    $edits = $database->loadObjectList();
    // -- Show/Hide --
    $show_hide = array(mosHTML::makeOption(1, 'Hide'), mosHTML::makeOption(0, 'Show'));
    $show_hide_r = array(mosHTML::makeOption(0, 'Hide'), mosHTML::makeOption(1, 'Show'));
    // -- menu items --
    $query = "SELECT id AS value, name AS text FROM #__menu" . "\n WHERE ( type='content_section' OR type='components' OR type='content_typed' )" . "\n AND published = 1" . "\n AND access = 0" . "\n ORDER BY name";
    $database->setQuery($query);
    $menuitems = array_merge($menuitems, $database->loadObjectList());
    // SITE SETTINGS
    $lists['offline'] = mosHTML::yesnoRadioList('config_offline', 'class="inputbox"', $row->config_offline);
    if (!$row->config_editor) {
        $row->config_editor = '';
    }
    // build the html select list
    $lists['editor'] = mosHTML::selectList($edits, 'config_editor', 'class="inputbox" size="1"', 'value', 'text', $row->config_editor);
    $listLimit = array(mosHTML::makeOption(5, 5), mosHTML::makeOption(10, 10), mosHTML::makeOption(15, 15), mosHTML::makeOption(20, 20), mosHTML::makeOption(25, 25), mosHTML::makeOption(30, 30), mosHTML::makeOption(50, 50));
    $lists['list_limit'] = mosHTML::selectList($listLimit, 'config_list_limit', 'class="inputbox" size="1"', 'value', 'text', $row->config_list_limit ? $row->config_list_limit : 50);
    $lists['frontend_login'] = mosHTML::yesnoRadioList('config_frontend_login', 'class="inputbox"', $row->config_frontend_login);
    // DEBUG
    $lists['debug'] = mosHTML::yesnoRadioList('config_debug', 'class="inputbox"', $row->config_debug);
    // DATABASE SETTINGS
    // SERVER SETTINGS
    $lists['gzip'] = mosHTML::yesnoRadioList('config_gzip', 'class="inputbox"', $row->config_gzip);
    $session = array(mosHTML::makeOption(0, 'Level 3 Security- Default & Highest'), mosHTML::makeOption(1, 'Level 2 Security - Allow for proxy IPs'), mosHTML::makeOption(2, 'Level 1 Security - Backward Compatibility'));
    $lists['session_type'] = mosHTML::selectList($session, 'config_session_type', 'class="inputbox" size="1"', 'value', 'text', $row->config_session_type);
    $errors = array(mosHTML::makeOption(-1, 'System Default'), mosHTML::makeOption(0, 'None'), mosHTML::makeOption(E_ERROR | E_WARNING | E_PARSE, 'Simple'), mosHTML::makeOption(E_ALL, 'Maximum'));
    $lists['error_reporting'] = mosHTML::selectList($errors, 'config_error_reporting', 'class="inputbox" size="1"', 'value', 'text', $row->config_error_reporting);
    $lists['admin_expired'] = mosHTML::yesnoRadioList('config_admin_expired', 'class="inputbox"', $row->config_admin_expired);
    // LOCALE SETTINGS
    $lists['lang'] = mosHTML::selectList($langs, 'config_lang', 'class="inputbox" size="1"', 'value', 'text', $row->config_lang);
    $timeoffset = array(mosHTML::makeOption(-12, '(UTC -12:00) International Date Line West'), mosHTML::makeOption(-11, '(UTC -11:00) Midway Island, Samoa'), mosHTML::makeOption(-10, '(UTC -10:00) Hawaii'), mosHTML::makeOption(-9.5, '(UTC -09:30) Taiohae, Marquesas Islands'), mosHTML::makeOption(-9, '(UTC -09:00) Alaska'), mosHTML::makeOption(-8, '(UTC -08:00) Pacific Time (US &amp; Canada)'), mosHTML::makeOption(-7, '(UTC -07:00) Mountain Time (US &amp; Canada)'), mosHTML::makeOption(-6, '(UTC -06:00) Central Time (US &amp; Canada), Mexico City'), mosHTML::makeOption(-5, '(UTC -05:00) Eastern Time (US &amp; Canada), Bogota, Lima'), mosHTML::makeOption(-4, '(UTC -04:00) Atlantic Time (Canada), Caracas, La Paz'), mosHTML::makeOption(-3.5, '(UTC -03:30) St. John`s, Newfoundland and Labrador'), mosHTML::makeOption(-3, '(UTC -03:00) Brazil, Buenos Aires, Georgetown'), mosHTML::makeOption(-2, '(UTC -02:00) Mid-Atlantic'), mosHTML::makeOption(-1, '(UTC -01:00 hour) Azores, Cape Verde Islands'), mosHTML::makeOption(0, '(UTC 00:00) Western Europe Time, London, Lisbon, Casablanca'), mosHTML::makeOption(1, '(UTC +01:00 hour) Berlin, Brussels, Copenhagen, Madrid, Paris'), mosHTML::makeOption(2, '(UTC +02:00) Kaliningrad, South Africa'), mosHTML::makeOption(3, '(UTC +03:00) Baghdad, Riyadh, Moscow, St. Petersburg'), mosHTML::makeOption(3.5, '(UTC +03:30) Tehran'), mosHTML::makeOption(4, '(UTC +04:00) Abu Dhabi, Muscat, Baku, Tbilisi'), mosHTML::makeOption(4.5, '(UTC +04:30) Kabul'), mosHTML::makeOption(5, '(UTC +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent'), mosHTML::makeOption(5.5, '(UTC +05:30) Bombay, Calcutta, Madras, New Delhi'), mosHTML::makeOption(5.75, '(UTC +05:45) Kathmandu'), mosHTML::makeOption(6, '(UTC +06:00) Almaty, Dhaka, Colombo'), mosHTML::makeOption(6.5, '(UTC +06:30) Yagoon'), mosHTML::makeOption(7, '(UTC +07:00) Bangkok, Hanoi, Jakarta'), mosHTML::makeOption(8, '(UTC +08:00) Beijing, Perth, Singapore, Hong Kong'), mosHTML::makeOption(8.75, '(UTC +08:45) Western Australia'), mosHTML::makeOption(9, '(UTC +09:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk'), mosHTML::makeOption(9.5, '(UTC +09:30) Adelaide, Darwin, Yakutsk'), mosHTML::makeOption(10, '(UTC +10:00) Eastern Australia, Guam, Vladivostok'), mosHTML::makeOption(10.5, '(UTC +10:30) Lord Howe Island (Australia)'), mosHTML::makeOption(11, '(UTC +11:00) Magadan, Solomon Islands, New Caledonia'), mosHTML::makeOption(11.5, '(UTC +11:30) Norfolk Island'), mosHTML::makeOption(12, '(UTC +12:00) Auckland, Wellington, Fiji, Kamchatka'), mosHTML::makeOption(12.75, '(UTC +12:45) Chatham Island'), mosHTML::makeOption(13, '(UTC +13:00) Tonga'), mosHTML::makeOption(14, '(UTC +14:00) Kiribati'));
    $lists['offset'] = mosHTML::selectList($timeoffset, 'config_offset_user', 'class="inputbox" size="1"', 'value', 'text', $row->config_offset_user);
    // MAIL SETTINGS
    $mailer = array(mosHTML::makeOption('mail', 'PHP mail function'), mosHTML::makeOption('sendmail', 'Sendmail'), mosHTML::makeOption('smtp', 'SMTP Server'));
    $lists['mailer'] = mosHTML::selectList($mailer, 'config_mailer', 'class="inputbox" size="1"', 'value', 'text', $row->config_mailer);
    $lists['smtpauth'] = mosHTML::yesnoRadioList('config_smtpauth', 'class="inputbox"', $row->config_smtpauth);
    // CACHE SETTINGS
    $lists['caching'] = mosHTML::yesnoRadioList('config_caching', 'class="inputbox"', $row->config_caching);
    // USER SETTINGS
    $lists['allowUserRegistration'] = mosHTML::yesnoRadioList('config_allowUserRegistration', 'class="inputbox"', $row->config_allowUserRegistration);
    $lists['useractivation'] = mosHTML::yesnoRadioList('config_useractivation', 'class="inputbox"', $row->config_useractivation);
    $lists['uniquemail'] = mosHTML::yesnoRadioList('config_uniquemail', 'class="inputbox"', $row->config_uniquemail);
    $lists['shownoauth'] = mosHTML::yesnoRadioList('config_shownoauth', 'class="inputbox"', $row->config_shownoauth);
    $lists['frontend_userparams'] = mosHTML::yesnoRadioList('config_frontend_userparams', 'class="inputbox"', $row->config_frontend_userparams);
    // META SETTINGS
    $lists['MetaAuthor'] = mosHTML::yesnoRadioList('config_MetaAuthor', 'class="inputbox"', $row->config_MetaAuthor);
    $lists['MetaTitle'] = mosHTML::yesnoRadioList('config_MetaTitle', 'class="inputbox"', $row->config_MetaTitle);
    // STATISTICS SETTINGS
    $lists['log_searches'] = mosHTML::yesnoRadioList('config_enable_log_searches', 'class="inputbox"', $row->config_enable_log_searches);
    $lists['enable_stats'] = mosHTML::yesnoRadioList('config_enable_stats', 'class="inputbox"', $row->config_enable_stats);
    $lists['log_items'] = mosHTML::yesnoRadioList('config_enable_log_items', 'class="inputbox"', $row->config_enable_log_items);
    // SEO SETTINGS
    $lists['sef'] = mosHTML::yesnoRadioList('config_sef', 'class="inputbox" onclick="javascript: if (document.adminForm.config_sef[1].checked) { alert(\'Remember to rename htaccess.txt to .htaccess\') }"', $row->config_sef);
    $lists['pagetitles'] = mosHTML::yesnoRadioList('config_pagetitles', 'class="inputbox"', $row->config_pagetitles);
    // CONTENT SETTINGS
    $lists['link_titles'] = mosHTML::yesnoRadioList('config_link_titles', 'class="inputbox"', $row->config_link_titles);
    $lists['readmore'] = mosHTML::RadioList($show_hide_r, 'config_readmore', 'class="inputbox"', $row->config_readmore, 'value', 'text');
    $lists['vote'] = mosHTML::RadioList($show_hide_r, 'config_vote', 'class="inputbox"', $row->config_vote, 'value', 'text');
    $lists['hideAuthor'] = mosHTML::RadioList($show_hide, 'config_hideAuthor', 'class="inputbox"', $row->config_hideAuthor, 'value', 'text');
    $lists['hideCreateDate'] = mosHTML::RadioList($show_hide, 'config_hideCreateDate', 'class="inputbox"', $row->config_hideCreateDate, 'value', 'text');
    $lists['hideModifyDate'] = mosHTML::RadioList($show_hide, 'config_hideModifyDate', 'class="inputbox"', $row->config_hideModifyDate, 'value', 'text');
    $lists['hits'] = mosHTML::RadioList($show_hide_r, 'config_hits', 'class="inputbox"', $row->config_hits, 'value', 'text');
    if (is_writable("{$mosConfig_absolute_path}/media/")) {
        $lists['hidePdf'] = mosHTML::RadioList($show_hide, 'config_hidePdf', 'class="inputbox"', $row->config_hidePdf, 'value', 'text');
    } else {
        $lists['hidePdf'] = '<input type="hidden" name="config_hidePdf" value="1" /><strong>Hide</strong>';
    }
    $lists['hidePrint'] = mosHTML::RadioList($show_hide, 'config_hidePrint', 'class="inputbox"', $row->config_hidePrint, 'value', 'text');
    $lists['hideEmail'] = mosHTML::RadioList($show_hide, 'config_hideEmail', 'class="inputbox"', $row->config_hideEmail, 'value', 'text');
    $lists['icons'] = mosHTML::RadioList($show_hide_r, 'config_icons', 'class="inputbox"', $row->config_icons, 'value', 'text');
    $lists['back_button'] = mosHTML::RadioList($show_hide_r, 'config_back_button', 'class="inputbox"', $row->config_back_button, 'value', 'text');
    $lists['item_navigation'] = mosHTML::RadioList($show_hide_r, 'config_item_navigation', 'class="inputbox"', $row->config_item_navigation, 'value', 'text');
    $lists['multipage_toc'] = mosHTML::RadioList($show_hide_r, 'config_multipage_toc', 'class="inputbox"', $row->config_multipage_toc, 'value', 'text');
    $itemid_compat = array(mosHTML::makeOption('11', 'Joomla! 1.0.11 and before'), mosHTML::makeOption('0', 'Joomla! 1.0.12 and after'));
    $lists['itemid_compat'] = mosHTML::selectList($itemid_compat, 'config_itemid_compat', 'class="inputbox" size="1"', 'value', 'text', $row->config_itemid_compat);
    // SHOW EDIT FORM
    HTML_config::showconfig($row, $lists, $option);
}
Exemplo n.º 6
0
function uddeIMadmYesNo($value, $postvar, $condition, $head, $exp, $style='') {
	$tm = new mosHTML();
	echo '<tr align="center" valign="middle">';
	echo '<td align="left" valign="top"'.$style.'>';
	echo uddeIMprintCond($condition, $head, "gray", true);
	echo '</td>';
	echo '<td align="left" valign="top"'.$style.'>';
	$local = Array();
	$local[] = $tm->makeOption( '1', _UDDEADM_YES );
	$local[] = $tm->makeOption( '0', _UDDEADM_NO );
	echo $tm->RadioList( $local, $postvar, 'class="inputbox" size="2"', $value );
	echo '</td>';
	echo '<td align="left" valign="top" width="50%"'.$style.'>';
	echo uddeIMprintCond($condition, $exp, "gray");
	echo '</td>';
	echo '</tr>';
}