Example #1
0
            break;
    }
    $block_item_Widget->disp_template_raw('block_end');
}
if ($current_User->check_perm('users', 'edit')) {
    // Setting to lock system
    global $Settings;
    $Form = new Form(NULL, 'settings_checkchanges');
    $Form->begin_form('fform');
    $Form->add_crumb('tools');
    $Form->hidden('ctrl', 'tools');
    $Form->hidden('action', 'update_tools');
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...') . get_manual_link('system-lock'));
    $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)')));
    if ($current_User->check_perm('options', 'edit')) {
        $Form->buttons(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
    }
    $Form->end_fieldset();
    $Form->end_form();
}
// TODO: dh> this should really be a separate permission.. ("tools", "exec") or similar!
if ($current_User->check_perm('options', 'edit')) {
    // default admin actions:
    global $Settings;
    $block_item_Widget->title = T_('Cache management');
    // dh> TODO: add link to delete all caches at once?
    $block_item_Widget->disp_template_replaced('block_start');
    echo '<ul>';
    echo '<li><a href="' . regenerate_url('action', 'action=del_itemprecache&amp;' . url_crumb('tools')) . '">' . T_('Clear pre-rendered item cache (DB)') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=del_commentprecache&amp;' . url_crumb('tools')) . '">' . T_('Clear pre-rendered comment cache (DB)') . '</a></li>';
    echo '<li><a href="' . regenerate_url('action', 'action=del_messageprecache&amp;' . url_crumb('tools')) . '">' . T_('Clear pre-rendered message cache (DB)') . '</a></li>';
 *
 * 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();
 $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);
     echo '<p class="center">' . sprintf(T_('Selected group: <b>%s</b>'), $group_filtered->name) . '</p>';
     echo '<input id="send_group_recipients" type="button" onclick="location.href=\'' . $module_contacts_list_params['recipients_link'] . '&amp;group_ID=' . $group_filtered->ID . '\'" value="' . sprintf($module_contacts_list_params['title_group'], $group_filtered->count_users, $group_filtered->name) . '" style="margin: 1ex 0" /><br />';
     $Form->text_input('name', $group_filtered->name, 20, T_('Rename this group to'));
     $Form->button_input(array('name' => 'actionArray[rename_group]', 'value' => T_('Rename'), 'class' => 'SaveButton'));
     echo ' &nbsp; <b class="nowrap" style="padding-top:1em;line-height:32px">' . T_('or') . ' &nbsp; ';
     $Form->button_input(array('name' => 'actionArray[delete_group]', 'value' => T_('Delete this group'), 'class' => 'SaveButton', 'onclick' => 'return confirm("' . TS_('Are you sure want to delete this group?') . '")'));
     echo '</b>';
     echo '</div>';
 }
 $Form->end_form();
 */
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'));
$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'));
$BlogCache =& get_BlogCache();
$Blog =& $BlogCache->get_by_ID(phpbb_get_var('blog_ID'));
$Form->info(T_('Blog'), $Blog->get('name'), '');
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Go to Forum'), 'SaveButton')));
$Form->end_form();
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $dispatcher, $flush_action;
phpbb_display_steps(6);
$Form = new Form();
$Form->begin_form('fform', T_('phpBB Importer') . ' - ' . T_('Step 6: Import replies'));
evo_flush();
$Form->add_crumb('phpbb');
$Form->hidden_ctrl();
$Form->hidden('action', 'messages');
if ($flush_action == 'replies') {
    $Form->begin_fieldset(T_('Import log'));
    // Import the replies into the comments
    phpbb_import_replies();
    $Form->end_fieldset();
}
$Form->begin_fieldset(T_('Report of the replies import'));
$Form->info(T_('Count of the imported replies'), '<b>' . (int) phpbb_get_var('replies_count_imported') . '</b>');
$Form->info(T_('Count of the imported topics'), (int) phpbb_get_var('topics_count_imported'));
$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'));
$BlogCache =& get_BlogCache();
$Blog =& $BlogCache->get_by_ID(phpbb_get_var('blog_ID'));
$Form->info(T_('Collection'), $Blog->get('name'), '');
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Continue!'), 'SaveButton')));
$Form->end_form();
Example #6
0
$Form->text('blog_shortname', $edited_Blog->get('shortname', 'formvalue'), 12, T_('Short name'), T_('Will be used in selection menus and throughout the admin interface.'));
if ($current_User->check_perm('blog_admin', 'edit', false, $edited_Blog->ID)) {
    // Permission to edit advanced admin settings
}
$owner_User =& $edited_Blog->get_owner_User();
if ($current_User->check_perm('blog_admin', 'edit', false, $edited_Blog->ID)) {
    // Permission to edit advanced admin settings
    $Form->text('blog_urlname', $edited_Blog->get('urlname'), 20, T_('URL "filename"'), sprintf(T_('"slug" used to uniquely identify this blog in URLs. Also used as <a %s>default media folder</a>.'), 'href="?ctrl=coll_settings&tab=advanced&blog=' . $blog . '"'), 255);
    // fp> Note: There are 2 reasons why we don't provide a select here:
    // 1. If there are 1000 users, it's a pain.
    // 2. A single blog owner is not necessarily allowed to see all other users.
    $Form->text('owner_login', $owner_User->login, 20, T_('Owner'), T_('Login of this blog\'s owner.'));
} else {
    $Form->info(T_('URL Name'), $edited_Blog->get('urlname'), T_('Used to uniquely identify this blog in URLs.'));
    $Form->info(T_('Owner'), $owner_User->login, $owner_User->dget('fullname'));
}
$Form->select('blog_locale', $edited_Blog->get('locale'), 'locale_options_return', T_('Main Locale'), T_('Determines the language of the navigation links on the blog.'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Content / Posts'));
$Form->select_input_array('orderby', $edited_Blog->get_setting('orderby'), array('datestart' => T_('Date issued (Default)'), 'title' => T_('Title'), 'datecreated' => T_('Date created'), 'datemodified' => T_('Date last modified'), 'urltitle' => T_('URL "filename"'), 'priority' => T_('Priority')), T_('Order by'), T_('Default ordering of posts.'));
$Form->select_input_array('orderdir', $edited_Blog->get_setting('orderdir'), array('ASC' => T_('Ascending'), 'DESC' => T_('Descending')), T_('Direction'));
$Form->radio('what_to_show', $edited_Blog->get_setting('what_to_show'), array(array('days', T_('days')), array('posts', T_('posts'))), T_('Display unit'), false, T_('Do you want to restrict on the number of days or the number of posts?'));
$Form->text('posts_per_page', $edited_Blog->get_setting('posts_per_page'), 4, T_('Posts/Days per page'), T_('How many days or posts fo you want to display on the home page?'), 4);
$Form->radio('archive_mode', $edited_Blog->get_setting('archive_mode'), array(array('monthly', T_('monthly')), array('weekly', T_('weekly')), array('daily', T_('daily')), array('postbypost', T_('post by post'))), T_('Archive grouping'), false, T_('How do you want to browse the post archives? May also apply to permalinks.'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Description'));
$Form->text('blog_tagline', $edited_Blog->get('tagline'), 50, T_('Tagline'), T_('This is diplayed under the blog name on the blog template.'), 250);
$Form->textarea('blog_longdesc', $edited_Blog->get('longdesc'), 5, T_('Long Description'), T_('This is displayed on the blog template.'), 50, 'large');
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Save !'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
$Form->end_form();
			<?php 
    printf(T_('<strong>Blacklist</strong> the keyword [%s] locally.'), htmlspecialchars($keyword));
    ?>
		</label>
		</p>

		<?php 
    if ($Settings->get('antispam_report_to_central')) {
        ?>
			<p>
			<input type="checkbox" name="report" id="report_cb" value="1" checked="checked" />
			<label for="report_cb">
				<?php 
        printf(T_('<strong>Report</strong> the keyword [%s] as abuse to b2evolution.net.'), htmlspecialchars($keyword));
        ?>
			</label>
			[<a href="http://b2evolution.net/about/terms.html"><?php 
        echo T_('Terms of service');
        ?>
</a>]
			</p>
			<?php 
    }
}
$button = array('', 'actionArray[ban]', T_('Perform selected operations'), 'DeleteButton btn-danger');
if ($display_mode == 'js') {
    $Form->button($button);
} else {
    $Form->buttons(array($button));
}
$Form->end_form();
global $blogs_list, $delete_bankruptcy_blogs, $bankruptcy_blogs_IDs, $comment_status;
$Form = new Form();
$Form->add_crumb('antispam');
$Form->hidden_ctrl();
$Form->hidden('tab3', 'tools');
$Form->hidden('tool', 'bankruptcy');
$Form->begin_form('fform', T_('Declare comment spam bankruptcy...'));
if (isset($delete_bankruptcy_blogs) && $delete_bankruptcy_blogs) {
    $Form->begin_fieldset(T_('Deleting log'));
    antispam_bankruptcy_delete($bankruptcy_blogs_IDs, $comment_status);
    $Form->end_fieldset();
}
$visibility_statuses = get_visibility_statuses('', array());
$Form->begin_fieldset(T_('Filter comments by status'));
$Form->select_input_array('comment_status', $comment_status, $visibility_statuses, T_('Look at comments with status'), '');
$Form->buttons(array(array('submit', 'actionArray[bankruptcy_filter]', T_('Filter'))));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Select blogs'));
$blogs_list = antispam_bankruptcy_blogs($comment_status);
if (empty($blogs_list)) {
    // No blogs
    echo '<p>' . sprintf(T_('No comments found with status %s...'), $visibility_statuses[$comment_status]) . '</p>';
} else {
    // Print blogs list
    foreach ($blogs_list as $blog) {
        echo '<p><input type="checkbox" name="bankruptcy_blogs[]" value="' . $blog->blog_ID . '" id="bankruptcy_blog_' . $blog->blog_ID . '" /> ';
        echo '<label for="bankruptcy_blog_' . $blog->blog_ID . '">' . $blog->blog_name . ' (' . sprintf(T_('<b>%s</b> comments with status %s'), $blog->comments_count, $visibility_statuses[$comment_status]) . ')</label></p>';
    }
}
$Form->end_fieldset();
$buttons = array();
echo '<p>' . T_('We are sorry to see you leave.') . '</p>' . "\n";
echo '<p>' . T_('We value your feedback. Please be so kind and tell us in a few words why you are leaving us. This will help us to improve the site for the future.') . '</p>';
$Form->textarea_input('account_close_reason', '', 6, NULL, array('cols' => 40, 'class' => 'large', 'maxlength' => 255));
echo '<div id="character_counter" class="section_requires_javascript">';
echo '<div id="characters_left_block"></div>';
?>
	<script type="text/javascript">
		<?php 
echo 'var counter_text = "' . T_('%s characters left') . '";';
?>
		jQuery("#characters_left_block").html( counter_text.replace( "%s", 255 ) );
		jQuery("#account_close_reason").bind( "keyup", function(event)
		{
			var char_left = 255 - this.value.length;
			if( char_left < 0 )
			{
				char_left = 0;
			}
			jQuery("#characters_left_block").html( counter_text.replace( "%s", char_left ) );
		} );
	</script>
	<noscript>
		<?php 
echo T_('255 characters max');
?>
	</noscript>
<?php 
echo '</div>';
$Form->buttons(array(array('submit', 'submit', T_('Close my account now'), 'SaveButton')));
$Form->info('', '<a href="' . url_add_param($Blog->gen_blogurl(), 'disp=user') . '">' . T_('I changed my mind, don\'t close my account.') . '</a>');
$Form->end_form();
$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:
 */
while ($Item =& $ItemList->get_item()) {
    if ($ItemList->current_idx > 100) {
        break;
    }
    $Form->begin_fieldset('', array('class' => 'fieldset clear'));
    $edit_slug_link = '';
    if ($perm_slugs_view) {
        // user has permission to view slugs:
        $edit_slug_link = '&nbsp;' . action_icon(T_('Edit slugs...'), 'edit', $admin_url . '?ctrl=slugs&amp;slug_item_ID=' . $Item->ID);
    }
    $Form->text('mass_title_' . $Item->ID, htmlspecialchars_decode($Item->get('title')), 70, T_('Title'), '', 255);
    $Form->text('mass_urltitle_' . $Item->ID, $Item->get_slugs(), 70, T_('URL slugs') . $edit_slug_link, '', 255);
    $Form->text('mass_titletag_' . $Item->ID, $Item->get('titletag'), 70, htmlspecialchars(T_('<title> tag')), '', 255);
    $Form->end_fieldset();
}
// Submit button
$Form->buttons(array(array('submit', 'actionArray[mass_save]', T_('Save Changes!'), 'SaveButton')));
$Form->end_form();
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 * Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}.
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $repath_test_output, $action;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform');
$Form->add_crumb('emailsettings');
$Form->hidden('ctrl', 'email');
$Form->hidden('tab', get_param('tab'));
$Form->hidden('tab3', get_param('tab3'));
$Form->hidden('action', 'settings');
$Form->begin_fieldset(T_('Test saved settings') . get_manual_link('return-path-configuration'));
$url = '?ctrl=email&amp;tab=return&amp;tab3=test&amp;' . url_crumb('emailsettings') . '&amp;action=';
$Form->info_field(T_('Perform tests'), '<a href="' . $url . 'test_1">[' . T_('server connection') . ']</a>&nbsp;&nbsp;' . '<a href="' . $url . 'test_2">[' . T_('get one returned email') . ']</a>&nbsp;&nbsp;' . '<a href="' . $url . 'test_3">[' . T_('Paste an error message/returned email') . ']</a>');
if ($action == 'test_3') {
    // Display a textarea to fill a sample error message
    $Form->textarea('test_error_message', param('test_error_message', 'raw', ''), 15, T_('Test error message'), '', 50);
    $Form->buttons(array(array('submit', 'actionArray[test_3]', T_('Test'), 'SaveButton')));
}
if (!empty($repath_test_output)) {
    echo '<div style="margin-top:25px"></div>';
    // Display scrollable div
    echo '<div style="padding: 6px; margin:5px; border: 1px solid #CCC; min-height: 350px">' . $repath_test_output . '</div>';
}
$Form->end_fieldset();
$Form->end_form();
$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:
 */
while ($Item =& $ItemList->get_item()) {
    if ($ItemList->current_idx > 100) {
        break;
    }
    $Form->begin_fieldset('', array('class' => 'fieldset clear'));
    $edit_slug_link = '';
    if ($perm_slugs_view) {
        // user has permission to view slugs:
        $edit_slug_link = '&nbsp;' . action_icon(T_('Edit slugs...'), 'edit', $admin_url . '?ctrl=slugs&amp;slug_item_ID=' . $Item->ID);
    }
    $Form->text('mass_title_' . $Item->ID, htmlspecialchars_decode($Item->get('title')), 70, T_('Title'), '', 255);
    $Form->text('mass_urltitle_' . $Item->ID, $Item->get_slugs(), 70, T_('URL slugs') . $edit_slug_link, '', 255);
    $Form->text('mass_titletag_' . $Item->ID, $Item->get('titletag'), 70, htmlspecialchars(T_('<title> tag')), '', 255);
    $Form->end_fieldset();
}
// Submit & reset buttons
$Form->buttons(array(array('submit', 'actionArray[mass_save]', T_('Save changes'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
$Form->end_form();
Example #13
0
    if ($Settings->get('antispam_report_to_central')) {
        ?>
			<p>
			<input type="checkbox" name="report" id="report_cb" value="1" checked="checked" />
			<label for="report_cb">
				<?php 
        printf(T_('<strong>Report</strong> the keyword [%s] as abuse to b2evolution.net.'), htmlspecialchars($keyword));
        ?>
			</label>
			[<a href="http://b2evolution.net/about/terms.html"><?php 
        echo T_('Terms of service');
        ?>
</a>]
			</p>
			<?php 
    }
}
$Form->buttons(array(array('', 'actionArray[ban]', T_('Perform selected operations'), 'DeleteButton')));
$Form->end_form();
$Form = new Form(NULL, 'antispam_add', 'post', 'compact');
$Form->begin_form('fform', T_('Add a banned keyword'));
$Form->add_crumb('antispam');
$Form->hidden_ctrl();
$Form->hidden('action', 'ban');
$Form->text('keyword', $keyword, 50, T_('Keyword/phrase to ban'), '', 80);
// TODO: add note
/*
 * TODO: explicitly add a domain?
 * $add_Form->text( 'domain', $domain, 30, T_('Add a banned domain'), 'note..', 80 ); // TODO: add note
 */
$Form->end_form(array(array('submit', 'submit', T_('Check & ban...'), 'SaveButton')));
Example #14
0
 $Form = new Form(get_dispctrl_url('contacts'), 'add_group_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));
 $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' => '</span></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')));
 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);
     echo '<p class="center">' . sprintf(T_('Selected group: <b>%s</b>'), $group_filtered->name) . '</p>';
     echo '<input id="send_group_recipients" type="button" onclick="location.href=\'' . $module_contacts_list_params['recipients_link'] . '&amp;group_ID=' . $group_filtered->ID . '\'" value="' . sprintf($module_contacts_list_params['title_group'], $group_filtered->count_users, $group_filtered->name) . '" style="margin: 1ex 0" /><br />';
     $Form->text_input('name', $group_filtered->name, 20, T_('Rename this group to'));
     $Form->button_input(array('name' => 'actionArray[rename_group]', 'value' => T_('Rename'), 'class' => 'SaveButton'));
     echo ' &nbsp; <b class="nowrap" style="padding-top:1em;line-height:32px">' . T_('or') . ' &nbsp; ';
     $Form->button_input(array('name' => 'actionArray[delete_group]', 'value' => T_('Delete this group'), 'class' => 'SaveButton', 'onclick' => 'return confirm("' . TS_('Are you sure want to delete this group?') . '")'));
     echo '</b>';
     echo '</div>';
 }
 $Form->end_form();
 $Form->switch_layout(NULL);
<?php

/**
 * This file display the 2nd step of WordPress XML importer
 *
 * 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/}.
 * 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 $wp_blog_ID;
$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_('Collection'), $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') . '\'')));
$Form->end_form();
    if (empty($force_regexp_filename)) {
        $Form->text('regexp_filename', $Settings->get('regexp_filename'), 40, T_('Valid filename'), T_('Regular expression'), 255);
    }
    // Do not display regexp for dirname if the force_regexp_dirname var is set
    if (empty($force_regexp_dirname)) {
        $Form->text('regexp_dirname', $Settings->get('regexp_dirname'), 40, T_('Valid dirname'), T_('Regular expression'), 255);
    }
}
$Form->radio_input('evocache_foldername', $Settings->get('evocache_foldername'), array(array('value' => '.evocache', 'label' => T_('Use .evocache folders (system hidden folders)')), array('value' => '_evocache', 'label' => T_('Use _evocache folders (compatible with all webservers)'))), T_('Cache folder names'), array('lines' => 2));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Image options') . get_manual_link('image-options'));
$Form->checkbox('exif_orientation', $Settings->get('exif_orientation'), T_('Use EXIF info in photos'), T_('Use orientation tag to automatically rotate thumbnails to upright position.'));
$resize_input_suffix = ' ' . T_('Fit to') . ' ';
$resize_input_suffix .= '<input type="text" id="fm_resize_width" name="fm_resize_width" class="form_text_input" size="4" maxlength="4" value="' . $Settings->get('fm_resize_width') . '" />';
$resize_input_suffix .= ' x ';
$resize_input_suffix .= '<input type="text" id="fm_resize_height" name="fm_resize_height" class="form_text_input" size="4" maxlength="4" value="' . $Settings->get('fm_resize_height') . '" />';
$resize_input_suffix .= ' ' . T_('pixels') . ' ';
$resize_input_suffix .= '<input type="text" id="fm_resize_quality" name="fm_resize_quality" class="form_text_input" size="3" maxlength="3" style="margin-left:10px" value="' . $Settings->get('fm_resize_quality') . '" />';
$resize_input_suffix .= ' % ' . T_('quality') . ' ';
$Form->checkbox_input('fm_resize_enable', $Settings->get('fm_resize_enable'), T_('Resize large images after upload'), array('input_suffix' => $resize_input_suffix));
$Form->end_fieldset();
if ($current_User->check_perm('options', 'edit', false)) {
    // We have permission to modify:
    $Form->buttons(array(array('submit', 'submit[update]', T_('Save Changes!'), 'SaveButton'), array('submit', 'submit[restore_defaults]', T_('Restore defaults'), 'ResetButton')));
}
$Form->end_form();
if ($current_User->check_perm('options', 'edit', false)) {
    // TODO: better perm check
    echo '<p class="note">' . T_('See also:') . ' ';
    echo T_('Blog Settings') . ' &gt; ' . T_('Advanced') . ' &gt; ' . T_('Media directory location');
}