Esempio n. 1
0
        $frm = new InputForm("", "post", __('Submit'));
        if (!empty($_GET['edit'])) {
            $frm->addmessage('&lt;&lt;&lt; <a href="' . RCMS_ROOT_PATH . '">' . __('Return to') . ' ' . __('site index') . '</a>');
        } else {
            $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
        }
        $frm->addbreak(__('Menu editing'));
        $frm->hidden('edit', $_REQUEST['edit']);
        $frm->hidden('save', '1');
        if (empty($_GET['edit'])) {
            $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $frm->text_box('id', $_REQUEST['edit']));
        } else {
            $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $_REQUEST['edit'] . $frm->hidden('id', $_REQUEST['edit']));
        }
        $frm->addrow(__('Title'), $frm->text_box('title', $menu[0]));
        $frm->addrow(__('Alignment'), $frm->select_tag('align', array('center' => __('Center'), 'left' => __('Left'), 'right' => __('Right'), 'justify' => __('Justify')), $menu[2]));
        $frm->addrow(__('Text') . tinymce_selector('text') . '<br/>' . __('All HTML is allowed in this field and line breaks will not be transformed to &lt;br&gt; tags!'), $frm->textarea('text', $menu[1], 70, 25), 'top');
        $frm->show();
    } else {
        rcms_showAdminMessage(__('Cannot open menu for editing'));
    }
} else {
    $frm = new InputForm('', 'post', __('Create menu'));
    $frm->hidden('new', '1');
    $frm->show();
    $frm = new InputForm('', 'post', __('Submit'), __('Reset'));
    $frm->addbreak(__('User-Created-Menus'));
    $menus = ucm_list();
    foreach ($menus as $id => $menu) {
        $frm->addrow(__('Menu module') . ': "ucm:' . $id . '", ' . __('Title') . ': ' . $menu[0], $frm->checkbox('delete[' . $id . ']', '1', __('Delete')) . ' ' . $frm->radio_button('edit', array($id => __('Edit'))));
    }
Esempio n. 2
0
    $frm->hidden('ms', '1');
    $frm->hidden('mc', $c);
    $frm->hidden('mb', $b);
    $frm->hidden('ma', $_POST['move']);
    $frm->addrow(__('Select section'), $frm->select_tag('tc', $articles->getContainers(1), $c), 'top');
    $frm->show();
} elseif (!empty($c) && (!empty($b) || $c == '#hidden' || $c == '#root') && !empty($a) && $articles->setWorkContainer($c) && ($article = $articles->getArticle($b, $a, false, true, true, false)) !== false) {
    $categories_list = $articles->getCategories(true, false);
    $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'arted');
    $frm->addbreak(__('Edit article') . ' - ' . $article['title']);
    $frm->hidden('save', '1');
    $frm->hidden('c', $c);
    $frm->hidden('a', $a);
    $frm->hidden('b', $b);
    if ($c !== '#root' && $c !== '#hidden') {
        $frm->addrow(__('Select category'), $frm->select_tag('nb', $categories_list, $article['catid']), 'top');
    }
    $frm->addrow(__('Title'), $frm->text_box('title', $article['title']), 'top');
    $frm->addrow(__('Author/source'), $frm->text_box('source', $article['src']), 'top');
    $frm->addrow(__('Keywords'), $frm->text_box('keywords', @$article['keywords']), 'top');
    $frm->addrow(__('Description for search engines'), $frm->text_box('sef_desc', @$article['sef_desc']), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('arted.description'));
    $frm->addrow(__('Short description') . '<br />' . tinymce_selector('description', false), $frm->textarea('description', $article['desc'], 70, 5), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('arted.text'));
    $frm->addrow(__('Text') . '<br />' . tinymce_selector('text', false), $frm->textarea('text', $article['text'], 70, 25), 'top');
    $files = rcms_scandir(FILES_PATH);
    //Start Insert list uploaded files
    $key_thumb = array_search('_thumb', $files);
    if ($key_thumb !== FALSE) {
        unset($files[$key_thumb]);
    }
