Esempio n. 1
0
    $frm->addrow(__('Title'), $frm->text_box('ctitle', ''));
    $frm->addrow(rcms_show_bbcode_panel('mainfrm.cdesc'));
    $frm->addrow(__('Description'), $frm->textarea('cdesc', '', 70, 5), 'top');
    $frm->addrow(__('Minimum access level'), $frm->text_box('clevel', '0'));
    $frm->show();
} elseif (!empty($_POST['edit'])) {
    if (!empty($filesdb->data[$_POST['edit'] - 1])) {
        $category =& $filesdb->data[$_POST['edit'] - 1];
        $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'mainfrm');
        $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
        $frm->addbreak(__('Edit category'));
        $frm->hidden('save', '1');
        $frm->hidden('edit', $_POST['edit']);
        $frm->addrow(__('Title'), $frm->text_box('ctitle', $category['name']));
        $frm->addrow(rcms_show_bbcode_panel('mainfrm.cdesc'));
        $frm->addrow(__('Description'), $frm->textarea('cdesc', $category['desc'], 70, 5), 'top');
        $frm->addrow(__('Minimum access level'), $frm->text_box('clevel', @$category['accesslevel']));
        $frm->show();
    } else {
        rcms_showAdminMessage(__('Error occurred'));
    }
} else {
    $frm = new InputForm('', 'post', __('Add category'));
    $frm->hidden('new', '1');
    $frm->show();
    $frm = new InputForm('', 'post', __('Submit'), __('Reset'));
    if (!empty($filesdb->data)) {
        foreach ($filesdb->data as $cid => $cdata) {
            $frm->addrow($cdata['name'] . ': ' . __('Files in category') . ': ' . sizeof($cdata['files']), $frm->checkbox('delete[' . $cid . ']', '1', __('Delete')) . ' ' . $frm->radio_button('edit', array($cid + 1 => __('Edit')), 0));
        }
    }
Esempio n. 2
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();
Esempio n. 3
0
//   http://reloadcms.sf.net                                                  //
//                                                                            //
//   This program is distributed in the hope that it will be useful,          //
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['send'])) {
    $_list = explode(',', $_POST['to']);
    $list = array();
    foreach ($_list as $user_mask) {
        $user_mask = trim($user_mask);
        $users = user_get_list($user_mask);
        foreach ($users as $userdata) {
            $list[] = $userdata['email'];
        }
    }
    if (!empty($list) && !empty($_POST['subj']) && !empty($_POST['body'])) {
        $to = implode(';', $list);
        rcms_send_mail($to, $system->user['email'], $system->user['nickname'], $system->config['encoding'], $_POST['subj'], $_POST['body']);
    }
}
// Interface generation
$frm = new InputForm('', 'post', __('Send e-mail'));
$frm->addbreak(__('Send e-mail'));
$frm->hidden('send', '1');
$frm->addrow(__('Users') . '<br>' . __('You can use * in names and divide names by comma.'), $frm->text_box('to', '*', 60));
$frm->addrow(__('Subject'), $frm->text_box('subj', '', 60));
$frm->addrow(__('Body'), $frm->textarea('body', '', 60, 10));
$frm->show();
Esempio n. 4
0
    $time2 = explode(" ", microtime());
    $time2 = $time2[1];
    $result .= '<br/>' . __('Execution time: ') . number_format($time2 - $time) . "s<br/>";
    $result .= __('Done') . '<br/>';
    $result .= __('Look at') . '&nbsp;<a href="' . $_POST['filename'] . '" target="_blank"> sitemap.xml  </a> &nbsp;<br/>';
    rcms_showAdminMessage($result);
} else {
    $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'mainfrm');
    $frm->addbreak(__('Information') . ' sitemap');
    if (is_file(RCMS_ROOT_PATH . 'sitemap.xml')) {
        $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';
Esempio n. 5
0
//   http://reloadcms.sf.net                                                  //
//                                                                            //
//   This program is distributed in the hope that it will be useful,          //
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['poll_new'])) {
    rcms_showAdminMessage($lang['results']['polls'][poll_create($_POST['poll_question'], $_POST['poll_variants'])]);
}
if (!empty($_POST['rmpoll'])) {
    rcms_showAdminMessage($lang['results']['polls'][poll_remove()]);
}
if (!poll_is_running()) {
    $frm = new InputForm("", "post", $lang['general']['submit']);
    $frm->addbreak($lang['admincp']['poll']['poll']['new']);
    $frm->hidden('poll_new', '1');
    $frm->addrow($lang['poll']['question'], $frm->text_box("poll_question", '', 40));
    $frm->addrow($lang['poll']['answers'], $frm->textarea("poll_variants", '', 50, 10), 'top');
    $frm->show();
} else {
    $polldata = poll_get();
    $frm = new InputForm("", "post", $lang['general']['submit']);
    $frm->addrow($lang['poll']['question'] . ': ' . $polldata['q']);
    foreach ($polldata['v'] as $id => $answer) {
        $frm->addrow($polldata['c'][$id], $answer);
    }
    $frm->addrow($frm->checkbox('rmpoll', '1', $lang['admincp']['poll']['poll']['del']));
    $frm->show();
}
Esempio n. 6
0
}
// 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']));
$frm->addrow(__('Allow users to select language'), $frm->checkbox('nconfig[allowchlang]', '1', '', @$config['allowchlang']));
$frm->addrow(__('Default timezone'), user_tz_select((int) @$config['default_tz'], 'nconfig[default_tz]'));
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
rcms_loadAdminLib('articles');
/******************************************************************************
* Extracting some data from request                                           *
******************************************************************************/
$work_dir = articles_get_work_dir($null);
if (!empty($work_dir) && $work_dir != ARTICLES_PATH) {
    rcms_showAdminMessage($lang['results']['articles'][8] . $work_dir);
}
/******************************************************************************
* Perform adding of category                                                  *
******************************************************************************/
if (!empty($_POST['ctitle'])) {
    $res = articles_creare_category($_POST['ctitle'], @$_POST['cdesc'], @$_FILES['cicon'], @$_POST['caccess'], $work_dir);
    rcms_showAdminMessage($lang['results']['articles'][$res]);
}
/******************************************************************************
* Interface                                                                   *
******************************************************************************/
$frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data', 'mainfrm');
$frm->addbreak($lang['admincp']['articles']['createcat']['full']);
$frm->addrow($lang['articles']['cattitle'], $frm->text_box('ctitle', ''), 'top');
$frm->addrow('', rcms_show_bbcode_panel('document.mainfrm.cdesc'));
$frm->addrow($lang['articles']['catdesc'], $frm->textarea('cdesc', '', 70, 5), 'top');
$frm->addrow($lang['articles']['accesslevel'], $frm->text_box('caccess', ''), 'top');
$frm->addrow($lang['articles']['caticon'], $frm->file('cicon'), 'top');
$frm->show();
Esempio n. 8
0
}
$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'));
//Send mail when user write comment
$frm->addrow(__('E-mail for notification of the comments'), $frm->text_box('nconfig[email]', @$config['email']));
$frm->addrow(__('Length limit for title') . ' ' . __('Categories'), $frm->text_box('nconfig[category]', @$config['category'], 4));
$frm->addrow(__('Length limit for title') . ' ' . __('Articles'), $frm->text_box('nconfig[title]', @$config['title'], 4));
$frm->addrow('<a href="http://rating-widget.com/" title="Get new code" target="_blank">' . __('Rating') . '</a> ', $frm->textarea('nconfig[code_rating]', @$config['code_rating'], 80, 7));
$frm->addrow(__('Code of social networks'), $frm->textarea('nconfig[social]', @$config['social'], 80, 7), 'top');
$frm->show();
Esempio n. 9
0
        rcms_showAdminMessage($polls->lasterror);
    } else {
        rcms_showAdminMessage(__('Poll stopped'));
        $save_o = true;
        $save_c = true;
    }
}
if (!empty($_POST['remove'])) {
    if (!$polls->removePoll($_POST['remove'], false)) {
        rcms_showAdminMessage($polls->lasterror);
    } else {
        rcms_showAdminMessage(__('Poll removed'));
        $save_c = true;
    }
}
$polls->close($save_c, $save_o);
foreach ($polls->getCurrentPolls() as $pollid => $polldata) {
    $frm = new InputForm('', 'post', __('Submit'));
    $frm->addbreak(__('Question') . ': ' . $polldata['q']);
    foreach ($polldata['v'] as $id => $answer) {
        $frm->addrow($polldata['c'][$id], $answer);
    }
    $frm->addrow($frm->checkbox('stop', $pollid, __('Stop poll and move it to archive')), $frm->checkbox('remove', $pollid, __('Remove poll without moving to archive')));
    $frm->show();
}
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('New poll'));
$frm->hidden('new', '1');
$frm->addrow(__('Question'), $frm->text_box('poll_question', '', 40));
$frm->addrow(__('Answers'), $frm->textarea('poll_variants', '', 50, 10), 'top');
$frm->show();
Esempio n. 10
0
    $frm->addrow(__('Sender email'), $frm->text_box('sender_email', __('Your e-mail for answer'), 45));
    $frm->addrow(__('Subject'), $frm->text_box('subject', __('Subject of your letter'), 45));
    $frm->addrow(__('Text'), $frm->text_box('letter', __('Text of your letter'), 45));
    $frm->addrow(__('Important'), $frm->text_box('important', __('It is important!')));
    $frm->addrow(__('Important') . ': ' . __('Text'), $frm->textarea('important_text', __('Your letter will be sent to admin and it will not be kept on a site. Admin will answer to you as soon as he will have a possibility.'), 55, 15));
    $frm->show();
} elseif (!empty($_REQUEST['edit'])) {
    if ($page = tpl_get($_REQUEST['edit'])) {
        $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'edit');
        $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
        $frm->addbreak(__('Edit sendmail template'));
        $frm->hidden('edit', $_REQUEST['edit']);
        $frm->hidden('save', '1');
        $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $frm->text_box('id', $_REQUEST['edit']));
        $frm->addrow(__('Title'), $frm->text_box('title', $page['title'], 45));
        $frm->addrow(__('Comments') . ': ', $frm->textarea('comment', $page['comment'], 55, 15));
        $frm->addrow(__('Sender name'), $frm->text_box('sender_name', $page['sender_name'], 45));
        $frm->addrow(__('Sender email'), $frm->text_box('sender_email', $page['sender_email'], 45));
        $frm->addrow(__('Subject'), $frm->text_box('subject', $page['subject'], 45));
        $frm->addrow(__('Text'), $frm->text_box('letter', $page['letter']));
        $frm->addrow(__('Important'), $frm->text_box('important', $page['important'], 45));
        $frm->addrow(__('Important') . ': ' . __('Text'), $frm->textarea('important_text', $page['important_text'], 55, 15));
        $frm->show();
    } else {
        rcms_showAdminMessage(__('Cannot open template for editing'));
    }
} else {
    $frm = new InputForm('', 'post', __('Submit'));
    $frm->addbreak(__('Create a new template to send letters'));
    $frm->hidden('new', '1');
    $frm->show();
Esempio n. 11
0
// Names
$frm = new InputForm('', 'post', __('Send e-mail'));
$frm->addbreak(__('Send e-mail'));
$frm->hidden('name', '1');
$frm->addrow(__('Users') . '<br/>' . __('You can use * in names and divide names by comma.'), $frm->text_box('to', post('to', '*'), 60));
$frm->addrow(__('Subject'), $frm->text_box('subj', post('subj'), 60));
$frm->addrow(__('Body'), $frm->textarea('body', post('body'), 60, 10));
$frm->show();
//Skins by names
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Emailing') . ': ' . __('Skins'));
if (!empty($skins)) {
    foreach ($skins as $skin) {
        $frm->addrow(__('Skin'), $frm->text_box('_to', post('_to'), 60));
    }
}
$frm->addrow(__('Skin') . '<br/>' . __('You can divide email by comma.'), $frm->text_box('_to', post('_to'), 60));
$frm->addrow(__('Sender name'), $frm->text_box('_from', post('_from'), 60));
$frm->addrow(__('Subject'), $frm->text_box('_subj', post('_subj'), 60));
$frm->addrow(__('Body'), $frm->textarea('_body', post('_body'), 60, 10));
$frm->addrow(__('New'), $frm->text_box('new_skin', post('new_skin'), 60));
$frm->show();
// Emails
$frm = new InputForm('', 'post', __('Send e-mail'));
$frm->addbreak(__('Send e-mail'));
$frm->hidden('email', '1');
$frm->addrow(__('Emails') . '<br/>' . __('You can divide email by comma.'), $frm->text_box('_to', post('_to'), 60));
$frm->addrow(__('Sender name'), $frm->text_box('_from', post('_from'), 60));
$frm->addrow(__('Subject'), $frm->text_box('_subj', post('_subj'), 60));
$frm->addrow(__('Body'), $frm->textarea('_body', post('_body'), 60, 10));
$frm->show();
Esempio n. 12
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
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');
    $result .= $lang['results']['articles'][$res] . '<br />';
    if (!empty($_POST['cdel'])) {
        $res = articles_delete_category($_POST['cid'], $work_dir);
        $result .= $lang['results']['articles'][$res] . '<br />';
    }
    rcms_showAdminMessage($result);
}
/******************************************************************************
* Interface                                                                   *
******************************************************************************/
$categories_list = articles_get_categories_list(false, false, $work_dir);
if (empty($categories_list)) {
    rcms_showAdminMessage($lang['results']['articles'][9]);
} else {
    foreach ($categories_list as $data) {
        $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data', 'cat' . $data['id']);
        $frm->addbreak($lang['admincp']['articles']['managecat']['full'] . $data['title']);
        $frm->hidden('cid', $data['id']);
        $frm->addrow($lang['articles']['cattitle'], $frm->text_box('ctitle', $data['title']));
        $frm->addrow('', rcms_show_bbcode_panel('document.cat' . $data['id'] . '.cdesc'));
        $frm->addrow($lang['articles']['catdesc'], $frm->textarea('cdesc', $data['description']));
        $frm->addrow($lang['articles']['accesslevel'], $frm->text_box('caccess', $data['accesslevel']), 'top');
        if (!$data['icon']) {
            $frm->addrow($lang['articles']['caticon'], $frm->file('cicon'));
        } else {
            $frm->addrow($lang['articles']['caticon'] . ' - ' . $data['icon'] . '<br />' . $lang['articles']['chktodel'], $frm->checkbox('ckillicon', '1', ''));
        }
        $frm->addrow($lang['articles']['delete'], $frm->checkbox('cdel', '1', ''));
        $frm->show();
    }
}
    $frm->addrow('<abbr title="' . $lang['general']['pages']['pageid_h'] . '">' . $lang['general']['pages']['pageid'] . '</abbr>', $frm->text_box('name', ''));
    $frm->addrow('<abbr title="' . $lang['general']['pages']['pageid_h'] . '">' . $lang['general']['pages']['pagelang'] . '</abbr>', $frm->text_box('lang', ''));
    $frm->addrow($lang['general']['pages']['pagetitle'], $frm->text_box('title', ''));
    $frm->addrow($lang['general']['pages']['pagetext'] . '<br>' . $lang['general']['pages']['pagetext_h'], $frm->textarea('text', '', 70, 25), 'top');
    $frm->show();
} elseif (!empty($_POST['edit'])) {
    if (($pd = explode('.', $_POST['edit'])) && ($page = page_get($pd[0], $pd[1]))) {
        $frm = new InputForm("", "post", $lang['general']['submit']);
        $frm->addmessage('<a href="">&lt;&lt;&lt; ' . $lang['general']['back'] . '</a>');
        $frm->addbreak($lang['admincp']['general']['pages']['edit']);
        $frm->hidden('edit', $pd[0] . '.' . $pd[1]);
        $frm->hidden('save', '1');
        $frm->addrow('<abbr title="' . $lang['general']['pages']['pageid_h'] . '">' . $lang['general']['pages']['pageid'] . '</abbr>', $frm->text_box('name', $pd[0]));
        $frm->addrow('<abbr title="' . $lang['general']['pages']['pageid_h'] . '">' . $lang['general']['pages']['pagelang'] . '</abbr>', $frm->text_box('lang', $pd[1]));
        $frm->addrow($lang['general']['pages']['pagetitle'], $frm->text_box('title', $page['title']));
        $frm->addrow($lang['general']['pages']['pagetext'] . '<br>' . $lang['general']['pages']['pagetext_h'], $frm->textarea('text', $page['text'], 70, 25), 'top');
        $frm->show();
    } else {
        rcms_showAdminMessage($lang['results']['general'][8]);
    }
} else {
    $frm = new InputForm('', 'post', $lang['general']['createpage']);
    $frm->hidden('new', '1');
    $frm->show();
    $pages = page_get_list();
    $frm = new InputForm("", "post", $lang['general']['submit']);
    $frm->resetButton($lang['general']['reset']);
    $frm->addbreak($lang['admincp']['general']['pages']['title']);
    if (!empty($pages)) {
        foreach ($pages as $page => $langs) {
            foreach ($langs as $alang => $title) {
Esempio n. 15
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'));
Esempio n. 16
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['rssaggcfg']) && isset($_POST['feeds'])) {
    if (write_ini_file(array('config' => $_POST['rssaggcfg'], 'feeds' => explode("\n", str_replace("\r", '', $_POST['feeds']))), CONFIG_PATH . 'rss_aggregator.ini', true)) {
        rcms_showAdminMessage(__('Configuration updated'));
    }
}
$rss_cfg = parse_ini_file(CONFIG_PATH . 'rss_aggregator.ini', true);
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('RSS Aggregator'));
$frm->addrow(__('Cache timeout (seconds)'), $frm->text_box('rssaggcfg[cache_time]', $rss_cfg['config']['cache_time'], 40));
$frm->addrow(__('Length limit for title'), $frm->text_box('rssaggcfg[max_title_length]', $rss_cfg['config']['max_title_length'], 40));
$frm->addrow(__('Length limit for description'), $frm->text_box('rssaggcfg[max_desc_length]', $rss_cfg['config']['max_desc_length'], 40));
$frm->addrow(__('Feeds to aggregate (One URL per line)'), $frm->textarea('feeds', implode("\n", $rss_cfg['feeds']), 40));
$frm->show();
Esempio n. 17
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>';
                }
