function rcms_pagination($total, $perpage, $current, $link) { $return = ''; $link = preg_replace("/((&|&)page=(\\d*))/", '', $link); if (!empty($perpage)) { $arr = array('total' => $total, 'perpage' => $perpage, 'current' => $current, 'link' => $link); $return = rcms_parse_module_template('pagination.tpl', $arr); } return $return; }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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 // //////////////////////////////////////////////////////////////////////////////// $system->showModuleWindow('', file_get_contents(DATA_PATH . 'intro.html'), 'left'); $articles = articles_parse_list(1, true, NEWS_PATH); $result = ''; if (!empty($articles)) { foreach ($articles as $article) { $cat_data = articles_get_category($article['catid'], false, NEWS_PATH); if (!empty($article)) { $cat_data = articles_get_category($article['catid'], false, NEWS_PATH); $result .= rcms_parse_module_template('article.tpl', $article + array('showdesc' => true, 'showtitle' => true, 'linktext' => ($article['text_nonempty'] ? $lang['articles']['readmore'] : $lang['articles']['comments']) . ' (' . $article['comcnt'] . '/' . $article['views'] . ')', 'linkurl' => './index.php?module=articles&catid=' . $article['catid'] . '&id=' . $article['id'] . '&work_dir=news', 'cat_data' => $cat_data)); } } } $system->showModuleWindow($lang['articles']['latestnews'], $result, 'center'); $system->config['pagename'] = $lang['pages']['index'];
$intcapt = $_POST['captcheckout']; if ($defcatp == $intcapt) { post_message($system->user['username'], $system->user['nickname'], $_POST['comtext'], RCMS_GB_DEFAULT_FILE, 'guestbook.ini'); rcms_redirect(''); } else { show_window(__('Error'), __('Invalid form data')); } } else { post_message($system->user['username'], $system->user['nickname'], $_POST['comtext'], RCMS_GB_DEFAULT_FILE, 'guestbook.ini'); rcms_redirect(''); } } } if (isset($_POST['gbd']) && $system->checkForRight('GUESTBOOK')) { post_remove($_POST['gbd'], RCMS_GB_DEFAULT_FILE); rcms_redirect(''); } if (!(isset($system->config['guestbook-guest']) and !LOGGED_IN)) { show_window(__('Post message'), rcms_parse_module_template('gb-form.tpl', array()), 'center'); } else { show_window(__('Error'), __('You are not logined!'), 'center'); } $messages = get_messages($page, true, false, RCMS_GB_DEFAULT_FILE, 'guestbook.ini'); if (!empty($pagination)) { show_window('', $pagination, 'center'); } foreach ($messages as $id => $message) { $message['id'] = $id; show_window('', rcms_parse_module_template('gb-mesg.tpl', $message), 'center'); } $system->config['pagename'] = __('Guest book');
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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($_GET['user']) && ($userdata = load_user_info(basename($_GET['user'])))) { $system->config['pagename'] = $lang['users']['registeredusers'] . ' - ' . $userdata['username']; $system->showModuleWindow('', rcms_parse_module_template('user-view.tpl', array('userdata' => $userdata, 'fields' => $system->data['apf']))); } else { $system->config['pagename'] = $lang['users']['registeredusers']; $system->showModuleWindow($lang['users']['registeredusers'], rcms_parse_module_template('user-list.tpl', user_get_list())); }
} if ($total + $start > sizeof($data)) { $finish = sizeof($data); } else { $finish = $total + $start; } $result .= '<div align="right">' . rcms_pagination(sizeof($data), $system->config['perpage'], $page + 1, '?module=' . $module . '&id=' . ($cid + 1)) . '</div>'; for ($fid = $start; $fid < $finish; $fid++) { $fdata = $data[$fid]; $fdata['down_url'] = '?module=' . $module . '&id=' . ($cid + 1) . '&fid=' . ($fdata['id'] + 1) . '&get=1'; if (!empty($fdata)) { $result .= rcms_parse_module_template('fdb-file.tpl', $fdata); } } } show_window('<a href="?module=' . $module . '">' . __('Categories of files') . '</a> → ' . $filesdb->data[$cid]['name'], $result, 'center'); } } else { $system->config['pagename'] = __('Categories of files'); if (!empty($filesdb->data)) { $result = ''; foreach ($filesdb->data as $cid => $cdata) { if (@$cdata['accesslevel'] <= @$system->user['accesslevel'] || $system->checkForRight('-any-')) { $result .= rcms_parse_module_template('fdb-cat.tpl', $cdata + array('link' => '?module=' . $module . '&id=' . ($cid + 1))); } } show_window(__('Categories of files'), $result, 'center'); } else { show_error(__('There is no categories of files')); } }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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($_GET['id'])) { $langs = array_keys(page_get_langs($_GET['id'])); if (empty($langs)) { $system->showModuleWindow('', $lang['results']['general'][11]); } elseif (!empty($_POST['page_lang']) && ($page = page_get($_GET['id'], $_POST['page_lang']))) { $system->config['pagename'] = $page['title']; $system->showModuleWindow($page['title'], $page['text']); } elseif (count($langs) == 1 && ($page = page_get($_GET['id'], $langs[0]))) { $system->config['pagename'] = $page['title']; $system->showModuleWindow($page['title'], $page['text']); } else { $system->config['pagename'] = $lang['general']['pagelang']; $system->showModuleWindow($lang['general']['pagelang'], rcms_parse_module_template('pages-lang-sel.tpl', $langs)); } } else { $system->showModuleWindow('', $lang['results']['general'][11]); }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) ReloadCMS Development Team // // http://reloadcms.com // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// if (isset($_GET['id'])) { if (is_file(DATA_PATH . 'pages/' . $_GET['id'])) { $page = unserialize(file_get_contents(DATA_PATH . 'pages/' . $_GET['id'])); $text = rcms_parse_text_by_mode($page['text'], $page['mode']); if (!empty($page['description'])) { $system->addInfoToHead('<meta name="Description" content="' . $page['description'] . '">' . "\n"); } if (!empty($page['keywords'])) { $system->addInfoToHead('<meta name="Keywords" content="' . $page['keywords'] . '">' . "\n"); } $title = !empty($page['title']) ? $system->checkForRight('GENERAL') ? $page['title'] . ' <a href="' . ADMIN_FILE . '?show=module&id=articles.pages&tab=2&page=' . $_GET['id'] . '" title="' . __('Edit') . '"> <img src="' . IMAGES_PATH . 'skins/edit_small.gif" title="' . __('Edit') . '"> </a> ' : $page['title'] : ''; if (!empty($page['text'])) { show_window($title, rcms_parse_module_template('pages.tpl', array('text' => $text, 'author_name' => $page['author_name'], 'author_nick' => $page['author_nick'], 'date' => $page['date']))); } } else { show_window(__('Error'), __('There are no article with this ID')); } }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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['profile_form']) && LOGGED_IN) { $result = user_update($system->user['username'], false, $_POST['password'], $_POST['confirmation'], $_POST['email'], @$_POST['userdata']); $system->config['pagename'] = $lang['users']['profileupdate']; $system->showModuleWindow($lang['users']['profileupdate'], $lang['results']['users'][$result]); } elseif (!empty($_POST['registration_form']) && !LOGGED_IN) { $result = user_update($_POST['username'], true, $_POST['password'], $_POST['confirmation'], $_POST['email'], @$_POST['userdata']); $system->config['pagename'] = $lang['users']['registration']; $system->showModuleWindow($lang['users']['registration'], $lang['results']['users'][$result], 'center'); } elseif (!LOGGED_IN) { $system->config['pagename'] = $lang['users']['registration']; $system->showModuleWindow($lang['users']['registration'], rcms_parse_module_template('user-profile.tpl', array('mode' => 'registration_form', 'fields' => $system->data['apf']))); } elseif (LOGGED_IN) { $system->config['pagename'] = $lang['users']['profileupdate']; $system->showModuleWindow($lang['users']['profileupdate'], rcms_parse_module_template('user-profile.tpl', array('mode' => 'profile_form', 'fields' => $system->data['apf'], 'values' => $system->user))); }
$system->config['pagename'] = __('Registration'); show_window('', $system->results['registration'], 'center'); } else { show_window(__('Error'), __('Invalid form data')); } } } elseif (!empty($_POST['profile_form']) && LOGGED_IN) { if (md5(@$_POST['current_password']) == $system->user['password']) { $system->updateUser($system->user['username'], $_POST['nickname'], $_POST['password'], $_POST['confirmation'], $_POST['email'], $_POST['userdata']); $system->config['pagename'] = __('My profile'); show_window('', $system->results['profileupdate'], 'center'); } else { show_error(__('Invalid password')); } } elseif (!empty($_POST['password_request']) && !LOGGED_IN) { $system->recoverPassword($_POST['name'], $_POST['email']); $system->config['pagename'] = __('Password recovery'); show_window('', $system->results['passrec'], 'center'); } // Basic data $act = !empty($_GET['act']) ? $_GET['act'] : ''; if (($act == 'register' || $act == '') && !LOGGED_IN) { $system->config['pagename'] = __('Registration'); show_window(__('Registration'), rcms_parse_module_template('user-profile.tpl', array('mode' => 'registration_form', 'fields' => $system->data['apf']))); } elseif ($act == 'password_request' && !LOGGED_IN) { $system->config['pagename'] = __('Password recovery'); show_window(__('Password recovery'), rcms_parse_module_template('user-respas.tpl', array())); } elseif (LOGGED_IN) { $system->config['pagename'] = __('My profile'); show_window(__('My profile'), rcms_parse_module_template('user-profile.tpl', array('mode' => 'profile_form', 'fields' => $system->data['apf'], 'values' => rcms_htmlspecialchars_recursive($system->user)))); }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) ReloadCMS Development Team // // http://reloadcms.com // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// if (!empty($system->results['user_login'])) { show_window(__('Logging in'), $system->results['user_login'], 'center'); } show_window(__('Hello') . ', ' . $system->user['nickname'], rcms_parse_module_template('user-panel.tpl', array()));
show_error($cpolls->lasterror); } else { $cpolls->close(true, false); } } $result = ''; if ($polls = $cpolls->getCurrentPolls()) { foreach ($polls as $poolid => $poll) { $poll['voted'] = $cpolls->isVotedInPoll($poolid, $_SERVER['REMOTE_ADDR']); $poll['id'] = $poolid; $result .= rcms_parse_module_template('poll.tpl', $poll); } } show_window(__('Poll'), $result, 'center'); } else { //Show Archive of Polls $polls = new polls(); $polls->openCurrentPolls(); $result = ''; $cpolls = array_reverse($polls->getArchivedPolls()); if (!empty($cpolls)) { foreach ($cpolls as $poll) { $poll['voted'] = true; $result .= rcms_parse_module_template('poll.tpl', $poll); } } else { $result = __('Archive poll is empty'); } $system->config['pagename'] = __('Polls archive'); show_window(__('Polls archive'), $result); }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) ReloadCMS Development Team // // http://reloadcms.com // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// if (LOGGED_IN) { if (!empty($_GET['user']) && ($userdata = load_user_info(basename($_GET['user'])))) { $system->config['pagename'] = __('User profile of') . ' ' . $userdata['username']; show_window('', rcms_parse_module_template('user-view.tpl', array('userdata' => $userdata, 'fields' => $system->data['apf']))); } if (!empty($_GET['nick']) && ($userdata = load_user_info(basename($system->users_cache->getUser('nicks', $_GET['nick']))))) { $system->config['pagename'] = __('User profile of') . ' ' . $userdata['username']; show_window('', rcms_parse_module_template('user-view.tpl', array('userdata' => $userdata, 'fields' => $system->data['apf']))); } else { $system->config['pagename'] = __('Member list'); $userlist = $system->getUserList('*', 'nickname'); ksort($userlist); show_window(__('Member list'), rcms_parse_module_template('user-list.tpl', $userlist)); } } else { show_window(__('Error'), __('You are not logined!')); }
} else { show_error(__('There is no post with this id')); } } else { show_error(__('There is no topic with this id')); } } elseif ($action == 'topic') { $topic_id = empty($_GET['id']) ? 0 : basename((int) $_GET['id']); if (!empty($archives[$topic_id])) { $posts = @unserialize(@file_get_contents(FORUM_PATH . 'archive/topic.' . $topic_id . '.dat')); if (!is_array($posts)) { $posts = array(); } $archives[$topic_id]['id'] = $topic_id; $system->config['pagename'] = __('Archive') . ': ' . __('Show topic') . ': ' . $archives[$topic_id]['title']; show_window(__('Archive') . ': ' . __('Show topic') . ' - "' . $archives[$topic_id]['title'] . '"', rcms_parse_module_template('forum.archive-messages.tpl', array('topic' => &$archives[$topic_id], 'posts' => &$posts))); if (!$archives[$topic_id]['closed']) { if (isset($sysconfig['forum.archive-guest']) and !LOGGED_IN) { show_window(__('Post comment'), __('You are not logined!'), 'center'); } else { show_window(__('Reply to topic'), rcms_parse_module_template('forum.archive-new-post.tpl', array($topic_id, @$new_post_text))); } } } else { show_error(__('There is no topic with this id')); } } else { $system->config['pagename'] = __('Forum') . ': ' . __('Archive'); show_window(__('Forum') . ': ' . __('Archive'), rcms_parse_module_template('forum.archive-topics.tpl', $archives)); } }
} if (!empty($system->config['perpage'])) { $pages = ceil(sizeof($images) / $system->config['perpage']); if (!empty($_GET['page']) && (int) $_GET['page'] > 0) { $page = (int) $_GET['page'] - 1; } else { $page = 0; } $start = $page * $system->config['perpage']; $total = $system->config['perpage']; } else { $pages = 1; $page = 0; $start = 0; $total = sizeof($images); } $keys = @array_keys($images); $data['pagination'] = rcms_pagination(sizeof($images), $system->config['perpage'], $page + 1, '?' . $_SERVER['QUERY_STRING']); $c = $start; $data['images'] = array(); while ($total > 0 && $c < sizeof($keys)) { $image =& $images[$keys[$c]]; if ($image_data = $gallery->getData($image)) { $data['images'][$image] = $image_data + array('thumbnail' => $gallery->getThumbnail($image), 'comments' => $gallery->countComments($image)); } $total--; $c++; } $data['linkdata'] = $linkdata; show_window('<a href="?module=gallery">' . __('Gallery') . '</a>' . (cfr('GALLERY') ? ' ' . edit_button(ADMIN_FILE . '?show=module&id=gallery.upload&tab=5') : '') . (get('keyword') ? ' → ' . get('keyword') : ''), !empty($images) ? rcms_parse_module_template('gallery.tpl', $data) : __('Nothing founded'), 'center'); }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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 // //////////////////////////////////////////////////////////////////////////////// $minichat_config = parse_ini_file(CONFIG_PATH . "minichat.ini"); if (!LOGGED_IN && !$minichat_config['allow_guests_view']) { return; } if (!empty($_POST['mctext']) && (LOGGED_IN || $minichat_config['allow_guests_post'])) { guestbook_add_post(DATA_PATH . 'gstbooks/minichat.last', $_POST['mctext'], @$_POST['mcnick'], 'minichat.ini'); } if ((!empty($_POST['mcdelete']) || @$_POST['mcdelete'] === '0') && $system->checkForRight('MC-C')) { guestbook_remove_post(DATA_PATH . 'gstbooks/minichat.last', $_POST['mcdelete'], 'minichat.ini'); } $result = ''; $list = guestbook_get_last_msgs(DATA_PATH . 'gstbooks/minichat.last', 'minichat.ini'); foreach ($list as $message_id => $message) { $result .= rcms_parse_module_template('minichat-mesg.tpl', array('id' => $message_id) + $message); } if (LOGGED_IN || $minichat_config['allow_guests_post']) { $result .= rcms_parse_module_template('minichat-form.tpl', array('allow_guests_enter_name' => $minichat_config['allow_guests_enter_name'])); } $system->showMenuWindow($lang['minichat']['title'], $result, "center");
$total = sizeof($list); } $keys = array_keys($list); for ($a = $start; $a < $end; $a++) { $time =& $list[$keys[$a]]; $id = explode('.', $keys[$a]); if (($category = $articles->getCategory($id[0], true)) !== false && ($article = $articles->getArticle($id[0], $id[1], true, true, false, false)) !== false) { $result .= rcms_parse_module_template('art-article.tpl', $article + array('showtitle' => true, 'linktext' => $articles->linktextArticle($article['text_nonempty'], $article['comcnt'], $article['views']), 'iconurl' => '?module=articles&c=' . $news_container . '&b=' . $id[0], 'linkurl' => '?module=articles&c=' . $news_container . '&b=' . $id[0] . '&a=' . $article['id'], 'cat_data' => $category)); } } $title = isset($category['title']) ? $category['title'] : __(file_get_contents(ARTICLES_PATH . $news_container . '/title')); if (!empty($list)) { $result .= '<div align="right">' . rcms_pagination(sizeof($list), $system->config['perpage'], $page + 1, '?module=' . $module) . '</div>'; } else { $result = __('Nothing founded'); } } show_window($title, $result); } $system->config['pagename'] = __('Latest news'); } } elseif ($system->config['index_module'] != 'empty' && !empty($system->modules['main'][$module])) { $my_module = $module; $module = $system->config['index_module']; include_once MODULES_PATH . $module . '/index.php'; $module = $my_module; } if (!empty($menu_points['index-menus'])) { $system->setCurrentPoint($old_point); show_window(__('Index'), rcms_parse_module_template('index.tpl')); }
$start = 0; $total = count($contents); } $result .= '<div align="right">' . rcms_pagination(count($contents), $system->config['perpage'], $page + 1, '?module=' . $module . '&id=' . $_GET['id'] . $work_dir_suffix) . '</div>'; for ($c = $start; $c < $total + $start; $c++) { $article =& $contents[$c]; if (!empty($article)) { $result .= rcms_parse_module_template('article.tpl', $article + array('showdesc' => true, 'showtitle' => true, 'linktext' => ($article['text_nonempty'] ? $lang['articles']['readart'] : $lang['articles']['comments']) . ' (' . $article['comcnt'] . '/' . $article['views'] . ')', 'linkurl' => '?module=' . $module . '&catid=' . $article['catid'] . '&id=' . $article['id'] . $work_dir_suffix, 'cat_data' => $cat_data)); } } } $system->showModuleWindow('<a href="./index.php?module=' . $module . $work_dir_suffix . '">' . $lang['articles']['categories'] . '</a> -> ' . (strlen($cat_data['title']) > 30 ? substr($cat_data['title'], 0, 30) . '...' : $cat_data['title']), $result, 'center'); } else { $system->showModuleWindow('', $lang['results']['articles'][12], 'center'); } } else { /********************************************************************************* * List of categories * *********************************************************************************/ rcms_chtitle($lang['articles']['categories']); if ($contents = articles_get_categories_list(false, true, $work_dir)) { $result = ''; foreach ($contents as $category) { $result .= rcms_parse_module_template('category.tpl', $category + array('link' => './index.php?module=' . $module . '&id=' . $category['id'] . $work_dir_suffix)); } $system->showModuleWindow($lang['articles']['categories'], $result, 'center'); $system->config['pagename'] = $lang['articles']['categories']; } else { $system->showModuleWindow('', $lang['results']['articles'][9], 'center'); } }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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($system->results['user_login'])) { $system->showMenuWindow($lang['users']['login'], $lang['results']['users'][$system->results['user_login']], 'center'); } $system->showMenuWindow($lang['users']['hello'] . $system->user['nickname'], rcms_parse_module_template('user-panel.tpl', array()));
$images = rcms_scandir(GALLERY_PATH); if ($data = @file_get_contents(GALLERY_PATH . $images[$id] . '.cm')) { $data = unserialize($data); } else { return false; } if (isset($data[$cid])) { unset($data[$cid]); file_write_contents(GALLERY_PATH . $images[$id] . '.cm', serialize($data)); } return true; } if (!empty($images)) { if (!isset($_GET['id'])) { $_GET['id'] = 0; } show_gallery_item($_GET['id']); if (!empty($_POST['comtext'])) { gallery_post_comment($_GET['id'], $_POST['comtext']); } if (isset($_POST['cdelete']) && $system->checkForRight('A-MA')) { gallery_delete_comment($_GET['id'], $_REQUEST['cdelete']); } $comm = gallery_get_comments($_GET['id']); if (!empty($comm)) { $system->showModuleWindow('Comments', rcms_parse_module_template('comment.tpl', $comm), "center"); } $system->showModuleWindow($lang['articles']['postcomment'], rcms_parse_module_template('comment-post.tpl', $comm), 'center'); } else { $system->showModuleWindow('', $lang['gallery']['empty']); }
show_window(__('Edit topic'), rcms_parse_module_template('forum-edit.tpl', array($topics[$topic_id]['title'], $topics[$topic_id]['text'], $topic_id, 0))); } else { show_error(__('You cannot edit this topic')); } } else { show_error(__('There is no topic with this id')); } } elseif ($action == 'topic') { $topic_id = empty($_GET['id']) ? 0 : basename((int) $_GET['id']); if (!empty($topics[$topic_id])) { $posts = @unserialize(@file_get_contents(FORUM_PATH . 'topic.' . $topic_id . '.dat')); if (!is_array($posts)) { $posts = array(); } $topics[$topic_id]['id'] = $topic_id; $system->config['pagename'] = __('Forum') . ': ' . __('Show topic') . ': ' . $topics[$topic_id]['title']; show_window(__('Forum') . ': ' . __('Show topic') . ' - "' . $topics[$topic_id]['title'] . '"', rcms_parse_module_template('forum-messages.tpl', array('topic' => &$topics[$topic_id], 'posts' => &$posts))); if (!$topics[$topic_id]['closed']) { if (isset($sysconfig['forum-guest']) and !LOGGED_IN) { show_window(__('Post comment'), __('You are not logined!'), 'center'); } else { show_window(__('Reply to topic'), rcms_parse_module_template('forum-new-post.tpl', array($topic_id, @$new_post_text))); } } } else { show_error(__('There is no topic with this id')); } } else { $system->config['pagename'] = __('Forum'); show_window(__('Forum'), rcms_parse_module_template('forum-topics.tpl', $topics)); }
/** * Returns bbcode panel code for selected textarea * * @param string $textarea * @return string */ function rcms_show_bbcode_panel($textarea) { return rcms_parse_module_template('bbcodes-panel.tpl', array('textarea' => $textarea)); }
} else { $result = ''; $containers = $articles->getContainers(); foreach ($containers as $container_id => $container_title) { if (mb_substr($container_id, 0, 1) != '#') { if ($articles->setWorkContainer($container_id) == true) { $siteUrl = '.'; $result .= "\n<ul>\n"; $result .= '<li style="list-style-type:disc"><a href="' . $siteUrl . '/?module=articles&c=' . str_replace('#', '%23', $container_id) . '">' . $container_title . "</a></li>\n<li style=\"visibility: hidden\">\n"; if ($categories = $articles->getCategories(false, false, false)) { $result .= "<ul>\n"; foreach ($categories as $category) { $result .= "<li style=\"visibility: visible\"><a href=\"" . $siteUrl . '/?module=articles&c=' . str_replace('#', '%23', $container_id) . '&b=' . $category['id'] . '">' . $category['title'] . '</a>'; if (!empty($category['articles_clv'])) { $result .= "<sup>" . $category['articles_clv'] . "</sup>"; } $result .= "</li>\n"; } $result .= "</ul>\n"; } $result .= "</li>\n</ul>\n"; } } } $result .= '<br/>'; if ($system->checkForRight('ARTICLES-ADMIN')) { $result .= '<a href="' . RCMS_ROOT_PATH . ADMIN_FILE . '?show=module&id=articles.containers">' . __('Manage sections') . '</a><br/>'; } $system->config['pagename'] = __('Containers'); show_window(__('Containers'), rcms_parse_module_template('art-container.tpl', $result)); }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2004 ReloadCMS Development Team // // 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 // //////////////////////////////////////////////////////////////////////////////// $system->config['pagename'] = $lang['users']['forgotpas']; if (!empty($_POST['sendnewpas']) && !LOGGED_IN) { $system->showModuleWindow('', $lang['results']['users'][user_forgot_password(@$_POST['name'], @$_POST['email'])]); } if (!LOGGED_IN) { $system->showModuleWindow($lang['users']['forgotpas'], rcms_parse_module_template('user-respas.tpl', array())); }
} else { show_window(__('Error'), __('Error of a control code'), 'center'); } } else { show_window(__('Error'), __('Error of a control code'), 'center'); } } if (!empty($_GET['get'])) { if (is_file(DATA_PATH . 'sendmail/' . $_GET['get'])) { $data = unserialize(file_get_contents(DATA_PATH . 'sendmail/' . $_GET['get'])); } } if (empty($data)) { $data['title'] = __('The letter to admin'); $data['comment'] = ''; $data['sender_name'] = __('Your name'); $data['sender_email'] = __('Your e-mail for answer'); $data['subject'] = __('Subject of your letter'); $data['letter'] = __('Text of your letter'); $data['important'] = __('It is important!'); $data['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.'); } $system->config['pagename'] = $data['title']; //check right to edit $title = ($system->checkForRight('GENERAL') and isset($_GET['get'])) ? $data['title'] . ' <a href="' . ADMIN_FILE . '?show=module&id=tools.sendmail&edit=' . $_GET['get'] . '&tab=8" title="' . __('Edit') . '"> <img src="' . IMAGES_PATH . 'skins/edit_small.gif" alt="' . __('Edit') . '"> </a> ' : $data['title']; show_window($title, rcms_parse_module_template('sendmail.tpl', array('comment' => $data['comment'], 'sender_name' => $data['sender_name'], 'sender_email' => $data['sender_email'], 'subject' => $data['subject'], 'letter' => $data['letter'], 'important' => $data['important'], 'important_text' => $data['important_text'])), 'center');
<?php if ($system->checkForRight('STGNEWADMIN')) { if (!isset($_POST['registration_form'])) { show_window(__('Administrator registration'), rcms_parse_module_template('user-profile.tpl', array('mode' => 'registration_form', 'fields' => $system->data['apf']))); show_window('', wf_Link('?module=permissions', __('Back'), true, 'ubButton')); } if (isset($_POST['registration_form'])) { if (wf_CheckPost(array('username', 'nickname', 'password', 'confirmation', 'email'))) { $system->registerUser($_POST['username'], $_POST['nickname'], @$_POST['password'], @$_POST['confirmation'], $_POST['email'], $_POST['userdata']); $system->updateUser($_POST['username'], $_POST['nickname'], $_POST['password'], $_POST['confirmation'], $_POST['email'], $_POST['userdata']); stg_putlogevent('ADMREG {' . $_POST['username'] . '}'); show_window(__('Administrator registered'), wf_link('?module=permissions&edit=' . $_POST['username'], __('His permissions you can setup via corresponding module'), true, 'ubButton')); } else { show_error(__('No all of required fields is filled')); show_window('', wf_Link('?module=adminreg', __('Back'), true, 'ubButton')); } } } else { show_error(__('Access denied')); }
*/ if (isset($_POST['mcdelete']) && $system->checkForRight('MINICHAT')) { post_remove($_POST['mcdelete'], RCMS_MC_DEFAULT_FILE); rcms_redirect(''); } /* * Minichat post form */ $result = ''; if (LOGGED_IN || $minichat_config['allow_guests_post']) { /* * BB-codes editor in minichat — for really kamikaze */ if (!empty($minichat_config['editor'])) { $result .= rcms_show_bbcode_panel('minichat.mctext') . '<br />'; } $result .= rcms_parse_module_template('minichat-form.tpl', array('allow_guests_enter_name' => $minichat_config['allow_guests_enter_name'])); } /* * Minichat comments */ $list = get_last_messages($minichat_config['messages_to_show'], true, false, RCMS_MC_DEFAULT_FILE, 'minichat.ini'); foreach ($list as $id => $message) { $message['id'] = $id; $result .= rcms_parse_module_template('minichat-mesg.tpl', $message); } /* * Show all */ $result = '<div style="overflow-x: hidden; overflow-y: auto; width: 100%">' . $result . '</div>'; show_window(__('Minichat'), $result, 'center');