Esempio n. 3
0
         $cells .= wf_TableCell($content);
         $content = wf_Link("?module=freeradius&netid={$netid}&edit=" . $result['id'], web_edit_icon());
         $content .= wf_JSAlert("?module=freeradius&netid={$netid}&delete=" . $result['id'], web_delete_icon(), 'Are you serious');
         $cells .= wf_TableCell($content);
         $rows .= wf_TableRow($cells, 'row3');
     }
 }
 /* Кнопка "Назад" */
 $html .= wf_Link("?module=multinet", __('Back'), false, 'ubButton');
 // Форма добавления нового атрибута
 $form = new InputForm('', 'POST', __('Save'), '', '', '', 'add');
 //  - Сценарий
 $content = $form->radio_button('add[scenario]', $scenarios, 'check');
 $form->addrow(__('Scenario'), $content);
 //  - Сервис (disabled)
 $content = $form->select_tag('add[netid]', getServiceIdDesc(), $netid, 'disabled');
 $content .= $form->checkbox('add[login]', '*', __('Foreach'), '');
 $form->addrow(__('Service'), $content);
 //  - Атрибут
 $content = $form->text_box('add[Attribute]', '');
 $form->addrow(__('Attribute'), $content);
 //  - Оператор
 $content = $form->select_tag('add[op]', $operators, '');
 $form->addrow(__('op'), $content);
 //  - Значение
 $content = $form->text_box('add[Value]', '');
 $form->addrow(__('Value'), $content);
 /* Кнопка модального окна с формой добавления нового атрибута */
 $html .= wf_modal(__('Append'), __('Adding of RADIUS-attribute'), $form->show(1), 'ubButton', 450, 275);
 // Форма переопределения атрибута 'User-Name'
 $query = "SELECT `value` FROM `radius_reassigns` WHERE `netid` = '{$netid}'";
