Exemplo n.º 1
0
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author efy-maxim: Evo Factory / Maxim.
 * @author fplanque: Francois Planque.
 *
 * @version $Id: _currency.form.php 3328 2013-03-26 11:44:11Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Currency
 */
global $edited_Currency;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'currency_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this currency!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('currency')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New currency') : T_('Currency'));
$Form->add_crumb('currency');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',curr_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->text_input('curr_code', $edited_Currency->code, 3, T_('Code'), '', array('maxlength' => 3, 'required' => true));
$Form->text_input('curr_shortcut', $edited_Currency->shortcut, 8, T_('Shortcut'), '', array('maxlength' => 8, 'required' => true));
$Form->text_input('curr_name', $edited_Currency->name, 40, T_('Name'), '', array('maxlength' => 40, 'required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
}
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}.
 * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Slug
 */
global $edited_IPRange;
// Determine if we are creating or updating...
global $action;
$creating = $action == 'iprange_new';
$Form = new Form(NULL, 'iprange_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,iprange_ID'));
$Form->begin_form('fform', ($creating ? T_('New IP Range') : T_('IP Range')) . get_manual_link('ip-range-editing'));
$Form->add_crumb('iprange');
$Form->hidden('action', $creating ? 'iprange_create' : 'iprange_update');
$Form->hidden_ctrl();
$Form->hidden('tab', get_param('tab'));
$Form->hidden('tab3', get_param('tab3'));
$Form->hidden('iprange_ID', param('iprange_ID', 'integer', 0));
$Form->select_input_array('aipr_status', $edited_IPRange->get('status'), aipr_status_titles(), T_('Status'), '', array('force_keys_as_values' => true, 'background_color' => aipr_status_colors(), 'required' => true));
$Form->text_input('aipr_IPv4start', int2ip($edited_IPRange->get('IPv4start')), 50, T_('IP Range Start'), '', array('maxlength' => 15, 'required' => true));
$Form->text_input('aipr_IPv4end', int2ip($edited_IPRange->get('IPv4end')), 50, T_('IP Range End'), '', array('maxlength' => 15, 'required' => true));
$Form->date_input('aipr_IP_timestamp', date2mysql($edited_IPRange->IP_timestamp), T_('Date'), array('required' => true));
$Form->info(T_('User count'), (int) $edited_IPRange->get('user_count'));
$Form->info(T_('Block count'), (int) $edited_IPRange->get('block_count'));
$Form->end_form(array(array('submit', 'submit', $creating ? T_('Record') : T_('Save Changes!'), 'SaveButton')));
Exemplo n.º 3
0
 */
global $edited_GenericCategory;
/**
 * @var Chapter
 */
$edited_Chapter =& $edited_GenericCategory;
/**
 * @var GenericCategoryCache
 */
