Example #1
0
 }
 // BROKEN ?
 $field_options['download'] = T_('Download files as ZIP archive...');
 /* Not fully functional:
 			$field_options['file_copy'] = T_('Copy the selected files...');
 			$field_options['file_move'] = T_('Move the selected files...');
 
 			// This is too geeky! Default perms radio options and unchecked radio groups! NO WAY!
 			// If you want this feature to be usable by average users you must only have one line per file OR one file for all. You can't mix both.
 			// The only way to have both is to have 2 spearate forms: 1 titled "change perms for all files simultaneously"-> submit  and another 1 title "change perms for each file individually" -> another submit
 			// fplanque>> second thought: changing perms for multiple files at once is useful. BUT assigning different perms to several files with ONE form is trying to solve a problem that not even geeks can face once in a lifetime.
 			// This has to be simplified to ONE single set of permissions for all selected files. (If you need different perms, click again)
 			$field_options['file_perms'] = T_('Change permissions for the selected files...');
 			*/
 $Form->switch_layout('none');
 $Form->select_input_array('group_action', $action, $field_options, ' &mdash; <strong>' . T_('With selected files') . '</strong>');
 $Form->submit_input(array('name' => 'actionArray[group_action]', 'value' => T_('Go!'), 'onclick' => 'return js_act_on_selected();'));
 $Form->switch_layout(NULL);
 /* fp> the following has been integrated into the select.
 			if( $mode == 'upload' )
 			{	// We are uploading in a popup opened by an edit screen
 				?>
 				&mdash;
 				<input class="ActionButton"
 					title="<?php echo T_('Insert IMG or link tags for the selected files, directly into the post text'); ?>"
 					name="actionArray[img_tag]"
 					value="<?php echo T_('Insert IMG/link into post') ?>"
 					type="submit"
 					onclick="insert_tag_for_selected_files(); return false;" />
 				<?php
 			}
 * 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 $edited_Domain;
// Determine if we are creating or updating...
global $action;
$creating = $action == 'domain_new';
$Form = new Form(NULL, 'domain_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,domain_ID'));
$Form->begin_form('fform', $creating ? T_('New Domain') : T_('Domain'));
$Form->add_crumb('domain');
$Form->hidden('action', 'domain_update');
$Form->hidden('dom_ID', $edited_Domain->ID);
$Form->hidden_ctrl();
$Form->hidden('tab', get_param('tab'));
$Form->hidden('tab_from', get_param('tab_from'));
$Form->hidden('tab3', get_param('tab3'));
$Form->text_input('dom_name', $edited_Domain->get('name'), 50, T_('Name'), '', array('maxlength' => 250, 'required' => true));
$Form->select_input_array('dom_type', $edited_Domain->get('type'), stats_dom_type_titles(), T_('Referrer type'), '', array('force_keys_as_values' => true, 'required' => true));
$Form->select_input_array('dom_status', $edited_Domain->get('status'), stats_dom_status_titles(), T_('Spam status'), '', array('force_keys_as_values' => true, 'background_color' => stats_dom_status_colors(), 'required' => true));
$Form->end_form(array(array('submit', 'submit', $creating ? T_('Record') : T_('Save Changes!'), 'SaveButton')));
 */
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'));
$Form->add_crumb('iprange');
$Form->hidden('action', $creating ? 'iprange_create' : 'iprange_update');
$Form->hidden_ctrl();
$Form->hidden('tab3', param('tab3', 'string', ''));
$Form->hidden('iprange_ID', param('iprange_ID', 'integer', 0));
$aipr_statuses = array('' => T_('Unknown'), 'trusted' => T_('Trusted'), 'suspect' => T_('Suspect'), 'blocked' => T_('Blocked'));
$aipr_statuses_color = array('' => '999999', 'trusted' => '00CC00', 'suspect' => 'FFAA00', 'blocked' => 'FF0000');
$Form->select_input_array('aipr_status', $edited_IPRange->get('status'), $aipr_statuses, 'Status', '', array('force_keys_as_values' => true, 'background_color' => $aipr_statuses_color, '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->info(T_('User count'), (int) $edited_IPRange->get('user_count'));
$Form->info(T_('Block count'), (int) $edited_IPRange->get('block_count'));
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')));
}
}
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();
Example #5
0
    }
    // Display scrollable div
    echo '<div style="padding: 6px; margin:5px; border: 1px solid #CCC; overflow:scroll; height: 350px">' . $eblog_test_output . '</div>';
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('General settings') . get_manual_link('blog_by_email'));
if (extension_loaded('imap')) {
    $imap_extenssion_status = T_('(INSTALLED)');
} else {
    $imap_extenssion_status = '<b class="red">' . T_('(NOT INSTALLED)') . '</b>';
}
$Form->checkbox_input('eblog_enabled', $Settings->get('eblog_enabled'), T_('Enable Post by email'), array('note' => sprintf(T_('Note: This feature needs the php_imap extension %s.'), $imap_extenssion_status)));
$eblog_test_mode_value = isset($eblog_saved_test_mode_value) ? $eblog_saved_test_mode_value : $Settings->get('eblog_test_mode');
$Form->checkbox_input('eblog_test_mode', $eblog_test_mode_value, T_('Test Mode'), array('note' => T_('Check to run Post by Email in test mode. Nothing will be posted to the database nor will your inbox be altered.')));
// sam2kb> TODO: javascript to preset default eblog_server_port when eblog_method and/or eblog_encrypt change
$Form->select_input_array('eblog_method', $Settings->get('eblog_method'), array('pop3' => T_('POP3'), 'imap' => T_('IMAP')), T_('Retrieval method'), T_('Choose a method to retrieve the emails.'));
$Form->text_input('eblog_server_host', $Settings->get('eblog_server_host'), 25, T_('Mail Server'), T_('Hostname or IP address of your incoming mail server.'), array('maxlength' => 255));
$Form->text_input('eblog_server_port', $Settings->get('eblog_server_port'), 5, T_('Port Number'), T_('Port number of your incoming mail server (Defaults: POP3: 110, IMAP: 143, SSL/TLS: 993).'), array('maxlength' => 6));
$Form->radio('eblog_encrypt', $Settings->get('eblog_encrypt'), array(array('none', T_('None')), array('ssl', T_('SSL')), array('tls', T_('TLS'))), T_('Encryption method'));
$Form->checkbox('eblog_novalidatecert', $Settings->get('eblog_novalidatecert'), T_('Do not validate certificate'), T_('Do not validate the certificate from the TLS/SSL server. Check this if you are using a self-signed certificate.'));
$Form->text_input('eblog_username', $Settings->get('eblog_username'), 25, T_('Account Name'), T_('User name for authenticating on your mail server. Usually it\'s your email address or a part before the @ sign.'), array('maxlength' => 255));
$Form->password_input('eblog_password', $Settings->get('eblog_password'), 25, T_('Password'), array('maxlength' => 255, 'note' => T_('Password for authenticating on your mail server.')));
$Form->checkbox('eblog_delete_emails', $Settings->get('eblog_delete_emails'), T_('Delete processed emails'), T_('Check this if you want processed messages to be deleted form server after successful processing.'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Posting settings'));
// TODO: provide a list of categories to choose from
$Form->text_input('eblog_default_category', $Settings->get('eblog_default_category'), 5, T_('Default Category ID'), sprintf(T_('This is a default category for your posts.') . '<br />' . T_('You can use the following code in message body to define categories: %s. In this example 2 will be main category and 5, 47 extra categories.'), '<b>&lt;category&gt;2, 5, 47&lt;/category&gt;</b>'), array('maxlength' => 6));
$Form->text_input('eblog_default_title', $Settings->get('eblog_default_title'), 50, T_('Default title'), sprintf(T_('This is a default title for your posts.') . '<br />' . T_('You can use the following code in message body to define post title: %s.'), '<b>&lt;title&gt;Post title here&lt;/title&gt;</b>'), array('maxlength' => 255));
$Form->checkbox('eblog_add_imgtag', $Settings->get('eblog_add_imgtag'), T_('Add &lt;img&gt; tags'), T_('Display image attachments using &lt;img&gt; tags (instead of linking them through file manager).'));
$Form->text_input('eblog_subject_prefix', $Settings->get('eblog_subject_prefix'), 15, T_('Subject Prefix'), T_('Email subject must start with this prefix to be imported, messages that don\'t have this tag will be skipped.'), array('maxlength' => 255));
$Form->text_input('eblog_body_terminator', $Settings->get('eblog_body_terminator'), 15, T_('Body Terminator'), T_('Starting from this string, everything will be ignored, including this string.') . '<br />' . T_('You can use this to remove signature from message body.'), array('maxlength' => 255));
Example #6
0
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('tab', 'other');
$Form->hidden('blog', $edited_Blog->ID);
$Form->begin_fieldset(T_('Search results') . get_manual_link('search-results-other'));
$Form->text('search_per_page', $edited_Blog->get_setting('search_per_page'), 4, T_('Number of results per page'), '', 4);
$Form->end_fieldset();
$Form->begin_fieldset(T_('Latest comments') . get_manual_link('latest-comments-other'));
$Form->text('latest_comments_num', $edited_Blog->get_setting('latest_comments_num'), 4, T_('Number of comments shown'), '', 4);
$Form->end_fieldset();
$Form->begin_fieldset(T_('Archive pages') . get_manual_link('archives-other'));
$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.'));
// TODO: Hide if archive_mode != 'postbypost' (JS)
// fp> there should probably be no post by post mode since we do have other ways to list posts now
// fp> TODO: this is display param and should go to plugin/widget
$Form->radio('archives_sort_order', $edited_Blog->get_setting('archives_sort_order'), array(array('date', T_('date')), array('title', T_('title'))), T_('Archive sorting'), false, T_('How to sort your archives? (only in post by post mode)'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Download pages') . get_manual_link('download-display-other'));
$Form->text_input('download_delay', $edited_Blog->get_setting('download_delay'), 2, T_('Download delay'));
$Form->end_fieldset();
if (isset($GLOBALS['files_Module'])) {
    load_funcs('files/model/_image.funcs.php');
    $params['force_keys_as_values'] = true;
    $Form->begin_fieldset(T_('User directory') . get_manual_link('user-directory-other'));
    $Form->select_input_array('image_size_user_list', $edited_Blog->get_setting('image_size_user_list'), get_available_thumb_sizes(), T_('Profile picture size'), '', $params);
    $Form->end_fieldset();
    $Form->begin_fieldset(T_('Messaging pages') . get_manual_link('messaging-other'));
    $Form->select_input_array('image_size_messaging', $edited_Blog->get_setting('image_size_messaging'), get_available_thumb_sizes(), T_('Profile picture size'), '', $params);
    $Form->end_fieldset();
}
$Form->end_form(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
if (!empty($path_avatars) && !file_exists($path_avatars)) {
    // Path avatars is incorrect
    $path_avatars = '<b class="red">' . $path_avatars . '</b>';
    $path_avatars_note = T_('This folder does not exist');
}
$Form->info(T_('Source for avatars'), $path_avatars, $path_avatars_note);
$BlogCache =& get_BlogCache();
if ($phpbbBlog =& $BlogCache->get_by_ID(phpbb_get_var('blog_ID'))) {
    $Form->info(T_('Blog for import'), $phpbbBlog->get('name'));
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('Users groups'));
$b2evo_groups = b2evo_groups();
$b2evo_groups_default = $b2evo_groups;
$b2evo_groups_default['0'] = T_('Select');
$Form->select_input_array('phpbb_group_default', phpbb_get_var('group_default'), $b2evo_groups_default, T_('Default group'), T_('Use this group as default for users without defined rank'), array('force_keys_as_values' => true));
$Form->select_input_array('phpbb_group_invalid', phpbb_get_var('group_invalid'), $b2evo_groups, '<span class="red">' . T_('Invalid users') . '</span>', T_('Use this group as default for users which was deleted from DB'), array('force_keys_as_values' => true));
echo T_('Please select the ranks which should be imported:');
$rank_values = phpbb_get_var('ranks');
$phpbb_ranks = phpbb_ranks();
foreach ($phpbb_ranks as $rank_ID => $rank_name) {
    $rank_users_count = phpbb_rank_info($rank_ID, true);
    if ($rank_users_count == 0) {
        // Don't display ranks without users
        continue;
    }
    $rank_value = isset($rank_values[$rank_ID]) ? $rank_values[$rank_ID] : phpbb_get_var('all_group_default');
    $Form->select_input_array('phpbb_ranks[' . $rank_ID . ']', $rank_value, $b2evo_groups, $rank_name, phpbb_rank_info($rank_ID), array('force_keys_as_values' => true));
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('Select the forums which will be imported'));
Example #8
0
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) {
    if (in_array($extension, $force_upload_forbiddenext)) {
        $not_allowed = true;
        continue;
    }
}
$Form->radio('ftyp_allowed', $edited_Filetype->allowed, array(array('any', T_('Allow anyone (including anonymous users) to upload/rename files of this type')), array('registered', T_('Allow only registered users to upload/rename files of this type')), array('admin', T_('Allow only admins to upload/rename files of this type'))), T_('Allow upload'), true);
if ($creating) {
    $Form->end_form(array(array('submit', 'submit', T_('Record'), 'SaveButton'), array('submit', 'submit', T_('Record, then Create New'), 'SaveButton'), array('submit', 'submit', T_('Record, then Create Similar'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
} else {
    $Form->end_form(array(array('submit', 'submit', T_('Update'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
Example #9
0
load_class('users/model/_userfield.class.php', 'Userfield');
/**
 * @var Userfield
 */
global $edited_Userfield;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'userfield_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this userfield!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('userfield')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New user field') : T_('User field'));
$Form->add_crumb('userfield');
$Form->hiddens_by_key(get_memorized('action'));
// (this allows to come back to the right list order & page)
$Form->select_input_array('ufdf_ufgp_ID', $edited_Userfield->group_ID, $edited_Userfield->get_groups(), T_('Group'), '', array('required' => true, 'force_keys_as_values' => true));
$Form->text_input('ufdf_name', $edited_Userfield->name, 50, T_('Field name'), '', array('maxlength' => 255, 'required' => true));
$Form->select_input_array('ufdf_type', $edited_Userfield->type, $edited_Userfield->get_types(), T_('Field type'), '', array('required' => true));
// Show this textarea only for field type with "Option list"
echo '<div id="div_ufdf_options"' . ($edited_Userfield->type != 'list' ? ' style="display:none"' : '') . '>';
$Form->textarea_input('ufdf_options', $edited_Userfield->options, 10, T_('Options'), array('required' => true, 'note' => T_('Enter one option per line')));
echo '</div>';
// Suggest values only for field type with "Single word"
echo '<div id="div_ufdf_suggest"' . ($edited_Userfield->type != 'word' ? ' style="display:none"' : '') . '>';
$Form->checkbox_input('ufdf_suggest', $edited_Userfield->suggest, T_('Suggest values'));
echo '</div>';
$Form->radio_input('ufdf_duplicated', $edited_Userfield->duplicated, $edited_Userfield->get_duplicateds(), T_('Multiple values'), array('required' => true, 'lines' => true));
$Form->radio_input('ufdf_required', $edited_Userfield->required, $edited_Userfield->get_requireds(), T_('Required?'), array('required' => true));
$Form->textarea_input('ufdf_bubbletip', $edited_Userfield->bubbletip, 5, T_('Bubbletip text'));
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')));
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $edited_EmailAddress;
// Determine if we are creating or updating...
global $action;
$creating = $action == 'blocked_new';
$Form = new Form(NULL, 'slug_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,emadr_ID'));
$Form->begin_form('fform', ($creating ? T_('New email address') : T_('Email address')) . get_manual_link('email-addresses'));
$Form->add_crumb('email_blocked');
$Form->hidden('action', 'blocked_save');
$Form->hiddens_by_key(get_memorized('action'));
$Form->text_input('emadr_address', $edited_EmailAddress->get('address'), 50, T_('Email address'), '', array('maxlength' => 255, 'required' => true));
$email_status_icon = '<div id="email_status_icon" class="status_icon">' . emadr_get_status_icon($edited_EmailAddress->get('status')) . '</div>';
$Form->select_input_array('emadr_status', $edited_EmailAddress->get('status'), emadr_get_status_titles(), 'Status', '', array('force_keys_as_values' => true, 'background_color' => emadr_get_status_colors(), 'required' => true, 'field_suffix' => $email_status_icon));
$Form->info(T_('Last sent date'), mysql2localedatetime_spans($edited_EmailAddress->get('last_sent_ts'), "M-d"));
$Form->text_input('emadr_sent_count', $edited_EmailAddress->get('sent_count'), 20, T_('Sent count'), '');
$Form->text_input('emadr_sent_last_returnerror', $edited_EmailAddress->get('sent_last_returnerror'), 20, T_('Sent count since last error'), '');
$Form->info(T_('Last error date'), mysql2localedatetime_spans($edited_EmailAddress->get('last_error_ts'), "M-d"));
$Form->text_input('emadr_prmerror_count', $edited_EmailAddress->get('prmerror_count'), 20, T_('Permanent errors count'), '');
$Form->text_input('emadr_tmperror_count', $edited_EmailAddress->get('tmperror_count'), 20, T_('Temporary errors count'), '');
$Form->text_input('emadr_spamerror_count', $edited_EmailAddress->get('spamerror_count'), 20, T_('Spam errors count'), '');
$Form->text_input('emadr_othererror_count', $edited_EmailAddress->get('othererror_count'), 20, T_('Other errors count'), '');
$Form->end_form(array(array('submit', 'submit', $creating ? T_('Record') : T_('Save Changes!'), 'SaveButton')));
?>
<script type="text/javascript">
var email_status_icons = new Array;
<?php 
$email_status_icons = emadr_get_status_icons();
foreach ($email_status_icons as $status => $icon) {
        // Field to create a new category if current user has the rights
        $categories[] = array('value' => 'new', 'label' => T_('New') . ':', 'suffix' => '<input type="text" id="new_categories[' . $post_counter . ']" name="new_categories[' . $post_counter . ']" class="form_text_input" maxlength="255" size="25" />');
    }
    $Form->radio_input('category[' . $post_counter . ']', $selected_category_ID, $categories, T_('Category'), array('suffix' => '<br />'));
    // Clear last option to create a new for next item with other $post_counter
    array_pop($categories);
    $Form->info(T_('Post content'), '<img src="' . $fm_FileRoot->ads_url . urldecode($item) . '" width="200" />');
    $Form->end_fieldset();
    $post_counter++;
}
$edited_Item = NULL;
$visibility_statuses = get_visibility_statuses('notes-string', array(), true, $blog);
if (empty($visibility_statuses)) {
    $visibility_statuses = get_visibility_statuses('notes-string');
    if (isset($visibility_statuses[$Blog->get_setting('default_post_status')])) {
        // Current user can create a post only with default status
        $Form->info(T_('Status of new posts'), $visibility_statuses[$Blog->get_setting('default_post_status')]);
    }
} else {
    // Display a list with the post statuses
    $Form->select_input_array('post_status', $Blog->get_setting('default_post_status'), $visibility_statuses, T_('Status of new posts'));
}
$Form->end_form(array(array('submit', 'actionArray[make_posts_from_files]', T_('Make posts'), 'ActionButton')));
?>
<script type="text/javascript">
jQuery( 'input[id^=new_categories]' ).focus( function()
{
	var num = jQuery( this ).attr( 'id' ).replace( /new_categories\[(\d+)\]/gi, '$1' );
	jQuery( 'input[name=category\\[' + num + '\\]]' ).attr( 'checked', 'checked' );
} );
</script>
$tablet_skins = array(0 => T_('Same as normal skin'));
$SkinCache =& get_SkinCache();
$SkinCache->load_all();
$SkinCache->rewind();
while (($iterator_Skin =& $SkinCache->get_next()) != NULL) {
    switch ($iterator_Skin->get('type')) {
        case 'normal':
            $normal_skins[$iterator_Skin->ID] = $iterator_Skin->get('name');
            break;
        case 'mobile':
            $mobile_skins[$iterator_Skin->ID] = $iterator_Skin->get('name');
            break;
        case 'tablet':
            $tablet_skins[$iterator_Skin->ID] = $iterator_Skin->get('name');
            break;
            //default: It's not a skin whit a type what we should show in these select lists ( e.g. feed )
    }
}
$field_params = array('force_keys_as_values' => true);
$Form->select_input_array('def_normal_skin_ID', $Settings->get('def_normal_skin_ID'), $normal_skins, T_('Default normal skin'), NULL, $field_params);
$Form->select_input_array('def_mobile_skin_ID', $Settings->get('def_mobile_skin_ID'), $mobile_skins, T_('Default mobile phone skin'), NULL, $field_params);
$Form->select_input_array('def_tablet_skin_ID', $Settings->get('def_tablet_skin_ID'), $tablet_skins, T_('Default tablet skin'), NULL, $field_params);
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Comment recycle bin') . get_manual_link('recycle-bin-settings'));
$Form->text_input('auto_empty_trash', $Settings->get('auto_empty_trash'), 5, T_('Prune recycled comments after'), T_('days.'));
$Form->end_fieldset();
// --------------------------------------------
if ($current_User->check_perm('options', 'edit')) {
    $Form->end_form(array(array('submit', 'submit', T_('Save Changes!'), 'SaveButton')));
}
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Blog
 */
global $edited_Blog;
$Form = new Form(NULL, 'coll_features_checkchanges');
$Form->begin_form('fform');
$Form->add_crumb('collection');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('tab', 'features');
$Form->hidden('blog', $edited_Blog->ID);
$Form->begin_fieldset(T_('Post list') . get_manual_link('item-list-features'));
$Form->select_input_array('orderby', $edited_Blog->get_setting('orderby'), get_available_sort_options(), 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 do you want to display on the home page?'), 4);
$Form->radio('timestamp_min', $edited_Blog->get_setting('timestamp_min'), array(array('yes', T_('yes')), array('no', T_('no')), array('duration', T_('only the last'))), T_('Show past posts'), true);
$Form->duration_input('timestamp_min_duration', $edited_Blog->get_setting('timestamp_min_duration'), '');
$Form->radio('timestamp_max', $edited_Blog->get_setting('timestamp_max'), array(array('yes', T_('yes')), array('no', T_('no')), array('duration', T_('only the next'))), T_('Show future posts'), true);
$Form->duration_input('timestamp_max_duration', $edited_Blog->get_setting('timestamp_max_duration'), '');
$Form->end_fieldset();
$Form->begin_fieldset(T_('Post options') . get_manual_link('blog_features_settings'));
$Form->select_input_array('default_post_status', $edited_Blog->get_setting('default_post_status'), get_visibility_statuses('notes-string'), T_('Default status'), T_('Default status for new posts'));
$Form->radio('require_title', $edited_Blog->get_setting('require_title'), array(array('required', T_('Always'), T_('The blogger must provide a title')), array('optional', T_('Optional'), T_('The blogger can leave the title field empty')), array('none', T_('Never'), T_('No title field'))), T_('Post titles'), true);
$Form->checkbox('allow_html_post', $edited_Blog->get_setting('allow_html_post'), T_('Allow HTML'), T_('Check to allow HTML in posts.') . ' (' . T_('HTML code will pass several sanitization filters.') . ')');
$Form->radio('enable_goto_blog', $edited_Blog->get_setting('enable_goto_blog'), array(array('no', T_('No'), T_('Check this to view list of the posts.')), array('blog', T_('View home page'), T_('Check this to automatically view the blog after publishing a post.')), array('post', T_('View new post'), T_('Check this to automatically view the post page.'))), T_('View blog after publishing'), true);
$Form->radio('editing_goto_blog', $edited_Blog->get_setting('editing_goto_blog'), array(array('no', T_('No'), T_('Check this to view list of the posts.')), array('blog', T_('View home page'), T_('Check this to automatically view the blog after editing a post.')), array('post', T_('View edited post'), T_('Check this to automatically view the post page.'))), T_('View blog after editing'), true);
// FP> TODO:
Example #14
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();
$SkinCache->load_all();
$block_item_Widget = new Widget('block_item');
$block_item_Widget->title = T_('Skins available for installation') . get_manual_link('installing_skins');
if ($current_User->check_perm('options', 'edit', false)) {
    // We have permission to modify:
    $block_item_Widget->global_icon(T_('Cancel install!'), 'close', $redirect_to);
}
$block_item_Widget->disp_template_replaced('block_start');
// Skin type selector:
$Form = new Form($admin_url, '', 'get', 'blockspan');
$Form->hidden_ctrl();
$Form->hidden('action', $action);
$Form->hidden('redirect_to', $redirect_to);
$Form->hidden('kind', get_param('kind'));
$Form->begin_form('skin_selector_filters');
$Form->select_input_array('skin_type', $skin_type, array('' => T_('All skins'), 'normal' => T_('Normal skins'), 'mobile' => T_('Mobile skins'), 'tablet' => T_('Tablet skins'), 'feed' => T_('Feed skins'), 'sitemap' => T_('Sitemap skins')), T_('Show'), '', array('force_keys_as_values' => true, 'onchange' => 'this.form.submit()'));
$Form->end_form();
$filename_params = array('inc_files' => false, 'recurse' => false, 'basename' => true);
// Get all skin folder names:
$skin_folders = get_filenames($skins_path, $filename_params);
$Form = new Form($admin_url, '', 'post', 'blockspan');
$Form->hidden_ctrl();
$Form->hidden('action', 'install');
if (isset($tab)) {
    $Form->hidden('tab', $tab);
}
// fp> do we need this?
$Form->hidden('redirect_to', $redirect_to);
$Form->add_crumb('skin');
$Form->begin_form('skin_selector_form');
echo '<div class="skin_selector_block">';
 * @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')));
$Form->begin_fieldset(T_('Comment moderation'));
$newstatus_warning_attrs = ' id="newstatus_warning" style="display:' . ($edited_Blog->get_setting('new_feedback_status') == 'published' ? 'inline' : 'none') . '"';
$newstatus_warning = str_replace('$attrs$', $newstatus_warning_attrs, $spammers_warning);
$status_options = get_visibility_statuses('', array('redirected', 'trash'));
if ($edited_Blog->get_setting('new_feedback_status') != 'published') {
    if ($perm_blog_admin) {
        // Only admin can set this setting to 'Public'
        $status_options['published'] .= ' [' . T_('Admin') . ']';
    } else {
        // Remove published status for non-admin users
        unset($status_options['published']);
    }
}
// put this on feedback details container, this way it won't be displayed if comment posting is not allowed
echo '<div class="feedback_details_container">';
$Form->select_input_array('new_feedback_status', $edited_Blog->get_setting('new_feedback_status'), $status_options, T_('New feedback status'), $newstatus_warning . T_('Logged in users will get the highest possible status allowed by their permissions. Plugins may also override this default.'));
echo '</div>';
// Moderation statuses setting
$not_moderation_statuses = array_diff(get_visibility_statuses('keys', NULL), get_visibility_statuses('moderation'));
// Get moderation statuses with status text
$moderation_statuses = get_visibility_statuses('', $not_moderation_statuses);
$blog_moderation_statuses = $edited_Blog->get_setting('moderation_statuses');
$checklist_options = array();
foreach ($moderation_statuses as $status => $status_text) {
    // Add a checklist option for each possible modeartion status
    $is_checked = strpos($blog_moderation_statuses, $status) !== false;
    $checklist_options[] = array('notif_' . $status, 1, $status_text, $is_checked);
}
$Form->checklist($checklist_options, 'moderation_statuses', T_('Comment moderation reminder statuses'), false, false, array('note' => 'Comments with the selected statuses will be notified on the "Send reminders about comments awaiting moderation" scheduled job.'));
$Form->radio('comment_quick_moderation', $edited_Blog->get_setting('comment_quick_moderation'), array(array('never', T_('Never')), array('expire', T_('Links expire on first edit action')), array('always', T_('Always available'))), T_('Comment quick moderation'), true);
$Form->end_fieldset();
Example #18
0
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') {
        $Form->info(T_('Job #'), $edited_Cronjob->ID);
    }
    $Form->info(T_('Default job name'), cron_job_name($edited_Cronjob->key, '', $edited_Cronjob->params));
    $Form->text_input('cjob_name', $edited_Cronjob->name, 50, T_('Job name'), '', array('maxlength' => 255));
}
$Form->date_input('cjob_date', date2mysql($edited_Cronjob->start_timestamp), T_('Schedule date'), array('required' => true));
$Form->time_input('cjob_time', date2mysql($edited_Cronjob->start_timestamp), T_('Schedule time'), array('required' => true));
$Form->duration_input('cjob_repeat_after', $edited_Cronjob->repeat_after, T_('Repeat every'), 'days', 'minutes', array('minutes_step' => 1));
$Form->end_fieldset();
if (!$creating) {
    // We can edit only pending cron jobs, Show this field just for info
    $Form->begin_fieldset(T_('Execution details') . get_manual_link('scheduled-job-execution-details'));
Example #19
0
$default_avatar_women = get_default_avatar_url('F');
$default_images_info = '<br />' . T_('For unknown gender') . ': <a href="' . $default_avatar_unknown . '" target="_blank">' . $default_avatar_unknown . '</a>';
$default_images_info .= '<br />' . T_('For men') . ': <a href="' . $default_avatar_men . '" target="_blank">' . $default_avatar_men . '</a>';
$default_images_info .= '<br />' . T_('For women') . ': <a href="' . $default_avatar_women . '" target="_blank">' . $default_avatar_women . '</a>';
$Form->radio('default_gravatar', $Settings->get('default_gravatar'), array(array('b2evo', T_('Default image'), $default_images_info), array('', 'Gravatar'), array('identicon', 'Identicon'), array('monsterid', 'Monsterid'), array('wavatar', 'Wavatar'), array('retro', 'Retro')), T_('Default gravatars'), true, T_('Gravatar users can choose to set up a unique icon for themselves, and if they don\'t, they will be assigned a default image.'));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Username display options') . get_manual_link('user-username-display-options'));
$Form->radio('username_display', $Settings->get('username_display'), array(array('login', T_('Usernames/Logins'), T_('Secure options')), array('name', T_('Friendly names (Nickname or Firstname if available)'), T_('WARNING: this may allow users to fake their identity'))), T_('What to display'), true);
$Form->checkbox_input('gender_colored', $Settings->get('gender_colored'), T_('Display gender in back-office'), array('note' => T_('Use colored usernames to differentiate men & women.')));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Username display in back-office') . get_manual_link('user-bubble-tips-settings'));
$Form->checkbox_input('bubbletip', $Settings->get('bubbletip'), T_('Username bubble tips'), array('note' => T_('Check to enable bubble tips on usernames')));
if (isset($GLOBALS['files_Module'])) {
    $Form->select_input_array('bubbletip_size_admin', $Settings->get('bubbletip_size_admin'), get_available_thumb_sizes(), T_('Bubble tip image format'), '', $params);
}
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Username display for logged-in users (front-office)') . get_manual_link('user-bubble-tips-settings'));
$Form->radio('user_url_loggedin', $Settings->get('user_url_loggedin'), array(array('page', T_('Always user page'), ''), array('url', T_('User website if available (fallback to user page)'), '')), T_('Link to'), true);
$Form->info(T_('Note'), T_('Enable bubble tips in each skin\'s settings.'));
if (isset($GLOBALS['files_Module'])) {
    $Form->select_input_array('bubbletip_size_front', $Settings->get('bubbletip_size_front'), get_available_thumb_sizes(), T_('Bubble tip image format'), '', $params);
}
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Username display for anonymous user (front-office)') . get_manual_link('user-bubble-tips-settings'));
$Form->radio('user_url_anonymous', $Settings->get('user_url_anonymous'), array(array('page', T_('Always user page (if allowed)'), ''), array('url', T_('User website if available (fallback to user page)'), '')), T_('Link to'), true);
// Allow anonymous users to see the user display ( disp=user )
$Form->checkbox_input('allow_anonymous_user_profiles', $Settings->get('allow_anonymous_user_profiles'), T_('Allow to see user profiles'));