<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 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 // //////////////////////////////////////////////////////////////////////////////// rcms_loadAdminLib('file-uploads'); /****************************************************************************** * Perform uploading * ******************************************************************************/ if (!empty($_FILES['upload'])) { if (fupload_array($_FILES['upload'])) { rcms_showAdminMessage(__('Files uploaded')); } else { rcms_showAdminMessage(__('Error occurred')); } } /****************************************************************************** * Perform deletion * ******************************************************************************/ if (!empty($_POST['delete'])) { $result = ''; foreach ($_POST['delete'] as $file => $cond) { $file = basename($file); if (!empty($cond)) {
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) 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 // //////////////////////////////////////////////////////////////////////////////// rcms_loadAdminLib('ucm'); if (!empty($_POST['save'])) { $content = ''; $i = -1; if (!empty($_POST['menus'])) { foreach ($_POST['menus'] as $element) { if (substr($element, 0, 1) == '/') { $content .= '[' . substr($element, 1) . "]\n"; $i = 0; } elseif ($i !== -1) { $content .= $i . '=' . $element . "\n"; $i++; } } } file_write_contents(CONFIG_PATH . 'menus.ini', $content); } /****************************************************************************** * Interface *
<?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 // //////////////////////////////////////////////////////////////////////////////// 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');
<?php /////////////////////////////////////////API/////////////////////////////////////////////// rcms_loadAdminLib('sitemap'); //$directory = 'http://'.$_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'] . basename($_SERVER['SCRIPT_NAME'])); $directory = 'http://' . $_SERVER['HTTP_HOST'] . '/'; $priority = array('0.1' => '0.1', '0.2' => '0.2', '0.3' => '0.3', '0.4' => '0.4', '0.5' => '0.5', '0.6' => '0.6', '0.7' => '0.7', '0.8' => '0.8', '0.9' => '0.9', '1' => '1'); $changefreq = array('always' => 'always', 'hourly' => 'hourly', 'daily' => 'daily', 'weekly' => 'weekly', 'monthly' => 'monthly', 'yearly' => 'yearly', 'never' => 'never'); if (!empty($_POST['names']) && is_array($_POST['names'])) { $names = $_POST['changefreq']; foreach ($names as $name => $value) { if (in_array($name, $_POST['names'])) { $config[$name]['changefreq'] = $_POST['changefreq'][$name]; $config[$name]['priority'] = $_POST['priority'][$name]; } } if (write_ini_file($config, CONFIG_PATH . 'sitemap.ini', true)) { rcms_showAdminMessage(__('Configuration updated')); } } $config = @parse_ini_file(CONFIG_PATH . 'sitemap.ini', true); /////////////////////////////////////Initialization///////////////////////////////////////// if (!empty($_POST['create']) && !empty($_POST['filename'])) { $frm = new InputForm('', 'post', '<<< ' . __('Back')); $frm->show(); $sitemap = new SitemapGenerator($directory); $time = explode(" ", microtime()); $time = $time[1]; if (isset($_POST['sitemap_dat'])) { file_write_contents(DF_PATH . 'sitemap.dat', $_POST['sitemap_dat']); }
<?php //////////////////////////////////////////////////////////////////////////////// // Copyright (C) ReloadCMS Development Team // // http://reloadcms.com // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// //Initialization API rcms_loadAdminLib('archive'); $result = ''; //Save in archive ./content and ./config if (!empty($_POST['backupit'])) { set_time_limit(0); rcms_clear_directory(CACHE_DIR); if (!empty($_POST['gzip'])) { $suffix = '.gz'; } else { $suffix = ''; } $bkupfilename = BACKUP_PATH . 'backup_' . (!empty($_POST['all']) ? 'all_' : '') . date('d.m.Y_H-i-s') . '.tar' . $suffix; $backup = new archiveTar(); $backup->archive_name = $bkupfilename; if (!empty($_POST['gzip'])) { $backup->isGzipped = true; } else { $backup->isGzipped = false; } if (empty($_POST['all'])) { $success = $backup->createArchive(array(DATA_PATH, CONFIG_PATH)); } else { //All files to archive, except 'backups','uploads'