Esempio n. 4
0
        $frm->addrow(__('You entered filename of file uploaded through upload interface'), $frm->select_tag('files', $files, '0', ' onClick="selChange(this.form)"') . '&nbsp;&nbsp;&nbsp;' . __('Add link to file'), 'top');
    }
    $frm->show();
} elseif (!empty($_POST['cid'])) {
    $frm = new InputForm('', 'post', '&lt;&lt;&lt; ' . __('Back'));
    $frm->show();
    $frm = new InputForm('', 'post', __('New file'));
    $frm->hidden('new', $_POST['cid']);
    $frm->show();
    if (!empty($filesdb->data[$_POST['cid'] - 1]['files'])) {
        $frm = new InputForm('', 'post', __('Submit'), __('Reset'));
        $frm->hidden('cid', $_POST['cid']);
        foreach ($filesdb->data[$_POST['cid'] - 1]['files'] as $fid => $fdata) {
            $frm->addrow($fdata['link'] . '<br/>' . $fdata['name'] . ' (' . $fdata['desc'] . '). ' . __('Size of file') . ': ' . $fdata['size'], $frm->checkbox('delete[' . $fid . ']', '1', __('Delete')) . ' ' . $frm->radio_button('edit', array($fid + 1 => __('Edit')), 0), 'top');
        }
        $frm->show();
    }
} else {
    $clist = array();
    foreach ($filesdb->data as $cid => $cdata) {
        $clist[$cid + 1] = $cdata['name'];
    }
    if (!empty($clist)) {
        $frm = new InputForm('', 'post', __('Browse'));
        $frm->addrow(__('Select category'), $frm->select_tag('cid', $clist));
        $frm->show();
    } else {
        rcms_showAdminMessage(__('There is no categories of files'));
    }
}
$filesdb->close();
Esempio n. 5
0
        $frm->addrow(__('Look at') . '&nbsp;<a href="sitemap.xml" target="_blank"> sitemap.xml  </a> ');
    }
    $frm->addrow(__('Sitemap will be created for all news (except hidden).') . '<br/><a href="http://www.google.com/support/webmasters/bin/answer.py?answer=40318&topic=13450">' . __('Read more about Google Sitemap') . '</a>.<br/><a href="http://www.google.com/webmasters/">' . __('Register here') . '</a>.<br/>');
    $frm->addbreak(__('Configuration') . ' robots.txt');
    $frm->hidden('create', '1');
    $frm->addrow(__('Content of') . ' robots.txt', $frm->textarea('robots_txt', @file_get_contents(RCMS_ROOT_PATH . 'robots.txt'), 80, 10), 'top');
    $frm->addrow(__('Build new') . ' robots.txt. ', $frm->checkbox('robots', 'true', __('Check if you build robots.txt first time'), false));
    $frm->addbreak(__('Configuration') . ' sitemap');
    $frm->addrow(__('Content of') . ' sitemap.dat<br/><br/>' . __('Add new urls to') . ' sitemap.xml:<br/><br/>(' . __('Example') . ')<br/> index.htm <br/> default.htm<br/> uploads/price.zip<br/>', $frm->textarea('sitemap_dat', @file_get_contents(DF_PATH . 'sitemap.dat'), 80, 10), 'top');
    $sitemap = new SitemapGenerator($directory);
    //Include all sitemap modules in current directory, except 'module.php'&'sitemap.php'
    $modules = rcms_scandir(dirname(__FILE__) . '/sitemap/');
    foreach ($modules as $file) {
        if (basename($file) != 'module.php' and basename($file) != 'sitemap.php') {
            $module = str_replace('.php', '', $file);
            if (isset($config[$module])) {
                $prio = $config[$module]['priority'];
                $chfr = $config[$module]['changefreq'];
            } else {
                $prio = '0.5';
                $chfr = 'weekly';
            }
            include_once 'sitemap/' . $file;
            $frm->addrow($name_module, $frm->checkbox('names[]', $module, __('Add'), @$config[$module]) . '&nbsp;&nbsp;&nbsp;' . $frm->select_tag('priority[' . $module . ']', $priority, $prio) . __('Priority') . '&nbsp;&nbsp;&nbsp;' . $frm->select_tag('changefreq[' . $module . ']', $changefreq, $chfr) . __('Changefreq'));
        }
    }
    $frm->addrow(__('Pack file to') . '&nbsp;sitemap.xml.gz', $frm->checkbox('gz', '1', __('Build new'), true));
    $frm->addrow(__('Send to search engines') . '&nbsp;sitemap.xml.gz', $frm->checkbox('engines', '1', __('Enable'), true));
    $frm->addrow(__('Filename'), $frm->text_box('filename', 'sitemap.xml'));
    $frm->show();
}
    $frm->hidden('newsave', '1');
    $frm->addrow('<abbr title="' . $lang['general']['ucm']['id_h'] . '">' . $lang['general']['ucm']['id'] . '</abbr>', $frm->text_box('id', ''));
    $frm->addrow('<abbr title="' . $lang['general']['ucm']['title_h'] . '">' . $lang['general']['ucm']['title'] . '</abbr>', $frm->text_box('title', ''));
    $frm->addrow($lang['general']['alignment'], $frm->select_tag('align', $lang['general']['align']));
    $frm->addrow($lang['general']['ucm']['text'] . '<br>' . $lang['general']['ucm']['text_h'], $frm->textarea('text', '', 70, 25), 'top');
    $frm->show();
} elseif (!empty($_POST['edit'])) {
    if ($menu = ucm_get($_POST['edit'])) {
        $frm = new InputForm("", "post", $lang['general']['submit']);
        $frm->addmessage('<a href="">&lt;&lt;&lt; ' . $lang['general']['back'] . '</a>');
        $frm->addbreak($lang['admincp']['general']['ucm']['edit']);
        $frm->hidden('edit', $_POST['edit']);
        $frm->hidden('save', '1');
        $frm->addrow('<abbr title="' . $lang['general']['ucm']['id_h'] . '">' . $lang['general']['ucm']['id'] . '</abbr>', $frm->text_box('id', $_POST['edit']));
        $frm->addrow('<abbr title="' . $lang['general']['ucm']['title_h'] . '">' . $lang['general']['ucm']['title'] . '</abbr>', $frm->text_box('title', $menu[0]));
        $frm->addrow($lang['general']['alignment'], $frm->select_tag('align', $lang['general']['align'], $menu[2]));
        $frm->addrow($lang['general']['ucm']['text'] . '<br>' . $lang['general']['ucm']['text_h'], $frm->textarea('text', $menu[1], 70, 25), 'top');
        $frm->show();
    } else {
        rcms_showAdminMessage($lang['results']['general'][8]);
    }
} else {
    $frm = new InputForm('', 'post', $lang['general']['createucm']);
    $frm->hidden('new', '1');
    $frm->show();
    $frm = new InputForm("", "post", $lang['general']['submit']);
    $frm->resetButton($lang['general']['reset']);
    $frm->addbreak($lang['admincp']['general']['ucm']['title']);
    $menus = ucm_list();
    foreach ($menus as $id => $menu) {
        $frm->addrow($lang['general']['ucm']['id'] . ': ' . $id . ', ' . $lang['general']['ucm']['title'] . ': ' . $menu[0], $frm->checkbox('delete[' . $id . ']', '1', $lang['general']['delete']) . ' ' . $frm->radio_button('edit', array($id => $lang['general']['edit'])));
Esempio n. 7
0
        $avaible_modules[$module] = $module_data['title'];
    }
}
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Site configuration'));
$frm->addrow(__('Your site\'s title'), $frm->text_box("nconfig[title]", $config['title'], 40));
$frm->addrow(__('Do not show sitename in title'), $frm->checkbox('nconfig[hide_title]', '1', '', @$config['hide_title']));
$frm->addrow(__('Your site\'s URL') . '<br />' . __('Leave empty for autodetect'), $frm->text_box("nconfig[site_url]", $config['site_url'], 40));
$frm->addrow(__('Copyright for your content'), $frm->text_box("nconfig[copyright]", @$config['copyright'], 60));
$frm->addrow(__('Enable RSS'), $frm->checkbox('nconfig[enable_rss]', '1', '', @$config['enable_rss']));
$frm->addrow(__('Enable logging'), $frm->checkbox('nconfig[logging]', '1', '', @$config['logging']));
$frm->addrow(__('Enable IDS (logging must be enabled)'), $frm->checkbox('nconfig[enable_ids]', '1', '', @$config['enable_ids']));
$frm->addrow(__('Number of element that will be considered as latest'), $frm->text_box('nconfig[num_of_latest]', @$config['num_of_latest']));
$frm->addrow(__('Number of elements per page'), $frm->text_box('nconfig[perpage]', @$config['perpage']));
$frm->addrow(__('Module on index page'), $frm->select_tag('nconfig[index_module]', $avaible_modules, @$config['index_module']));
$frm->addrow(__('Hide welcome message'), $frm->checkbox('nconfig[wmh]', '1', '', @$config['wmh']));
$frm->addrow(__('Text of Welcome message'), $frm->textarea('welcome_mesg', file_get_contents(DATA_PATH . 'intro.html'), 80, 10), 'top');
$frm->addrow(__('Additional meta tags for your site'), $frm->textarea('meta_tags', file_get_contents(DATA_PATH . 'meta_tags.html'), 80, 5), 'top');
$frm->addbreak(__('Interaction with user'));
$frm->addrow(__('Disallow guest post to Articles'), $frm->checkbox('nconfig[article-guest]', '1', '', @$config['article-guest']));
$frm->addrow(__('Disallow guest post comments to Guestbook'), $frm->checkbox('nconfig[guestbook-guest]', '1', '', @$config['guestbook-guest']));
$frm->addrow(__('Disallow guest post comments to Gallery'), $frm->checkbox('nconfig[gallery-guest]', '1', '', @$config['gallery-guest']));
$frm->addrow(__('Disallow guest post to Forum'), $frm->checkbox('nconfig[forum-guest]', '1', '', @$config['forum-guest']));
$frm->addrow(__('Disallow user selection of password in registration form'), $frm->checkbox('nconfig[regconf]', '1', '', @$config['regconf']));
$frm->addrow(__('Period when one password request can be acomplished (seconds)'), $frm->text_box('nconfig[pr_flood]', @$config['pr_flood']));
$frm->addrow(__('Access level for registered users'), $frm->text_box('nconfig[registered_accesslevel]', @$config['registered_accesslevel']));
$frm->addrow(__('Try to detect user\'s language'), $frm->checkbox('nconfig[detect_lang]', '1', '', @$config['detect_lang']));
$frm->addrow(__('Default skin'), user_skin_select(SKIN_PATH, 'nconfig[default_skin]', $config['default_skin']));
$frm->addrow(__('Allow users to select skin'), $frm->checkbox('nconfig[allowchskin]', '1', '', @$config['allowchskin']));
$frm->addrow(__('Default language'), user_lang_select('nconfig[default_lang]', $config['default_lang']));
Esempio n. 8
0
		});
		</script>
			<?php 
        }
        $frm->addrow(__('Mode'), $frm->select_tag('mode', array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'), 'php' => __('PHP')), $page['mode'], 'onchange="if (this.options[selectedIndex].value==\'html\') { 	
		tinyMCE.init({
		mode : \'exact\',
		elements : \'text\',
		theme : \'advanced\',
		language : \'ru\',
        plugins : \'paste,table\',
        theme_advanced_buttons2_add : \'pastetext,pasteword,selectall\',
        theme_advanced_buttons3_add : \'tablecontrols\',
		theme_advanced_toolbar_location : \'top\',
        theme_advanced_toolbar_align : \'left\',
        theme_advanced_statusbar_location : \'bottom\',
        theme_advanced_resizing : true,
        paste_auto_cleanup_on_paste : true,
		content_css: \'/css/tinymce.css\',
		extended_valid_elements : \'script[type|language|src]\',
		forced_root_block : \'\', 
		force_br_newlines : true,
		force_p_newlines : false
		});
		$(\'table.bb_editor\').hide();} else {
		tinyMCE.get(\'text\').hide();
		$(\'table.bb_editor\').show();
		}"'), 'top');
        $frm->addrow(__('Date') . ' (yyyy-mm-dd hh:mm:ss)', $frm->text_box('date', gmdate("Y-m-d H:i:s", $page['date'])), 'top');
        $frm->show();
    } else {
        rcms_showAdminMessage(__('Cannot open menu for editing'));
    $frm->addrow($lang['files']['link'], $frm->text_box('link', $filesdb[$cid]['files'][$fid]['link']));
    $frm->addrow($lang['files']['type'], $frm->select_tag('type', $lang['files']['types']));
    $frm->show();
} elseif (!empty($_POST['cid'])) {
    $frm = new InputForm('', 'post', '&lt;&lt;&lt; ' . $lang['general']['back']);
    $frm->show();
    $frm = new InputForm('', 'post', $lang['files']['addfile']);
    $frm->hidden('new', $_POST['cid']);
    $frm->show();
    if (!empty($filesdb[$_POST['cid'] - 1]['files'])) {
        $frm = new InputForm('', 'post', $lang['general']['submit']);
        $frm->resetButton($lang['general']['reset']);
        $frm->hidden('cid', $_POST['cid']);
        foreach ($filesdb[$_POST['cid'] - 1]['files'] as $fid => $fdata) {
            $frm->addrow($fdata['link'] . '<br>' . $fdata['name'] . ' (' . $fdata['desc'] . '). ' . $lang['files']['filesize'] . $fdata['size'], $frm->checkbox('delete[' . $fid . ']', '1', $lang['general']['delete']) . ' ' . $frm->radio_button('edit', array($fid => $lang['general']['edit']), 0), 'top');
        }
        $frm->show();
    }
} else {
    $clist = array();
    foreach ($filesdb as $cid => $cdata) {
        $clist[$cid + 1] = $cdata['name'];
    }
    if (!empty($clist)) {
        $frm = new InputForm('', 'post', $lang['admincp']['browse']);
        $frm->addrow($lang['files']['browsecat'], $frm->select_tag('cid', $clist));
        $frm->show();
    } else {
        rcms_showAdminMessage($lang['files']['nocats']);
    }
}
Esempio n. 10
0
        theme_advanced_statusbar_location : \'bottom\',
        theme_advanced_resizing : true,
        paste_auto_cleanup_on_paste : true,
		content_css: \'/css/tinymce.css\',
		extended_valid_elements : \'script[type|language|src]\',
		forced_root_block : \'\', 
		force_br_newlines : true,
		force_p_newlines : false
		});
		$(\'table.bb_editor\').hide();
		$(\'a.clr_txt\').hide();
		} else {
		tinyMCE.get(\'description\').hide();
		tinyMCE.get(\'text\').hide();
		$(\'table.bb_editor\').show();
		$(\'a.clr_txt\').show();
		}"'), 'top');
                $frm->addrow(__('Allow comments'), $frm->radio_button('comments', array('yes' => __('Allow'), 'no' => __('Disallow')), 'yes'), 'top');
                $result = $frm->show(true);
            }
        } else {
            show_error($articles->last_error);
        }
    } else {
        $frm = new InputForm('', 'post', __('Submit'));
        $frm->addrow(__('Select section'), $frm->select_tag('c', $articles->getContainers(2)), 'top');
        $result = $frm->show(true);
    }
    show_window(__('Post article'), $result, 'center');
    $system->config['pagename'] = __('Post article');
}
$work_dir = articles_get_work_dir($null);
if (!empty($work_dir) && $work_dir != ARTICLES_PATH) {
    rcms_showAdminMessage($lang['results']['articles'][8] . $work_dir);
}
////////////////////////////////////////////////////////////////////////////////
// Perform article posting                                                    //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['a_category'])) {
    $res = articles_save($_POST['a_category'], 0, @$_POST['a_title'], @$_POST['a_src'], @$_POST['a_description'], @$_POST['a_text'], @$_POST['a_mode'], @$_POST['a_comments'], $work_dir);
    rcms_showAdminMessage($lang['results']['articles'][$res]);
}
////////////////////////////////////////////////////////////////////////////////
// Interface generation                                                       //
////////////////////////////////////////////////////////////////////////////////
$categories_list = articles_get_categories_list(true, false, $work_dir);
if (!empty($categories_list)) {
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data', 'artadd');
    $frm->addbreak($lang['admincp']['articles']['create']['full']);
    $frm->addrow($lang['articles']['categ'], $frm->select_tag('a_category', $categories_list), 'top');
    $frm->addrow($lang['articles']['subj'], $frm->text_box('a_title', ''), 'top');
    $frm->addrow($lang['articles']['author'], $frm->text_box('a_src', ''), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.artadd.a_description'));
    $frm->addrow($lang['articles']['desc'], $frm->textarea('a_description', '', 70, 5), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.artadd.a_text'));
    $frm->addrow($lang['articles']['text'], $frm->textarea('a_text', '', 70, 25), 'top');
    $frm->addrow($lang['articles']['mode'], $frm->radio_button('a_mode', $lang['articles']['modes'], 'text'), 'top');
    $frm->addrow($lang['articles']['allowcomments'], $frm->radio_button('a_comments', array('yes' => $lang['admincp']['allow'], 'no' => $lang['admincp']['disallow']), 'yes'), 'top');
    $frm->show();
} else {
    rcms_showAdminMessage($lang['results']['articles'][9]);
}
Esempio n. 12
0
    rcms_showAdminMessage(__('Configuration updated'));
}
$file = file_get_contents(CONFIG_PATH . 'articles.ini');
if (substr($file, 0, 2) != 'a:') {
    $articles->config = parse_ini_file(CONFIG_PATH . 'articles.ini');
} else {
    $articles->config = unserialize($file);
}
$config =& $articles->config;
// Interface generation
$frm = new InputForm('', 'post', __('Submit'), '', '', '', 'mainfrm');
//Containers configuration
$frm->addbreak(__('Containers'));
$articles = new articles();
$containers = $articles->getContainers(0);
$frm->addrow(__('News container ID'), $frm->text_box('nconfig[news]', @$config['news'], 24) . $frm->select_tag('files', $containers, @$config['news'], ' onchange="$(\'input[name=\\\'nconfig[news]\\\']\').val(this.value);"'), 'top');
$frm->addrow(__('Section') . ' ' . __('Most readable articles'), $frm->text_box('nconfig[rpop]', @$config['rpop'], 24) . $frm->select_tag('files', $containers, @$config['rpop'], ' onchange="$(\'input[name=\\\'nconfig[rpop]\\\']\').val(this.value);"'), 'top');
$frm->addrow(__('Section') . ' ' . __('Most commented articles'), $frm->text_box('nconfig[cpop]', @$config['cpop'], 24) . $frm->select_tag('files', $containers, @$config['cpop'], ' onchange="$(\'input[name=\\\'nconfig[cpop]\\\']\').val(this.value);"'), 'top');
$frm->addrow(__('Section') . ' ' . __('Recently commented articles'), $frm->text_box('nconfig[lcmt]', @$config['lcmt'], 24) . $frm->select_tag('files', $containers, @$config['lcmt'], ' onchange="$(\'input[name=\\\'nconfig[lcmt]\\\']\').val(this.value);"'), 'top');
//Categories configuration
$frm->addbreak(__('Categories'));
//Views counter configuration
$frm->addrow(__('Count and show views'), $frm->checkbox('nconfig[count_views]', '1', __('Enable'), @$config['count_views']));
//Comment counter configuration
$frm->addrow(__('Count and show comments'), $frm->checkbox('nconfig[count_comments]', '1', __('Enable'), @$config['count_comments']));
//Show date configuration
$frm->addrow(__('Date'), $frm->checkbox('nconfig[show_date]', '1', __('Show'), @$config['show_date']));
//Show author configuration
$frm->addrow(__('Author'), $frm->checkbox('nconfig[show_author]', '1', __('Show'), @$config['show_author']));
//Articles configuration
$frm->addbreak(__('Articles'));
Esempio n. 13
0
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['lightbox_config'])) {
    file_write_contents(CONFIG_PATH . 'lightbox.ini', serialize($_POST['lightbox_config']));
    rcms_showAdminMessage(__('Configuration updated'));
}
$lightbox_config = unserialize(@file_get_contents(CONFIG_PATH . 'lightbox.ini'));
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Javascript'));
$frm->addrow(__('Editor') . '<br/> elements : \'{textarea}\',', $frm->textarea('lightbox_config[editor]', @$lightbox_config['editor'], 60, 10));
$frm->addbreak(__('Automatic resizing image (lightbox effect)'));
$frm->addrow(__('Code') . '<br/> (class="gallery")', $frm->textarea('lightbox_config[code]', @$lightbox_config['code'], 60, 10));
$frm->addrow(__('Gallery'), $frm->checkbox('lightbox_config[gallery]', '1', '  ' . __('Add'), @$lightbox_config['gallery']));
$frm->addrow(__('Width single image in gallery (pixels)'), $frm->text_box('lightbox_config[gal_width]', @$lightbox_config['gal_width'], 5));
$frm->addrow(__('Articles') . __(' and comments (add by [img] tag)'), $frm->checkbox('lightbox_config[articles]', '1', '  ' . __('Add'), @$lightbox_config['articles']));
$frm->addrow(__('Width image in articles and comments (pixels)'), $frm->text_box('lightbox_config[width]', @$lightbox_config['width'], 5));
$frm->addbreak(__('Change uploaded images'));
$frm->addrow(__('Change uploaded images'), $frm->checkbox('lightbox_config[change_enable]', '1', '  ' . __('Enable'), @$lightbox_config['change_enable']));
$frm->addrow(__('Size of file'), $frm->text_box('lightbox_config[max_size]', @$lightbox_config['max_size'], 5) . ' Mb');
$frm->addrow(__('Maximum width'), $frm->text_box('lightbox_config[max_width]', @$lightbox_config['max_width'], 5) . ' px');
$frm->addrow(__('Maximum height'), $frm->text_box('lightbox_config[max_height]', @$lightbox_config['max_height'], 5) . ' px');
$frm->addrow(__('Watermark'), $frm->text_box('lightbox_config[watermark]', @$lightbox_config['watermark'], 35));
$frm->addbreak(__('Users'));
$lightbox_config['right_string'] = empty($lightbox_config['right_string']) ? 'GENERAL' : $lightbox_config['right_string'];
$right = array('GENERAL' => __('Administrator') . ' -' . __(' as default'), '-any-' => 'Advanced user', 'LOGGED_IN' => 'Only for registered users');
$frm->addrow(__('Right to upload images'), $frm->checkbox('lightbox_config[manage_enable]', '1', '  ' . __('Enable'), @$lightbox_config['manage_enable']) . ' ' . $frm->select_tag('lightbox_config[right_string]', $right, $lightbox_config['right_string']));
$folders = array('0' => 'Disable', 'user' => 'User', 'user_year' => __('User') . '/' . __('Year'), 'user_year_month' => __('User') . '/' . __('Year') . '/' . __('Month'), 'year' => __('Year'), 'year_month' => __('Year') . '/' . __('Month'));
$frm->addrow(__('Distribute images to subfolders'), $frm->checkbox('lightbox_config[distribute_enable]', '1', '  ' . __('Enable'), @$lightbox_config['distribute_enable']) . ' ' . $frm->select_tag('lightbox_config[folders]', $folders, $lightbox_config['folders']));
$frm->addrow(__('Make unique image name'), $frm->checkbox('lightbox_config[unique]', '1', '  ' . __('Enable'), @$lightbox_config['unique']));
$frm->addrow(__('Close by clicking'), $frm->checkbox('lightbox_config[close_by_clicking]', '1', '  ' . __('Enable'), @$lightbox_config['close_by_clicking']));
$frm->show();
Esempio n. 14
0
    if ($module !== 'pm') {
        if ($module !== 'smiles') {
            if ($module !== 'search.result') {
                $avaible_modules[$module] = $module_data['title'];
            }
        }
    }
}
foreach ($links as $link) {
    $tmp = explode(':', $link['url'], 2);
    $checked = $tmp[0] == 'external';
    if ($checked) {
        $link['url'] = $tmp[1];
    }
    $frm->addrow($frm->text_box('urls[' . $i . ']', $link['url']), '&nbsp;&darr;&uarr;&nbsp;' . $frm->text_box('names[' . $i . ']', $link['name'], 20) . '&nbsp;' . $frm->checkbox('ext[' . $i . ']', '1', __('Open in new window') . '&nbsp;&nbsp;', $checked) . $frm->select_tag('modules', $avaible_modules, -1, 'onChange="
document.addnav[\'' . 'urls[' . $i . ']' . '\'].value = \'module:\'+ this.value;
">\\n
	<option value="">' . __('Add link to module') . '</option') . '<img src="' . IMAGES_PATH . 'skins/neok.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;" onClick="$($(this).parents(\'tr\').get(0)).remove();">');
    $i++;
}
$frm->addrow($frm->text_box('urls[' . $i . ']', ''), '&nbsp;&darr;&uarr;&nbsp;' . $frm->text_box('names[' . $i . ']', '', 20) . '&nbsp;' . $frm->checkbox('ext[' . $i . ']', '1', __('Open in new window') . '&nbsp;&nbsp;') . $frm->select_tag('modules', $avaible_modules, -1, 'onChange="
document.addnav[\'' . 'urls[' . $i . ']' . '\'].value = \'module:\'+ this.value;
">\\n
	<option value="">' . __('Add link to module') . '</option'));
$frm->addmessage(__('If you want to remove link leave it\'s URL empty. If you want to add new item fill in the last row.'));
$frm->addmessage(__('You can use modifiers to create link to specified part of your site. Type MODIFIER:OPTIONS in "Link" column. If you want to override default title of modified link you must enter your title to "Title" column, or leave it empty to use default one. Here is a list of modifiers:'));
foreach ($system->navmodifiers as $modifier => $options) {
    $frm->addrow($modifier, call_user_func($system->navmodifiers[$modifier]['h']));
}
$frm->show();
?>
<script type="text/javascript">