global $GenericCategoryCache;
global $Settings, $action, $subset_ID;
// Determine if we are creating or updating...
$creating = is_create_action($action);
$Form = new Form(NULL, 'form');
$close_url = get_chapter_redirect_url(get_param('redirect_page'), $edited_Chapter->parent_ID, $edited_Chapter->ID);
$Form->global_icon(T_('Cancel editing!'), 'close', $close_url);
$Form->begin_form('fform', $creating ? T_('New category') : T_('Category'));
$Form->add_crumb('element');
$Form->hidden('action', $creating ? 'create' : 'update');
$Form->hiddens_by_key(get_memorized('action'));
$Form->begin_fieldset(T_('Properties'));
// We're essentially double checking here...
$edited_Blog =& $edited_Chapter->get_Blog();
$move = '';
if ($Settings->get('allow_moving_chapters') && !$creating) {
    // If moving cats between blogs is allowed:
    $move = ' ' . action_icon(T_('Move to a different blog...'), 'file_move', regenerate_url('action,cat_ID', 'cat_ID=' . $edited_Chapter->ID . '&action=move'), T_('Move'));
}
$Form->info(T_('Blog'), $edited_Blog->get_maxlen_name() . $move);
$Form->select_input_options('cat_parent_ID', $GenericCategoryCache->recurse_select($edited_Chapter->parent_ID, $subset_ID, true, NULL, 0, array($edited_Chapter->ID)), T_('Parent category'));
$Form->text_input('cat_name', $edited_Chapter->name, 40, T_('Name'), '', array('required' => true, 'maxlength' => 255));
Exemplo n.º 4
0
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $cjob_row, $current_User, $admin_url;
$Form = new Form(NULL, 'cronlog');
if (empty($cjob_row->clog_status) && $current_User->check_perm('options', 'edit', false, NULL)) {
    // User can edit this job:
    $Form->global_icon(T_('Edit this job'), 'edit', $admin_url . '?ctrl=crontab&action=edit&ctsk_ID=' . $cjob_row->ctsk_ID, T_('Edit this job...'), 3, 3);
}
$Form->global_icon(T_('Close sheet'), 'close', regenerate_url('action,cjob_ID'));
$manual_link = cron_job_manual_link($cjob_row->ctsk_key);
$Form->begin_form('fform', T_('Scheduled job'));
$Form->begin_fieldset(T_('Job details') . $manual_link);
$Form->info(T_('Job #'), $cjob_row->ctsk_ID);
$Form->info(T_('Job name'), cron_job_name($cjob_row->ctsk_key, $cjob_row->ctsk_name, $cjob_row->ctsk_params) . $manual_link);
$Form->info(T_('Scheduled at'), mysql2localedatetime($cjob_row->ctsk_start_datetime));
$cjob_repeat_after = '';
if ($cjob_repeat_after_days = floor($cjob_row->ctsk_repeat_after / 86400)) {
    $cjob_repeat_after .= $cjob_repeat_after_days . ' ' . T_('days') . ' ';
}
if ($cjob_repeat_after_hours = floor($cjob_row->ctsk_repeat_after % 86400 / 3600)) {
    $cjob_repeat_after .= $cjob_repeat_after_hours . ' ' . T_('hours') . ' ';
}
Exemplo n.º 5
0
 * @copyright (c)2009-2015 by Francois Planque - {@link http://fplanque.com/}
 * Parts of this file are copyright (c)2009 by The Evo Factory - {@link http://www.evofactory.com/}.
 *
 * @package evocore
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
load_class('users/model/_userfieldgroup.class.php', 'UserfieldGroup');
/**
 * @var Userfield
 */
global $edited_UserfieldGroup;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'userfieldgroup_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this user field group!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('userfieldgroup')));
$Form->global_icon(T_('Cancel editing!'), 'close', '?ctrl=userfields');
$Form->begin_form('fform', $creating ? T_('New user field group') : T_('User field group'));
$Form->add_crumb('userfieldgroup');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',ufgp_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->hidden('ufgp_ID', $edited_UserfieldGroup->ID);
$Form->text_input('ufgp_name', $edited_UserfieldGroup->name, 50, T_('Name'), '', array('maxlength' => 255, 'required' => true));
$Form->text_input('ufgp_order', $edited_UserfieldGroup->order, 50, T_('Order number'), '', array('maxlength' => 11, 'required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
Exemplo n.º 6
0
                            $Form->radio('edited_grp_' . $perm_name, $GroupSettings->permission_values[$perm_name], $perm['options'], $perm['label'], $perm['field_lines'], $perm['field_note']);
                            break;
                        case 'info':
                            $Form->info($perm['label'], $perm['info']);
                            break;
                        case 'text_input':
                            $Form->text_input('edited_grp_' . $perm_name, $GroupSettings->permission_values[$perm_name], 5, $perm['label'], $perm['note'], array('maxlength' => $perm['maxlength']));
                            break;
                    }
                }
            }
        }
    }
}
$Form = new Form(NULL, 'group_checkchanges');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('ctrl,grp_ID,action', 'ctrl=groups'));
if ($edited_Group->ID == 0) {
    $Form->begin_form('fform', T_('Creating new group'));
} else {
    $title = ($action == 'edit' ? T_('Editing group:') : T_('Viewing group:')) . ' ' . (isset($edited_grp_oldname) ? $edited_grp_oldname : $edited_Group->dget('name')) . ' (' . T_('ID') . ' ' . $edited_Group->ID . ')';
    $Form->begin_form('fform', $title);
}
$Form->add_crumb('group');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('grp_ID', $edited_Group->ID);
$perm_none_option = array('none', T_('No Access'));
$perm_view_option = array('view', T_('View details'));
$perm_edit_option = array('edit', T_('Edit/delete all'));
$Form->begin_fieldset(T_('General') . get_manual_link('group_properties_general'));
$Form->text('edited_grp_name', $edited_Group->name, 50, T_('Name'), '', 50, 'large');
Exemplo n.º 7
0
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Organization
 */
global $edited_Organization;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'organization_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this organization!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('organization')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,org_ID'));
$Form->begin_form('fform', ($creating ? T_('New organization') : T_('Organization')) . get_manual_link('organization-form'));
$Form->add_crumb('organization');
$Form->hiddens_by_key(get_memorized('action'));
// (this allows to come back to the right list order & page)
$Form->text_input('org_name', $edited_Organization->name, 32, T_('Name'), '', array('maxlength' => 255, 'required' => true));
$Form->text_input('org_url', $edited_Organization->url, 32, T_('Url'), '', array('maxlength' => 2000));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
if ($edited_Organization->ID > 0) {
    // Display users of this organization
Exemplo n.º 8
0
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Invitation
 */
global $edited_Invitation;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'invitation_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this invitation code!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('invitation')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', ($creating ? T_('New invitation code') : T_('Invitation code')) . get_manual_link('invitation-code-form'));
$Form->add_crumb('invitation');
$Form->hiddens_by_key(get_memorized('action'));
// (this allows to come back to the right list order & page)
$GroupCache =& get_GroupCache();
$Form->select_input_object('ivc_grp_ID', $edited_Invitation->grp_ID, $GroupCache, T_('Group'), array('required' => true));
$Form->text_input('ivc_code', $edited_Invitation->code, 32, T_('Code'), T_('Must be from 3 to 32 letters, digits or signs "-", "_".'), array('required' => true));
$Form->date_input('ivc_expire_date', date2mysql($edited_Invitation->expire_ts), T_('Expire date'), array('required' => true));
$Form->time_input('ivc_expire_time', date2mysql($edited_Invitation->expire_ts), T_('Expire time'), array('required' => true));
$Form->text_input('ivc_source', $edited_Invitation->source, 32, T_('Source'), '', array('maxlength' => 30));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
Exemplo n.º 9
0
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Blog
 */
