当前位置: 首页>>代码示例>>PHP>>正文


PHP Form::begin_form方法代码示例

本文整理汇总了PHP中Form::begin_form方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::begin_form方法的具体用法?PHP Form::begin_form怎么用?PHP Form::begin_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Form的用法示例。


在下文中一共展示了Form::begin_form方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

 * @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());
$Form->end_fieldset();
$Form->begin_fieldset(T_('Meta data'));
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_file_properties.form.php

示例2: die

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
    users_results_block(array('org_ID' => $edited_Organization->ID, 'filterset_name' => 'orgusr_' . $edited_Organization->ID, 'results_param_prefix' => 'orgusr_', 'results_title' => T_('Users of this organization') . get_manual_link('users_and_groups'), 'results_order' => '/uorg_accepted/D', 'page_url' => get_dispctrl_url('organizations', 'action=edit&org_ID=' . $edited_Organization->ID), 'display_orgstatus' => true, 'display_ID' => false, 'display_btn_adduser' => false, 'display_btn_addgroup' => false, 'display_blogs' => false, 'display_source' => false, 'display_regdate' => false, 'display_regcountry' => false, 'display_update' => false, 'display_lastvisit' => false, 'display_contact' => false, 'display_reported' => false, 'display_group' => false, 'display_level' => false, 'display_status' => false, 'display_actions' => false, 'display_newsletter' => false));
}
// AJAX changing of an accept status of organizations for each user
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_organization.form.php

示例3: upgrade_b2evo_tables


//.........这里部分代码省略.........
            load_class('plugins/model/_plugins.class.php', 'Plugins');
            $Plugins = new Plugins();
        }
        task_begin('Recreate autogenerated post excerpts...');
        $upgrade_continue_url = $baseurl . 'install/index.php?locale=' . $locale . '&action=' . $upgrade_action . '&exec_general_tasks=0&recreate_excerpts=1';
        $all_excerpt = param('all_excerpt', 'integer', 0);
        recreate_autogenerated_excerpts($upgrade_continue_url, $all_excerpt == 0);
        task_end();
    }
    // Update the progress bar status
    update_install_progress_bar();
    /*
     * -----------------------------------------------
     * Check to make sure the DB schema is up to date:
     * -----------------------------------------------
     */
    echo "Starting to check DB...<br/>\n";
    evo_flush();
    $upgrade_db_deltas = array();
    // This holds changes to make, if any (just all queries)
    global $debug;
    foreach ($schema_queries as $table => $query_info) {
        // For each table in the schema, check diffs...
        if ($debug) {
            echo '<br />Checking table: ' . $table . ': ';
        }
        $updates = db_delta($query_info[1], array('drop_column', 'drop_index'), false, true);
        if (empty($updates)) {
            if ($debug) {
                echo 'ok';
            }
        } else {
            if ($debug) {
                echo 'NEEDS UPDATE!';
            }
            foreach ($updates as $table => $queries) {
                foreach ($queries as $qinfo) {
                    foreach ($qinfo['queries'] as $query) {
                        // subqueries for this query (usually one, but may include required other queries)
                        $upgrade_db_deltas[] = $query;
                    }
                }
            }
        }
    }
    if ($debug) {
        echo '<br />';
    }
    if (empty($upgrade_db_deltas)) {
        // no upgrades needed:
        echo '<p>' . T_('The database schema is up to date.') . '</p>';
    } else {
        // Upgrades are needed:
        $confirmed_db_upgrade = param('confirmed', 'integer', 0);
        // force confirmation
        $upgrade_db_deltas_confirm_md5 = param('upgrade_db_deltas_confirm_md5', 'string', '');
        if (!$confirmed_db_upgrade) {
            if (!empty($upgrade_db_deltas_confirm_md5)) {
                // received confirmation from form
                if ($upgrade_db_deltas_confirm_md5 != md5(implode('', $upgrade_db_deltas))) {
                    // unlikely to happen
                    echo '<p class="text-danger"><evo:error>' . T_('The DB schema has been changed since confirmation.') . '</evo:error></p>';
                } else {
                    $confirmed_db_upgrade = true;
                }
            }
        }
        if (!$confirmed_db_upgrade) {
            global $action, $form_action;
            load_class('_core/ui/forms/_form.class.php', 'Form');
            if (!empty($form_action)) {
                $Form = new Form($form_action, '', 'post');
            } else {
                $Form = new Form(NULL, '', 'post');
            }
            $Form->begin_form('fform', T_('Upgrade database'));
            $Form->begin_fieldset();
            $Form->hidden('upgrade_db_deltas_confirm_md5', md5(implode('', $upgrade_db_deltas)));
            $Form->hidden('action', $action);
            $Form->hidden('locale', $locale);
            echo '<p>' . T_('The version number is correct, but we have detected changes in the database schema. This can happen if you\'ve been using development versions directly off GitHub...') . '</p>';
            echo '<p>' . T_('The following database changes will be carried out. If you are not sure what this means, it will probably be alright.') . '</p>';
            echo '<ul>';
            foreach ($upgrade_db_deltas as $l_delta) {
                #echo '<li><code>'.nl2br($l_delta).'</code></li>';
                echo '<li><pre>' . str_replace("\t", '  ', $l_delta) . '</pre></li>';
            }
            echo '</ul>';
            $Form->submit(array('', T_('Try to Repair/Upgrade database now!'), 'btn-warning'));
            $Form->end_form();
            return 'need-fix';
        }
        // Alter DB to match DB schema:
        install_make_db_schema_current(true);
    }
    // Force MySQL strict mode
    $DB->query('SET sql_mode = "TRADITIONAL"', 'Force MySQL "strict" mode (and make sure server is not configured with a weird incompatible mode)');
    track_step('upgrade-success');
    return true;
}
开发者ID:Edind304,项目名称:b2evolution,代码行数:101,代码来源:_functions_evoupgrade.php

