示例#1
0
        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'))));
    }
    $frm->show();
示例#2
0
            $dfile = $help_dir . '/' . get('delete');
            if (rcms_delete_files($dfile)) {
                show_window(__('Result'), __('File removed'));
            } else {
                show_window(__('Result'), __('Error occurred') . ':' . $dfile);
            }
        }
        if (!empty($_POST['save']) && !empty($module)) {
            file_write_contents($file, $_POST['help_edit']);
            show_window(__('Result'), __('File updated') . '. ' . __('Show') . ' — ' . show_help($module));
        }
        if (!empty($module)) {
            $result = file_exists($file) ? file_get_contents($file) : '';
            $frm = new InputForm('', 'post', __('Submit'));
            $frm->hidden('save', '1');
            $frm->addrow('', $frm->textarea('help_edit', $result, 55, 15) . tinymce_selector('help_edit'), 'top');
            $result = $frm->show(true);
            show_window(__('Help') . ' ' . __('for the module') . ' ' . get('edit') . ': ' . __('Edit'), $result, 'center');
        } else {
            $files = rcms_scandir($help_dir);
            if (!empty($files)) {
                $result = '<table width="100%">';
                foreach ($files as $helpfile) {
                    $admin_link = '
	<a href="?module=help&edit=' . $helpfile . '"><img title="' . __('Edit') . '" src="' . IMAGES_PATH . 'skins/edit_small.gif"></a>
	<a href="#" onClick="if(confirm(\'' . __('Delete') . ': \\n' . str_replace('"', '&#8243;', $helpfile) . '?\\n\')) document.location.href = \'?module=help&delete=' . $helpfile . '\'">
	<img title="' . __('Delete') . '" src="' . IMAGES_PATH . 'skins/trash_small.gif">
	</a>
	';
                    $result .= '<tr><td class="row2" align="left" valign="top">' . $helpfile . '</td><td class="row3" align="left" valign="top">' . $admin_link . '</td></tr>';
                }
示例#3
0
    $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]);
    }
    if (!empty($files)) {
        $frm->addrow(__('Add link to file'), $frm->select_tag('files', $files, -1, 'onChange="selChange(this.form)">\\n
	<option value="-1">' . __('Select file') . '</option') . '&nbsp;&nbsp;&nbsp;' . __('You entered filename of file uploaded through upload interface'), 'top');
    }
    //End Insert list uploaded files
    if ($system->checkForRight('GENERAL')) {
        $arr_modes = array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'), 'php' => __('PHP'));
    } else {
        $arr_modes = array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'));
示例#4
0
//Site configuration
$frm->addbreak(__('Site configuration'));
$frm->addrow(__('Your site\'s title'), $frm->text_box("nconfig[title]", @$config['title'], 60));
$frm->addrow(__('Your site\'s slogan'), $frm->text_box("nconfig[slogan]", @$config['slogan'], 60));
$frm->addrow(__('Admin file'), $frm->text_box("nconfig[admin_file]", empty($config['admin_file']) ? 'admin.php' : $config['admin_file'], 15));
$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') . tinymce_selector('welcome_mesg'), $frm->textarea('welcome_mesg', file_get_contents(DATA_PATH . 'intro.html'), 70, 20), 'top');
$frm->addrow(__('Additional meta tags for your site'), $frm->textarea('meta_tags', file_get_contents(DATA_PATH . 'meta_tags.html'), 70, 5), 'top');
$frm->addrow(__('Add to external link') . '.<br /> ' . __('Example') . ": rel='nofollow' class='external'", $frm->text_box('nconfig[addtolink]', @$config['addtolink']));
//Redirect
$add_redirect = '<div>+' . __(' from ') . "<input type=\\'text\\' name=\\'redirect[from_arr][]\\' size=\\'35\\' />*" . __(' to ') . "<input type=\\'text\\' name=\\'redirect[to_arr][]\\' size=\\'35\\'/>*" . "<img src=\\'" . IMAGES_PATH . "skins/neok.gif\\' title=\\'" . __('Delete') . "\\' style=\\'cursor:pointer;display:table-cell;vertical-align:middle;\\' onClick=\\'\$(\$(this).parents().get(0)).remove();\\'>" . '</div>';
$frm->addbreak(__('Redirect') . '&nbsp;&nbsp;&nbsp;<img onClick="$(\'#add_redirect\').append(\'' . $add_redirect . '\');" title="' . __('Add') . '" src="' . IMAGES_PATH . 'skins/plus.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;"/>');
if (!empty($redirect['from_arr'])) {
    foreach ($redirect['from_arr'] as $i => $value) {
        if (!empty($redirect['from_arr'][$i])) {
            $frm->addrow(__(' from ') . ' ' . $frm->text_box('redirect[from_arr][]', @$redirect['from_arr'][$i], 35), __(' to ') . $frm->text_box('redirect[to_arr][]', @$redirect['to_arr'][$i], 35) . '<img src="' . IMAGES_PATH . 'skins/neok.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;" onClick="$($(this).parents(\'tr\').get(0)).remove();">');
        }
    }
}
$frm->addmessage('<div id="add_redirect"></div>');
//Performance
$frm->addbreak(__('Performance'));