function search_in_article($article, $find) { if (!class_exists('articles')) { return false; } $out = array(); $articles = new articles(); $articles->setWorkContainer($article); $categories = $articles->getCategories(); if (!empty($categories)) { foreach ($categories as $catkey => $katval) { if (access_chk($katval['accesslevel'])) { to_result($katval['description'], $find, '?module=articles&c=' . $article . '&b=' . $katval['id'], $out); to_result($katval['title'], $find, '?module=articles&c=' . $article . '&b=' . $katval['id'], $out); $articls = $articles->getArticles($katval, true, true, true); if (!empty($articls)) { foreach ($articls as $akey => $aval) { $link = '?module=articles&c=' . $article . '&b=' . $aval['catid'] . '&a=' . $aval['id']; to_result($aval['text'], $find, $link, $out); to_result($aval['desc'], $find, $link, $out); to_result($aval['keywords'], $find, $link, $out); to_result($aval['sef_desc'], $find, $link, $out); to_result($aval['title'], $find, $link, $out); to_result($aval['author_nick'], $find, $link, $out); } } } } } return $out; }
$articles->sendUserDeletedArticle($_POST['arrData']); messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, CONF_ADMIN_FILE . '?' . $qString); } else { $arrErrors[] = db::$message_error; } } } //смещение, всегда 0 (затем берется из $_GET) $offset = !empty($_GET['offset']) && strings::ifInt($_GET['offset']) && (int) $_GET['offset'] > 0 ? (int) abs($_GET['offset']) : 0; $path = CONF_ADMIN_FILE . '?m=manager&s=articles&action=moderate&'; //текущий обработанный URL $strWhere = "token IN ('moderate')"; $strLimit = array('strLimit' => $offset . ',' . $retFields['records'], 'calcRows' => true); $arrFields = array('id', 'title', 'id_section', 'id_user', 'author', 'comments', 'datetime'); // массив всех статей $arrArticles = $articles->getArticles($strWhere, false, $strLimit, $arrFields); // формируем страницы $allRecords = $articles->cntArticles(); // получаем общее количество статей $strPages = strings::generatePage($allRecords, $offset, $retFields['records'], $path, true); // формируем странциы $smarty->assignByRef('arrArticles', $arrArticles); //передаем в шаблон общее количество записей $smarty->assignByRef('allRecords', $allRecords); //передаем в шаблон строку сформированных страниц $smarty->assignByRef('strPages', $strPages); } elseif ($arrActions['archived']) { // инициируем "Наименование страницы" отображаемое в форме $arrNamePage[] = array('name' => MENU_ACTION_ARCHIVED, 'link' => false); /** извлечение из архива и удаление статей **/ if (isset($_POST['action'])) {
function rcms_parse_dynamik_menu($format) { global $system; function convertArray($ar) { $var = '{ '; foreach ($ar as $key => $val) { $var .= '"' . $key . '" : '; if (is_array($val)) { $var .= convertArray($val) . ', '; } else { $var .= '"' . $val . '", '; } } if ($var[strlen($var) - 2] == ',') { $var[strlen($var) - 2] = ' '; } return $var . '} '; } $pic_right = ' <b>�</b> '; //Commented becouse f*****g IE, Microsoft, Gates and his mother... //$pic_right = ' <img src = \''.SKIN_PATH.'arrow_right.gif\'>'; //$pic_down = '<img src = \''.SKIN_PATH.'arrow_down.gif\'>'; $pic_down = ''; $navigation = parse_ini_file(CONFIG_PATH . 'navigation.ini', true); $dyna = parse_ini_file(CONFIG_PATH . 'dynamik.ini', true); $result = array(); foreach ($navigation as $link) { if (substr($link['url'], 0, 9) == 'external:') { $target = '_blank'; $link['url'] = substr($link['url'], 9); } else { $target = ''; } $tdata = explode(':', $link['url'], 2); if (count($tdata) == 2) { list($modifier, $value) = $tdata; } else { $modifier = $tdata[0]; } if (!empty($value) && !empty($system->navmodifiers[$modifier])) { if ($clink = call_user_func($system->navmodifiers[$modifier]['m'], $value)) { $result[] = array($clink[0], empty($link['name']) ? $clink[1] : __($link['name']), $target); } } else { $result[] = array($link['url'], __($link['name'])); } } $menu = ' <script type="text/javascript" src="modules/jsc/navigation.js"></script> <div class="dhtml_menu"> <div class="horz_menu"> '; foreach ($result as $item) { if (empty($item[2])) { $item[2] = '_top'; } if (empty($item[4])) { $item[4] = ''; } // Begin of Icons support by Migel //$arr = array(); if ($item[0] == '?module=articles') { if (!isset($dyna['use_art'])) { $articles = new articles(); $containers = $articles->getContainers(); $count = 0; if (is_array($containers)) { $item[1] .= ' ' . $pic_down; $containers = array_reverse($containers); foreach ($containers as $conkey => $conval) { $count++; if ($count != $dyna['max']) { $arr['ddm_article'][' ' . cut_text($conval) . ' '] = '?module=articles&c=' . $conkey; if (!isset($dyna['min'])) { $articles->setWorkContainer($conkey); $art = $articles->getCategories(); $count2 = 0; if (is_array($art)) { unset($arr['ddm_article'][' ' . cut_text($conval) . ' ']); $arr['ddm_article'][$pic_right . ' ' . cut_text($conval) . ' '] = array('-' => '?module=articles&c=' . $conkey); $art = array_reverse($art); foreach ($art as $artkey => $artval) { $count2++; if ($count2 != $dyna['max']) { $arr['ddm_article'][$pic_right . ' ' . cut_text($conval) . ' '][' ' . cut_text($artval['title']) . ' '] = '?module=articles&c=' . $conkey . '&b=' . $artval['id']; $art2 = $articles->getArticles($artval['id']); $count3 = 0; if (count($art2) > 0) { unset($arr['ddm_article'][$pic_right . ' ' . cut_text($conval) . ' '][' ' . cut_text($artval['title']) . ' ']); $arr['ddm_article'][$pic_right . ' ' . cut_text($conval) . ' '][$pic_right . ' ' . cut_text($artval['title']) . ' '] = array('-' => '?module=articles&c=' . $conkey . '&b=' . $artval['id']); $art2 = array_reverse($art2); foreach ($art2 as $art2key => $art2val) { $count3++; if ($count3 != $dyna['max']) { $arr['ddm_article'][$pic_right . ' ' . cut_text($conval) . ' '][$pic_right . ' ' . cut_text($artval['title']) . ' '][' ' . cut_text($art2val['title']) . ' '] = '?module=articles&c=' . $conkey . '&b=' . $artval['id'] . '&a=' . $art2val['id']; } } } } } } } } } } $item[4] = 'ddm_article'; } $item[3] = 'articles.png'; } elseif ($item[0] == '?module=gallery') { if (!isset($dyna['use_gal'])) { $gallery = new gallery(); $kw = $gallery->getAvaiableValues('keywords'); $count = 0; if (is_array($kw)) { $kw = array_reverse($kw); $count++; if (!isset($dyna['min'])) { foreach ($kw as $key => $val) { if ($count != $dyna['max']) { $arr['ddm_gallery'][$pic_right . ' ' . __('By keywords') . ' '][$pic_right . ' ' . cut_text($val) . ' '] = array('-' => '?module=gallery&keyword=' . $val); $kw2 = $gallery->getLimitedImagesList('keywords', $val); $kw2 = array_reverse($kw2); $count2 = 0; foreach ($kw2 as $key2 => $val2) { $count2++; if ($count2 != $dyna['max']) { $arr['ddm_gallery'][$pic_right . ' ' . __('By keywords') . ' '][$pic_right . ' ' . cut_text($val) . ' '][' ' . cut_text($val2) . ' '] = '?module=gallery&id=' . $val2; } } } } } } $kw = $gallery->getAvaiableValues('size'); $count = 0; if (is_array($kw)) { $kw = array_reverse($kw); $count++; $item[1] .= ' ' . $pic_down; if (!isset($dyna['min'])) { foreach ($kw as $key => $val) { if ($count != $dyna['max']) { $arr['ddm_gallery'][$pic_right . ' ' . __('By size') . ' '][$pic_right . ' ' . cut_text($val) . ' '] = array('-' => '?module=gallery&size=' . $val); $kw2 = $gallery->getLimitedImagesList('size', $val); $kw2 = array_reverse($kw2); $count2 = 0; foreach ($kw2 as $key2 => $val2) { $count2++; if ($count2 != $dyna['max']) { $arr['ddm_gallery'][$pic_right . ' ' . __('By size') . ' '][$pic_right . ' ' . cut_text($val) . ' '][' ' . cut_text($val2) . ' '] = '?module=gallery&id=' . $val2; } } } } } } $kw = $gallery->getAvaiableValues('type'); $count = 0; if (is_array($kw)) { $kw = array_reverse($kw); $count++; if (!isset($dyna['min'])) { foreach ($kw as $key => $val) { if ($count != $dyna['max']) { $arr['ddm_gallery'][$pic_right . ' ' . __('By type') . ' '][$pic_right . ' ' . cut_text($val) . ' '] = array('-' => '?module=gallery&type=' . $val); $kw2 = $gallery->getLimitedImagesList('type', $val); $kw2 = array_reverse($kw2); $count2 = 0; foreach ($kw2 as $key2 => $val2) { $count2++; if ($count2 != $dyna['max']) { $arr['ddm_gallery'][$pic_right . ' ' . __('By type') . ' '][$pic_right . ' ' . cut_text($val) . ' '][' ' . cut_text($val2) . ' '] = '?module=gallery&id=' . $val2; } } } } } } $kw = $gallery->getFullImagesList(); $count = 0; if (count($kw) > 0) { $kw = array_reverse($kw); $count++; foreach ($kw as $key => $val) { if ($count != $dyna['max']) { $arr['ddm_gallery'][' ' . cut_text($val) . ' '] = '?module=gallery&id=' . $val; } } } $item[4] = 'ddm_gallery'; } $item[3] = 'gallery.png'; } elseif ($item[0] == '?module=user.list') { if (!isset($dyna['use_mem'])) { $userlist = $system->getUserList('*', 'nickname'); $count = 0; if (count($userlist) > 0) { $item[1] .= ' ' . $pic_down; $userlist = array_reverse($userlist); foreach ($userlist as $conkey => $conval) { $count++; if ($count != $dyna['max']) { $arr['ddm_users'][' ' . cut_text($conval['nickname']) . ' '] = '?module=user.list&user='******'username']; } } } $item[4] = 'ddm_users'; } $item[3] = 'userlist.png'; } elseif ($item[0] == '?module=filesdb') { if (!isset($dyna['use_fdb'])) { $filesdb = new linksdb(DOWNLOADS_DATAFILE); $count = 0; if (!empty($filesdb->data)) { $item[1] .= ' ' . $pic_down; $fdb = array_reverse($filesdb->data); foreach ($fdb as $conkey => $conval) { $count++; if ($count != $dyna['max']) { $arr['ddm_filesdb'][' ' . cut_text($conval['name']) . ' '] = '?module=filesdb&id=' . (sizeof($fdb) - ($count - 1)); if (count($conval['files']) > 0) { if (!isset($dyna['min'])) { unset($arr['ddm_filesdb'][' ' . cut_text($conval['name']) . ' ']); $arr['ddm_filesdb'][$pic_right . ' ' . cut_text($conval['name']) . ' '] = array('-' => '?module=filesdb&id=' . (sizeof($fdb) - ($count - 1))); $count2 = 0; $conval['files'] = array_reverse($conval['files']); foreach ($conval['files'] as $artkey => $artval) { $count2++; if ($count2 != $dyna['max']) { $arr['ddm_filesdb'][$pic_right . ' ' . cut_text($conval['name']) . ' '][' ' . cut_text($artval['name']) . ' '] = '?module=filesdb&id=' . (sizeof($fdb) - ($count - 1)) . '&fid=' . (sizeof($conval['files']) - ($count2 - 1)); } } } } } } } $item[4] = 'ddm_filesdb'; } $item[3] = 'files.png'; } elseif ($item[0] == '?module=forum') { if (!isset($dyna['use_for'])) { $topics = @unserialize(@file_get_contents(FORUM_PATH . 'topic_index.dat')); $count = 0; if (count($topics) > 0) { $item[1] .= ' ' . $pic_down; if (is_array($topics)) { $topics = array_reverse($topics); foreach ($topics as $conkey => $conval) { $count++; if ($count != $dyna['max']) { $arr['ddm_forum'][' ' . cut_text($conval['title']) . ' '] = '?module=forum&id=' . (sizeof($topics) - $count) . '&action=topic'; } } } } $item[4] = 'ddm_forum'; } $item[3] = 'forum.png'; } elseif ($item[1] == 'CUSTOM1') { $item[1] = __(file_get_contents(CONFIG_PATH . 'custom_menu_title_1.txt')) . ' ' . $pic_down; $arr['ddm_custom1'] = arr2ddm(unserialize(file_get_contents(CONFIG_PATH . 'custom_menu_1.dat'))); $item[4] = 'ddm_custom1'; $item[3] = 'custom1.png'; } elseif ($item[1] == 'CUSTOM2') { $item[1] = __(file_get_contents(CONFIG_PATH . 'custom_menu_title_2.txt')) . ' ' . $pic_down; $arr['ddm_custom2'] = arr2ddm(unserialize(file_get_contents(CONFIG_PATH . 'custom_menu_2.dat'))); $item[4] = 'ddm_custom2'; $item[3] = 'custom2.png'; } elseif ($item[1] == 'CUSTOM3') { $item[1] = __(file_get_contents(CONFIG_PATH . 'custom_menu_title_3.txt')) . ' ' . $pic_down; $arr['ddm_custom3'] = arr2ddm(unserialize(file_get_contents(CONFIG_PATH . 'custom_menu_3.dat'))); $item[4] = 'ddm_custom3'; $item[3] = 'custom3.png'; } else { $item[3] = 'default.png'; } if (isset($dyna['ico'])) { $item[3] = '<img src="skins/icons/' . $item[3] . '">'; } else { $item[3] = ''; } $menu .= str_replace('{link}', $item[0], str_replace('{title}', $item[1], str_replace('{target}', @$item[2], str_replace('{icon}', $item[3], str_replace('{id}', $item[4], $format))))); // End of Icons support by Migel } $menu .= ' <br clear="both" /> </div>'; $result = $menu . ' <script type="text/javascript"> dhtmlmenu_build(' . convertArray($arr, 'arr') . ');</script></div>'; return $result; }
$frm->addrow(__('Add link to file'), $frm->select_tag('files', $files, -1, 'onChange="selChange(this.form)">\\n <option value="-1">' . __('Select file') . '</option') . ' ' . __('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')); } $frm->addrow(__('Mode'), $frm->select_tag('mode', $arr_modes, $article['mode']), 'top'); $frm->addrow(__('Date') . ' (yyyy-mm-dd hh:mm:ss)', $frm->text_box('time', gmdate("Y-m-d H:i:s", $article['time'])), 'top'); $frm->addrow(__('Allow comments'), $frm->radio_button('comments', array('yes' => __('Allow'), 'no' => __('Disallow')), $article['comments']), 'top'); $frm->show(); } elseif (!empty($b) || $c == '#hidden' || $c == '#root') { if ($articles->setWorkContainer($c)) { $frm = new InputForm('', 'post', __('Submit'), __('Reset')); $frm->addbreak(__('List of articles')); $frm->hidden('c', $c); $frm->hidden('b', $b); if (($list = $articles->getArticles($b, false, false, false)) !== false) { foreach (array_reverse($list, true) as $id => $article) { $frm->addrow('<a href="' . RCMS_ROOT_PATH . '?module=articles&c=' . $c . '&b=' . $b . '&a=' . $article['id'] . '" target="_blank">' . $article['title'] . '</a>' . ' [' . user_create_link($article['author_name'], $article['author_nick'], '_blank') . '] [' . rcms_format_time('d F Y H:i:s', $article['time']) . ']', $frm->checkbox('delete[' . $article['id'] . ']', '1', __('Delete')) . $frm->radio_button('a', array($article['id'] => __('Edit'))) . $frm->radio_button('move', array($article['id'] => __('Move')))); } } else { rcms_showAdminMessage($articles->last_error); } $frm->show(); } else { rcms_showAdminMessage($articles->last_error); } }
$arrErrors[] = ERROR_NOT_ENOUGH_RIGHTS; } } else { $arrErrors[] = ERROR_SELECTED_ARTICLE; } } else { $arrErrors[] = ERROR_TO_PERFORM_ACTION_SPECIFY_ALIAS; } } else { $arrErrors[] = ERROR_SELECTED_ARTICLE; } } elseif ($arrActions['moderate']) { // инициируем "Наименование страницы" отображаемое в заголовке формы $arrNamePage[] = array('name' => constant('MENU_ACTION_MODERATE'), 'link' => false); $strWhere = "id_user IN (" . secure::escQuoteData($arrUser['id']) . ") AND token IN ('moderate')"; $arrArticles = $articles->getArticles($strWhere, false, false, array('id', 'title', 'datetime', 'id_section')); $smarty->assignByRef('arrArticles', $arrArticles); } elseif ($arrActions['correction']) { /** ДЕЙСТВИЯ **/ if (!empty($_POST['action'])) { // удаление if ('delete' === $_POST['action'] && !empty($_SESSION['sd_' . DB_PREFIX . 'codex']['rights']['del_articles']) && !empty($_POST['articles'])) { $strWhere = "id_user IN (" . secure::escQuoteData($arrUser['id']) . ")"; !$articles->deleteArticles(array_keys($_POST['articles']), $strWhere) ? $arrErrors[] = db::$message_error : messages::messageChangeSaved(MESSAGE_CHANGE_SAVED, false, chpu::createChpuUrl(CONF_SCRIPT_URL . 'index.php?ut=' . $_SESSION['sd_user'][DB_PREFIX . 'conf']['user_type'] . '&do=user.articles&action=archived')); } } // инициируем "Наименование страницы" отображаемое в заголовке формы $arrNamePage[] = array('name' => constant('MENU_ACTION_CORRECTION'), 'link' => false); $strWhere = "id_user IN (" . secure::escQuoteData($arrUser['id']) . ") AND token IN ('correction')"; $arrArticles = $articles->getArticles($strWhere, false, false, false); $smarty->assignByRef('arrArticles', $arrArticles);
$result['success'] = true; $result['data'] = $comment; $result['attaches'] = $attaches; } echo json_encode($result); exit; break; default: $content = 'content_index.php'; // $page = __paramInit('int', 'p'); // if (!$page) $page = 1; if (isset($_GET['tag'])) { require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/kwords.php'; $tag_name = kwords::getKeyById(intval($_GET['tag'])); } $articles = articles::getArticles($page, $msgs_on_page, $uid, $_GET['tag'], true, null, $ord); $articles_count = articles::ArticlesCount(true, null, $_GET['tag']); $order = intval($_COOKIE['bmOrderType']); switch ($order) { case 0: $order = 'time'; break; case 1: $order = 'priority'; break; case 2: $order = 'title'; break; default: $order = 'time'; break;
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) ReloadCMS Development Team // // http://reloadcms.com // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// $name_module = __('Articles'); $articles = new articles(); $containers = $articles->getContainers(); if (!empty($containers) && is_array($containers)) { foreach (array_keys($containers) as $c) { if ($c != '#hidden') { if ($articles->setWorkContainer($c)) { if (is_array($articles->getCategories())) { foreach ($articles->getCategories() as $b) { foreach ($articles->getArticles($b['id'], true) as $article) { $loc = $directory . '?module=articles&c=' . str_replace('#', '%23', $c) . '&b=' . $b['id'] . '&a=' . $article['id']; $sitemap->addUrl($loc, rcms_format_time('Y-m-d', $article['time']), $chfr, $prio); } } } } } } }
} } else { //Poster une modification d'articles $_POST['title'] = trim(htmlentities($_POST['title'])); $_POST['author'] = trim(htmlentities($_POST['author'])); $_POST['content'] = trim(htmlentities($_POST['content'])); $articles->updateArticles($pdo, $date); header("Location: index.php?pages=listArticles"); exit; } } if (isset($_GET['deleteArticles'])) { //Supprimer un article $articles->deleteArticles($pdo, $date); if (isset($_SESSION['userId'])) { header("Location: index.php?pages=articles"); exit; } else { header("Location: index.php?pages=listArticles"); exit; } } if (isset($_GET['updateArticles'])) { $result = $articles->getArticles($pdo, $date); } else { $result['title'] = ''; $result['author'] = ''; $result['content'] = ''; $result['idCat'] = 1; $result['id'] = 0; }
$frm->addbreak(__('Additional information')); $frm->addrow(__('News') . ', ' . __('Articles'), format_size(get_dir_size(DATA_PATH . 'a/'))); $frm->addrow(__('Various datafiles'), format_size(get_dir_size(DF_PATH))); $frm->addrow(__('Users profiles') . ' (' . get_user_count() . ')', format_size(get_dir_size(USERS_PATH) + get_dir_size(DATA_PATH . 'avatars/') + get_dir_size(DATA_PATH . 'pm/'))); $frm->addrow(__('Uploads'), format_size(get_dir_size(FILES_PATH))); if (defined('GALLERY_PATH')) { $frm->addrow(__('Gallery'), format_size(get_dir_size(GALLERY_PATH))); } if (defined('FORUM_PATH')) { $frm->addrow(__('Forum'), format_size(get_dir_size(FORUM_PATH))); } $frm->addrow(__('Logs'), format_size(get_dir_size(LOGS_PATH))); $frm->addrow(__('Config'), format_size(get_dir_size(CONFIG_PATH))); $frm->addrow(__('Backups'), format_size(get_dir_size(BACKUP_PATH))); $frm->addrow(__('Skins'), format_size(get_dir_size(SKIN_PATH))); $frm->addrow(__('Images'), format_size(get_dir_size(IMAGES_PATH))); $frm->addrow(__('All'), format_size(get_dir_size(RCMS_ROOT_PATH))); if (class_exists('articles') && $system->checkForRight('ARTICLES-EDITOR')) { $frm->addbreak(__('Information from users')); $articles = new articles(); $articles->setWorkContainer('#hidden'); $count = sizeof($articles->getArticles(0, false, false, false)); $frm->addrow($count . ' ' . __('article(s) awaits moderation')); } if ($system->checkForRight('SUPPORT')) { $count = sizeof(get_messages(null, true, false, DF_PATH . 'support.dat')); $frm->addrow($count . ' ' . __('feedback requests in database')); } $frm->addbreak(__('Here you can leave message for other administrators')); $frm->addrow($frm->textarea('remarks', file_get_contents(DATA_PATH . 'admin_remarks.txt'), 60, 10), '', 'middle', 'center'); $frm->show();
foreach ($articles_list as $id => $time) { $id = explode('.', $id); if ((!$from || $time >= $from) && (!$until || $time <= $until)) { if ((($cat_data = $articles->getCategory($id[0], false)) !== false || $c == '#root') && ($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']), 'linkurl' => '?module=' . $module . '&c=' . str_replace('#', '%23', $c) . '&b=' . $article['catid'] . '&a=' . $article['id'], 'cat_data' => @$cat_data)); } } } } } $title = '<a class="winheader" href="?module=' . $module . '">' . __('Sections') . '</a> → ' . __('Search results'); show_window($title, $result); } elseif (!empty($c) && (!empty($b) || $c == '#root')) { if (!$articles->setWorkContainer($c)) { show_error($articles->last_error); } elseif (($contents = $articles->getArticles($b, true, true, false)) === false) { show_error($articles->last_error); } elseif ($c !== '#root' && !($category = $articles->getCategory($b, false))) { show_error($articles->last_error); } else { $containers = $articles->getContainers(); $result = ''; if ($c !== '#root') { $system->config['pagename'] = mb_strlen($category['title']) > $articles->config['category'] ? mb_substr($category['title'], 0, $articles->config['category']) . '...' : $category['title']; } else { $system->config['pagename'] = $containers[$c]; } foreach ($contents as $tmp_article) { $arr_art[$tmp_article['time']] = $tmp_article; } unset($contents);