本文整理汇总了PHP中rcms_showAdminMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP rcms_showAdminMessage函数的具体用法?PHP rcms_showAdminMessage怎么用?PHP rcms_showAdminMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rcms_showAdminMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rcms_showAdminMessage
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Update comments configuration //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['config']) && is_array($_POST['config'])) {
if (write_ini_file($_POST['config'], CONFIG_PATH . 'comments.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
} else {
rcms_showAdminMessage(__('Error occurred'));
}
}
////////////////////////////////////////////////////////////////////////////////
// Interface generation //
////////////////////////////////////////////////////////////////////////////////
$config = parse_ini_file(CONFIG_PATH . 'comments.ini');
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Comments configuration'));
$frm->addrow(__('Maximum message length'), $frm->text_box('config[max_message_len]', $config['max_message_len'], 5));
$frm->addrow(__('Maximum word length'), $frm->text_box('config[max_word_len]', $config['max_word_len'], 4));
$frm->addrow(__('Maximum size of database (in messages)'), $frm->text_box('config[max_db_size]', $config['max_db_size'], 5));
$frm->addbreak(__('Configuration') . ' bbcodes');
$frm->addrow(__('Enable nl2br and bbCodes') . __(' (except images)'), $frm->checkbox('config[bbcodes]', '1', '', @$config['bbcodes'], 4));
$frm->addrow(__('Enable all') . ' bbcodes', $frm->checkbox('config[links]', '1', '', @$config['links'], 4));
$frm->show();
示例2: elseif
$frm->addrow($lang['files']['ctitle'], $frm->text_box('ctitle', ''));
$frm->addrow($lang['files']['cdesc'], $frm->text_box('cdesc', ''));
$frm->show();
} elseif (!empty($_POST['edit']) && ($filesdb = download_get_data_file(DATA_PATH . 'downloads.dat'))) {
if (!empty($filesdb[$_POST['edit'] - 1])) {
$category =& $filesdb[$_POST['edit'] - 1];
$frm = new InputForm('', 'post', $lang['general']['submit']);
$frm->addmessage('<a href=""><<< ' . $lang['general']['back'] . '</a>');
$frm->addbreak($lang['files']['editcat']);
$frm->hidden('save', '1');
$frm->hidden('edit', $_POST['edit']);
$frm->addrow($lang['files']['ctitle'], $frm->text_box('ctitle', $category['name']));
$frm->addrow($lang['files']['cdesc'], $frm->text_box('cdesc', $category['desc']));
$frm->show();
} else {
rcms_showAdminMessage($lang['files']['invalidid']);
}
} else {
$frm = new InputForm('', 'post', $lang['files']['createcat']);
$frm->hidden('new', '1');
$frm->show();
$frm = new InputForm('', 'post', $lang['general']['submit']);
$frm->resetButton($lang['general']['reset']);
$filesdb = download_get_data_file(DATA_PATH . 'downloads.dat');
if (!empty($filesdb)) {
foreach ($filesdb as $cid => $cdata) {
$frm->addrow($cdata['name'] . ' (' . $cdata['desc'] . '). ' . $lang['files']['cfiles'] . count($cdata['files']), $frm->checkbox('delete[' . $cid . ']', '1', $lang['general']['delete']) . ' ' . $frm->radio_button('edit', array($cid + 1 => $lang['general']['edit']), 0));
}
}
$frm->show();
}
示例3: rcms_showAdminMessage
rcms_showAdminMessage($res);
}
if (!empty($_POST['delete']) && is_array($_POST['delete'])) {
$res = '';
foreach ($_POST['delete'] as $username => $delete) {
if ($delete) {
$res .= $lang['results']['users'][user_delete($username)];
}
}
rcms_showAdminMessage($res);
}
if (!empty($_POST['edit']) && !empty($_POST['save'])) {
rcms_showAdminMessage($lang['results']['users'][user_update($_POST['edit'], false, '', '', $_POST['email'], @$_POST['userdata'], true)]);
}
if (!empty($_POST['rights']) && !empty($_POST['save'])) {
rcms_showAdminMessage($lang['results']['users'][user_set_rights($_POST['rights'], @$_POST['rootuser'], @$_POST['_rights'])]);
}
/******************************************************************************
* Interface *
******************************************************************************/
$frm = new InputForm("", "post", $lang['general']['submit']);
$frm->addbreak($lang['admincp']['users']['profiles']['title']);
$frm->addrow($lang['users']['usersearch'], $frm->text_box('search', @$_POST['search']));
$frm->show();
if (!empty($_POST['edit']) && ($userdata = load_user_info($_POST['edit']))) {
$frm = new InputForm("", "post", $lang['general']['submit']);
$frm->resetButton($lang['general']['reset']);
$frm->addbreak($lang['admincp']['users']['profiles']['edit'] . $userdata['username']);
$frm->hidden('edit', $userdata['username']);
$frm->hidden('save', '1');
$frm->addrow($lang['users']['username'], $userdata['username']);
示例4: rcms_showAdminMessage
// 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['urls']) && !empty($_POST['names']) && is_array($_POST['urls']) && is_array($_POST['names'])) {
if (count($_POST['urls']) !== count($_POST['names'])) {
rcms_showAdminMessage($lang['general']['navigation_error']);
} else {
$result = array();
$cnt = count($_POST['urls']);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($_POST['urls'][$i])) {
$result[$i]['url'] = @$_POST['urls'][$i];
$result[$i]['name'] = $_POST['names'][$i];
}
}
write_ini_file($result, CONFIG_PATH . 'navigation.ini', true) or rcms_showAdminMessage($lang['general']['navigation_error']);
}
}
$links = parse_ini_file(CONFIG_PATH . 'navigation.ini', true);
// Interface generation
$frm = new InputForm("", "post", $lang['general']['submit']);
$frm->addbreak($lang['admincp']['general']['navigation']['title']);
$frm->addrow($lang['general']['url'], $lang['general']['title']);
foreach ($links as $link) {
$frm->addrow($frm->text_box('urls[]', $link['url']), $frm->text_box('names[]', $link['name']));
}
$frm->addrow($frm->text_box('urls[]', ''), $frm->text_box('names[]', ''));
$frm->addmessage($lang['general']['navigation_desc']);
$frm->show();
示例5: rcms_showAdminMessage
// //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['field_id']) && !empty($_POST['field_name'])) {
if (sizeof($_POST['field_id']) != sizeof($_POST['field_id'])) {
rcms_showAdminMessage(__('Cannot save configuration'));
} else {
$cnt = sizeof($_POST['field_id']);
for ($i = 0; $i < $cnt; $i++) {
if (!empty($_POST['field_id'][$i])) {
$result[$_POST['field_id'][$i]] = $_POST['field_name'][$i];
}
}
if (write_ini_file($result, CONFIG_PATH . 'users.fields.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
$system->data['apf'] = $result;
} else {
rcms_showAdminMessage(__('Cannot save configuration'));
}
}
}
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Manage additional fields'));
$frm->addrow(__('ID'), __('Title'));
foreach ($system->data['apf'] as $field_id => $field_name) {
$frm->addrow($frm->text_box('field_id[]', $field_id), $frm->text_box('field_name[]', $field_name));
}
$frm->addrow($frm->text_box('field_id[]', ''), $frm->text_box('field_name[]', ''));
$frm->addmessage(__('If you want to remove field leave its id and name empty. If you want to add new item you must write its data must to the last fields.'));
$frm->show();
示例6: rcms_showAdminMessage
<?php
////////////////////////////////////////////////////////////////////////////////
// Copyright (C) ReloadCMS Development Team //
// http://reloadcms.com //
// This product released under GNU General Public License v2 //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['nconfig']) && write_ini_file($_POST['nconfig'], CONFIG_PATH . 'search.ini')) {
rcms_showAdminMessage(__('Configuration updated'));
}
$system->config = parse_ini_file(CONFIG_PATH . 'search.ini');
$config =& $system->config;
// Interface generation
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Search engine configuration'));
$frm->addrow(__('Allow guests use searching'), $frm->checkbox('nconfig[guest]', '1', '', @$config['guest']));
$frm->addrow(__('Allow chose search source'), $frm->checkbox('nconfig[chose]', '1', '', @$config['chose']));
$frm->addrow(__('Check access level before search in article'), $frm->checkbox('nconfig[access]', '1', '', @$config['access']));
$frm->addrow(__('Min length'), $frm->text_box("nconfig[min]", @$config['min']));
$frm->addrow(__('Max length'), $frm->text_box("nconfig[max]", @$config['max']));
$frm->addrow(__('Output block length'), $frm->text_box("nconfig[block]", @$config['block']));
$frm->addrow(__('Editbox width'), $frm->text_box("nconfig[width]", @$config['width']));
$frm->show();
示例7: rcms_showAdminMessage
////////////////////////////////////////////////////////////////////////////////
// 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['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);
}
示例8: write_ini_file
if (!empty($url)) {
if (!empty($_POST['ext'][$i])) {
$ins['url'] = 'external:' . $url;
} else {
$ins['url'] = $url;
}
$ins['name'] = $_POST['names'][$i];
$result[] = $ins;
}
}
write_ini_file($result, CONFIG_PATH . 'navigation.ini', true) or rcms_showAdminMessage(__('Error occurred'));
}
} elseif (!empty($_POST['addlink']) && !empty($_POST['addlink']['url'])) {
$links = parse_ini_file(CONFIG_PATH . 'navigation.ini', true);
$links[] = $_POST['addlink'];
write_ini_file($links, CONFIG_PATH . 'navigation.ini', true) or rcms_showAdminMessage(__('Error occurred'));
}
if (!empty($_POST['dy'])) {
write_ini_file($_POST['dy'], CONFIG_PATH . 'dynamik.ini');
}
if (!empty($_POST['c1title'])) {
file_write_contents(CONFIG_PATH . 'custom_menu_title_1.txt', $_POST['c1title']);
}
if (!empty($_POST['c2title'])) {
file_write_contents(CONFIG_PATH . 'custom_menu_title_2.txt', $_POST['c2title']);
}
if (!empty($_POST['c3title'])) {
file_write_contents(CONFIG_PATH . 'custom_menu_title_3.txt', $_POST['c3title']);
}
if (!empty($_POST['c1'])) {
txt2dat($_POST['c1'], CONFIG_PATH . 'custom_menu_1.dat');
示例9: elseif
$frm->addrow($lang['files']['link'], $frm->text_box('link', $filesdb[$cid]['files'][$fid]['link']));
$frm->addrow($lang['files']['type'], $frm->select_tag('type', $lang['files']['types']));
$frm->show();
} elseif (!empty($_POST['cid'])) {
$frm = new InputForm('', 'post', '<<< ' . $lang['general']['back']);
$frm->show();
$frm = new InputForm('', 'post', $lang['files']['addfile']);
$frm->hidden('new', $_POST['cid']);
$frm->show();
if (!empty($filesdb[$_POST['cid'] - 1]['files'])) {
$frm = new InputForm('', 'post', $lang['general']['submit']);
$frm->resetButton($lang['general']['reset']);
$frm->hidden('cid', $_POST['cid']);
foreach ($filesdb[$_POST['cid'] - 1]['files'] as $fid => $fdata) {
$frm->addrow($fdata['link'] . '<br>' . $fdata['name'] . ' (' . $fdata['desc'] . '). ' . $lang['files']['filesize'] . $fdata['size'], $frm->checkbox('delete[' . $fid . ']', '1', $lang['general']['delete']) . ' ' . $frm->radio_button('edit', array($fid => $lang['general']['edit']), 0), 'top');
}
$frm->show();
}
} else {
$clist = array();
foreach ($filesdb as $cid => $cdata) {
$clist[$cid + 1] = $cdata['name'];
}
if (!empty($clist)) {
$frm = new InputForm('', 'post', $lang['admincp']['browse']);
$frm->addrow($lang['files']['browsecat'], $frm->select_tag('cid', $clist));
$frm->show();
} else {
rcms_showAdminMessage($lang['files']['nocats']);
}
}
示例10: rcms_showAdminMessage
}
}
if (!empty($_POST['stop'])) {
if (!$polls->removePoll($_POST['stop'], true)) {
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'));
示例11: elseif
$frm->show();
} elseif (!empty($_POST['edit'])) {
if (!empty($containers[$_POST['edit']])) {
$container =& $containers[$_POST['edit']];
$frm = new InputForm('', 'post', __('Submit'));
$frm->addmessage('<a href=""><<< ' . __('Back') . '</a>');
if ($_POST['edit'] != '#root' && $_POST['edit'] != '#hidden') {
$frm->addbreak(__('Edit section'));
$frm->hidden('save', '1');
$frm->hidden('edit', $_POST['edit']);
$frm->addrow(__('ID'), $frm->text_box('id', $_POST['edit']));
$frm->addrow(__('Title'), $frm->text_box('title', $container));
}
$frm->show();
} else {
rcms_showAdminMessage(__('Section with this ID doesn\'t exists'));
}
} else {
$frm = new InputForm('', 'post', __('Create section'));
$frm->hidden('new', '1');
$frm->show();
$frm = new InputForm('', 'post', __('Submit'), __('Reset'));
if (!empty($containers)) {
foreach ($containers as $id => $title) {
if ($id != '#root' && $id != '#hidden') {
$frm->addrow($title, $frm->checkbox('delete[' . $id . ']', '1', __('Delete')) . ' ' . $frm->radio_button('edit', array($id => __('Edit')), 0));
}
}
}
$frm->show();
}
示例12: InputForm
$frm = new InputForm('', 'post', __('Show selected'));
$frm->addbreak(__('Avaible logs in archive') . ' ' . $_POST['browse']);
$frm->hidden('showlogs_from_archive', '1');
$frm->hidden('archive', $_POST['browse']);
foreach ($archive->files as $file_data) {
if (preg_match("/^((.*?)-(.*?)-(.*?))\\.log(|.gz)\$/i", $file_data['name'], $matches)) {
$frm->addrow($matches[1], $frm->checkbox('viewlog[]', $file_data['name'], ''));
}
}
$frm->show();
unset($archive);
}
} else {
if (!empty($_POST['build_monthly'])) {
$system->logMergeByMonth();
rcms_showAdminMessage(__('Archivation done'));
}
$frm = new InputForm('', 'post', __('Build monthly log archives (except current month)'));
$frm->hidden('build_monthly', '1');
$frm->show();
$frm = new InputForm('', 'post', __('Show selected'));
$logs = rcms_scandir($system->logging);
$frm->addbreak(__('Avaible logs'));
$frm->hidden('showlogs', '1');
foreach ($logs as $log_entry) {
if (preg_match("/^((.*?)-(.*?)-(.*?))\\.log(|.gz)\$/i", $log_entry, $matches)) {
$frm->addrow($matches[1], $frm->checkbox('viewlog[]', $log_entry, ''));
}
}
$frm->show();
$frm = new InputForm('', 'post', __('Browse selected'));
示例13: __
<?php
}
?>
<input type="submit" name="save" value="<?php
echo __('Submit');
?>
">
</form>
</td>
</tr>
</table>
<?php
} elseif (!empty($_REQUEST['rename']) && $_REQUEST['rename'] != '.') {
if (!empty($_REQUEST['save'])) {
rcms_rename_file($_REQUEST['path'] . $_REQUEST['rename'], $_REQUEST['path'] . $_REQUEST['newname']);
rcms_showAdminMessage(__('File updated'));
$_REQUEST['rename'] = $_REQUEST['newname'];
}
clearstatcache();
$link = $url_inc . '&rename=' . $_REQUEST['rename'] . '&path=' . $_REQUEST['path'];
$backlink = $url_inc . '&path=' . $_REQUEST['path'];
?>
<table border='0' cellspacing='0' cellpadding='1' width="100%">
<tr>
<th><?php
echo __('File manager') . ' - ' . __('Rename') . ' - ' . $_REQUEST['rename'];
?>
</th>
</tr>
<tr>
<td class="row1">
示例14: InputForm
$frm = new InputForm('', 'post', __('Submit'), '', '', '', 'edit');
$frm->addmessage('<a href=""><<< ' . __('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();
$frm = new InputForm('', 'post', __('Submit'), __('Reset'));
$frm->addbreak(__('List'));
$menus = rcms_scandir(SENDMAIL_PATH);
foreach ($menus as $id => $menu) {
$frm->addrow(__('File') . ': <a href="' . RCMS_ROOT_PATH . '?module=sendmail&get=' . $menu . '" target="_blank">' . $menu . '</a> ', $frm->checkbox('delete[' . $menu . ']', '1', __('Delete')) . ' ' . $frm->radio_button('edit', array($menu => __('Edit'))));
}
$frm->show();
}
示例15: rcms_loadAdminLib
// 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();