Esempio n. 1
0
if (isset($_POST['remarks'])) {
    file_write_contents(DATA_PATH . 'admin_remarks.txt', $_POST['remarks']);
}
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Welcome to administration panel'));
if (!$root) {
    foreach ($rights as $right => $right_desc) {
        $frm->addrow($right, $right_desc, 'top');
    }
} else {
    $frm->addrow(__('You have all rights on this site'));
}
$frm->addbreak(__('Information'));
$frm->addrow('httpd', $_SERVER['SERVER_SOFTWARE']);
$frm->addrow('php', phpversion());
$frm->addrow('ReloadCMS', RCMS_VERSION_A . '.' . RCMS_VERSION_B . '.' . RCMS_VERSION_C . RCMS_VERSION_SUFFIX);
$frm->addbreak(__('Additional information'));
$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(__('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)));
if ($system->checkForRight('ARTICLES-EDITOR')) {
    $frm->addbreak(__('Information from users'));
}
if ($system->checkForRight('SUPPORT')) {
    $count = sizeof(guestbook_get_msgs(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();
Esempio n. 2
0
<?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                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['d'])) {
    foreach ($_POST['d'] as $id => $cond) {
        if ($cond) {
            guestbook_post_remove($id, DF_PATH . 'support.dat');
        }
    }
}
$messages = guestbook_get_msgs(null, true, false, DF_PATH . 'support.dat');
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Feedback requests'));
foreach ($messages as $id => $message) {
    $frm->addrow('[' . rcms_format_time('d F Y H:i:s', $message['time'], $system->user['tz']) . '] ' . __('Message by') . ' ' . user_create_link($message['username'], $message['nickname']) . '<hr>' . $message['text'], $frm->checkbox('d[' . $id . ']', '1', __('Delete')));
}
$frm->show();