Esempio n. 18
0
$frm->addrow(__('Off for ') . '"' . __('Articles') . '"', $frm->checkbox('dy[use_art]', '1', '', @$dyna['use_art']));
$frm->addrow(__('Off for ') . '"' . __('Gallery') . '"', $frm->checkbox('dy[use_gal]', '1', '', @$dyna['use_gal']));
$frm->addrow(__('Off for ') . '"' . __('Member list') . '"', $frm->checkbox('dy[use_mem]', '1', '', @$dyna['use_mem']));
$frm->addrow(__('Off for ') . '"' . __('FilesDB') . '"', $frm->checkbox('dy[use_fdb]', '1', '', @$dyna['use_fdb']));
$frm->addrow(__('Off for ') . '"' . __('Forum') . '"', $frm->checkbox('dy[use_for]', '1', '', @$dyna['use_for']));
$frm->addbreak(__('Navigation editor'));
$frm->addrow(__('Link'), __('Title'));
$i = 0;
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']), $frm->text_box('names[' . $i . ']', $link['name']) . $frm->checkbox('ext[' . $i . ']', '1', __('Open in new window'), $checked));
    $i++;
}
$frm->addrow($frm->text_box('urls[' . $i . ']', ''), $frm->text_box('names[' . $i . ']', '') . $frm->checkbox('ext[' . $i . ']', '1', __('Open in new window')));
$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->addrow(__('CUSTOM1 or CUSTOM2 or CUSTOM3 (tilte column)'), __('Use it for custom menu'));
$frm->addbreak(__('Custom menu editor'));
$frm->addrow(':', __('Separator beetwen title and link (example: MyLink:www.example.com.ua)'));
$frm->addrow('>', __('Use it for define line as subitem (example: >MyLink:www.example.com.ua)'));
$frm->addrow('<b>CUSTOM1:</b>', $frm->text_box('c1title', file_get_contents(CONFIG_PATH . 'custom_menu_title_1.txt'), 100) . '<br>' . $frm->textarea('c1', dat2txt(CONFIG_PATH . 'custom_menu_1.dat'), 100, 20), 'top', 'left');
$frm->addrow('<b>CUSTOM2:</b>', $frm->text_box('c2title', file_get_contents(CONFIG_PATH . 'custom_menu_title_2.txt'), 100) . '<br>' . $frm->textarea('c2', dat2txt(CONFIG_PATH . 'custom_menu_2.dat'), 100, 20), 'top', 'left');
$frm->addrow('<b>CUSTOM3:</b>', $frm->text_box('c3title', file_get_contents(CONFIG_PATH . 'custom_menu_title_3.txt'), 100) . '<br>' . $frm->textarea('c3', dat2txt(CONFIG_PATH . 'custom_menu_3.dat'), 100, 20), 'top', 'left');
$frm->show();
Esempio n. 19
0
	<a href = "?module=aforizm">
	<img src="' . IMAGES_PATH . 'skins/edit_small.gif" title="' . __('Edit') . '" alt="' . __('Edit') . '" border="0">
	</a>';
        }
        show_window('', $result);
    }
} elseif ($system->checkForRight('GENERAL')) {
    //Edit Aforizms
    if (!empty($_POST['save'])) {
        file_write_contents($file, $_POST['text']);
        show_window('', __('Module updated'));
    }
    if (!empty($file)) {
        $array_aforizm = file($file);
    } else {
        $array_aforizm = array();
    }
    $result = '';
    foreach ($array_aforizm as $aforizm) {
        $result .= $aforizm;
    }
    $frm = new InputForm('', 'post', __('Submit'));
    $frm->hidden('save', '1');
    $frm->addrow(__('Each value on a new line'));
    $frm->addrow(__('All HTML is allowed in this field and line breaks will not be transformed to &lt;br&gt; tags!'));
    $frm->addrow('', $frm->textarea('text', $result, 70, 23), 'top');
    $result = $frm->show(true);
    show_window(__('Edit') . ' ' . __('Aphorism'), $result);
} else {
    show_window(__('Error'), __('You are not administrator of this site'));
}
$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. 21
0
    $frm->show();
} elseif (!empty($_POST['edit']) && !empty($_POST['cid']) && !empty($filesdb->data[$_POST['cid'] - 1]['files'][$_POST['edit'] - 1])) {
    $cid = $_POST['cid'] - 1;
    $fid = $_POST['edit'] - 1;
    $mode = $filesdb->data[$cid]['files'][$fid]['link'] == basename($filesdb->data[$cid]['files'][$fid]['link']);
    $frm = new InputForm('', 'post', '&lt;&lt;&lt; ' . __('Back'));
    $frm->hidden('cid', $_POST['cid']);
    $frm->show();
    $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'mainfrm');
    $frm->addbreak(__('Edit file'));
    $frm->hidden('save', '1');
    $frm->hidden('edit', $_POST['edit']);
    $frm->hidden('cid', $_POST['cid']);
    $frm->addrow(__('Title'), $frm->text_box('title', $filesdb->data[$cid]['files'][$fid]['name']));
    $frm->addrow(rcms_show_bbcode_panel('mainfrm.desc'));
    $frm->addrow(__('Description'), $frm->textarea('desc', $filesdb->data[$cid]['files'][$fid]['desc'], 70, 5), 'top');
    $frm->addrow(__('Author'), $frm->text_box('author', $filesdb->data[$cid]['files'][$fid]['author']));
    $frm->addrow(__('Filename or link to remote file'), $frm->text_box('link', $filesdb->data[$cid]['files'][$fid]['link']));
    $frm->addrow(__('Select type of link you specified in previous field'), $frm->select_tag('type', array(__('You entered the link to remote file'), __('You entered filename of file uploaded through upload interface')), $mode));
    $files = rcms_scandir(FILES_PATH);
    //Start Insert list uploaded files
    if (!empty($files)) {
        $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();
Esempio n. 22
0
        if ($articles->setWorkContainer($c)) {
            if ($c !== '#root' && $c !== '#hidden' && ($categories_list = $articles->getCategories(true, false)) === false) {
                show_error($articles->last_error);
            } else {
                $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'artadd');
                $frm->hidden('save', '1');
                $frm->hidden('c', $c);
                if ($c !== '#root' && $c !== '#hidden') {
                    $frm->addrow(__('Select category'), $frm->select_tag('b', $categories_list), 'top');
                }
                $frm->addrow(__('Title'), $frm->text_box('title', ''), 'top');
                $frm->addrow(__('Author/source'), $frm->text_box('source', ''), 'top');
                $frm->addrow(__('Keywords'), $frm->text_box('keywords', ''), 'top');
                $frm->addrow(__('Description for search engines'), $frm->text_box('sef_desc', ''), 'top');
                $frm->addrow('', rcms_show_bbcode_panel('artadd.description'));
                $frm->addrow(__('Short description'), $frm->textarea('description', '', 70, 5), 'top');
                $frm->addrow('', rcms_show_bbcode_panel('artadd.text'));
                $frm->addrow(__('Text'), $frm->textarea('text', '', 70, 25), 'top');
                $frm->addrow(__('Mode'), $frm->select_tag('mode', array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML')), 'text', 'onchange="if (this.options[selectedIndex].value==\'html\') { 	
		tinyMCE.init({
		mode : \'exact\',
		elements : \'description,text\',
		theme : \'advanced\',
		language : \'ru\',
        plugins : \'paste,table,cyberim\',
        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,
Esempio n. 23
0
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['nconfig'])) {
    write_ini_file($_POST['nconfig'], CONFIG_PATH . 'config.ini');
}
if (isset($_POST['meta_tags'])) {
    file_write_contents(DATA_PATH . "meta_tags.html", $_POST['meta_tags']);
}
if (isset($_POST['top'])) {
    file_write_contents(DATA_PATH . "top.html", $_POST['top']);
}
if (isset($_POST["welcome_mesg"])) {
    file_write_contents(DATA_PATH . 'intro.html', $_POST["welcome_mesg"]);
}
$system->loadConfiguration();
$config =& $system->config;
// Interface generation
$frm = new InputForm("", "post", $lang['general']['submit']);
$frm->addbreak($lang['admincp']['general']['config']['full']);
$frm->addrow($lang['admincp']['general']['config']['sitename'], $frm->text_box("nconfig[title]", $config['title'], 40));
$frm->addrow($lang['admincp']['general']['config']['siteurl'], $frm->text_box("nconfig[site_url]", $config['site_url'], 40));
$frm->addrow($lang['admincp']['general']['config']['defskin'], user_skin_select(SKIN_PATH, 'nconfig[default_skin]', $config['default_skin']));
$frm->addrow($lang['admincp']['general']['config']['deflang'], user_lang_select(LANG_PATH, 'nconfig[default_lang]', $config['default_lang']));
$frm->addrow($lang['admincp']['general']['config']['latestnumber'], $frm->text_box('nconfig[num_of_latest]', @$config['num_of_latest']));
$frm->addrow($lang['general']['perpage'], $frm->text_box('nconfig[perpage]', @$config['perpage']));
$frm->addrow($lang['admincp']['general']['config']['allowchskin'], $frm->checkbox('nconfig[allowchskin]', '1', '', @$config['allowchskin']));
$frm->addrow($lang['admincp']['general']['config']['allowchlang'], $frm->checkbox('nconfig[allowchlang]', '1', '', @$config['allowchlang']));
$frm->addrow($lang['admincp']['general']['config']['regconfirmation'], $frm->checkbox('nconfig[regconf]', '1', '', @$config['regconf']));
$frm->addrow($lang['admincp']['general']['config']['meta'], $frm->textarea("meta_tags", file_get_contents(DATA_PATH . "meta_tags.html"), 80, 5));
$frm->addrow($lang['admincp']['general']['config']['top'], $frm->textarea("top", file_get_contents(DATA_PATH . "top.html"), 80, 5));
$frm->addrow($lang['admincp']['general']['config']['welcome'], $frm->textarea("welcome_mesg", file_get_contents(DATA_PATH . 'intro.html'), 80, 10), 'top');
$frm->show();
Esempio n. 24
0
        $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'edit');
        $frm->addbreak(__('Edit article'));
        $frm->hidden('edit', $edited);
        $frm->hidden('save', '1');
        $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $frm->text_box('id', $edited));
        $frm->addrow(__('Title'), $frm->text_box('title', $page['title']));
        if (empty($page['description'])) {
            $page['description'] = $page['title'];
        }
        $frm->addrow(__('Description for search engines'), $frm->text_box('description', $page['description']));
        if (empty($page['keywords'])) {
            $page['keywords'] = '';
        }
        $frm->addrow(__('Keywords'), $frm->text_box('keywords', $page['keywords']));
        $frm->addrow('', rcms_show_bbcode_panel('edit.text'));
        $frm->addrow(__('Text'), $frm->textarea('text', $page['text'], 70, 25), 'top');
        if ($page['mode'] == 'html') {
            ?>
			<script type="text/javascript">
			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,
Esempio n. 25
0
    $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]);
    }
    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'));
    $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. 27