global $Blog;
/**
 * @var ItemList2
 */
global $ItemList;
global $redirect_to, $current_User, $admin_url;
$perm_slugs_view = $current_User->check_perm('slugs', 'view');
$Form = new Form();
$redirect_to = regenerate_url('action', '', '', '&');
$Form->global_icon(T_('Cancel editing!'), 'close', $redirect_to, 4, 2);
$Form->begin_form('fform', T_('Mass edit the current post list') . get_manual_link('mass-edit-screen'));
// hidden params
$Form->add_crumb('item');
$Form->hidden('ctrl', 'items');
$Form->hidden('blog', $Blog->ID);
$Form->hidden('redirect_to', $redirect_to);
$Form->hidden('filter', 'restore');
// Run the query:
$ItemList->query();
if ($ItemList->get_num_rows() > 100) {
    $Form->info('', sprintf(T_('There are %d posts in your selection, only the first 100 are displayed'), $ItemList->get_num_rows()));
}
/*
 * Display posts:
 */
Exemplo n.º 10
0
    die('Please, do not access this page directly.');
}
/**
 * @global Plugin
 */
global $edit_Plugin;
/**
 * @global Plugins_admin
 */
global $admin_Plugins;
global $edited_plugin_name, $edited_plugin_shortdesc, $edited_plugin_priority, $edited_plugin_code;
global $admin_url;
load_funcs('plugins/_plugin.funcs.php');
$Form = new Form(NULL, 'pluginsettings_checkchanges');
// Restore defaults button:
$Form->global_icon(T_('Restore defaults'), 'reload', regenerate_url('action,plugin_class', 'action=default_settings&plugin_ID=' . $edit_Plugin->ID . '&crumb_plugin=' . get_crumb('plugin')), T_('Restore defaults'), 5, 4, array('onclick' => 'if (!confirm(\'' . TS_('Are you sure you want to restore the default settings? This cannot be undone!') . '\')) { cancelClick(event); }'));
// Info button:
$Form->global_icon(T_('Display info'), 'info', regenerate_url('action,plugin_class', 'action=info&plugin_class=' . $edit_Plugin->classname));
// Close button:
$Form->global_icon(T_('Cancel edit!'), 'close', regenerate_url());
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('plugin');
$Form->hidden_ctrl();
$Form->hidden('plugin_ID', $edit_Plugin->ID);
// --------------------------- INFO ---------------------------
$Form->begin_fieldset(T_('Plugin info'), array('class' => 'clear'));
// Name:
$Form->text_input('edited_plugin_name', $edited_plugin_name, 25, T_('Name'), '', array('maxlength' => 255));
// Desc:
$Form->text_input('edited_plugin_shortdesc', $edited_plugin_shortdesc, 50, T_('Short desc'), '', array('maxlength' => 255));
// Links to external manual (dh> has been removed from form's global_icons before by fp, but is very useful IMHO):
Exemplo n.º 11
0
    die('Please, do not access this page directly.');
}
load_class('items/model/_itemtype.class.php', 'ItemType');
/**
 * @var Itemtype
 */
