Esempio n. 1
0
//                                                                            //
//   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();
//   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();
Esempio n. 3
0
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['new'])) {
    $frm = new InputForm('', 'post', __('Submit'));
    $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
    $frm->addbreak(__('Create menu'));
    $frm->hidden('newsave', '1');
    $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $frm->text_box('id', ''));
    $frm->addrow(__('Title'), $frm->text_box('title', ''));
    $frm->addrow(__('Alignment'), $frm->select_tag('align', array('center' => __('Center'), 'left' => __('Left'), 'right' => __('Right'), 'justify' => __('Justify'))));
    $frm->addrow(__('Text') . tinymce_selector('text') . '<br/>' . __('All HTML is allowed in this field and line breaks will not be transformed to &lt;br&gt; tags!'), $frm->textarea('text', '', 70, 25), 'top');
    $frm->show();
} elseif (!empty($_REQUEST['edit'])) {
    if ($menu = ucm_get($_REQUEST['edit'])) {
        $frm = new InputForm("", "post", __('Submit'));
        if (!empty($_GET['edit'])) {
            $frm->addmessage('&lt;&lt;&lt; <a href="' . RCMS_ROOT_PATH . '">' . __('Return to') . ' ' . __('site index') . '</a>');
        } else {
            $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
        }
        $frm->addbreak(__('Menu editing'));
        $frm->hidden('edit', $_REQUEST['edit']);
        $frm->hidden('save', '1');
        if (empty($_GET['edit'])) {
            $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $frm->text_box('id', $_REQUEST['edit']));
        } else {
            $frm->addrow('<abbr title="' . __('Use only small Latin letters and digits') . '">' . __('MenuID') . '</abbr>', $_REQUEST['edit'] . $frm->hidden('id', $_REQUEST['edit']));
        }
        $frm->addrow(__('Title'), $frm->text_box('title', $menu[0]));
        $frm->addrow(__('Alignment'), $frm->select_tag('align', array('center' => __('Center'), 'left' => __('Left'), 'right' => __('Right'), 'justify' => __('Justify')), $menu[2]));
        $frm->addrow(__('Text') . tinymce_selector('text') . '<br/>' . __('All HTML is allowed in this field and line breaks will not be transformed to &lt;br&gt; tags!'), $frm->textarea('text', $menu[1], 70, 25), 'top');
        $frm->show();
Esempio n. 4
0
$frm->addrow(__('Module on index page'), $frm->select_tag('nconfig[index_module]', $avaible_modules, @$config['index_module']));
$frm->addrow(__('Hide welcome message'), $frm->checkbox('nconfig[wmh]', '1', '', @$config['wmh']));
$frm->addrow(__('Text of Welcome message') . tinymce_selector('welcome_mesg'), $frm->textarea('welcome_mesg', file_get_contents(DATA_PATH . 'intro.html'), 70, 20), 'top');
$frm->addrow(__('Additional meta tags for your site'), $frm->textarea('meta_tags', file_get_contents(DATA_PATH . 'meta_tags.html'), 70, 5), 'top');
$frm->addrow(__('Add to external link') . '.<br /> ' . __('Example') . ": rel='nofollow' class='external'", $frm->text_box('nconfig[addtolink]', @$config['addtolink']));
//Redirect
$add_redirect = '<div>+' . __(' from ') . "<input type=\\'text\\' name=\\'redirect[from_arr][]\\' size=\\'35\\' />*" . __(' to ') . "<input type=\\'text\\' name=\\'redirect[to_arr][]\\' size=\\'35\\'/>*" . "<img src=\\'" . IMAGES_PATH . "skins/neok.gif\\' title=\\'" . __('Delete') . "\\' style=\\'cursor:pointer;display:table-cell;vertical-align:middle;\\' onClick=\\'\$(\$(this).parents().get(0)).remove();\\'>" . '</div>';
$frm->addbreak(__('Redirect') . '&nbsp;&nbsp;&nbsp;<img onClick="$(\'#add_redirect\').append(\'' . $add_redirect . '\');" title="' . __('Add') . '" src="' . IMAGES_PATH . 'skins/plus.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;"/>');
if (!empty($redirect['from_arr'])) {
    foreach ($redirect['from_arr'] as $i => $value) {
        if (!empty($redirect['from_arr'][$i])) {
            $frm->addrow(__(' from ') . ' ' . $frm->text_box('redirect[from_arr][]', @$redirect['from_arr'][$i], 35), __(' to ') . $frm->text_box('redirect[to_arr][]', @$redirect['to_arr'][$i], 35) . '<img src="' . IMAGES_PATH . 'skins/neok.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;" onClick="$($(this).parents(\'tr\').get(0)).remove();">');
        }
    }
}
$frm->addmessage('<div id="add_redirect"></div>');
//Performance
$frm->addbreak(__('Performance'));
$frm->addrow(__('Disable statistic'), $frm->checkbox('nconfig[disable_stats]', '1', '', @$config['disable_stats']));
$frm->addrow(__('Enable site cache in seconds (0 - disabled)'), $frm->text_box('nconfig[cache]', @$config['cache'], 10));
$frm->addrow(__('Clear cache directory'), $frm->checkbox('clear_cache', '1', '', false));
$frm->addrow(__('Disable modules in cache'), $frm->textarea('nconfig[disable_cache]', @$config['disable_cache'], 70, 10), 'top');
//Interaction with user
$frm->addbreak(__('Interaction with user'));
$frm->addrow(__('Email for users letters'), $frm->text_box("nconfig[admin_email]", @$config['admin_email'], 30));
$frm->addrow(__('Disallow guest post to Articles'), $frm->checkbox('nconfig[article-guest]', '1', '', @$config['article-guest']));
$frm->addrow(__('Disallow guest post comments to Guestbook'), $frm->checkbox('nconfig[guestbook-guest]', '1', '', @$config['guestbook-guest']));
$frm->addrow(__('Disallow guest post comments to Gallery'), $frm->checkbox('nconfig[gallery-guest]', '1', '', @$config['gallery-guest']));
$frm->addrow(__('Disallow guest post to Forum'), $frm->checkbox('nconfig[forum-guest]', '1', '', @$config['forum-guest']));
$frm->addrow(__('Disallow user selection of password in registration form'), $frm->checkbox('nconfig[regconf]', '1', '', @$config['regconf']));
$frm->addrow(__('Period when one password request can be acomplished (seconds)'), $frm->text_box('nconfig[pr_flood]', @$config['pr_flood']));
Esempio n. 5
0
            }
        }
    }
    $gallery->saveIndexFiles();
    if (!empty($result)) {
        rcms_showAdminMessage($result);
    }
}
/******************************************************************************
* Interface                                                                   *
******************************************************************************/
$files = $gallery->getFullImagesList();
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Uploaded images'));
if (!empty($files)) {
    $frm->addmessage(__('To divide keywords use ; symbol'));
    // Pagination
    if (!empty($system->config['perpage'])) {
        $perpage = $system->config['perpage'] * 3;
        $pages = ceil(sizeof($files) / $perpage);
        if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
            $page = (int) $_GET['page'] - 1;
        } else {
            $page = 0;
        }
        $start = $page * $perpage;
        $total = $perpage;
    } else {
        $pages = 1;
        $page = 0;
        $start = 0;
Esempio n. 6
0
}
if (!empty($_POST['new'])) {
    $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'mainfrm');
    $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
    $frm->addbreak(__('Add category'));
    $frm->hidden('newsave', '1');
    $frm->addrow(__('Title'), $frm->text_box('ctitle', ''));
    $frm->addrow(rcms_show_bbcode_panel('mainfrm.cdesc'));
    $frm->addrow(__('Description'), $frm->textarea('cdesc', '', 70, 5), 'top');
    $frm->addrow(__('Minimum access level'), $frm->text_box('clevel', '0'));
    $frm->show();
} elseif (!empty($_POST['edit'])) {
    if (!empty($filesdb->data[$_POST['edit'] - 1])) {
        $category =& $filesdb->data[$_POST['edit'] - 1];
        $frm = new InputForm('', 'post', __('Submit'), '', '', '', 'mainfrm');
        $frm->addmessage('<a href="">&lt;&lt;&lt; ' . __('Back') . '</a>');
        $frm->addbreak(__('Edit category'));
        $frm->hidden('save', '1');
        $frm->hidden('edit', $_POST['edit']);
        $frm->addrow(__('Title'), $frm->text_box('ctitle', $category['name']));
        $frm->addrow(rcms_show_bbcode_panel('mainfrm.cdesc'));
        $frm->addrow(__('Description'), $frm->textarea('cdesc', $category['desc'], 70, 5), 'top');
        $frm->addrow(__('Minimum access level'), $frm->text_box('clevel', @$category['accesslevel']));
        $frm->show();
    } else {
        rcms_showAdminMessage(__('Error occurred'));
    }
} else {
    $frm = new InputForm('', 'post', __('Add category'));
    $frm->hidden('new', '1');
    $frm->show();
Esempio n. 7
0
             $result .= __('Cannot update title') . ': ' . $filename . '<br/>';
         }
         if (@$current['keywords'] !== $_POST['keywords']) {
             if ($gallery->changeKeywords($filename, $_POST['keywords'])) {
                 $result .= __('Keywords updated') . ': ' . $filename . '<br/>';
             } else {
                 $result .= __('Cannot update keywords') . ': ' . $filename . '<br/>';
             }
         }
         $gallery->saveIndexFiles();
     }
     $current = $gallery->getData(basename($_GET['edit']));
     $frm = new InputForm('', 'post', __('Submit'));
     $frm->hidden('save', 1);
     $frm->addrow(__('Title') . ': ' . $frm->text_box('title', $current['title']) . '<br/>' . __('Keywords') . ': ' . $frm->text_box('keywords', @$current['keywords']) . '<br/>' . $current['type'] . '(' . $current['size'] . ')<br/>' . $frm->checkbox('delete', $filename, __('Delete')), $gallery->getThumbnail($filename), 'top');
     $frm->addmessage(__('To divide keywords use ; symbol'));
     if (!empty($result)) {
         show_window($gallery_link . ' &rarr; ' . __('Result'), $result);
     }
     show_window($gallery_link . ' &rarr; ' . __('Edit') . ' ' . $filename, $frm->show(true) . back_button());
 }
 $result = '';
 if (!empty($_GET['delete'])) {
     $filename = $_GET['delete'];
     if ($gallery->removeImage($filename)) {
         $result .= __('Image removed') . ': ' . $filename . '<br/>';
     } else {
         $result .= __('Error occurred') . ': ' . $filename . '<br/>';
     }
 }
 if (!empty($_POST['delete'])) {
// Interface generation                                                       //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['new'])) {
    $frm = new InputForm("", "post", $lang['general']['submit']);
    $frm->addmessage('<a href="">&lt;&lt;&lt; ' . $lang['general']['back'] . '</a>');
    $frm->addbreak($lang['admincp']['general']['ucm']['create']);
    $frm->hidden('newsave', '1');
    $frm->addrow('<abbr title="' . $lang['general']['ucm']['id_h'] . '">' . $lang['general']['ucm']['id'] . '</abbr>', $frm->text_box('id', ''));
    $frm->addrow('<abbr title="' . $lang['general']['ucm']['title_h'] . '">' . $lang['general']['ucm']['title'] . '</abbr>', $frm->text_box('title', ''));
    $frm->addrow($lang['general']['alignment'], $frm->select_tag('align', $lang['general']['align']));
    $frm->addrow($lang['general']['ucm']['text'] . '<br>' . $lang['general']['ucm']['text_h'], $frm->textarea('text', '', 70, 25), 'top');
    $frm->show();
} elseif (!empty($_POST['edit'])) {
    if ($menu = ucm_get($_POST['edit'])) {
        $frm = new InputForm("", "post", $lang['general']['submit']);
        $frm->addmessage('<a href="">&lt;&lt;&lt; ' . $lang['general']['back'] . '</a>');
        $frm->addbreak($lang['admincp']['general']['ucm']['edit']);
        $frm->hidden('edit', $_POST['edit']);
        $frm->hidden('save', '1');
        $frm->addrow('<abbr title="' . $lang['general']['ucm']['id_h'] . '">' . $lang['general']['ucm']['id'] . '</abbr>', $frm->text_box('id', $_POST['edit']));
        $frm->addrow('<abbr title="' . $lang['general']['ucm']['title_h'] . '">' . $lang['general']['ucm']['title'] . '</abbr>', $frm->text_box('title', $menu[0]));
        $frm->addrow($lang['general']['alignment'], $frm->select_tag('align', $lang['general']['align'], $menu[2]));
        $frm->addrow($lang['general']['ucm']['text'] . '<br>' . $lang['general']['ucm']['text_h'], $frm->textarea('text', $menu[1], 70, 25), 'top');
        $frm->show();
    } else {
        rcms_showAdminMessage($lang['results']['general'][8]);
    }
} else {
    $frm = new InputForm('', 'post', $lang['general']['createucm']);
    $frm->hidden('new', '1');
    $frm->show();
Esempio n. 9
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['d'])) {
    foreach ($_POST['d'] as $id => $cond) {
        if ($cond) {
            post_remove($id, DF_PATH . 'support.dat');
        }
    }
}
$messages = get_messages(null, true, false, DF_PATH . 'support.dat');
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Feedback requests'));
if (!empty($messages)) {
    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')));
    }
} else {
    $frm->addmessage(__('Nothing founded'));
}
$frm->show();
Esempio n. 10
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['ban'])) {
    file_write_contents(CONFIG_PATH . 'bans.ini', @implode("\n", @$_POST['ban']));
}
if (!($banlist = @file(CONFIG_PATH . 'bans.ini'))) {
    $banlist = array();
}
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Manage banned IP addresses'));
foreach ($banlist as $ban) {
    $ban = trim($ban);
    if (!empty($ban)) {
        $frm->addrow($frm->text_box('ban[]', $ban, 40), '', 'middle', 'center');
    }
}
$frm->addrow($frm->text_box('ban[]', '', 40), '', 'middle', 'center');
$frm->addmessage(__('If you want to remove ip address leave it\'s string empty. If you want to add new ip address write it in the last field. You can use * that will match only one part of ip address.'));
$frm->show();
Esempio n. 11
0
$frm->addrow(__('Off for ') . '"' . __('Articles') . '"', $frm->checkbox('dy[use_art]', '1', '', @$dyna['use_art']));
$frm->addrow(__('Off for ') . '"' . __('Gallery') . '"', $frm->checkbox('dy[use_gal]', '1', '', @$dyna['use_gal']));
$frm->addrow(__('Off for ') . '"' . __('Member list') . '"', $frm->checkbox('dy[use_mem]', '1', '', @$dyna['use_mem']));
$frm->addrow(__('Off for ') . '"' . __('FilesDB') . '"', $frm->checkbox('dy[use_fdb]', '1', '', @$dyna['use_fdb']));
$frm->addrow(__('Off for ') . '"' . __('Forum') . '"', $frm->checkbox('dy[use_for]', '1', '', @$dyna['use_for']));
$frm->addbreak(__('Navigation editor'));
$frm->addrow(__('Link'), __('Title'));
$i = 0;
foreach ($links as $link) {
    $tmp = explode(':', $link['url'], 2);
    $checked = $tmp[0] == 'external';
    if ($checked) {
        $link['url'] = $tmp[1];
    }
    $frm->addrow($frm->text_box('urls[' . $i . ']', $link['url']), $frm->text_box('names[' . $i . ']', $link['name']) . $frm->checkbox('ext[' . $i . ']', '1', __('Open in new window'), $checked));
    $i++;
}
$frm->addrow($frm->text_box('urls[' . $i . ']', ''), $frm->text_box('names[' . $i . ']', '') . $frm->checkbox('ext[' . $i . ']', '1', __('Open in new window')));
$frm->addmessage(__('If you want to remove link leave it\'s URL empty. If you want to add new item fill in the last row.'));
$frm->addmessage(__('You can use modifiers to create link to specified part of your site. Type MODIFIER:OPTIONS in "Link" column. If you want to override default title of modified link you must enter your title to "Title" column, or leave it empty to use default one. Here is a list of modifiers:'));
foreach ($system->navmodifiers as $modifier => $options) {
    $frm->addrow($modifier, call_user_func($system->navmodifiers[$modifier]['h']));
}
$frm->addrow(__('CUSTOM1 or CUSTOM2 or CUSTOM3 (tilte column)'), __('Use it for custom menu'));
$frm->addbreak(__('Custom menu editor'));
$frm->addrow(':', __('Separator beetwen title and link (example: MyLink:www.example.com.ua)'));
$frm->addrow('>', __('Use it for define line as subitem (example: >MyLink:www.example.com.ua)'));
$frm->addrow('<b>CUSTOM1:</b>', $frm->text_box('c1title', file_get_contents(CONFIG_PATH . 'custom_menu_title_1.txt'), 100) . '<br>' . $frm->textarea('c1', dat2txt(CONFIG_PATH . 'custom_menu_1.dat'), 100, 20), 'top', 'left');
$frm->addrow('<b>CUSTOM2:</b>', $frm->text_box('c2title', file_get_contents(CONFIG_PATH . 'custom_menu_title_2.txt'), 100) . '<br>' . $frm->textarea('c2', dat2txt(CONFIG_PATH . 'custom_menu_2.dat'), 100, 20), 'top', 'left');
$frm->addrow('<b>CUSTOM3:</b>', $frm->text_box('c3title', file_get_contents(CONFIG_PATH . 'custom_menu_title_3.txt'), 100) . '<br>' . $frm->textarea('c3', dat2txt(CONFIG_PATH . 'custom_menu_3.dat'), 100, 20), 'top', 'left');
$frm->show();
Esempio n. 12
0
    if ($add) {
        $ins = 'if (this.value!=-1) {if (document.forms[\'' . $frm . '\'].elements[\'' . $key . '\'].value != \'\') insert_text(document.forms[\'' . $frm . '\'].elements[\'' . $key . '\'], \';\'); insert_text(document.forms[\'' . $frm . '\'].elements[\'' . $key . '\'],  this.options[selectedIndex].text);}';
    } else {
        $ins = 'if (this.value!=-1) document.forms[\'' . $frm . '\'].elements[\'' . $key . '\'].value = this.options[selectedIndex].text;';
    }
    if (!empty($array_keys) && is_array($array_keys)) {
        $result .= ' 
	<select name="all_keys" onchange="' . $ins . '">
	<option value="-1">' . __('Select') . '</option>';
        foreach ($array_keys as $key => $keyword) {
            $result .= '<option value="' . $key . '" >' . $keyword . '</option>';
        }
        $result .= '</select>';
    }
    return $result;
}
//Upload form
$frm_name = 'newpicture';
$keywords = array_keys($gallery->indexes['keywords']);
$frm = new InputForm('', 'post', __('Submit'), '', '', 'multipart/form-data', $frm_name);
$frm->addbreak(__('Upload images'));
$code_to_repeat = __('Image') . ': ' . $frm->file('upload[]') . '<br />' . __('Keywords') . ': ' . $frm->text_box('keywords[]', '') . '<br />' . __('Title') . ': ' . $frm->text_box('title[]', '') . '<br /><br />';
$js_b = '<script type="text/javascript">function add_file_field(){ var ni = document.getElementById(\'upload_images\'); var newdiv = document.createElement(\'div\'); newdiv.innerHTML = \'' . $code_to_repeat . '\'; ni.appendChild(newdiv); }</script>';
$js_a = '<script type="text/javascript">add_file_field();</script>';
$frm->addrow(__('Select images to upload'), $js_b . '<span id="upload_images"></span>' . $js_a . '<a href="#" onclick="add_file_field();">' . __('Upload another image') . '</a>', 'top');
$frm->addrow(__('Keywords for all images'), $frm->text_box('gkeywords', post('gkeywords')) . pic_select_keywords($keywords, $frm_name, 'gkeywords', false));
$frm->addmessage(__('To divide keywords use ; symbol'));
$frm->addrow(__('Title for all images'), $frm->text_box('gtitle', post('gtitle')));
$frm->addrow(__('Add number to title'), $frm->checkbox('gadd', '1', __('Enable'), post('gadd')) . '&nbsp;&nbsp;&nbsp;' . __('Start') . ': ' . $frm->text_box('gstart', 1, 2) . __('Number of digits') . ': ' . $frm->text_box('gdigits', 2, 2) . '&nbsp;&nbsp;&nbsp;');
$frm->addmessage(__('Also you can upload your files using filemanager or FTP to directory') . ' ' . substr(GALLERY_UPLOAD_DIR, 1) . ' ' . __('(Relative to ReloadCMS installation path) and rebuild index file.'));
$frm->show();
Esempio n. 13
0
    $_POST['logic']['modules'] = str_replace('http://' . $_SERVER['HTTP_HOST'] . '/', '', $_POST['logic']['modules']);
    //safe config to logicing
    file_write_contents(CONFIG_PATH . 'logic.ini', serialize(str_replace('http://' . $_SERVER['HTTP_HOST'] . '/', '', $_POST['logic'])));
} elseif (post('settingschange')) {
    rcms_delete_files(CONFIG_PATH . 'logic.ini');
}
if (is_file(CONFIG_PATH . 'logic.ini')) {
    $logic = unserialize(file_get_contents(CONFIG_PATH . 'logic.ini'));
}
$frm = new InputForm('', 'post', __('Submit'), '', '', '', 'addlogic');
//logic
$add_logic = '<div>+ ' . __('Module') . " <input type=\\'text\\' name=\\'logic[modules][]\\' size=\\'15\\' /> " . $select_menus . __('Logic') . "<input type=\\'text\\' name=\\'logic[expression][]\\' size=\\'35\\'/> " . "<img src=\\'" . IMAGES_PATH . "skins/neok.gif\\' title=\\'" . __('Delete') . "\\' style=\\'cursor:pointer;display:table-cell;vertical-align:middle;\\' onClick=\\'\$(\$(this).parents().get(0)).remove();\\'>" . '</div>';
$frm->addbreak(__('Logic') . ' <img onClick="$(\'#add_logic\').append(\'' . $add_logic . '\');" title="' . __('Add') . '" src="' . IMAGES_PATH . 'skins/plus.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;"/>&nbsp;&nbsp;&nbsp;');
if (!empty($logic['modules'])) {
    foreach ($logic['modules'] as $i => $value) {
        if (!empty($logic['modules'][$i])) {
            $frm->addrow(__('Module') . ' ' . $frm->text_box('logic[modules][]', @$logic['modules'][$i], 15) . stripslashes($select_menus), ' ' . __('Logic') . ' ' . $frm->text_box('logic[expression][]', @$logic['expression'][$i], 35) . '<img src="' . IMAGES_PATH . 'neok.gif" style="cursor:pointer;display:table-cell;vertical-align:middle;" onClick="$($(this).parents(\'tr\').get(0)).remove();">');
        }
    }
}
$frm->addmessage('<div id="add_logic"></div>' . $frm->hidden('settingschange', true));
$frm->show();
?>
<script type="text/javascript">
$(function(){
     $("#menus, #unused").sortable({
       connectWith: ".MenuSortable",
       tolerance: "pointer"
	   });
});
</script>
//   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['field_id']) && !empty($_POST['field_name'])) {
    if (count($_POST['field_id']) != count($_POST['field_id'])) {
        rcms_showAdminMessage($lang['results']['users'][9]);
    } else {
        $cnt = count($_POST['field_id']);
        for ($i = 0; $i < $cnt; $i++) {
            if (!empty($_POST['field_id'][$i])) {
                $result[$_POST['field_id'][$i]] = $_POST['field_name'][$i];
            }
        }
        write_ini_file($result, CONFIG_PATH . 'users.fields.ini') or rcms_showAdminMessage($lang['results']['users'][8]);
    }
}
// Interface generation
$frm = new InputForm("", "post", $lang['general']['submit']);
$frm->addbreak($lang['admincp']['users']['fields']['full']);
$frm->addrow($lang['users']['fieldid'], $lang['users']['fieldname']);
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($lang['users']['fielddesc']);
$frm->show();