0
    $frm = new InputForm(RCMS_ROOT_PATH, "post", $lang['users']['login'], '_top');
    $frm->addbreak($lang['admin_cp']['notlogged']);
    $frm->hidden('login_form', '1');
    $frm->addrow($lang['users']['username'], $frm->text_box("username", '', 20), 'top');
    $frm->addrow($lang['users']['password'], $frm->text_box("password", '', 20, 50, true), 'top');
    $frm->addrow($lang['users']['remember'], $frm->checkbox("remember", '1', ''), 'top');
    $frm->show();
} else {
    $rights =& $system->rights;
    if ($rights === array()) {
        $frm = new InputForm(RCMS_ROOT_PATH, "get", $lang['general']['return'], '_top');
        $frm->addbreak($lang['admin_cp']['loggedbutnotadmin']);
        $frm->show();
    } else {
        if (isset($_POST['remarks'])) {
            file_write_contents(DATA_PATH . 'admin_remarks.txt', $_POST['remarks']);
        }
        $frm = new InputForm('', "post", $lang['general']['submit']);
        $frm->addbreak($lang['admin_cp']['loggedok']);
        if ($rights !== 'ROOT') {
            foreach ($rights as $right => $right_desc) {
                $frm->addrow($right, $right_desc, 'top');
            }
        } else {
            $frm->addrow($lang['users']['youareroot']);
        }
        $frm->addbreak($lang['admin_cp']['remarks']);
        $frm->addrow($frm->textarea('remarks', file_get_contents(DATA_PATH . 'admin_remarks.txt'), 60, 10), '', 'middle', 'center');
        $frm->show();
    }
}
if (!empty($categories_list)) {
    $frm = new InputForm('', 'post', $lang['admincp']['browse'], '', 'multipart/form-data');
    $frm->addrow($lang['admincp']['articles']['manage']['selcat'], $frm->select_tag('category', $categories_list), 'top');
    $frm->show();
} else {
    rcms_showAdminMessage($lang['results']['articles'][9]);
}
if (!empty($article) && !empty($category)) {
    $article_data = articles_get($category, $article, false, 2, $work_dir);
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data', 'arted');
    $frm->addbreak($lang['admincp']['articles']['manage']['edit'] . ': ' . $article_data['title']);
    $frm->addrow($lang['articles']['categ'], $frm->select_tag('a_category', $categories_list, $article_data['catid']), 'top');
    $frm->addrow($lang['articles']['subj'], $frm->text_box('a_title', $article_data['title']), 'top');
    $frm->addrow($lang['articles']['author'], $frm->text_box('a_src', $article_data['src']), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.arted.a_description'));
    $frm->addrow($lang['articles']['desc'], $frm->textarea('a_description', str_replace('<br />', '', $article_data['desc']), 70, 5), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.arted.a_text'));
    $frm->addrow($lang['articles']['text'], $frm->textarea('a_text', str_replace('<br />', '', $article_data['text']), 70, 25), 'top');
    $frm->addrow($lang['articles']['mode'], $frm->radio_button('a_mode', $lang['articles']['modes'], $article_data['mode']), 'top');
    $frm->addrow($lang['articles']['allowcomments'], $frm->radio_button('a_comments', array('yes' => $lang['admincp']['allow'], 'no' => $lang['admincp']['disallow']), $article_data['comments']), 'top');
    $frm->hidden('editflag', '1');
    $frm->hidden('edit', $article);
    $frm->hidden('category', $category);
    $frm->show();
} elseif (!empty($category)) {
    $category_name = $categories_list[$category];
    $articles = articles_get_articles_list($category, false, 0, $work_dir);
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data');
    $frm->resetButton($lang['general']['reset']);
    $frm->addbreak($lang['admincp']['articles']['manage']['full'] . ': ' . $category_name);
    if (!empty($articles)) {