global $edited_Itemtype;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'itemtype_checkchanges');
if ($edited_Itemtype->ID > 0) {
    $default_ids = ItemType::get_default_ids();
    if (!$edited_Itemtype->is_special() && !in_array($edited_Itemtype->ID, $default_ids)) {
        // Allow delete post type only if it is not default of blogs
        $Form->global_icon(T_('Delete this Post Type!'), 'delete', regenerate_url('action', 'action=delete&amp;crumb_itemtype=' . get_crumb('itemtype')));
    }
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,ityp_ID'));
$Form->begin_form('fform', $edited_Itemtype->ID > 0 ? T_('Edit post type') : T_('New post type'));
$Form->add_crumb('itemtype');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',ityp_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->begin_fieldset($creating ? T_('New Post Type') . get_manual_link('item-type-form') : T_('Post type') . get_manual_link('item-type-form'));
if ($creating) {
    $Form->text_input('new_ityp_ID', get_param('new_ityp_ID'), 8, T_('ID'), '', array('maxlength' => 10, 'required' => true));
} else {
    $Form->hidden('ityp_ID', $edited_Itemtype->ID);
}
if ($edited_Itemtype->is_special()) {
    // Don't edit a name of special post types
Exemplo n.º 12
0
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE
 * @author blueyed: Daniel HAHLER
 *
 * @version $Id: _file_delete.form.php 3328 2013-03-26 11:44:11Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @global Filelist
 */
global $selected_Filelist;
$Form = new Form(NULL);
$Form->global_icon(T_('Cancel delete!'), 'close', regenerate_url());
$Form->begin_form('fform', T_('Delete'));
$Form->add_crumb('file');
$Form->hidden_ctrl();
$Form->hiddens_by_key(get_memorized());
$Form->hidden('action', 'delete');
$Form->hidden('confirmed', 1);
$Form->begin_fieldset(T_('Confirm delete'));
echo $selected_Filelist->count() > 1 ? T_('Do you really want to delete the following files?') : T_('Do you really want to delete the following file?');
$selected_Filelist->restart();
echo '<ul>';
while ($l_File =& $selected_Filelist->get_next()) {
    echo '<li>' . $l_File->get_prefixed_name() . '</li>';
}
echo '</ul>';
$Form->end_fieldset();
Exemplo n.º 13
0
 * @package admin
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE.
 *
 * @version $Id: _file_browse_set.form.php 4680 2013-09-11 03:00:20Z marc $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var UserSettings
 */
global $UserSettings;
$Form = new Form(NULL, 'file_displaysettings_checkchanges');
$Form->global_icon(T_('Close settings!'), 'close', regenerate_url());
$Form->begin_form('fform', T_('Display settings') . get_manual_link('file-manager-display-settings'));
$Form->add_crumb('file');
$Form->hidden_ctrl();
$Form->hiddens_by_key(get_memorized());
$Form->begin_fieldset(T_('Images'));
$Form->checkbox('option_imglistpreview', $UserSettings->get('fm_imglistpreview'), T_('Thumbnails'), T_('Check to display thumbnails instead of icons for image files'));
$Form->checkbox('option_getimagesizes', $UserSettings->get('fm_getimagesizes'), T_('Dimensions'), T_('Check to display the pixel dimensions of image files'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Columns'));
$Form->checkbox('option_showtypes', $UserSettings->get('fm_showtypes'), T_('File type'), T_('Based on file extension'));
$Form->radio_input('option_showdate', $UserSettings->get('fm_showdate'), array(array('value' => 'no', 'label' => T_('No')), array('value' => 'compact', 'label' => T_('Compact format')), array('value' => 'long', 'label' => T_('Long format'))), T_('Last change'));
$Form->checkbox('option_showfsperms', $UserSettings->get('fm_showfsperms'), T_('File permissions'), T_('Unix file permissions'));
$Form->checkbox('option_permlikelsl', $UserSettings->get('fm_permlikelsl'), '', T_('Check to display file permissions like "rwxr-xr-x" rather than short form'));
$Form->checkbox('option_showfsowner', $UserSettings->get('fm_showfsowner'), T_('File Owner'), T_('Unix file owner'));
$Form->checkbox('option_showfsgroup', $UserSettings->get('fm_showfsgroup'), T_('File Group'), T_('Unix file group'));
Exemplo n.º 14
0
 *
 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
 *
 * @package admin
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE
 *
 * @version $Id: _comment_mass.form.php 1273 2012-04-20 13:23:46Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $Blog, $tab3;
$Form = new Form(regenerate_url('action', '', '', '&'), 'comment_massdelete');
$Form->global_icon(T_('Cancel deleting!'), 'close', '?ctrl=comments&blog=' . $Blog->ID . '&tab3=' . $tab3, T_('cancel'), 4, 1);
$Form->begin_form('fform');
$Form->add_crumb('comment');
$Form->hidden('ctrl', 'comments');
$Form->begin_fieldset(T_('Mass deleting'));
$mass_type_value = 'delete';
$mass_types = array();
if (!$CommentList->is_trashfilter(false)) {
    // Don't display this option if trashed comments are also displayed
    $mass_types[] = array('value' => 'recycle', 'label' => T_('Move to Recycle bin'));
    $mass_type_value = 'recycle';
}
$mass_types[] = array('value' => 'delete', 'label' => T_('Delete permanently'));
$Form->labelstart = '<b>';
$Form->labelend = '</b>';
$Form->radio_input('mass_type', $mass_type_value, $mass_types, sprintf(T_('Are you sure you want to mass delete %s comments?'), $CommentList->total_rows), array('lines' => true));
Exemplo n.º 15
0
 *
 * @package evocore
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
load_class('regional/model/_country.class.php', 'Country');
/**
 * @var Sub-region
 */
global $edited_Subregion;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'subregion_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this sub-region!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('subregion')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', ($creating ? T_('New sub-region') : T_('Sub-region')) . get_manual_link('subregions-editing'));
$Form->add_crumb('subregion');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',subrg_ID' : '')));
// (this allows to come back to the right list order & page)
$CountryCache =& get_CountryCache();
$Form->select_country('subrg_ctry_ID', $edited_Subregion->ctry_ID, $CountryCache, T_('Country'), array('allow_none' => true, 'required' => true));
$Form->select_input_options('subrg_rgn_ID', get_regions_option_list($edited_Subregion->ctry_ID, $edited_Subregion->rgn_ID, array('none_option_text' => T_('Unknown'))), T_('Region'), '', array('required' => true));
$Form->text_input('subrg_code', $edited_Subregion->code, 6, T_('Code'), '', array('maxlength' => 6, 'required' => true));
$Form->text_input('subrg_name', $edited_Subregion->name, 40, T_('Name'), '', array('maxlength' => 40, 'required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
Exemplo n.º 16
0
 * under any OSI approved OSS license (http://www.opensource.org/licenses/).
 * }}
 *
 * @package admin
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE
 * @author blueyed: Daniel HAHLER
 *
 * @version $Id: _file_download.form.php 3328 2013-03-26 11:44:11Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $zipname, $exclude_sd, $selected_Filelist;
$Form = new Form(NULL, 'fm_download_checkchanges');
$Form->global_icon(T_('Cancel download!'), 'close', regenerate_url());
$Form->begin_form('fform', T_('Download files in archive'));
$Form->hidden_ctrl();
$Form->hidden('action', 'download');
$Form->hidden('action_invoked', 1);
$Form->hiddens_by_key(get_memorized());
$Form->text_input('zipname', $zipname, 30, T_('Archive filename'), T_('This is the name of the file which will get sent to you.'), array('maxlength' => ''));
if ($selected_Filelist->count_dirs()) {
    // Allow to exclude dirs:
    $Form->checkbox('exclude_sd', $exclude_sd, T_('Exclude subdirectories'), T_('This will exclude subdirectories of selected directories.'));
}
$Form->begin_fieldset(T_('Files to download'));
echo '<ul>' . '<li>' . implode("</li>\n<li>", $selected_Filelist->get_array('get_prefixed_name')) . "</li>\n" . '</ul>';
$Form->end_fieldset();
$Form->end_form(array(array('submit', 'submit', T_('Download'), 'DeleteButton')));
Exemplo n.º 17
0
}
/**
 * @global string
 */