示例4: die

    die('Please, do not access this page directly.');
}
/**
 * @var back up configuration
 */
global $backup_paths, $backup_tables, $backup_path;
/**
 * @var action
 */
global $action;
/**
 * @var instance of Backup class
 */
global $current_Backup;
$Form = new Form(NULL, 'backup_settings', 'post');
$Form->begin_form('fform', T_('Backup application files and data'));
echo '<p>Your backups will be saved into the directory: <b>' . $backup_path . '</b> (on your web server).</p>';
$Form->hiddens_by_key(get_memorized('action'));
// Backup settings for folders and files
$Form->begin_fieldset(T_('Folders & files') . get_manual_link('backup-tab'), array('class' => 'fieldset clear'));
// Display checkboxes
foreach ($backup_paths as $name => $settings) {
    if (!is_null($settings['label'])) {
        $note = '';
        if (array_key_exists('note', $settings)) {
            $note = $settings['note'];
        } else {
            $note = get_affected_paths($settings['path']);
        }
        $Form->checkbox('bk_' . $name, $current_Backup->backup_paths[$name], $settings['label'], $note);
    }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_backup.form.php

示例5: display

 /**
  * Display the widget!
  *
  * @param array MUST contain at least the basic display params
  */
 function display($params)
 {
     global $Blog, $Settings, $Session, $redirect_to, $dummy_fields;
     if (is_logged_in()) {
         // No display when user is already registered
         return false;
     }
     if ($Settings->get('newusers_canregister') != 'yes' || !$Settings->get('quick_registration')) {
         // Display error message when quick registration is disabled
         echo '<p class="error">' . T_('Quick registration is currently disabled on this system.') . '</p>';
         return false;
     }
     // Restore the typed in params from the redirected page:
     $widget_param_input_err_messages = $Session->get('param_input_err_messages_' . $this->ID);
     $widget_param_input_values = $Session->get('param_input_values_' . $this->ID);
     if (!empty($widget_param_input_err_messages)) {
         // Convert param errors to global $param_input_err_messages that is used to display an error text under input field
         global $param_input_err_messages;
         $param_input_err_messages = $widget_param_input_err_messages;
     }
     // Clear the temp session vars
     $Session->delete('param_input_err_messages_' . $this->ID);
     $Session->delete('param_input_values_' . $this->ID);
     $Session->dbsave();
     $this->init_display($params);
     if (isset($this->BlockCache)) {
         // Do NOT cache some of these links are using a redirect_to param, which makes it page dependent.
         // Note: also beware of the source param.
         // so this will be cached by the PageCache; there is no added benefit to cache it in the BlockCache
         // (which could have been shared between several pages):
         $this->BlockCache->abort_collect();
     }
     echo $this->disp_params['block_start'];
     $redirect_to = param('redirect_to', 'url', regenerate_url('', '', '', '&'));
     $this->disp_title();
     echo $this->disp_params['block_body_start'];
     if (!empty($this->disp_params['intro'])) {
         // Intro text
         echo '<p>' . $this->disp_params['intro'] . '</p>';
     }
     $Form = new Form(get_secure_htsrv_url() . 'register.php', 'register_form', 'post');
     $Form->begin_form();
     $Form->add_crumb('regform');
     $Form->hidden('action', 'quick_register');
     $Form->hidden('inskin', true);
     $Form->hidden('blog', $Blog->ID);
     $Form->hidden('widget', $this->ID);
     $Form->hidden('redirect_to', $redirect_to);
     // E-mail
     $email_value = isset($widget_param_input_values[$dummy_fields['email']]) ? $widget_param_input_values[$dummy_fields['email']] : '';
     $Form->text_input($dummy_fields['email'], $email_value, 50, T_('Your email'), '', array('maxlength' => 255, 'class' => 'input_text', 'required' => true));
     if ($this->disp_params['ask_firstname'] != 'no') {
         // First name
         $firstname_value = isset($widget_param_input_values['firstname']) ? $widget_param_input_values['firstname'] : '';
         $Form->text_input('firstname', $firstname_value, 18, T_('First name'), '', array('maxlength' => 50, 'class' => 'input_text', 'required' => $this->disp_params['ask_firstname'] == 'required'));
     }
     if ($this->disp_params['ask_lastname'] != 'no') {
         // Last name
         $lastname_value = isset($widget_param_input_values['lastname']) ? $widget_param_input_values['lastname'] : '';
         $Form->text_input('lastname', $lastname_value, 18, T_('Last name'), '', array('maxlength' => 50, 'class' => 'input_text', 'required' => $this->disp_params['ask_lastname'] == 'required'));
     }
     // Submit button
     $Form->begin_fieldset('', array('class' => 'fieldset field_register_btn'));
     $Form->button_input(array('value' => $this->disp_params['button'], 'class' => 'submit'));
     $Form->end_fieldset();
     $Form->end_form();
     echo $this->disp_params['block_body_end'];
     echo $this->disp_params['block_end'];
     if (!empty($widget_param_input_err_messages)) {
         // Clear param errors here because we already display them above
         // Don't display them twice on another widget form
         $param_input_err_messages = NULL;
     }
     return true;
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:80,代码来源:_user_register.widget.php

示例6: Form

// 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);
if ($DB->num_rows == 0) {
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_antispam_ban.form.php

示例7: die

 * 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/}.
 * 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.');
}
global $dispatcher, $flush_action;
phpbb_display_steps(5);
$Form = new Form();
$Form->begin_form('fform', T_('phpBB Importer') . ' - ' . T_('Step 5: Import topics'));
evo_flush();
$Form->add_crumb('phpbb');
$Form->hidden_ctrl();
$Form->hidden('action', 'replies');
if ($flush_action == 'topics') {
    $Form->begin_fieldset(T_('Import log'));
    // Import the topics into the posts
    phpbb_import_topics();
    $Form->end_fieldset();
}
$Form->begin_fieldset(T_('Report of the topics import'));
$Form->info(T_('Count of the imported topics'), '<b>' . (int) phpbb_get_var('topics_count_imported') . '</b>');
$Form->info(T_('Count of the imported forums'), (int) phpbb_get_var('forums_count_imported'));
$Form->info(T_('Count of the imported users'), (int) phpbb_get_var('users_count_imported'));
$Form->info(T_('Count of the updated users'), (int) phpbb_get_var('users_count_updated'));
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_phpbb_topics.form.php

示例8: Form

 case 'start':
     // Display backup settings form
     $AdminUI->disp_view('maintenance/views/_backup.form.php');
     break;
 case 'backup':
     if ($demo_mode) {
         $Messages->clear();
         $Messages->add(T_('This feature is disabled on the demo server.'), 'error');
         $Messages->display();
         break;
     }
     // Check that this action request is not a CSRF hacked request:
     $Session->assert_received_crumb('backup');
     $Form = new Form(NULL, 'backup_progress', 'post');
     // Interactive / flush() backup should start here
     $Form->begin_form('fform', T_('System backup is in progress...'));
     evo_flush();
     // Lock b2evolution while backing up
     $success = true;
     $lock_type = param('bk_lock_type', 'string');
     switch ($lock_type) {
         case 'maintenance_lock':
             // Enable maintenance lock
             $success = switch_maintenance_lock(true);
             // Make sure we disable the maintenance lock if PHP dies
             register_shutdown_function('switch_maintenance_lock', false);
             break;
         case 'maintenance_mode':
             // Enable maintenance mode
             $success = switch_maintenance_mode(true, 'all', T_('System backup is in progress. Please reload this page in a few minutes.'));
             // Make sure we exit the maintenance mode if PHP dies
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:backup.ctrl.php

示例9: die

 * @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&amp;action=edit&amp;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') . ' ';
}
if ($cjob_repeat_after_minutes = floor($cjob_row->ctsk_repeat_after % 3600 / 60)) {
    $cjob_repeat_after .= $cjob_repeat_after_minutes . ' ' . T_('minutes');
}
$Form->info(T_('Repeat every'), $cjob_repeat_after);
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_cronjob.view.php

示例10: die

 *
 * @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: _phpbb_users.form.php 505 2011-12-09 20:54:21Z fplanque $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $dispatcher, $flush_action;
$Form = new Form();
$Form->begin_form('fform', T_('phpBB Importer') . ' - ' . T_('Step 7: Import messages'));
evo_flush();
$Form->add_crumb('phpbb');
$Form->hidden_ctrl();
$Form->hidden('action', 'finish');
if ($flush_action == 'messages') {
    $Form->begin_fieldset(T_('Import log'));
    // Import the messages
    phpbb_import_messages();
    $Form->end_fieldset();
}
$Form->begin_fieldset(T_('Report of the mesagges import'));
$Form->info(T_('Count of the imported messages'), '<b>' . (int) phpbb_get_var('messages_count_imported') . '</b>');
$Form->info(T_('Count of the messages that are NOT imported because of missing users'), '<b class="red">' . (int) phpbb_get_var('messages_count_missing_users') . '</b>');
$Form->info(T_('Count of the imported replies'), (int) phpbb_get_var('replies_count_imported'));
$Form->info(T_('Count of the imported topics'), (int) phpbb_get_var('topics_count_imported'));
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_phpbb_messages.form.php

示例11: die

 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var User
 */
global $current_User;
/**
 * @var GeneralSettings
 */
global $Settings;
global $dispatcher;
global $collections_Module;
$Form = new Form(NULL, 'settings_checkchanges');
$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('globalsettings');
$Form->hidden('ctrl', 'gensettings');
$Form->hidden('action', 'update');
// --------------------------------------------
if ($current_User->check_perm('users', 'edit')) {
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...'));
    $Form->checkbox_input('system_lock', $Settings->get('system_lock'), T_('Lock system'), array('note' => T_('check this to prevent login (except for admins) and sending comments/messages. This prevents the DB from receiving updates (other than logging)') . '<br />' . T_('Note: for a more complete lock down, rename the file /conf/_maintenance.html to /conf/maintenance.html (complete lock) or /conf/imaintenance.html (gives access to /install)')));
    $Form->end_fieldset();
}
// --------------------------------------------
$Form->begin_fieldset(T_('Caching'));
$Form->checkbox_input('general_cache_enabled', $Settings->get('general_cache_enabled'), T_('Enable general cache'), array('note' => T_('Cache rendered pages that are not controlled by a skin. See Blog Settings for skin output caching.')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Online Help') . get_manual_link('online help'));
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_general.form.php

示例12: array

    }
}
$Results->cols[] = array('th' => T_('Groups'), 'th_class' => 'shrinkwrap', 'td_class' => 'left nowrap', 'td' => '%contacts_groups( #mct_to_user_ID# )%');
$Results->display($display_params);
if (count($Results->rows) > 0) {
    // Display actions buttons
    global $module_contacts_list_params;
    modules_call_method('get_contacts_list_params');
    $Form = new Form(get_dispctrl_url('contacts'), 'add_group_contacts');
    echo '<div class="form_send_contacts">';
    $multi_action_icon = get_icon('multi_action', 'imgtag', array('style' => 'margin:0 2px 0 14px;position:relative;top:-5px;'));
    $Form->button_input(array('type' => 'button', 'value' => $module_contacts_list_params['title_selected'], 'onclick' => 'location.href=\'' . $module_contacts_list_params['recipients_link'] . '\'', 'id' => 'send_selected_recipients', 'input_prefix' => $multi_action_icon));
    echo '</div>';
    $Form->switch_layout('none');
    $Form->switch_template_parts(array('formstart' => '<div class="form_add_contacts">', 'labelstart' => '<span class="label">', 'labelend' => '</span> <span class="controls">', 'formend' => '</div>'));
    $Form->begin_form();
    $Form->add_crumb('messaging_contacts');
    $Form->hidden('users', '');
    if (isset($module_contacts_list_params['form_hiddens']) && !empty($module_contacts_list_params['form_hiddens'])) {
        // Append the hidden input elements from module
        foreach ($module_contacts_list_params['form_hiddens'] as $hidden_input) {
            $Form->hidden($hidden_input['name'], $hidden_input['value']);
        }
    }
    $Form->combo_box('group', param('group_combo', 'string', ''), get_contacts_groups_options(param('group', 'string', '-1'), false), $multi_action_icon . T_('Add all selected contacts to this group'), array('new_field_size' => '8'));
    $Form->buttons(array(array('submit', 'actionArray[add_group]', T_('Add'), 'SaveButton btn-primary btn-sm')));
    echo '</span>';
    if (isset($group_filtered)) {
        // Contacts list is filtered by group
        echo '<div id="edit_group_contacts" style="white-space:normal">';
        $Form->hidden('group_ID', $group_filtered->ID);
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_contact_list.view.php

示例13: Form

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 . '&amp;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));
$Form->text_input('cat_urlname', $edited_Chapter->urlname, 40, T_('URL "slug"'), T_('Used for clean URLs. Must be unique.'), array('maxlength' => 255));
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_chapter.form.php

示例14: die

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;
$extensions = explode(' ', $edited_Filetype->extensions);
foreach ($extensions as $extension) {
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_filetype.form.php

示例15: die

 *
 * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
 * See also {@link http://sourceforge.net/projects/evocms/}.
 *
 * @copyright (c)2003-2013 by Francois Planque - {@link http://fplanque.com/}.
 * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
 *
 * @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: _wpxml_import.view.php 505 2011-12-09 20:54:21Z fplanque $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $wp_blog_ID, $dispatcher;
$Form = new Form(NULL, '', 'post', NULL, 'multipart/form-data');
$Form->begin_form('fform', T_('WordPress XML Importer'));
$Form->begin_fieldset(T_('Report of the import'));
$BlogCache =& get_BlogCache();
$Blog =& $BlogCache->get_by_ID($wp_blog_ID);
$Form->info(T_('Blog'), $Blog->get_name());
// Import the data and display a report on the screen
wpxml_import();
$Form->end_fieldset();
$Form->buttons(array(array('button', 'button', T_('Go to Blog'), 'SaveButton', 'onclick' => 'location.href="' . $Blog->get('url') . '"'), array('button', 'button', T_('Back'), 'SaveButton', 'onclick' => 'location.href="' . $dispatcher . '?ctrl=wpimportxml"')));
$Form->end_form();
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_wpxml_import.form.php


注:本文中的Form::begin_form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。