global $fm_mode;
/**
 * @global Filelist
 */
global $fm_source_Filelist;
/**
 * @global array
 */
global $new_names;
global $filename_max_length;
$Form = new Form(NULL, 'fm_copymove_checkchanges');
$Form->global_icon(T_('Quit copy/move mode!'), 'close', regenerate_url('fm_sources,fm_mode'));
$Form->begin_form('fform', $fm_mode == 'file_copy' ? T_('Copy') : T_('Move'));
$Form->add_crumb('file');
$Form->hidden_ctrl();
$Form->hiddens_by_key(get_memorized());
$Form->hidden('confirm', 1);
$fm_source_Filelist->restart();
while ($loop_src_File =& $fm_source_Filelist->get_next()) {
    $Form->begin_fieldset(T_('Source') . ': ' . $loop_src_File->get_rdfp_rel_path());
    if (isset($overwrite[$loop_src_File->get_md5_ID()])) {
        $Form->checkbox('overwrite[' . $loop_src_File->get_md5_ID() . ']', $overwrite[$loop_src_File->get_md5_ID()], T_('Overwrite'), T_('Check to overwrite the existing file'));
    }
    $Form->text('new_names[' . $loop_src_File->get_md5_ID() . ']', $new_names[$loop_src_File->get_md5_ID()], 32, T_('New name'), $loop_src_File->dget('title'), $filename_max_length);
    $Form->end_fieldset();
}
$Form->end_form(array(array('submit', 'submit', $fm_mode == 'file_copy' ? T_('Copy') : T_('Move'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
Exemplo n.º 18
0
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var GoalCategory
 */
global $edited_GoalCategory;
// Determine if we are creating or updating...
global $action;
$creating = in_array($action, array('cat_new', 'cat_copy', 'cat_create', 'cat_create_new', 'cat_create_copy'));
$Form = new Form(NULL, 'goalcat_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this goal category!'), 'delete', regenerate_url('action', 'action=cat_delete&amp;' . url_crumb('goalcat')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,gcat_ID'));
$Form->begin_form('fform', $creating ? T_('New goal category') : T_('Goal category'));
$Form->add_crumb('goalcat');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',gcat_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->text_input('gcat_name', $edited_GoalCategory->name, 40, T_('Name'), '', array('maxlength' => 50, 'required' => true));
$Form->color_input('gcat_color', $edited_GoalCategory->color, T_('Color'), T_('E-g: #ff0000 for red'), array('required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[cat_create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[cat_create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[cat_create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[cat_update]', T_('Save Changes!'), 'SaveButton')));
}
Exemplo n.º 19
0
$Form->text_input('keyword', $keyword, 50, T_('Keyword/phrase to ban'), '', array('maxlength' => 80, 'input_suffix' => $button_html));
// TODO: add note
/*
 * TODO: explicitly add a domain?
 * $add_Form->text( 'domain', $domain, 30, T_('Add a banned domain'), 'note..', 80 ); // TODO: add note
 */
if ($display_mode != 'js') {
    $Form->buttons(array($button));
}
$Form->end_form();
$Form = new Form(NULL, 'antispam_ban', 'post', 'compact');
$redirect_to = param('redirect_to', 'url', NULL);
if ($redirect_to == NULL) {
    $redirect_to = regenerate_url('action');
}
$Form->global_icon(T_('Cancel!'), 'close', $redirect_to, '', 3, 2, array('class' => 'action_icon', 'id' => 'close_button'));
$Form->begin_form('fform', $display_mode == 'js' ? '' : T_('Confirm ban & delete'));
$Form->add_crumb('antispam');
$Form->hidden_ctrl();
$Form->hiddens_by_key(get_memorized());
$Form->hidden('confirm', 'confirm');
// Check for junk:
// Check for potentially affected logged hits:
$sql = 'SELECT SQL_NO_CACHE hit_ID, UNIX_TIMESTAMP(hit_datetime) as hit_datetime, hit_uri, hit_referer, dom_name,
									hit_coll_ID, hit_remote_addr, blog_shortname
					 FROM T_hitlog INNER JOIN T_basedomains ON hit_referer_dom_ID = dom_ID
					 LEFT JOIN T_blogs ON hit_coll_ID = blog_ID
					WHERE hit_referer LIKE ' . $DB->quote('%' . $keyword . '%') . '
					ORDER BY dom_name ASC
					LIMIT 500';
$res_affected_hits = $DB->get_results($sql, ARRAY_A);
<?php

/**
 * This file implements the Item history details view
 *
 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}.
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $edited_Item, $Revision;
$post_statuses = get_visibility_statuses();
$Form = new Form(NULL, 'history', 'post', 'compact');
$Form->global_icon(T_('Cancel viewing!'), 'close', regenerate_url('action', 'action=history'));
$Form->begin_form('fform', sprintf(T_('Revision #%s for: %s'), $Revision->iver_ID == 0 ? '(' . T_('Current version') . ')' : $Revision->iver_ID, $edited_Item->get_title()));
$Form->info(T_('Date'), mysql2localedatetime($Revision->iver_edit_datetime, 'Y-m-d', 'H:i:s'));
$iver_editor_user_link = get_user_identity_link(NULL, $Revision->iver_edit_user_ID);
$Form->info(T_('User'), empty($iver_editor_user_link) ? T_('(deleted user)') : $iver_editor_user_link);
$Form->info(T_('Status'), $post_statuses[$Revision->iver_status]);
$Form->info(T_('Note'), $Revision->iver_ID > 0 ? T_('Archived version') : T_('Current version'));
$Form->info(T_('Title'), $Revision->iver_title);
$Form->info(T_('Content'), $Revision->iver_content);
$Form->end_form();
Exemplo n.º 21
0
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @global File
 */
global $edited_File, $selected_Filelist;
global $blog, $filename_max_length;
$edit_allowed_perm = $current_User->check_perm('files', 'edit_allowed', false, $selected_Filelist->get_FileRoot());
$Form = new Form(NULL, 'fm_properties_checkchanges');
if (get_param('mode') != 'modal') {
    $Form->global_icon(T_('Close properties!'), 'close', regenerate_url());
}
$Form->begin_form('fform', get_param('mode') == 'modal' ? '' : T_('File properties'));
$Form->add_crumb('file');
$Form->hidden_ctrl();
$Form->hidden('action', 'update_properties');
$Form->hiddens_by_key(get_memorized());
$Form->begin_fieldset(T_('Properties'));
if ($edit_allowed_perm) {
    // User can edit:
    $Form->text('name', $edited_File->dget('name'), 32, T_('Filename'), T_('This is the name of the file on the server hard drive.'), $filename_max_length);
} else {
    // User can view only:
    $Form->info(T_('Filename'), $edited_File->dget('name'), T_('This is the name of the file on the server hard drive.'));
}
$Form->info(T_('Type'), $edited_File->get_icon() . ' ' . $edited_File->get_type());
 *
 * {@internal License choice
 * - If you have received this file as part of a package, please find the license.txt file in
 *   the same folder or the closest folder above for complete license terms.
 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
 *   then you must choose one of the following licenses before using the file:
 *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
 *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
 * }}
 *
 * {@internal Open Source relicensing agreement:
 * }}
 *
 * @package admin
 *
 * @version $Id: _email_sent_details.view.php 349 2011-11-18 11:18:14Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $MailReturn;
$Form = new Form(NULL, 'mail_returns', 'post', 'compact');
$Form->global_icon(T_('Cancel viewing!'), 'close', regenerate_url('blog'));
$Form->begin_form('fform', sprintf(T_('Returned mail ID#%s'), $MailReturn->emret_ID));
$Form->info(T_('Date'), mysql2localedatetime_spans($MailReturn->emret_timestamp, 'Y-m-d', 'H:i:sP'));
$Form->info(T_('Error Type'), dre_decode_error_type($MailReturn->emret_errtype));
$Form->info(T_('Address'), '<pre class="email_log"><span>' . htmlspecialchars($MailReturn->emret_address) . '</span></pre>');
$Form->info(T_('Error'), '<pre class="email_log"><span>' . htmlspecialchars($MailReturn->emret_errormsg) . '</span></pre>');
$Form->info(T_('Headers'), '<pre class="email_log_scroll"><span>' . htmlspecialchars($MailReturn->emret_headers) . '</span></pre>');
$Form->info(T_('Message'), '<pre class="email_log_scroll"><span>' . htmlspecialchars($MailReturn->emret_message) . '</span></pre>');
$Form->end_form();
Exemplo n.º 23
0
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 *
 * @author fplanque: Francois PLANQUE.
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Skin
 */
global $edited_Skin;
$Form = new Form(NULL, 'skin_checkchanges');
$Form->global_icon(T_('Uninstall this skin!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('skin')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', T_('Skin properties'));
$Form->add_crumb('skin');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('skin_ID', $edited_Skin->ID);
$Form->begin_fieldset(T_('Skin properties') . get_manual_link('skin-system-settings'));
echo '<div class="skin_settings well">';
$disp_params = array('skinshot_class' => 'coll_settings_skinshot');
Skin::disp_skinshot($edited_Skin->folder, $edited_Skin->name, $disp_params);
// Skin name
echo '<div class="skin_setting_row">';
echo '<label>' . T_('Skin name') . ':</label>';
echo '<span>' . $edited_Skin->name . '</span>';
echo '</div>';
Exemplo n.º 24
0
 *
 * @package evocore
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author efy-maxim: Evo Factory / Maxim.
 * @author fplanque: Francois Planque.
 *
 * @version $Id: _region.form.php 9 2011-10-24 22:32:00Z fplanque $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
load_class('regional/model/_country.class.php', 'Country');
/**
 * @var String
 */
global $edited_String;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'region_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this translated string!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('translation')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('Add new translated string') : T_('Edit a translated string'));
$Form->add_crumb('translation');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',itst_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->info(T_('Original string'), htmlspecialchars($edited_String->iost_string));
$Form->info(T_('Locale'), $edited_String->itst_locale);
$Form->textarea('itst_standard', $edited_String->itst_standard, 5, T_('Translated string'), '', 100, '', true);
$Form->end_form(array(array('submit', 'actionArray[update]', $creating ? T_('Add') : T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
Exemplo n.º 25
0
 */
global $Blog;
/**
 * @var Comment
 */
global $edited_Comment;
/**
 *
 */
global $Plugins;
global $mode, $month, $tab, $redirect_to, $comment_content;
$Form = new Form(NULL, 'comment_checkchanges', 'post');
$link_attribs = array('style' => 'margin-right: 3ex;');
// Avoid misclicks by all means!
if ($current_User->check_perm('blog_post!draft', 'edit', false, $Blog->ID)) {
    $Form->global_icon(T_('Elevate this comment into a post'), 'elevate', '?ctrl=comments&amp;action=elevate&amp;comment_ID=' . $edited_Comment->ID . '&amp;' . url_crumb('comment'), T_('Elevate into a post'), 4, 3, $link_attribs);
}
$delete_url = '?ctrl=comments&amp;action=delete&amp;comment_ID=' . $edited_Comment->ID . '&amp;' . url_crumb('comment');
if ($edited_Comment->status == 'trash') {
    $delete_title = T_('Delete this comment');
    $delete_text = T_('delete');
    $link_attribs['onclick'] = 'return confirm(\'' . TS_('You are about to delete this comment!\\nThis cannot be undone!') . '\')';
} else {
    $delete_title = T_('Recycle this comment');
    $delete_text = T_('recycle');
}
$Form->global_icon($delete_title, 'recycle', $delete_url, $delete_text, 4, 3, $link_attribs);
$Form->global_icon(T_('Cancel editing!'), 'close', str_replace('&', '&amp;', $redirect_to), T_('cancel'), 4, 1);
$Form->begin_form('eform');
$Form->add_crumb('comment');
$Form->hidden('ctrl', 'comments');
Exemplo n.º 26
0
		<?php 
        // }}}
        break;
    case 'edit_settings':
        $AdminUI->disp_view('plugins/views/_plugin_settings.form.php');
        break;
    case 'info':
        if ($edit_Plugin->status == 'broken') {
            break;
        }
        // Display plugin info:
        load_funcs('plugins/_plugin.funcs.php');
        $Form = new Form($pagenow);
        if ($edit_Plugin->ID > 0 && $current_User->check_perm('options', 'edit', false)) {
            // Edit settings button (if installed):
            $Form->global_icon(T_('Edit plugin settings!'), 'edit', $admin_url . '?ctrl=plugins&amp;action=edit_settings&amp;plugin_ID=' . $edit_Plugin->ID);
        }
        // Close button:
        $Form->global_icon(T_('Close info!'), 'close', regenerate_url());
        $Form->begin_form('fform', '&nbsp;');
        $Form->hidden('ctrl', 'plugins');
        $Form->begin_fieldset('Plugin info', array('class' => 'fieldset'));
        $Form->info_field(T_('Name'), $edit_Plugin->name);
        $Form->info_field(T_('Code'), empty($edit_Plugin->code) ? ' - ' : $edit_Plugin->code, array('note' => T_('This 8-32 character code identifies the plugin when it needs to be called directly and specifically. This is especially useful for renderer plugins and widgets (SkinTags).')));
        $Form->info_field(T_('Short desc'), $edit_Plugin->short_desc);
        $Form->info_field(T_('Long desc'), $edit_Plugin->long_desc);
        if ($edit_Plugin->ID > 0) {
            // do not display ID for non registered Plugins
            $Form->info_field(T_('ID'), $edit_Plugin->ID);
        }
        $Form->info_field(T_('Version'), $edit_Plugin->version);
Exemplo n.º 27
0
 * @version $Id: _filetype.form.php 3446 2013-04-10 11:24:40Z attila $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var FileType
 */
global $edited_Filetype;
global $force_upload_forbiddenext;
global $rsc_path;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'ftyp_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this filetype!'), 'delete', regenerate_url('action', 'action=delete'));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New file type') : T_('File type'));
$Form->add_crumb('filetype');
$Form->hidden_ctrl();
$Form->hidden('action', $creating ? 'create' : 'update');
if (!$creating) {
    $Form->hidden('ftyp_ID', $edited_Filetype->ID);
}
$Form->text_input('ftyp_extensions', $edited_Filetype->extensions, 40, T_('Extensions'), '', array('maxlength' => 30, 'required' => true, 'note' => sprintf('E.g. &laquo;%s&raquo;' . ', ' . T_('separated by whitespace'), 'html')));
$Form->text_input('ftyp_name', $edited_Filetype->name, 40, T_('File type name'), sprintf('E.g. &laquo;%s&raquo;', 'HTML file'), array('maxlength' => 30, 'required' => true));
$Form->text_input('ftyp_mimetype', $edited_Filetype->mimetype, 40, T_('Mime type'), sprintf('E.g. &laquo;%s&raquo;', 'text/html'), array('maxlength' => 50, 'required' => true));
$Form->select_input_array('ftyp_icon', $edited_Filetype->icon, get_available_filetype_icons(), T_('Icon'));
$Form->radio('ftyp_viewtype', $edited_Filetype->viewtype, array(array('browser', T_('Open with browser (popup)'), T_('Let the browser handle the file in a popup.')), array('text', T_('Open with text viewer (popup)'), T_('Use the online text viewer (recommended for .txt)')), array('image', T_('Open with image viewer (popup)'), T_('Use the online image viewer (recommended for .gif .png .jpg)')), array('external', T_('Open with external app (no popup)'), T_('Let the browser handle the file in a popup. Note: if you do not want Word to open inside of IE, you must uncheck "browse in same window" in Windows\' file types.')), array('download', T_('Download to disk (no popup)'), T_('Tell the browser to save the file to disk instead of displaying it.'))), T_('View type'), true);
// Check if the extension is in the array of the not allowed upload extensions from _advanced.php
$not_allowed = false;
Exemplo n.º 28
0
 *
 * This file is part of the evoCore framework - {@link http://evocore.net/}
 * See also {@link https://github.com/b2evolution/b2evolution}.
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var File
 */
global $edited_File;
$Form = new Form(NULL, 'file_edit');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('fm_mode'));
$Form->begin_form('fform', T_('Editing:') . ' ' . $edited_File->get_rdfs_rel_path());
$Form->hidden_ctrl();
$Form->add_crumb('file');
$Form->hidden('action', 'update_file');
$Form->hiddens_by_key(get_memorized());
$Form->switch_layout('none');
echo '<div class="center">';
$Form->textarea_input('file_content', $edited_File->content, 25, '', array('cols' => '80'));
$Form->buttons(array(array('submit', '', T_('Save Changes!'), 'SaveButton')));
echo '</div>';
$Form->switch_layout(NULL);
$Form->end_form();
Exemplo n.º 29
0
 *
 * @license GNU GPL v2 - {@link http://b2evolution.net/about/gnu-gpl-license}
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $localtimenow, $edited_Cronjob;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'cronjob');
$Form->global_icon(T_('Cancel!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New scheduled job') : T_('Edit scheduled job'));
$Form->add_crumb('crontask');
$Form->hiddens_by_key(get_memorized('action'));
$Form->hidden('action', $creating ? 'create' : 'update');
$Form->begin_fieldset(T_('Job details') . get_manual_link('scheduled-job-form'));
if ($creating && $action != 'copy') {
    // New cronjob
    $cron_jobs_names = get_cron_jobs_config('name');
    // Exclude these cron jobs from manual creating
    unset($cron_jobs_names['send-post-notifications']);
    unset($cron_jobs_names['send-comment-notifications']);
    $Form->select_input_array('cjob_type', get_param('cjob_type'), $cron_jobs_names, T_('Job type'));
} else {
    // Edit cronjob
    if ($action == 'edit') {
Exemplo n.º 30
0
 /**
  * TODO
  *
  */
 function disp_form()
 {
     global $ctrl, $action, $edited_name_maxlen, $form_below_list;
     // Determine if we are creating or updating...
     $creating = is_create_action($action);
     $Form = new Form(NULL, 'form');
     if (!$form_below_list) {
         // We need to display a link to cancel editing:
         $Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
     }
     $Form->begin_form('fform', $creating ? T_('New element') : T_('Element'));
     $Form->add_crumb('element');
     $Form->hidden('action', $creating ? 'create' : 'update');
     $Form->hidden('ctrl', $ctrl);
     $Form->hiddens_by_key(get_memorized('action, ctrl'));
     $Form->text_input($this->dbprefix . 'name', $this->name, $edited_name_maxlen, T_('name'), '', array('required' => true));
     if (!$creating) {
         $Form->hidden($this->dbIDname, $this->ID);
     }
     if ($creating) {
         $Form->end_form(array(array('submit', 'submit', T_('Record'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
     } else {
         $Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
     }
 }