Пример #1
0
    public function callback($term = null)
    {
        if (!empty($term)) {
            $mp_term = \Morepress\Term::forge($term);
            ?>
			<tr class="form-field">
				<th scope="row" valign="top">
					<label for="term_meta_<?php 
            echo $this->_slug;
            ?>
"><?php 
            echo $this->_params['label'];
            ?>
</label>
				</th>
				<td>
                    <select id="term_meta_<?php 
            echo $this->_slug;
            ?>
" name="term_meta[<?php 
            echo $this->_slug;
            ?>
]"  id="term_meta_<?php 
            echo $this->_slug;
            ?>
">
                        <?php 
            wp_dropdown_roles($mp_term->getMeta($this->_slug));
            ?>
                    </select>
					<?php 
            if (!empty($this->_params['description'])) {
                ?>
						<p class="description"><?php 
                echo $this->_params['description'];
                ?>
</p>
					<?php 
            }
            ?>
				</td>
			</tr>
			<?php 
        }
    }
function msum_options()
{
    $blogs = msum_get_blog_list(0, 'all');
    echo '<h3>' . __('Multisite User Management', 'msum') . '</h3>';
    if (empty($blogs)) {
        echo '<p><b>' . __('No public, safe sites available.', 'msum') . '</b></p>';
    } else {
        echo '<p>' . __('Select the default role for each of your sites.', 'msum') . '</p>';
        echo '<p>' . __('New users will receive these roles when activating their account. Existing users will receive these roles only if they have the current default role or no role at all for each particular site.', 'msum') . '</p>';
        echo '<table class="form-table">';
        foreach ($blogs as $key => $blog) {
            switch_to_blog($blog['blog_id']);
            ?>
			<tr valign="top">
				<th scope="row"><?php 
            echo get_bloginfo('name');
            ?>
</th>
				<td>
					<select name="msum_default_user_role[<?php 
            echo $blog['blog_id'];
            ?>
]" id="msum_default_user_role[<?php 
            echo $blog['blog_id'];
            ?>
]">
						<option value="none"><?php 
            _e('-- None --', 'msum');
            ?>
</option>
						<?php 
            wp_dropdown_roles(get_option('msum_default_user_role'));
            ?>
					</select>
				</td> 
			</tr>
		<?php 
            restore_current_blog();
        }
        echo '</table>';
    }
    echo '<p>' . __('<b>Note:</b> only public, non-mature and non-dashboard sites appear here. Set the default role for the dashboard site above under <b>Dashboard Settings</b>.', 'msum') . '</p>';
}
Пример #3
0
<?php if ( $wp_user_search->results_are_paged() ) : ?>
	<div class="tablenav-pages"><?php $wp_user_search->page_links(); ?></div>
<?php endif; ?>

<div class="alignleft actions">
<select name="action">
<option value="" selected="selected"><?php _e('Bulk Actions'); ?></option>
<?php if ( !is_multisite() && current_user_can('delete_users') ) { ?>
<option value="delete"><?php _e('Delete'); ?></option>
<?php } else { ?>
<option value="remove"><?php _e('Remove'); ?></option>
<?php } ?>
</select>
<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" />
<label class="screen-reader-text" for="new_role"><?php _e('Change role to&hellip;') ?></label><select name="new_role" id="new_role"><option value=''><?php _e('Change role to&hellip;') ?></option><?php wp_dropdown_roles(); ?></select>
<input type="submit" value="<?php esc_attr_e('Change'); ?>" name="changeit" class="button-secondary" />
<?php wp_nonce_field('bulk-users'); ?>
</div>

<br class="clear" />
</div>

	<?php if ( is_wp_error( $wp_user_search->search_errors ) ) : ?>
		<div class="error">
			<ul>
			<?php
				foreach ( $wp_user_search->search_errors->get_error_messages() as $message )
					echo "<li>$message</li>";
			?>
			</ul>
</tr>
<tr valign="top"> 
<th scope="row"><?php _e('Membership:') ?></th> 
<td> <label for="users_can_register"> 
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> /> 
<?php _e('Anyone can register') ?></label><br />
<label for="comment_registration">
<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> /> 
<?php _e('Users must be registered and logged in to comment') ?>
</label>
</td> 
</tr> 
<tr valign="top"> 
<th scope="row"><?php _e('New User Default Role:') ?></th> 
<td><label for="default_role"> 
<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select></label>
</td> 
</tr> 
</table> 
<fieldset class="options"> 
<legend><?php _e('Date and Time') ?></legend> 
<table class="optiontable"> 
<tr> 
<th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th> 
<td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td> 
</tr>
<tr>
<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>
<td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 
<?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td>
</tr>
    function extra_tablenav($which)
    {
        if ('top' != $which) {
            return;
        }
        if (!current_user_can('promote_users')) {
            return;
        }
        ?>
	<div class="alignleft actions">
		<label class="screen-reader-text" for="new_role"><?php 
        _e('Change role to&hellip;');
        ?>
</label>
		<select name="new_role" id="new_role">
			<option value=''><?php 
        _e('Change role to&hellip;');
        ?>
</option>
			<?php 
        wp_dropdown_roles();
        ?>
		</select>
		<?php 
        submit_button(__('Change'), 'small', 'changeit', false);
        ?>
	</div>
<?php 
    }
_e('Members may only sign up for active subscription levels.', 'rcp');
?>
</p>
				</td>
			</tr>
			<tr class="form-field">
				<th scope="row" valign="top">
					<label for="rcp-role"><?php 
_e('User Role', 'rcp');
?>
</label>
				</th>
				<td>
					<select name="role" id="rcp-role">
						<?php 
wp_dropdown_roles($level->role);
?>
					</select>
					<p class="description"><?php 
_e('The user role given to the member after signing up.', 'rcp');
?>
</p>
				</td>
			</tr>
			<?php 
do_action('rcp_edit_subscription_form', $level);
?>
		</tbody>
	</table>
	<p class="submit">
		<input type="hidden" name="rcp-action" value="edit-subscription"/>
Пример #7
0
        _e('Delete');
        ?>
</option>
</select>
<input type="submit" value="<?php 
        _e('Apply');
        ?>
" name="doaction" id="doaction" class="button-secondary action" />
<label class="hidden" for="new_role"><?php 
        _e('Change role to&hellip;');
        ?>
</label><select name="new_role" id="new_role"><option value=''><?php 
        _e('Change role to&hellip;');
        ?>
</option><?php 
        wp_dropdown_roles();
        ?>
</select>
<input type="submit" value="<?php 
        _e('Change');
        ?>
" name="changeit" class="button-secondary" />
<?php 
        wp_nonce_field('bulk-users');
        ?>
</div>

<br class="clear" />
</div>

	<?php 
Пример #8
0
function nggallery_admin_roles()
{
    if (isset($_POST['update_cap'])) {
        check_admin_referer('ngg_addroles');
        // now set or remove the capability
        ngg_set_capability($_POST['general'], "NextGEN Gallery overview");
        ngg_set_capability($_POST['tinymce'], "NextGEN Use TinyMCE");
        ngg_set_capability($_POST['add_gallery'], "NextGEN Upload images");
        ngg_set_capability($_POST['manage_gallery'], "NextGEN Manage gallery");
        ngg_set_capability($_POST['manage_others'], "NextGEN Manage others gallery");
        ngg_set_capability($_POST['manage_tags'], "NextGEN Manage tags");
        ngg_set_capability($_POST['edit_album'], "NextGEN Edit album");
        ngg_set_capability($_POST['change_style'], "NextGEN Change style");
        ngg_set_capability($_POST['change_options'], "NextGEN Change options");
        nggGallery::show_message(__('Updated capabilities', "nggallery"));
    }
    ?>
	<div class="wrap">
    <?php 
    screen_icon('nextgen-gallery');
    ?>
	<h2><?php 
    _e('Roles / capabilities', 'nggallery');
    ?>
</h2>
	<p><?php 
    _e('Select the lowest role which should be able to access the following capabilities. NextCellent Gallery supports the standard roles from WordPress.', 'nggallery');
    ?>
 <br />
	   <?php 
    _e('For a more flexible user management you can use the', 'nggallery');
    ?>
 <a href="http://wordpress.org/extend/plugins/capsman/" target="_blank">Capability Manager</a>.</p>
	<form name="addroles" id="addroles" method="POST" accept-charset="utf-8" >
		<?php 
    wp_nonce_field('ngg_addroles');
    ?>
			<table class="form-table">
			<tr valign="top">
				<th scope="row"><label for="general"><?php 
    _e('NextCellent Gallery overview', 'nggallery');
    ?>
</label></th>
				<td><select name="general" id="general"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Gallery overview'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="tinymce"><?php 
    _e('Use TinyMCE Button / Add Media', 'nggallery');
    ?>
</label></th>
				<td><select name="tinymce" id="tinymce"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Use TinyMCE'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="add_gallery"><?php 
    _e('Add gallery / Upload images', 'nggallery');
    ?>
</label></th>
				<td><select name="add_gallery" id="add_gallery"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Upload images'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="manage_gallery"><?php 
    _e('Manage gallery', 'nggallery');
    ?>
</label></th>
				<td><select name="manage_gallery" id="manage_gallery"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Manage gallery'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="manage_others"><?php 
    _e('Manage others gallery', 'nggallery');
    ?>
</label></th>
				<td><select name="manage_others" id="manage_others"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Manage others gallery'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="manage_tags"><?php 
    _e('Manage tags', 'nggallery');
    ?>
</label></th>
				<td><select name="manage_tags" id="manage_tags"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Manage tags'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="edit_album"><?php 
    _e('Edit Album', 'nggallery');
    ?>
</label></th>
				<td><select name="edit_album" id="edit_album"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Edit album'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="change_style"><?php 
    _e('Change style', 'nggallery');
    ?>
</label></th>
				<td><select name="change_style" id="change_style"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Change style'));
    ?>
</select></td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="change_options"><?php 
    _e('Change options', 'nggallery');
    ?>
</label></th>
				<td><select name="change_options" id="change_options"><?php 
    wp_dropdown_roles(ngg_get_role('NextGEN Change options'));
    ?>
</select></td>
			</tr>
			</table>
			<div class="submit"><input type="submit" class="button-primary" name= "update_cap" value="<?php 
    _e('Update capabilities', 'nggallery');
    ?>
"/></div>
	</form>
	</div>
<?php 
}
Пример #9
0
    public function user_primary_role_dropdown_list($user_roles)
    {
        ?>
        
        <select name="primary_role" id="primary_role">
<?php 
        // Compare user role against currently editable roles
        $user_roles = array_intersect(array_values($user_roles), array_keys(get_editable_roles()));
        $user_primary_role = array_shift($user_roles);
        // print the full list of roles with the primary one selected.
        wp_dropdown_roles($user_primary_role);
        // print the 'no role' option. Make it selected if the user has no role yet.
        $selected = empty($user_primary_role) ? 'selected="selected"' : '';
        echo '<option value="" ' . $selected . '>' . esc_html__('&mdash; No role for this site &mdash;') . '</option>';
        ?>
        </select>
<?php 
    }
Пример #10
0
?>
</label></th>
			<td><select name="access_post" class="tzn_option_select">
				<?php 
echo wp_dropdown_roles($this->options['access_post']);
?>
			</select></td>
		</tr>
		<tr>
			<th><label><?php 
_e('Who can moderate the project', 'taskfreak');
?>
</label></th>
			<td><select name="access_manage" class="tzn_option_select">
				<?php 
echo wp_dropdown_roles($this->options['access_manage']);
?>
			</select></td>
		</tr>
		</table>
		<h3><?php 
_e('Security options', 'taskfreak');
?>
</h3>
		<table class="form-table">
		<tr>
			<th><label><?php 
_e('Allow uploads in task comments', 'taskfreak');
?>
</label></th>
			<td>
Пример #11
0
 <span class="description"><?php 
echo SwpmUtils::_('(required)');
?>
</span></label></th>
            <td><input class="regular-text validate[required]" name="alias" type="text" id="alias" value="" aria-required="true" /></td>
	</tr>
	<tr class="form-field form-required">
            <th scope="row"><label for="role"><?php 
echo SwpmUtils::_('Default WordPress Role');
?>
 <span class="description"><?php 
echo SwpmUtils::_('(required)');
?>
</span></label></th>
            <td><select  class="regular-text" name="role"><?php 
wp_dropdown_roles('subscriber');
?>
</select></td>
	</tr>
        <tr>
            <th scope="row"><label for="subscription_period"><?php 
echo SwpmUtils::_('Access Duration');
?>
 <span class="description"><?php 
echo SwpmUtils::_('(required)');
?>
</span></label>
            </th>
            <td>
                <p><input type="radio" checked="checked" value="<?php 
echo SwpmMembershipLevel::NO_EXPIRY;
Пример #12
0
?>
:</label>
        <select name="capability[gmedia_module_manage]" class="form-control input-sm"><?php 
wp_dropdown_roles($gmDB->get_role('gmedia_module_manage'));
?>
</select>

        <p class="help-block"><?php 
_e('Who can manage modules', 'grand-media');
?>
</p>
    </div>

    <div class="form-group">
        <label><?php 
_e('Settings', 'grand-media');
?>
:</label>
        <select name="capability[gmedia_settings]" class="form-control input-sm"><?php 
wp_dropdown_roles($gmDB->get_role('gmedia_settings'));
?>
</select>

        <p class="help-block"><?php 
_e('Who can change settings. Note: Capabilites can be changed only by administrator', 'grand-media');
?>
</p>
    </div>

</fieldset>
Пример #13
0
function clean_login_options()
{
    // No debería ser necesario, pero no está de más
    if (!current_user_can('manage_options')) {
        wp_die(__('Admin area', 'clean-login'));
    }
    // Comprobar el estado del plugin y mostrarlo
    $login_url = get_option('cl_login_url');
    $edit_url = get_option('cl_edit_url');
    $register_url = get_option('cl_register_url');
    $restore_url = get_option('cl_restore_url');
    ?>
	    <div class="wrap">
	        <!-- donation box -->
	        <div class="card">

			    <h3 class="title" id="like-donate-more" style="cursor: pointer;"><?php 
    echo __('Do you like it?', 'cleanlogin');
    ?>
 <span id="like-donate-arrow" class="dashicons dashicons-arrow-down"></span><span id="like-donate-smile" class="dashicons dashicons-smiley hidden"></span></h3>
			    <div class="hidden"  style="display:none !important" id="like-donate">
				    <p>Hi there! We are <a href="https://twitter.com/fjcarazo" target="_blank" title="Javier Carazo">Javier Carazo</a> and <a href="https://twitter.com/ahornero" target="_blank" title="Alberto Hornero">Alberto Hornero</a> from <a href="http://codection.com">Codection</a>, developers of this plugin. We have been spending many hours to develop this plugin, we keep updating it and we always try do the best in the <a href="https://wordpress.org/support/plugin/clean-login">support forum</a>.</p>
				    <p>If you like it, you can <strong>buy us a cup of coffee</strong> or whatever ;-)</p>
				    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
						<input type="hidden" name="cmd" value="_s-xclick">
						<input type="hidden" name="hosted_button_id" value="HGAS22NVY7Q8N">
						<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
						<img alt="" border="0" src="https://www.paypalobjects.com/es_ES/i/scr/pixel.gif" width="1" height="1">
					</form>
					<p>Sure! You can also <strong><a href="https://wordpress.org/support/view/plugin-reviews/clean-login?filter=5">rate our plugin</a></strong> and provide us your feedback. Thanks!</p>
				</div>
			</div>
			<br>

	        <h2><?php 
    echo __('Clean Login status', 'cleanlogin');
    ?>
</h2>

	        <p><?php 
    echo __('Below you can check the plugin status regarding the shortcodes usage and the pages/posts which contain  it.', 'cleanlogin');
    ?>
</p>


	    	<table class="widefat importers">
				<tbody>
					<tr class="alternate">
						<td class="import-system row-title"><a>[clean-login]</a></td>
						<?php 
    if (!$login_url) {
        ?>
							<td class="desc"><?php 
        echo __('Currently not used', 'cleanlogin');
        ?>
</td>
						<?php 
    } else {
        ?>
							<td class="desc"><?php 
        printf(__('Used <a href="%s">here</a>', 'cleanlogin'), $login_url);
        ?>
</td>
						<?php 
    }
    ?>
						<td class="desc"><?php 
    echo __('This shortcode contains login form and login information.', 'cleanlogin');
    ?>
</td>
					</tr>
					<tr>
						<td class="import-system row-title"><a>[clean-login-edit]</a></td>
						<?php 
    if (!$edit_url) {
        ?>
							<td class="desc"><?php 
        echo __('Currently not used', 'cleanlogin');
        ?>
</td>
						<?php 
    } else {
        ?>
							<td class="desc"><?php 
        printf(__('Used <a href="%s">here</a>', 'cleanlogin'), $edit_url);
        ?>
</td>
						<?php 
    }
    ?>
						<td class="desc"><?php 
    echo __('This shortcode contains the profile editor. If you include in a page/post a link will appear on your login preview.', 'cleanlogin');
    ?>
</td>
					</tr>
					<tr class="alternate">
						<td class="import-system row-title"><a>[clean-login-register]</a></td>
						<?php 
    if (!$register_url) {
        ?>
							<td class="desc"><?php 
        echo __('Currently not used', 'cleanlogin');
        ?>
</td>
						<?php 
    } else {
        ?>
							<td class="desc"><?php 
        printf(__('Used <a href="%s">here</a>', 'cleanlogin'), $register_url);
        ?>
</td>
						<?php 
    }
    ?>
						<td class="desc"><?php 
    echo __('This shortcode contains the register form. If you include in a page/post a link will appear on your login form.', 'cleanlogin');
    ?>
</td>
					</tr>
					<tr>
						<td class="import-system row-title"><a>[clean-login-restore]</a></td>
						<?php 
    if (!$restore_url) {
        ?>
							<td class="desc"><?php 
        echo __('Currently not used', 'cleanlogin');
        ?>
</td>
						<?php 
    } else {
        ?>
							<td class="desc"><?php 
        printf(__('Used <a href="%s">here</a>', 'cleanlogin'), $restore_url);
        ?>
</td>
						<?php 
    }
    ?>
						<td class="desc"><?php 
    echo __('This shortcode contains the restore (lost password?) form. If you include in a page/post a link will appear on your login form.', 'cleanlogin');
    ?>
</td>
					</tr>
				</tbody>
			</table>

			<h2><?php 
    echo __('Options', 'cleanlogin');
    ?>
</h2>

    <?php 
    $hidden_field_name = 'cl_hidden_field';
    $hidden_field_value = 'hidden_field_to_update_others';
    if (isset($_POST[$hidden_field_name]) && $_POST[$hidden_field_name] == $hidden_field_value) {
        update_option('cl_adminbar', isset($_POST['adminbar']) ? $_POST['adminbar'] : '');
        update_option('cl_dashboard', isset($_POST['dashboard']) ? $_POST['dashboard'] : '');
        update_option('cl_antispam', isset($_POST['antispam']) ? $_POST['antispam'] : '');
        update_option('cl_standby', isset($_POST['standby']) ? $_POST['standby'] : '');
        update_option('cl_hideuser', isset($_POST['hideuser']) ? $_POST['hideuser'] : '');
        update_option('cl_passcomplex', isset($_POST['passcomplex']) ? $_POST['passcomplex'] : '');
        update_option('cl_emailnotification', isset($_POST['emailnotification']) ? $_POST['emailnotification'] : '');
        update_option('cl_emailnotificationcontent', isset($_POST['emailnotificationcontent']) ? $_POST['emailnotificationcontent'] : '');
        update_option('cl_chooserole', isset($_POST['chooserole']) ? $_POST['chooserole'] : '');
        update_option('cl_newuserroles', isset($_POST['newuserroles']) ? $_POST['newuserroles'] : '');
        update_option('cl_termsconditions', isset($_POST['termsconditions']) ? $_POST['termsconditions'] : '');
        update_option('cl_termsconditionsMSG', isset($_POST['termsconditionsMSG']) ? $_POST['termsconditionsMSG'] : '');
        update_option('cl_termsconditionsURL', isset($_POST['termsconditionsURL']) ? $_POST['termsconditionsURL'] : '');
        update_option('cl_email_username', isset($_POST['emailusername']) ? $_POST['emailusername'] : '');
        update_option('cl_single_password', isset($_POST['singlepassword']) ? $_POST['singlepassword'] : '');
        update_option('cl_automatic_login', isset($_POST['automaticlogin']) ? $_POST['automaticlogin'] : '');
        update_option('cl_url_redirect', isset($_POST['automaticlogin']) && isset($_POST['urlredirect']) ? esc_url_raw($_POST['urlredirect']) : home_url());
        update_option('cl_login_redirect', isset($_POST['loginredirect']) ? $_POST['loginredirect'] : '');
        update_option('cl_login_redirect_url', isset($_POST['loginredirect']) && isset($_POST['loginredirect_url']) ? esc_url_raw($_POST['loginredirect_url']) : home_url());
        update_option('cl_logout_redirect', isset($_POST['logoutredirect']) ? $_POST['logoutredirect'] : '');
        update_option('cl_logout_redirect_url', isset($_POST['logoutredirect']) && isset($_POST['logoutredirect_url']) ? esc_url_raw($_POST['logoutredirect_url']) : home_url());
        echo '<div class="updated"><p><strong>' . __('Settings saved.', 'cleanlogin') . '</strong></p></div>';
    }
    // Recoger las opciones del plugin
    $adminbar = get_option('cl_adminbar', 'on');
    $dashboard = get_option('cl_dashboard');
    $antispam = get_option('cl_antispam');
    $standby = get_option('cl_standby');
    $hideuser = get_option('cl_hideuser');
    $passcomplex = get_option('cl_passcomplex');
    $emailnotification = get_option('cl_emailnotification');
    $emailnotificationcontent = get_option('cl_emailnotificationcontent');
    $chooserole = get_option('cl_chooserole');
    $newuserroles = get_option('cl_newuserroles');
    $termsconditions = get_option('cl_termsconditions');
    $termsconditionsMSG = get_option('cl_termsconditionsMSG');
    $termsconditionsURL = get_option('cl_termsconditionsURL');
    $emailusername = get_option('cl_email_username');
    $singlepassword = get_option('cl_single_password');
    $automaticlogin = get_option('cl_automatic_login', false) ? true : false;
    $urlredirect = get_option('cl_url_redirect', false) ? esc_url(get_option('cl_url_redirect')) : home_url();
    $loginredirect = get_option('cl_login_redirect', false) ? true : false;
    $loginredirect_url = get_option('cl_login_redirect_url', false) ? esc_url(get_option('cl_login_redirect_url')) : home_url();
    $logoutredirect = get_option('cl_logout_redirect', false) ? true : false;
    $logoutredirect_url = get_option('cl_logout_redirect_url', false) ? esc_url(get_option('cl_logout_redirect_url')) : home_url();
    ?>
    	<form name="form1" method="post" action="">
    	<table class="form-table">
			<tbody>
				<tr>
					<th scope="row"><?php 
    echo __('Admin bar', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="adminbar" type="checkbox" id="adminbar" <?php 
    if ($adminbar == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Hide admin bar for non-admin users?', 'cleanlogin');
    ?>
</label>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Dashboard access', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="dashboard" type="checkbox" id="dashboard" <?php 
    if ($dashboard == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Disable dashboard access for non-admin users?', 'cleanlogin');
    ?>
</label>
						<p class="description"><?php 
    echo __('Please note that you can only log in through <strong>wp-login.php</strong> and this plugin. <strong>wp-admin</strong> permalink will be inaccessible.', 'cleanlogin');
    ?>
</p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Antispam protection', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="antispam" type="checkbox" id="antispam" <?php 
    if ($antispam == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Enable captcha?', 'cleanlogin');
    ?>
</label>
						<p class="description"><?php 
    echo __('Honeypot antispam detection is enabled by default.', 'cleanlogin');
    ?>
</p>
						<p class="description"><?php 
    echo __('For captcha usage the PHP-GD library needs to be enabled in your server/hosting.', 'cleanlogin');
    ?>
</p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('User role', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="standby" type="checkbox" id="standby" <?php 
    if ($standby == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Enable Standby role?', 'cleanlogin');
    ?>
</label>
						<p class="description"><?php 
    echo __('Standby role disables all the capabilities for new users, until the administrator changes. It usefull for site with restricted components.', 'cleanlogin');
    ?>
</p>
						<br>
						<label><input name="chooserole" type="checkbox" id="chooserole" <?php 
    if ($chooserole == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Choose the role(s) in the registration form?', 'cleanlogin');
    ?>
</label>
						<p class="description"><?php 
    echo __('This feature allows you to choose the role from the frontend, with the selected roles you want to show. You can also define an standard predefined role through a shortcode parameter, e.g. [clean-login-register role="contributor"]. Anyway, you need to choose only the role(s) you want to accept to avoid security/infiltration issues.', 'cleanlogin');
    ?>
</p>
						<p>
							<select name="newuserroles[]" id="newuserroles" multiple size="5"><?php 
    wp_dropdown_roles();
    ?>
</select>
							<?php 
    //print_r($newuserroles);
    ?>
						</p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Hide username', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="hideuser" type="checkbox" id="hideuser" <?php 
    if ($hideuser == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Hide username?', 'cleanlogin');
    ?>
</label>
						<p class="description"><?php 
    echo __('Hide username from the preview form.', 'cleanlogin');
    ?>
</p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Password complexity', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="passcomplex" type="checkbox" id="passcomplex" <?php 
    if ($passcomplex == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Enable password complexity?', 'cleanlogin');
    ?>
</label>
						<p class="description"><?php 
    echo __('Passwords must be eight characters including one upper/lowercase letter, one special/symbol character and alphanumeric characters. Passwords should not contain the user\'s username, email, or first/last name.', 'cleanlogin');
    ?>
</p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Email notification', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="emailnotification" type="checkbox" id="emailnotification" <?php 
    if ($emailnotification == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Enable email notification for new registered users?', 'cleanlogin');
    ?>
</label>
						<p><textarea name="emailnotificationcontent" id="emailnotificationcontent" placeholder="<?php 
    echo __('Please use HMTL tags for all formatting. And also you can use:', 'cleanlogin') . ' {username} {password} {email}';
    ?>
" rows="8" cols="50" class="large-text code"><?php 
    echo $emailnotificationcontent;
    ?>
</textarea></p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Terms and conditions', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="termsconditions" type="checkbox" id="termsconditions" <?php 
    if ($termsconditions == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Accept terms / conditions in the registration form?', 'cleanlogin');
    ?>
</label>
						<p><input name="termsconditionsMSG" type="text" id="termsconditionsMSG" value="<?php 
    echo $termsconditionsMSG;
    ?>
" placeholder="<?php 
    echo __('Terms and conditions message', 'cleanlogin');
    ?>
" class="regular-text"></p>
						<p><input name="termsconditionsURL" type="url" id="termsconditionsURL" value="<?php 
    echo $termsconditionsURL;
    ?>
" placeholder="<?php 
    echo __('Target URL', 'cleanlogin');
    ?>
" class="regular-text"></p>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Use Email as Username', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="emailusername" type="checkbox" id="emailusername" <?php 
    if ($emailusername == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Allow user to use email as username? If you want to use both, WP Email Login plugin will help you', 'cleanlogin');
    ?>
</label>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Single Password', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="singlepassword" type="checkbox" id="singlepassword" <?php 
    if ($singlepassword == 'on') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Only ask for password once on registration form?', 'cleanlogin');
    ?>
</label>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Automatically Login after Registration', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="automaticlogin" type="checkbox" id="automaticlogin" <?php 
    if ($automaticlogin != '') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Automatically Login after registration?', 'cleanlogin');
    ?>
</label>
						<div id="urlredirect">
							<p class="description"><?php 
    echo __('URL after registration (if blank then homepage)', 'cleanlogin');
    ?>
</p>
							<label><input class="regular-text" type="text" name="urlredirect" value="<?php 
    echo $urlredirect;
    ?>
"></label>
						</div>
					</td>
				</tr>
				<tr>
					<th scope="row"><?php 
    echo __('Redirections', 'cleanlogin');
    ?>
</th>
					<td>
						<label><input name="loginredirect" type="checkbox" id="loginredirect" <?php 
    if ($loginredirect != '') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Redirect after log in?', 'cleanlogin');
    ?>
</label>
						<div id="loginredirect_url">
							<p class="description"><?php 
    echo __('URL after login (if blank then homepage)', 'cleanlogin');
    ?>
</p>
							<label><input class="regular-text" type="text" name="loginredirect_url" value="<?php 
    echo $loginredirect_url;
    ?>
"></label>
						</div>
						<br>
						<label><input name="logoutredirect" type="checkbox" id="logoutredirect" <?php 
    if ($logoutredirect != '') {
        echo 'checked="checked"';
    }
    ?>
><?php 
    echo __('Redirect after log out?', 'cleanlogin');
    ?>
</label>
						<div id="logoutredirect_url">
							<p class="description"><?php 
    echo __('URL after logout (if blank then homepage)', 'cleanlogin');
    ?>
</p>
							<label><input class="regular-text" type="text" name="logoutredirect_url" value="<?php 
    echo $logoutredirect_url;
    ?>
"></label>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
		<input type="hidden" name="<?php 
    echo $hidden_field_name;
    ?>
" value="<?php 
    echo $hidden_field_value;
    ?>
">

	    <p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php 
    echo __('Save Changes', 'cleanlogin');
    ?>
" /></p>
        </form>

    </div>
    <script>
    jQuery(document).ready(function( $ ) {

    	var selected_roles = <?php 
    echo json_encode($newuserroles);
    ?>
;
    	$('select#newuserroles').find('option').each(function() {
    		//alert(jQuery.inArray($(this).val(), selected_roles));
		    if( jQuery.inArray($(this).val(), selected_roles) < 0 )
		    	$(this).attr('selected', false);
		    else
		    	$(this).attr('selected', true);
		});

    	if ($('#chooserole').is(':checked')) {
            $('#newuserroles').show();
        } else {
        	$('#newuserroles').hide();
        }

    	$('#chooserole').click(function() {
	       $('#newuserroles').toggle();
	    });

	    if ($('#automaticlogin').is(':checked')) {
            $('#urlredirect').show();
        } else {
        	$('#urlredirect').hide();
        }

        $('#automaticlogin').click(function() {
    		$('#urlredirect').toggle();
    	});

    	if ($('#loginredirect').is(':checked')) {
            $('#loginredirect_url').show();
        } else {
        	$('#loginredirect_url').hide();
        }

        $('#loginredirect').click(function() {
    		$('#loginredirect_url').toggle();
    	});

    	if ($('#logoutredirect').is(':checked')) {
            $('#logoutredirect_url').show();
        } else {
        	$('#logoutredirect_url').hide();
        }

        $('#logoutredirect').click(function() {
    		$('#logoutredirect_url').toggle();
    	});

		if ($('#emailnotification').is(':checked')) {
            $('#emailnotificationcontent').show();
        } else {
        	$('#emailnotificationcontent').hide();
        }

	    $('#emailnotification').click(function() {
	        if ($(this).is(':checked')) {
	            $('#emailnotificationcontent').show();
	        } else {
	        	$('#emailnotificationcontent').hide();
	        }
	    });

	    if ($('#termsconditions').is(':checked')) {
            $('#termsconditionsMSG').show();
            $('#termsconditionsURL').show();
        } else {
        	$('#termsconditionsMSG').hide();
        	$('#termsconditionsURL').hide();
        }

    	$('#termsconditions').click(function() {
	        if ($(this).is(':checked')) {
	            $('#termsconditionsMSG').show();
	            $('#termsconditionsURL').show();
	        } else {
	        	$('#termsconditionsMSG').hide();
	        	$('#termsconditionsURL').hide();
	        }
	    });

	    $('#like-donate-more').click(function() {
	        $('#like-donate').fadeToggle();
	        $('#like-donate-arrow').toggle();
	        $('#like-donate-smile').toggle();
	    });

	});
    </script>
	<?php 
}
Пример #14
0
    function display($agent_type, $id_suffix, $current_selections = array(), $args = array())
    {
        $defaults = array('agent_id' => 0, 'context' => '', 'label_select' => _x('Select &gt;', 'user', 'pp'), 'label_unselect' => _x('&lt; Unselect', 'user', 'pp'), 'label_selections' => __('Current Selections:', 'pp'), 'display_stored_selections' => true, 'create_dropdowns' => false, 'width' => '', 'width_current' => '', 'label_headline' => true, 'multi_select' => true, 'use_selection_js' => true);
        $args = apply_filters('pp_agents_selection_ui_args', array_merge($defaults, $args), $agent_type, $id_suffix);
        extract($args, EXTR_SKIP);
        $width = $width ? "width:{$width}px;" : '';
        $this->register_ajax_js($agent_type, $id_suffix, $context, $agent_id, $args);
        if ('user' == $agent_type) {
            if (defined('PP_USER_LASTNAME_SEARCH') && !defined('PP_USER_SEARCH_FIELD')) {
                $default_search_field = 'last_name';
            } elseif (defined('PP_USER_SEARCH_FIELD')) {
                $default_search_field = PP_USER_SEARCH_FIELD;
            } else {
                $default_search_field = '';
            }
        }
        if (true === $label_headline) {
            if ('user' == $agent_type) {
                if ($default_search_field) {
                    $search_caption = __(ucwords(str_replace('_', ' ', $default_search_field)), 'pp');
                    $label_headline = sprintf(__('Find Users by %s', 'pp'), $search_caption);
                } else {
                    $label_headline = __('Find Users', 'pp');
                }
            } else {
                $label_headline = __('Select Groups', 'pp');
            }
        }
        ?>
		<table id="pp-agent-selection_<?php 
        echo $id_suffix;
        ?>
-wrapper" class="pp-agents-selection">
		<tr><td id="pp-agent-selection_<?php 
        echo $id_suffix;
        ?>
 " style="vertical-align:top">
		<h4><?php 
        echo $label_headline;
        ?>
</h4>
		<input id="agent_search_text_<?php 
        echo $id_suffix;
        ?>
" type="text" size="8" />
		<button type="button" class="pp-agent-search-submit" id="agent_submit_<?php 
        echo $id_suffix;
        ?>
"><?php 
        echo __ppw("Search");
        ?>
</button>
		
		<?php 
        if ('user' == $agent_type) {
            ?>
			<br />
			<?php 
            $title = !defined('PP_USER_SEARCH_META_FIELDS') && pp_is_user_administrator() && pp_get_option('advanced_options') && pp_get_option('display_hints') ? __('For additional fields, define constant PP_USER_SEARCH_META_FIELDS', 'pp') : '';
            $fields = array('first_name' => __('First Name', 'pp'), 'last_name' => __('Last Name', 'pp'), 'nickname' => __('Nickname', 'pp'));
            if (defined('PP_USER_SEARCH_META_FIELDS')) {
                $custom_fields = str_replace(' ', '', PP_USER_SEARCH_META_FIELDS);
                $custom_fields = explode(',', $custom_fields);
                foreach ($custom_fields as $cfield) {
                    $fields[$cfield] = __(ucwords(str_replace('_', ' ', $cfield)), 'pp');
                }
            }
            if (isset($fields[$default_search_field])) {
                unset($fields[$default_search_field]);
            }
            $ilim = defined('PP_USER_SEARCH_META_FIELDS') ? 6 : 3;
            for ($i = 0; $i < $ilim; $i++) {
                ?>
				<div class="pp-user-meta-search" <?php 
                if ($i > 0 && empty($_GET["pp_search_user_meta_key_{$i}_{$id_suffix}"])) {
                    echo ' style="display:none;"';
                }
                ?>
>
				<select id="pp_search_user_meta_key_<?php 
                echo $i;
                ?>
_<?php 
                echo $id_suffix;
                ?>
">
				<option value=""><?php 
                _e('(user field)', 'pp');
                ?>
</option>
				<?php 
                foreach ($fields as $field => $lbl) {
                    ?>
					<option value="<?php 
                    echo $field;
                    ?>
"><?php 
                    echo $lbl;
                    ?>
</option>
				<?php 
                }
                ?>
				</select>
				&nbsp;
				<input id="pp_search_user_meta_val_<?php 
                echo $i;
                ?>
_<?php 
                echo $id_suffix;
                ?>
" type="text" <?php 
                if (empty($_GET["pp_search_user_meta_key_{$i}_{$id_suffix}"])) {
                    echo 'style="display:none"';
                }
                ?>
 title="<?php 
                echo $title;
                ?>
" size="8" />
				<?php 
                if ($i < $ilim - 1) {
                    ?>
				&nbsp;<span class="pp-usermeta-field-more" <?php 
                    if (empty($_GET["pp_search_user_meta_key_{$i}_{$id_suffix}"])) {
                        echo 'style="display:none"';
                    }
                    ?>
>+</span>
				<?php 
                }
                ?>
				</div>
			<?php 
            }
            ?>
		<?php 
        }
        ?>
		
		<?php 
        if ('user' == $agent_type && pp_get_option('user_search_by_role')) {
            ?>
			<select id="pp_search_role_<?php 
            echo $id_suffix;
            ?>
" class="pp-search-role">
			<option value=""><?php 
            _e('(any WP role)', 'pp');
            ?>
</option>
			<?php 
            wp_dropdown_roles();
            ?>
			</select>
		<?php 
        }
        ?>
		</td>
		
		<?php 
        if ($display_stored_selections) {
            ?>
			<td style="vertical-align:top" class="pp-members-current">
			</td>
		<?php 
        }
        ?>
		
		</tr>
		
		<tr><td>
		<h4><?php 
        _e('Search Results:', 'pp');
        ?>
<img class="waiting" style="display:none;float:right" src="<?php 
        echo esc_url(admin_url('images/wpspin_light.gif'));
        ?>
" alt="" /></h4>
		
		<select id="agent_results_<?php 
        echo $id_suffix;
        ?>
" class="pp_agent_results" <?php 
        if ($multi_select) {
            ?>
multiple="multiple" style="height:160px;<?php 
        } else {
            ?>
style="display:none;<?php 
        }
        echo $width;
        ?>
"></select>
		<span id="agent_msg_<?php 
        echo $id_suffix;
        ?>
"></span>
		</td>

		<?php 
        if ($display_stored_selections) {
            if ($width_current) {
                $width = "width:{$width_current}px;";
            }
            ?>
		<td class="pp-members-current">
		<h4><?php 
            echo $label_selections;
            ?>
</h4>
		
		<select id='<?php 
            echo $id_suffix;
            ?>
' name='<?php 
            echo $id_suffix;
            ?>
[]' multiple='multiple' style='height:160px;<?php 
            echo $width;
            ?>
'>
		
<?php 
            if ('user' == $agent_type) {
                $display_property = defined('PP_USER_RESULTS_DISPLAY_NAME') ? 'display_name' : 'user_login';
            } else {
                $display_property = 'display_name';
            }
            foreach ($current_selections as $agent) {
                $attribs = isset($agent->display_name) && $agent->user_login != $agent->display_name ? 'title="' . esc_attr($agent->display_name) . '"' : '';
                ?>
		<?php 
                $data = apply_filters('pp_agents_selection_ui_attribs', array('attribs' => $attribs, 'user_caption' => $agent->{$display_property}), $agent_type, $id_suffix, $agent);
                ?>
		<option value="<?php 
                echo $agent->ID;
                ?>
" <?php 
                echo $data['attribs'];
                ?>
><?php 
                echo $data['user_caption'];
                ?>
</option>
<?php 
            }
            ?>

		</select><br />
		</td>
		<?php 
        }
        ?>
		
		</tr>
		
		<?php 
        do_action('_pp_agents_selection_ui_select_pre', $id_suffix);
        ?>
		<tr>
		<?php 
        do_action('pp_agents_selection_ui_select_pre', $id_suffix);
        ?>
		

		<td><button type="button" id="select_agents_<?php 
        echo $id_suffix;
        ?>
" class="pp_add" style="float:right<?php 
        if (!$multi_select) {
            ?>
;display:none;<?php 
        }
        ?>
"><?php 
        echo $label_select;
        ?>
</button></td>
		
		<?php 
        if ($display_stored_selections) {
            ?>
		<td class="pp-members-current"><button type="button" id="unselect_agents_<?php 
            echo $id_suffix;
            ?>
" class="pp_remove"><?php 
            echo $label_unselect;
            ?>
</button></td>
		<?php 
        }
        ?>
		
		</tr>
		</table>	
<?php 
        if (!defined('PPM_VERSION') && pp_get_option('display_extension_hints')) {
            if (0 === validate_plugin("pp-membership/pp-membership.php")) {
                $msg = __('To set date limits on group membership, activate the PP Membership plugin.', 'pp');
            } elseif (true == pp_key_status()) {
                $msg = sprintf(__('To set date limits on group membership, %1$sinstall%2$s the PP Membership plugin.', 'pp'), '<a href="admin.php?page=pp-settings&pp_tab=install">', '</a>');
            } else {
                $msg = sprintf(__('To set date limits on group membership, %1$senter%2$s or %3$spurchase%4$s a support key and install the PP Membership plugin.', 'pp'), '<a href="admin.php?page=pp-settings&pp_tab=install">', '</a>', '<a href="http://presspermit.com/purchase">', '</a>');
            }
            echo "<div class='pp-ext-promo'>{$msg}</div>";
        }
        $csv = $current_selections ? implode(',', array_keys($current_selections)) : '';
        $csv = apply_filters('pp_agents_selection_ui_csv', $csv, $id_suffix, $current_selections);
        ?>
		<input type="hidden" id="<?php 
        echo $id_suffix;
        ?>
_csv" name="<?php 
        echo $id_suffix;
        ?>
_csv" value="<?php 
        echo $csv;
        ?>
" />
		<?php 
    }
Пример #15
0
 public function render_default_wp_role()
 {
     echo '<select style="min-width: 200px;" name="aad-settings[default_wp_role]" id="new_role">';
     echo '<option value="">No Role</option>';
     wp_dropdown_roles($this->default_wp_role);
     echo '</select>';
     // echo '<p class="description">If no role is selected, a user will not be added.</p>';
 }
    /**
     * Sidebar metabox for administrative user actions
     *
     *
     * @todo Fix delete link to be handled internally and not depend on built-in user management
     * @since 0.01
     *
     */
    function special_actions($object)
    {
        global $current_user, $wpdb, $wp_filter, $user_id;
        $current_user_id = $current_user->ID;
        $user_id = $object['ID']['default'][0];
        $profileuser = get_user_to_edit($user_id);
        if ($user_id == $current_user_id) {
            $own_profile = true;
        }
        ?>
   
  <div id="minor-publishing">
  
  <ul class="wp_crm_advanced_user_actions_wrapper">

    <li class="wp_crm_advanced_user_actions">
      <div class="wp_crm_toggle_advanced_user_actions wp_crm_link"><?php 
        _e('Toggle Settings');
        ?>
</div>
      <div class="wp_crm_advanced_user_actions wp-tab-panel">

      <?php 
        if (current_user_can('edit_users')) {
            ?>

      <?php 
            if (current_user_can('WP-CRM: Change Passwords')) {
                ?>
      <?php 
                _e('Set Password:'******'wp_crm');
                ?>
      <ul class="wp_crm_edit_password">
        <li>
          <input type="password" autocomplete="off" value="" size="16" class="wp_crm_user_password" id="wp_crm_password_1" name="wp_crm[user_data][user_pass][<?php 
                echo rand(1000, 9999);
                ?>
][value]" />
          <span class="description"><?php 
                _e('Type in new password twice to change.');
                ?>
</span>
        </li>

        <li>
          <input type="password" autocomplete="off" value="" size="16" class="wp_crm_user_password" id="wp_crm_password_2" />
          <span class="description"><?php 
                _e('Type your new password again.');
                ?>
</span>
        </li>

      </ul>
      <?php 
            }
            ?>

      <ul>
        <?php 
            if (current_user_can('edit_roles')) {
                ?>
        <li class="wp_crm_edit_roles">
          <label for="wp_crm_role"><?php 
                _e('Capability Role:', 'wp_crm');
                ?>
</label>
          <select id="wp_crm_role" <?php 
                echo $own_profile ? ' disabled="true" ' : '';
                ?>
 name="wp_crm[user_data][role][<?php 
                echo rand(1000, 9999);
                ?>
][value]">
            <option value=""></option>
            <?php 
                wp_dropdown_roles($object['role']['default'][0]);
                ?>
          </select>
        </li>
        <?php 
            }
            ?>

        <li class="wp_crm_capability_bar">
          <input name="show_admin_bar_front" type="hidden" value="false"  />
          <input name="show_admin_bar_front" type="checkbox" id="show_admin_bar_front" value="true" <?php 
            checked(_get_admin_bar_pref('front', $profileuser->ID));
            ?>
 />
          <label for="show_admin_bar_front"><?php 
            _e('Show Admin Bar when viewing site.');
            ?>
 </label>
        </li>

      </ul>

      <?php 
        }
        ?>

      <?php 
        if (current_user_can('WP-CRM: Change Color Scheme')) {
            _e('Color Scheme:', 'wp_crm');
            do_action('admin_color_scheme_picker');
        }
        ?>

      </div>
    </li>

  </ul>

  <?php 
        if (count($wp_filter['show_user_profile']) || count($wp_filter['profile_personal_options'])) {
            ?>
  <div class="wp_crm_user_api_actions">
  <?php 
            add_filter('wpi_user_information', array('WP_CRM_F', 'wpi_user_information'));
            if ($own_profile) {
                do_action('show_user_profile', $profileuser);
            } else {
                do_action('edit_user_profile', $profileuser);
            }
            ?>

  </div>
  <?php 
        }
        ?>

  <?php 
        if (current_user_can('edit_users')) {
            do_action('wp_crm_metabox_special_actions');
        }
        ?>

</div>

  <div class="major-publishing-actions">

    <div class="other-action">
      <span class="wp_crm_subtle_link wp_crm_toggle" toggle="wp_crm_user_actions"><?php 
        _e('Show Actions');
        ?>
</span>
    </div>


  <div id="publishing-action">
      <input type="hidden" value="Publish" id="original_publish" name="original_publish">
      <?php 
        if (current_user_can('edit_users') || current_user_can('add_users') && $object['new']) {
            ?>
      <input type="submit" accesskey="p" tabindex="5" value="<?php 
            echo $object['new'] ? __('Save', 'wpp_crm') : __('Update', 'wpp_crm');
            ?>
" class="button-primary" id="publish" name="publish">
      <?php 
        } else {
            ?>
      <input type="submit" accesskey="p" tabindex="5" value="<?php 
            echo $object['new'] ? __('Save', 'wpp_crm') : __('Update', 'wpp_crm');
            ?>
" class="button-primary" id="publish" name="publish" disabled="true">
      <?php 
        }
        ?>
    </div>
  <div class="clear"></div>

</div>


<div class="wp_crm_user_actions hidden">
  <ul class="wp_crm_action_list">

<?php 
        if (current_user_can('WP-CRM: Add User Messages')) {
            ?>
  <li class="wp_crm_orange_link wp_crm_toggle_message_entry"><?php 
            _e('Add a general note.', 'wp_crm');
            ?>
</li>
<?php 
        }
        ?>


<?php 
        do_action('wp_crm_single_user_actions', $object);
        ?>

<?php 
        if ((current_user_can('remove_users') || current_user_can('delete_users')) && (!$object['new'] && $user_id != $current_user->ID)) {
            ?>
  <li class="wp_crm_orange_link"><a href="<?php 
            echo wp_nonce_url("admin.php?wp_crm_action=delete_user&page=wp_crm&user_id={$user_id}", 'wp-crm-delete-user-' . $user_id);
            ?>
" class="submitdelete deletion"><?php 
            _e('Delete');
            ?>
</a></li>
<?php 
        }
        ?>



  </ul>
</div>



<?php 
    }
    /**
     * Adds content to the Messages tab on the settings page
     *
     * @version 1.0
     * Copyright 2011 Andy Potanin, Usability Dynamics, Inc.  <*****@*****.**>
     */
    function settings_page_tab_content($wp_crm)
    {
        if (empty($wp_crm['wp_crm_contact_system_data'])) {
            $wp_crm['wp_crm_contact_system_data']['example_form']['title'] = 'Example Contact Form';
            $wp_crm['wp_crm_contact_system_data']['example_form']['full_shortcode'] = '[wp_crm_form form=example_contact_form]';
            $wp_crm['wp_crm_contact_system_data']['example_form']['current_form_slug'] = 'example_contact_form';
        }
        ?>
  <script type="text/javascript">
    jQuery(document).ready(function() {

    jQuery("#wp_crm_wp_crm_contact_system_data .slug_setter").live('change', function() {
      var parent = jQuery(this).parents('.wp_crm_notification_main_configuration');
      jQuery(".wp_crm_contact_form_shortcode", parent).val("[wp_crm_form form=" + wp_crm_create_slug(jQuery(this).val()) + "]");
      jQuery(".wp_crm_contact_form_current_form_slug", parent).val(wp_crm_create_slug(jQuery(this).val()));
    });


    });
  </script>
  <div class="wp_crm_inner_tab">

      <p>
        <?php 
        _e('Use this section to add and configure new contact forms.', 'wp_crm');
        ?>
      </p>
     <table id="wp_crm_wp_crm_contact_system_data" class="form-table wp_crm_form_table ud_ui_dynamic_table widefat">
      <thead>
        <tr>
           <th class="wp_crm_contact_form_header_col"><?php 
        _e('Form Settings', 'wpp');
        ?>
</th>
           <th class="wp_crm_contact_form_attributes_col"><?php 
        _e('Fields', 'wpp');
        ?>
</th>
          <?php 
        /* <th class="wp_crm_settings_col"><?php _e('Trigger Actions','wpp') ?></th> */
        ?>
          <th class="wp_crm_delete_col">&nbsp;</th>
          </tr>
      </thead>
      <tbody>
      <?php 
        foreach ($wp_crm['wp_crm_contact_system_data'] as $contact_form_slug => $data) {
            $row_hash = rand(100, 999);
            ?>
        <tr class="wp_crm_dynamic_table_row" slug="<?php 
            echo $contact_form_slug;
            ?>
"  new_row='false'>
          <td class='wp_crm_contact_form_header_col'>
            <ul class="wp_crm_notification_main_configuration">
              <li>
                <label for=""><?php 
            _e('Title:', 'wp_crm');
            ?>
</label>
                <input type="text" id="title_<?php 
            echo $row_hash;
            ?>
" class="slug_setter regular-text" name="wp_crm[wp_crm_contact_system_data][<?php 
            echo $contact_form_slug;
            ?>
][title]" value="<?php 
            echo $data['title'];
            ?>
" />
              </li>

              <li>
                <label><?php 
            _e('Shortcode:', 'wp_crm');
            ?>
</label>
                <input type="text" READONLY class='regular-text wp_crm_contact_form_shortcode'   name="wp_crm[wp_crm_contact_system_data][<?php 
            echo $contact_form_slug;
            ?>
][full_shortcode]"   value="<?php 
            echo $data['full_shortcode'];
            ?>
" />
                <input type="hidden" class='regular-text wp_crm_contact_form_current_form_slug'   name="wp_crm[wp_crm_contact_system_data][<?php 
            echo $contact_form_slug;
            ?>
][current_form_slug]"   value="<?php 
            echo $data['current_form_slug'];
            ?>
" />
              </li>


              <li>
                <label for=""><?php 
            _e('Role:');
            ?>
</label>
                <select id="" name="wp_crm[wp_crm_contact_system_data][<?php 
            echo $contact_form_slug;
            ?>
][new_user_role]">
                  <option value=""> - </option>
                  <?php 
            wp_dropdown_roles($data['new_user_role']);
            ?>
                </select>
                <span class="description"><?php 
            _e('If new user created, assign this role.');
            ?>
</span>
             </li>


              <li class="wp_crm_checkbox_on_left">
                <input <?php 
            checked($data['message_field'], 'on');
            ?>
 id="message_<?php 
            echo $row_hash;
            ?>
" type="checkbox"  name="wp_crm[wp_crm_contact_system_data][<?php 
            echo $contact_form_slug;
            ?>
][message_field]"  value="on"  value="<?php 
            echo $data['message_field'];
            ?>
" />
                <label for="message_<?php 
            echo $row_hash;
            ?>
"><?php 
            _e('Display textarea for custom message.', 'wp_crm');
            ?>
</label>
              </li>

              <li class="wp_crm_checkbox_on_left">
                <input <?php 
            checked($data['notify_with_blank_message'], 'on');
            ?>
 id="blank_message<?php 
            echo $row_hash;
            ?>
" type="checkbox"  name="wp_crm[wp_crm_contact_system_data][<?php 
            echo $contact_form_slug;
            ?>
][notify_with_blank_message]"  value="on"  value="<?php 
            echo $data['notify_with_blank_message'];
            ?>
" />
                <label for="blank_message<?php 
            echo $row_hash;
            ?>
"><?php 
            _e('Send message notification even if no message is submitted.', 'wp_crm');
            ?>
</label>
              </li>


            </ul>
          </td>
          <td>
           <?php 
            if (is_array($wp_crm['data_structure']['attributes'])) {
                ?>
            <ul class="wp-tab-panel">
              <?php 
                foreach ($wp_crm['data_structure']['attributes'] as $attribute_slug => $attribute_data) {
                    if (empty($attribute_data['title'])) {
                        continue;
                    }
                    ?>
                <li>
                  <input id="field_<?php 
                    echo $attribute_slug;
                    ?>
_<?php 
                    echo $row_hash;
                    ?>
" type="checkbox" <?php 
                    CRM_UD_UI::checked_in_array($attribute_slug, $data['fields']);
                    ?>
 name="wp_crm[wp_crm_contact_system_data][<?php 
                    echo $contact_form_slug;
                    ?>
][fields][]"  value="<?php 
                    echo $attribute_slug;
                    ?>
" />
                  <label for="field_<?php 
                    echo $attribute_slug;
                    ?>
_<?php 
                    echo $row_hash;
                    ?>
"><?php 
                    echo $attribute_data['title'];
                    ?>
</label>
                </li>
              <?php 
                }
                ?>
            </ul>
            <?php 
            }
            ?>

          </td>

          <?php 
            /*
            <td class="wp_crm_settings_col">
            
              <?php if(is_array($wp_crm['notification_actions'])): ?>
              <ul class="wp-tab-panel">
                <?php foreach($wp_crm['notification_actions'] as $action_slug => $action_title):
            
                if(empty($action_title)) {
                  continue;
                }
                ?>
                  <li>
                    <input <?php if( $action_slug == $contact_form_slug) echo ' DISABLED checked=true ' ; ?> id="field_<?php echo $action_slug; ?>_<?php echo $row_hash; ?>"  type="checkbox" <?php CRM_UD_UI::checked_in_array($action_slug, $data['fire_on_action']); ?> name="wp_crm[wp_crm_contact_system_data][<?php echo $contact_form_slug; ?>][fire_on_action][]"  value="<?php echo $action_slug; ?>" />
                    <label for="field_<?php echo $action_slug; ?>_<?php echo $row_hash; ?>"><?php echo $action_title; ?></label>
                  </li>
                <?php endforeach; ?>
              </ul>
              <?php else: ?>
                <p><?php _e('You do not have any notification actions yet. ', 'wp_crm'); ?></p>
              <?php endif; ?>
            </td>
            */
            ?>

          <td valign="middle"><span class="wp_crm_delete_row  button"><?php 
            _e('Delete', 'wpp');
            ?>
</span></td>
        </tr>
      </tbody>
      <?php 
        }
        ?>

      <tfoot>
        <tr>
          <td colspan='4'>
          <input type="button" class="wp_crm_add_row button-secondary" value="<?php 
        _e('Add Row', 'wpp');
        ?>
" />
          </td>
        </tr>
      </tfoot>

      </table>
      <p><?php 
        _e('To see list of variables you can use in wp_crm_contact_system_data open up the "Help" tab and view the user data structure.  Any variable you see in there can be used in the subject field, to field, BCC field, and the message body. Example: [user_email] would include the recipient\'s e-mail.', 'wp_crm');
        ?>
</p>
      <p><?php 
        _e('To add notification actions use the <b>wp_crm_notification_actions</b> filter, then call the action within <b>wp_crm_send_notification()</b> function, and the messages association with the given action will be fired off.', 'wp_crm');
        ?>
</p>


      <table class='form-table'>
        <tr>
          <th><?php 
        _e('Options');
        ?>
</th>
          <td>
            <ul>

              <li>
                <label for="wp_crm_new_contact_role"><?php 
        _e('Default role to use for new contacts: ');
        ?>
</label>
                 <select id="wp_crm_new_contact_role" name="wp_crm[configuration][new_contact_role]"><option value=""> - </option><?php 
        wp_dropdown_roles($wp_crm['configuration']['new_contact_role']);
        ?>
</select>
                 <div class="description"><?php 
        _e('WP-CRM creates user profiles, if only temporary, to store inquiries and messages from contact forms.  ', 'wp_crm');
        ?>
</div>
              </li>
            </ul>
          </td>
      </table>

      <?php 
        do_action('wp_crm_settings_notification_tab');
        ?>


    </div>

<?php 
    }
Пример #18
0
				                				<strong><?php 
_e('Who can create tasks', 'taskfreak');
?>
</strong><br />
				                				<select name="who_post"><?php 
echo wp_dropdown_roles($this->data->get('who_post'));
?>
</select>
				                			</li>
				                			<li style="line-height:1.75em">
				                				<strong><?php 
_e('Who can moderate the project', 'taskfreak');
?>
</strong><br />
				                				<select name="who_manage"><?php 
echo wp_dropdown_roles($this->data->get('who_manage'));
?>
</select>
				                			</li>
				                		</ul>
				                		<a href="javascript:{}" class="tzn_option_save hide-if-no-js button"><?php 
_e('OK', 'taskfreak');
?>
</a>
				                		<a href="javascript:{}" class="tzn_option_cancel hide-if-no-js"><?php 
_e('Cancel', 'taskfreak');
?>
</a>
				                	</div>
				                </div>
								<div class="clear"></div>
Пример #19
0
function flag_admin_options()
{
    global $flag;
    // same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
    $filepath = admin_url() . 'admin.php?page=' . urlencode($_GET['page']);
    if (isset($_POST['updateoption'])) {
        check_admin_referer('flag_settings');
        // get the hidden option fields, taken from WP core
        $options = array();
        if ($_POST['page_options']) {
            $options = explode(',', stripslashes($_POST['page_options']));
        }
        if (!empty($options)) {
            foreach ($options as $option) {
                $option = trim($option);
                if (isset($_POST[$option])) {
                    $value = trim($_POST[$option]);
                } else {
                    $value = false;
                }
                $flag->options[$option] = $value;
            }
            if (isset($_POST['galleryPath'])) {
                // the path should always end with a slash
                $flag->options['galleryPath'] = trailingslashit($flag->options['galleryPath']);
            }
            // the custom sortorder must be ascending
            //$flag->options['galSortDir'] = ($flag->options['galSort'] == 'sortorder') ? 'ASC' : $flag->options['galSortDir'];
        }
        // Save options
        update_option('flag_options', $flag->options);
        flagGallery::show_message(__('Update Successfully', 'flag'));
    }
    $regform = 0;
    if (isset($_POST['membership'])) {
        if (function_exists('curl_init')) {
            check_admin_referer('flag_settings');
            $ch = curl_init('http://mypgc.co/app/account_st.php');
            curl_setopt($ch, CURLOPT_REFERER, site_url());
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, array('access_key' => $_POST['access_key'], 'access_url' => $_POST['access_url'], 'license_key' => $_POST['license_key']));
            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
            curl_setopt($ch, CURLOPT_TIMEOUT, 10);
            $access_key_return = curl_exec($ch);
            curl_close($ch);
        } else {
            $access_key_return = __('cURL library is not installed on your server.', 'flag');
        }
        if (strpos($access_key_return, 'Error') !== FALSE) {
            $_POST['license_key'] = '';
        }
        $options = explode(',', stripslashes($_POST['page_options']));
        foreach ($options as $option) {
            $option = trim($option);
            $value = trim($_POST[$option]);
            $flag->options[$option] = $value;
        }
        if (strpos($access_key_return, 'Error') === FALSE || strpos($access_key_return, 'not a member') !== FALSE) {
            flagGallery::show_message($access_key_return);
            if (strpos($access_key_return, 'not a member') !== FALSE) {
                $regform = 1;
                //$flag->options['access_key'] = '';
            }
        } else {
            flagGallery::show_error($access_key_return);
            //$flag->options['access_key'] = '';
        }
        // Save options
        update_option('flag_options', $flag->options);
    }
    if (isset($_POST['register_subscriber'])) {
        if (empty($_POST['customer_first_name']) || empty($_POST['customer_last_name']) || empty($_POST['customer_email'])) {
            $regform = 1;
            flagGallery::show_error(__('Error: All fields required.'));
        } else {
            if (function_exists('curl_init')) {
                check_admin_referer('flag_settings');
                $ch = curl_init('http://mypgc.co/app/account_st.php');
                curl_setopt($ch, CURLOPT_REFERER, site_url());
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, array('access_key' => $_POST['access_key'], 'access_url' => $_POST['access_url'], 'customer_first_name' => $_POST['customer_first_name'], 'customer_last_name' => $_POST['customer_last_name'], 'customer_email' => $_POST['customer_email']));
                $reg_return = curl_exec($ch);
                curl_close($ch);
            } else {
                $reg_return = __('cURL library is not installed on your server.', 'flag');
            }
            if (strpos($reg_return, 'Error') === FALSE) {
                flagGallery::show_message($reg_return);
            } else {
                flagGallery::show_error($reg_return);
                $regform = 1;
            }
        }
    }
    if (isset($_POST['update_cap'])) {
        check_admin_referer('flag_addroles');
        // now set or remove the capability
        flag_set_capability($_POST['general'], "FlAG overview");
        flag_set_capability($_POST['tinymce'], "FlAG Use TinyMCE");
        flag_set_capability($_POST['add_gallery'], "FlAG Upload images");
        flag_set_capability($_POST['import_gallery'], "FlAG Import folder");
        flag_set_capability($_POST['manage_gallery'], "FlAG Manage gallery");
        flag_set_capability($_POST['manage_others'], "FlAG Manage others gallery");
        flag_set_capability($_POST['change_skin'], "FlAG Change skin");
        flag_set_capability($_POST['add_skins'], "FlAG Add skins");
        flag_set_capability($_POST['delete_skins'], "FlAG Delete skins");
        flag_set_capability($_POST['change_options'], "FlAG Change options");
        flag_set_capability($_POST['manage_music'], "FlAG Manage music");
        flag_set_capability($_POST['manage_video'], "FlAG Manage video");
        flag_set_capability($_POST['manage_banners'], "FlAG Manage banners");
        flag_set_capability($_POST['flagframe_page'], "FlAG iFrame page");
        flagGallery::show_message(__('Updated capabilities', "flag"));
    }
    // message windows
    if (!empty($messagetext)) {
        echo '<!-- Last Action --><div id="message" class="updated fade"><p>' . $messagetext . '</p></div>';
    }
    $flag_options = get_option('flag_options');
    ?>
	
<div id="slider" class="flag-wrap">

	<ul id="tabs" class="tabs">
		<li class="selected"><a href="#" rel="imageoptions"><?php 
    _e('Gallery Options', 'flag');
    ?>
</a></li>
		<li><a href="#" rel="grandpages"><?php 
    _e('GRAND Pages', 'flag');
    ?>
</a></li>
		<?php 
    if (current_user_can('administrator')) {
        ?>
		<li><a href="#" rel="rControl"><?php 
        _e('License Key & Remote Control', 'flag');
        ?>
</a></li>
		<?php 
    }
    ?>
		<li><a href="#" rel="vPlayer"><?php 
    _e('FLV Single Player Options', 'flag');
    ?>
</a></li>
		<li><a href="#" rel="mPlayer"><?php 
    _e('MP3 Single Player Options', 'flag');
    ?>
</a></li>
<?php 
    if (flagGallery::flag_wpmu_enable_function('wpmuRoles')) {
        ?>
		<li><a href="#" rel="roles"><?php 
        _e('Roles', 'flag');
        ?>
</a></li>
<?php 
    }
    ?>
	</ul>
	<!-- Image Gallery Options -->
<script type="text/javascript">
jQuery(document).ready(function() {
	jQuery('.flag_colors .colorPick').each( function(){
		var inpID = jQuery(this).attr('name');
		jQuery('#cp_'+inpID).farbtastic('#'+inpID);
		jQuery('#'+inpID).focus( function(){
		    jQuery('#cp_'+inpID).show();
		});
		jQuery('#'+inpID).blur( function(){
		    jQuery('#cp_'+inpID).hide();
		});
	});
});
</script>
	<div id="imageoptions" class="cptab">
		<form name="generaloptions" method="post">
		<?php 
    wp_nonce_field('flag_settings');
    ?>
			<input type="hidden" name="page_options" value="galleryPath,flashWidth,flashHeight,deleteImg,deepLinks,useMediaRSS,optimized_imgs,jAlterGal,jAlterGalScript,BarsBG,CatBGColor,CatBGColorOver,CatColor,CatColorOver,ThumbBG,ThumbLoaderColor,TitleColor,DescrColor,imgQuality,albSort,albSortDir,albPerPage,galSort,galSortDir,disableViews" />
			<h2><?php 
    _e('Image Gallery Options', 'flag');
    ?>
</h2>
			<h3><?php 
    _e('General Options', 'flag');
    ?>
</h3>
			<table class="form-table flag-options" style="width: auto; white-space: nowrap;">
				<tr valign="top">
					<th align="left" width="200"><?php 
    _e('Gallery path', 'flag');
    ?>
</th>
					<td><input readonly="readonly" type="text" size="35" name="galleryPath" value="<?php 
    echo $flag_options['galleryPath'];
    ?>
" />
					<span class="setting-description"><?php 
    _e('This is the default path for all galleries', 'flag');
    ?>
</span></td>
				</tr>
				<tr valign="top">
					<th><?php 
    _e('Default flash size (W x H)', 'flag');
    ?>
:</th>
					<td><input type="text" size="4" maxlength="4" name="flashWidth" value="<?php 
    echo $flag_options['flashWidth'];
    ?>
" /> x
					<input type="text" size="4" maxlength="4" name="flashHeight" value="<?php 
    echo $flag_options['flashHeight'];
    ?>
" /></td>
				</tr>					
				<tr valign="top">
					<th align="left"><?php 
    _e('Delete image files', 'flag');
    ?>
</th>
					<td><input <?php 
    if (IS_WPMU) {
        echo 'readonly = "readonly"';
    }
    ?>
 type="checkbox" name="deleteImg" value="1" <?php 
    checked('1', $flag_options['deleteImg']);
    ?>
 />
					<?php 
    _e('Delete files, when removing a gallery in the database', 'flag');
    ?>
</td>
				</tr>
				<tr>
					<th align="left"><?php 
    _e('Activate Deep Linking (optional)', 'flag');
    ?>
<br /><small><?php 
    _e('Not all skins support this feature.', 'flag');
    ?>
</small></th>
					<td><input type="checkbox" name="deepLinks" value="1" <?php 
    checked('1', $flag_options['deepLinks']);
    ?>
 />
					<span class="setting-description"><?php 
    _e('Deep links for images in flash.', 'flag');
    ?>
</span></td>
				</tr>
				<tr>
					<th align="left"><?php 
    _e('Activate Media RSS feed', 'flag');
    ?>
</th>
					<td><input type="checkbox" name="useMediaRSS" value="1" <?php 
    checked('1', $flag_options['useMediaRSS']);
    ?>
 />
					<span class="setting-description"><?php 
    _e('A RSS feed will be added to you blog header.', 'flag');
    ?>
</span></td>
				</tr>
			</table>

			<h3><?php 
    _e('Image settings', 'flag');
    ?>
</h3>
			<table class="form-table flag-options" style="width: auto; white-space: nowrap;">
				<tr valign="top">
					<th scope="row" width="200"><label><?php 
    _e('Use optimized images for mobile browsers', 'flag');
    ?>
</label><br /><small>(Manage Gallery -> 'Optimize images for web' action)</small></th>
					<td><input type="checkbox" name="optimized_imgs" value="1" <?php 
    checked('1', $flag_options['optimized_imgs']);
    ?>
 />
						<span class="setting-description"><?php 
    _e('Optimized images loads faster, save traffic and make page more lightweight for browser', 'flag');
    ?>
</span></td>
				</tr>
				<tr valign="top">
					<th align="left"><?php 
    _e('Image quality', 'flag');
    ?>
</th>
					<td><input type="text" size="3" maxlength="3" name="imgQuality" value="<?php 
    echo $flag_options['imgQuality'];
    ?>
" /> % &nbsp;&nbsp;<span class="setting-description"><?php 
    _e('Default: 85%', 'flag');
    ?>
</span></td>
				</tr>
			</table>

			<h3><?php 
    _e('Sort options', 'flag');
    ?>
</h3>
			<table class="form-table flag-options" style="width: auto; white-space: nowrap;">
				<tr>
					<th valign="top" width="200"><?php 
    _e('Sort galleries', 'flag');
    ?>
:</th>
					<td valign="top">
						<label><input name="albSort" type="radio" value="gid" <?php 
    checked('gid', $flag_options['albSort']);
    ?>
 /> <?php 
    _e('Gallery ID', 'flag');
    ?>
</label><br />
						<label><input name="albSort" type="radio" value="title" <?php 
    checked('title', $flag_options['albSort']);
    ?>
 /> <?php 
    _e('Title', 'flag');
    ?>
</label><br />
					</td>
					<td valign="top"><label><input name="albSortDir" type="radio" value="ASC" <?php 
    checked('ASC', $flag_options['albSortDir']);
    ?>
 /> <?php 
    _e('Ascending', 'flag');
    ?>
</label><br />
						<label><input name="albSortDir" type="radio" value="DESC" <?php 
    checked('DESC', $flag_options['albSortDir']);
    ?>
 /> <?php 
    _e('Descending', 'flag');
    ?>
</label>
					</td>
				</tr>
				<tr style="border-bottom: 1px solid #000000;">
					<th valign="top" width="200"><?php 
    _e('Galleries per page: <br><small>on Manage Galleries page</small>', 'flag');
    ?>
</th>
					<td valign="top">
						<input name="albPerPage" type="text" value="<?php 
    echo $flag_options['albPerPage'];
    ?>
" />
					</td>
					<td valign="top"></td>
				</tr>
				<tr>
					<th valign="top" width="200"><?php 
    _e('Sort images', 'flag');
    ?>
:</th>
					<td valign="top">
						<label><input name="galSort" type="radio" value="sortorder" <?php 
    checked('sortorder', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Custom order', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="pid" <?php 
    checked('pid', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Image ID', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="filename" <?php 
    checked('filename', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('File name', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="alttext" <?php 
    checked('alttext', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Alt / Title text', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="imagedate" <?php 
    checked('imagedate', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Date / Time', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="hitcounter" <?php 
    checked('hitcounter', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Image views', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="total_votes" <?php 
    checked('total_votes', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Image likes', 'flag');
    ?>
</label><br />
						<label><input name="galSort" type="radio" value="rand()" <?php 
    checked('rand()', $flag_options['galSort']);
    ?>
 /> <?php 
    _e('Randomly', 'flag');
    ?>
</label>
					</td>
					<td valign="top"><label><input name="galSortDir" type="radio" value="ASC" <?php 
    checked('ASC', $flag_options['galSortDir']);
    ?>
 /> <?php 
    _e('Ascending', 'flag');
    ?>
</label><br />
						<label><input name="galSortDir" type="radio" value="DESC" <?php 
    checked('DESC', $flag_options['galSortDir']);
    ?>
 /> <?php 
    _e('Descending', 'flag');
    ?>
</label>
					</td>
				</tr>
			</table>

			<h3><?php 
    _e('Alternative Gallery Options', 'flag');
    ?>
 <br><small style="color: darkgreen;"><?php 
    _e('(Note: this is not flash skin option. Options below only for alternative gallery in mobile browsers)', 'flag');
    ?>
</small></h3>
			<table class="flag_colors form-table flag-options" style="width: auto; white-space: nowrap;">
				<tr>
					<th align="left"><?php 
    _e('Show jQuery gallery for browsers without flashplayer', 'flag');
    ?>
</th>
					<td><input type="checkbox" name="jAlterGal" value="1" <?php 
    checked('1', $flag_options['jAlterGal']);
    ?>
 /></td>
				</tr>
				<tr>
					<th align="left"><?php 
    _e('jQuery gallery script', 'flag');
    ?>
</th>
					<td><select name="jAlterGalScript">
							<option value="0" <?php 
    selected('0', $flag_options['jAlterGalScript']);
    ?>
>FancyBox</option>
							<option value="1" <?php 
    selected('1', $flag_options['jAlterGalScript']);
    ?>
>PhotoSwipe</option>
						</select>
					</td>
				</tr>
				<tr>
					<th align="left"><?php 
    _e('Disable image views/likes counter on thumbnails', 'flag');
    ?>
</th>
					<td><input type="checkbox" name="disableViews" value="1" <?php 
    checked('1', $flag_options['disableViews']);
    ?>
 /></td>
				</tr>
				<tr>
					<th width="200"><?php 
    _e('Top Bar BG', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="BarsBG" name="BarsBG" value="<?php 
    echo $flag_options['BarsBG'];
    ?>
" /><div id="cp_BarsBG" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>					
					<th><?php 
    _e('Category Buttons BG', 'flag');
    ?>
:</th>
					<td>
						<input class="colorPick" type="text" size="7" maxlength="6" id="CatBGColorOver" name="CatBGColorOver" value="<?php 
    echo $flag_options['CatBGColorOver'];
    ?>
" /> mouseOver<br />
						<div id="cp_CatBGColorOver" style="background:#F9F9F9;position:absolute;display:none;"></div>
						<input class="colorPick" type="text" size="7" maxlength="6" id="CatBGColor" name="CatBGColor" value="<?php 
    echo $flag_options['CatBGColor'];
    ?>
" /> mouseOut<br />
						<div id="cp_CatBGColor" style="background:#F9F9F9;position:absolute;display:none;"></div>
					</td>
				</tr>
				<tr>					
					<th><?php 
    _e('Category Buttons Color', 'flag');
    ?>
:</th>
					<td>
						<input class="colorPick" type="text" size="7" maxlength="6" id="CatColorOver" name="CatColorOver" value="<?php 
    echo $flag_options['CatColorOver'];
    ?>
" /> mouseOver<br />
						<div id="cp_CatColorOver" style="background:#F9F9F9;position:absolute;display:none;"></div>
						<input class="colorPick" type="text" size="7" maxlength="6" id="CatColor" name="CatColor" value="<?php 
    echo $flag_options['CatColor'];
    ?>
" /> mouseOut<br />
						<div id="cp_CatColor" style="background:#F9F9F9;position:absolute;display:none;"></div>
					</td>
				</tr>
				<tr>					
					<th><?php 
    _e('Thumbnail BG', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="ThumbBG" name="ThumbBG" value="<?php 
    echo $flag_options['ThumbBG'];
    ?>
" /><div id="cp_ThumbBG" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>					
					<th><?php 
    _e('Thumbnail MouseOver BG', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="ThumbLoaderColor" name="ThumbLoaderColor" value="<?php 
    echo $flag_options['ThumbLoaderColor'];
    ?>
" /><div id="cp_ThumbLoaderColor" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Fancybox Title', 'flag');
    ?>
:<br /><small><?php 
    _e('Only if FancyBox script is selected', 'flag');
    ?>
</small></th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="TitleColor" name="TitleColor" value="<?php 
    echo $flag_options['TitleColor'];
    ?>
" /><div id="cp_TitleColor" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Fancybox Description Text', 'flag');
    ?>
:<br /><small><?php 
    _e('Only if FancyBox script is selected', 'flag');
    ?>
</small></th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="DescrColor" name="DescrColor" value="<?php 
    echo $flag_options['DescrColor'];
    ?>
" /><div id="cp_DescrColor" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
			</table>
			<div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php 
    _e('Save Changes', 'flag');
    ?>
"/></div>
		</form>	
	</div>

	<div id="grandpages" class="cptab">
		<form name="grandpages"  method="post">
			<?php 
    wp_nonce_field('flag_settings');
    ?>
			<input type="hidden" name="page_options" value="gp_jscode" />
			<h2><?php 
    _e('GRAND Pages settings', 'flag');
    ?>
</h2>
			<h3><?php 
    _e('Google Analytics Tracking Code', 'flag');
    ?>
</h3>
			<textarea name="gp_jscode" rows="5" cols="50"><?php 
    if (isset($flag_options['gp_jscode'])) {
        echo stripslashes($flag_options['gp_jscode']);
    }
    ?>
</textarea>
			<p><?php 
    _e('Enter your Google analytics tracking Code here. It will automatically be added to GRAND Pages so google can track your visitors behavior.', 'flag');
    ?>
</p>
			<div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php 
    _e('Save Changes', 'flag');
    ?>
"/></div>
		</form>
	</div>

<?php 
    if (current_user_can('administrator')) {
        ?>
	<div id="rControl" class="cptab">
		<form name="rControl"  method="post" style="float: left;width: 50%;">
			<?php 
        wp_nonce_field('flag_settings');
        ?>
			<input type="hidden" name="page_options" value="access_key,license_key" />
			<h2><?php 
        _e('License Key & Remote Control', 'flag');
        ?>
</h2>
			<input type="hidden" name="access_url" value="<?php 
        echo plugins_url() . '/' . FLAGFOLDER . '/lib/app.php';
        ?>
" />
			<table class="form-table flag-options" style="">
				<tr>
					<th valign="top" width="200"><a href="http://mypgc.co/membership/" target="_blank"><?php 
        _e('License Key', 'flag');
        ?>
</a>:</th>
					<td valign="top"><input type="text" size="40" id="license_key" name="license_key" value="<?php 
        echo $flag_options['license_key'];
        ?>
" /></td>
				</tr>
				<tr>
					<td colspan="2"><br><?php 
        _e('If you want to upload photos to FlAGallery right from your iPhone <a href="https://itunes.apple.com/us/app/mypgc/id663405181?ls=1&mt=8">download application</a> and enter access key below. You can enter your own access key. You can change these at any point in time and this will force all users to have to log in again in application.', 'flag');
        ?>
 </td>
				</tr>
				<tr>
					<th valign="top" width="200"><?php 
        _e('Remote App Access Key', 'flag');
        ?>
:</th>
					<td valign="top"><input type="text" size="40" id="access_key" name="access_key" value="<?php 
        echo $flag_options['access_key'];
        ?>
" />
						<button type="button" onclick="jQuery('#flag_register_form').toggle();"><?php 
        _e('Register free account Form', 'flag');
        ?>
</button>
						<br><small><?php 
        _e('Leave blank to disable access from application', 'flag');
        ?>
</small></td>
				</tr>
			</table>
			<p><a href="https://itunes.apple.com/us/app/mypgc/id663405181?ls=1&mt=8"><img src="<?php 
        echo plugins_url() . '/' . FLAGFOLDER;
        ?>
/admin/images/appstore_button.png" alt="Download from AppStore" /></a></p>
			<div class="submit"><input class="button-primary" type="submit" name="membership" value="<?php 
        _e('Update Settings for Remote Access', 'flag');
        ?>
"/></div>
		</form>

		<form id="flag_register_form" name="reg_on_mypgc" method="post" style="<?php 
        if (!$regform || !empty($flag_options['access_key'])) {
            ?>
display:none;<?php 
        }
        ?>
 float: left; border: 1px solid #666666; background-color: #ffffee; margin-top: 95px; width: 49%;">
			<?php 
        wp_nonce_field('flag_settings');
        ?>
			<h3 style="padding-left: 10px;"><?php 
        _e('Register with form below or <a href="http://mypgc.co/membership/" target="_blank">purchase license key</a>', 'flag');
        ?>
</h3>
			<div style="padding:0 10px;">
				<p><?php 
        _e("this email and password that you'll receive will be used to login in iOS application", 'flag');
        ?>
</p>
				<p><b><?php 
        _e("Note: if you already purchased license key or already registered this website you don't need register again. Just create your own Access Key and Save", 'flag');
        ?>
</b></p>
			</div>
			<input type="hidden" name="access_key" value="<?php 
        echo $flag_options['access_key'];
        ?>
" />
			<input type="hidden" name="access_url" value="<?php 
        echo plugins_url() . '/' . FLAGFOLDER . '/lib/app.php';
        ?>
" />
			<table class="form-table" style="100%;">
				<tr>
					<td valign="top" style="width: 50%;"><?php 
        _e('First Name', 'flag');
        ?>
:<br><input type="text" id="customer_first_name" name="customer_first_name" value="" style="width: 95%;" /></td>
					<td valign="top"><?php 
        _e('Last Name', 'flag');
        ?>
:<br><input type="text" id="customer_last_name" name="customer_last_name" value="" style="width: 95%;" /></td>
				</tr>
				<tr>
					<td valign="top"><?php 
        _e('Email', 'flag');
        ?>
:<br><input type="text" size="54" id="customer_email" name="customer_email" value="" style="width: 95%;" /></td>
					<td valign="top"><div class="submit"><input class="button-primary" type="submit" name="register_subscriber" value="<?php 
        _e('Register', 'flag');
        ?>
"/></div></td>
				</tr>
			</table>
		</form>

		<div style="clear: both;"> </div>
	</div>
<?php 
    }
    ?>

	<div id="vPlayer" class="cptab">
		<form name="vPlayer"  method="post">
			<?php 
    wp_nonce_field('flag_settings');
    ?>
			<input type="hidden" name="page_options" value="videoBG,vmColor1,vmColor2,vmAutoplay,vmWidth,vmHeight" />
			<h2><?php 
    _e('Flash Video Player Colors', 'flag');
    ?>
</h2>
			<table class="flag_colors form-table flag-options" style="width: auto; white-space: nowrap;">
				<tr>
					<th width="200"><?php 
    _e('Video BG', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="videoBG" name="videoBG" value="<?php 
    echo $flag_options['videoBG'];
    ?>
" /><div id="cp_videoBG" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Color 1', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="vmColor1" name="vmColor1" value="<?php 
    echo $flag_options['vmColor1'];
    ?>
" /><div id="cp_vmColor1" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Color 2', 'flag');
    ?>
:</th>
					<td>
						<input class="colorPick" type="text" size="7" maxlength="6" id="vmColor2" name="vmColor2" value="<?php 
    echo $flag_options['vmColor2'];
    ?>
" /><div id="cp_vmColor2" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Autoplay', 'flag');
    ?>
:</th>
					<td>
						<label><input name="vmAutoplay" type="radio" value="true" <?php 
    checked('true', $flag_options['vmAutoplay']);
    ?>
 /> <?php 
    _e('True', 'flag');
    ?>
</label><br />
						<label><input name="vmAutoplay" type="radio" value="false" <?php 
    checked('false', $flag_options['vmAutoplay']);
    ?>
 /> <?php 
    _e('False', 'flag');
    ?>
</label><br />
					</td>
				</tr>
				<tr>
					<th><?php 
    _e('Default Size', 'flag');
    ?>
:<br /><small>(width x height)</small></th>
					<td>
						<input name="vmWidth" type="text" size="3" maxlength="3" value="<?php 
    echo $flag_options['vmWidth'];
    ?>
" /> x <input name="vmHeight" type="text" size="3" maxlength="3" value="<?php 
    echo $flag_options['vmHeight'];
    ?>
" />
					</td>
				</tr>
			</table>
			<div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php 
    _e('Save Changes', 'flag');
    ?>
"/></div>
		</form>
	</div>

	<div id="mPlayer" class="cptab">
		<form name="mPlayer"  method="post">
			<?php 
    wp_nonce_field('flag_settings');
    ?>
			<input type="hidden" name="page_options" value="mpBG,mpColor1,mpColor2,mpAutoplay" />
			<h2><?php 
    _e('MP3 Player Colors', 'flag');
    ?>
</h2>
			<table class="flag_colors form-table flag-options" style="width: auto; white-space: nowrap;">
				<tr>
					<th width="200"><?php 
    _e('Player BG', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="mpBG" name="mpBG" value="<?php 
    echo $flag_options['mpBG'];
    ?>
" /><div id="cp_mpBG" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Color 1', 'flag');
    ?>
:</th>
					<td><input class="colorPick" type="text" size="7" maxlength="6" id="mpColor1" name="mpColor1" value="<?php 
    echo $flag_options['mpColor1'];
    ?>
" /><div id="cp_mpColor1" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>					
					<th><?php 
    _e('Color 2', 'flag');
    ?>
:</th>
					<td>
						<input class="colorPick" type="text" size="7" maxlength="6" id="mpColor2" name="mpColor2" value="<?php 
    echo $flag_options['mpColor2'];
    ?>
" /><div id="cp_mpColor2" style="background:#F9F9F9;position:absolute;display:none;"></div></td>
				</tr>
				<tr>
					<th><?php 
    _e('Autoplay', 'flag');
    ?>
:</th>
					<td>
						<label><input name="mpAutoplay" type="radio" value="true" <?php 
    checked('true', $flag_options['mpAutoplay']);
    ?>
 /> <?php 
    _e('True', 'flag');
    ?>
</label><br />
						<label><input name="mpAutoplay" type="radio" value="false" <?php 
    checked('false', $flag_options['mpAutoplay']);
    ?>
 /> <?php 
    _e('False', 'flag');
    ?>
</label><br />
					</td>
				</tr>
			</table>
			<div class="submit"><input class="button-primary" type="submit" name="updateoption" value="<?php 
    _e('Save Changes', 'flag');
    ?>
"/></div>
		</form>
	</div>
	
<?php 
    if (flagGallery::flag_wpmu_enable_function('wpmuRoles')) {
        ?>
	<div id="roles" class="cptab">
		<form method="POST" name="addroles" id="addroles" accept-charset="utf-8">
			<?php 
        wp_nonce_field('flag_addroles');
        ?>
			<h2><?php 
        _e('Roles / capabilities', 'flag');
        ?>
</h2>
			<div>&nbsp;</div>
			<p><?php 
        _e('Select the lowest role which should be able to access the follow capabilities. Flash Album Gallery supports the standard roles from WordPress.', 'flag');
        ?>
</p>
			<table class="form-table"> 
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Main Flash Album Gallery overview', 'flag');
        ?>
:</th> 
				<td><label for="general"><select style="width: 150px;" name="general" id="general"><?php 
        wp_dropdown_roles(flag_get_role('FlAG overview'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('View TinyMCE Button / GRAND Pages', 'flag');
        ?>
:</th>
				<td><label for="tinymce"><select style="width: 150px;" name="tinymce" id="tinymce"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Use TinyMCE'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Add gallery / Upload images', 'flag');
        ?>
:</th> 
				<td><label for="add_gallery"><select style="width: 150px;" name="add_gallery" id="add_gallery"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Upload images'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Import images folder', 'flag');
        ?>
:</th> 
				<td><label for="add_gallery"><select style="width: 150px;" name="import_gallery" id="import_gallery"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Import folder'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Manage gallery', 'flag');
        ?>
:</th> 
				<td><label for="manage_gallery"><select style="width: 150px;" name="manage_gallery" id="manage_gallery"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Manage gallery'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Manage others galleries and Albums', 'flag');
        ?>
:</th>
				<td><label for="manage_others"><select style="width: 150px;" name="manage_others" id="manage_others"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Manage others gallery'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Manage music', 'flag');
        ?>
:</th> 
				<td><label for="manage_music"><select style="width: 150px;" name="manage_music" id="manage_music"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Manage music'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Manage video', 'flag');
        ?>
:</th> 
				<td><label for="manage_video"><select style="width: 150px;" name="manage_video" id="manage_video"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Manage video'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Manage banners', 'flag');
        ?>
:</th> 
				<td><label for="manage_banners"><select style="width: 150px;" name="manage_banners" id="manage_banners"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Manage banners'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Change skin', 'flag');
        ?>
:</th> 
				<td><label for="change_skin"><select style="width: 150px;" name="change_skin" id="change_skin"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Change skin'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Add skins', 'flag');
        ?>
:</th> 
				<td><label for="add_skins"><select style="width: 150px;" name="add_skins" id="add_skins"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Add skins'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Delete skins', 'flag');
        ?>
:</th> 
				<td><label for="delete_skins"><select style="width: 150px;" name="delete_skins" id="delete_skins"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Delete skins'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('Change options', 'flag');
        ?>
:</th> 
				<td><label for="change_options"><select style="width: 150px;" name="change_options" id="change_options"><?php 
        wp_dropdown_roles(flag_get_role('FlAG Change options'));
        ?>
</select></label></td>
			</tr>
			<tr valign="top"> 
				<th scope="row" style="white-space: nowrap"><?php 
        _e('iFrame page', 'flag');
        ?>
:</th>
				<td><label for="flagframe_page"><select style="width: 150px;" name="flagframe_page" id="flagframe_page"><?php 
        wp_dropdown_roles(flag_get_role('FlAG iFrame page'));
        ?>
</select></label></td>
			</tr>
			</table>
			<div class="submit"><input type="submit" class="button-primary" name= "update_cap" value="<?php 
        _e('Update capabilities', 'flag');
        ?>
"/></div>
		</form>
	</div>
<?php 
    }
    ?>
</div>
<script type="text/javascript">
	var cptabs=new ddtabcontent("tabs");
	cptabs.setpersist(true);
	cptabs.setselectedClassTarget("linkparent");
	cptabs.init();
</script>

	<?php 
}
Пример #20
0
?>
" class="regular-text" />
					<br />
					<?php 
_e('Site path (&#8220;dashboard&#8221;, &#8220;control&#8221;, &#8220;manager&#8221;, etc.) or blog ID.<br />New users are added to this site as the user role defined below if they don&#8217;t have a site. Leave blank for the main site. Users with the Subscriber role on the old site will be moved to the new site if changed. The new site will be created if it does not exist.');
?>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="default_user_role"><?php 
_e('Dashboard User Default Role');
?>
</label></th>
				<td>
					<select name="default_user_role" id="default_user_role"><?php 
wp_dropdown_roles(get_site_option('default_user_role', 'subscriber'));
?>
					</select>
					<br />
					<?php 
_e('The default role for new users on the Dashboard site. &#8220;Subscriber&#8221; or &#8220;Contributor&#8221; roles are recommended.');
?>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row"><label for="admin_notice_feed"><?php 
_e('Admin Notice Feed');
?>
</label></th>
				<td><input name="admin_notice_feed" class="large-text" type="text" id="admin_notice_feed" value="<?php 
echo esc_attr(get_site_option('admin_notice_feed'));
Пример #21
0
    /**
     * Output the controls to allow user roles to be changed in bulk.
     *
     * @since 3.1.0
     * @access protected
     *
     * @param string $which Whether this is being invoked above ("top")
     *                      or below the table ("bottom").
     */
    protected function extra_tablenav($which)
    {
        if ('top' != $which) {
            return;
        }
        ?>
	<div class="alignleft actions">
		<?php 
        if (current_user_can('promote_users')) {
            ?>
		<label class="screen-reader-text" for="new_role"><?php 
            _e('Change role to&hellip;');
            ?>
</label>
		<select name="new_role" id="new_role">
			<option value=""><?php 
            _e('Change role to&hellip;');
            ?>
</option>
			<?php 
            wp_dropdown_roles();
            ?>
		</select>
	<?php 
            submit_button(__('Change'), 'button', 'changeit', false);
        }
        /**
         * Fires just before the closing div containing the bulk role-change controls
         * in the Users list table.
         *
         * @since 3.5.0
         */
        do_action('restrict_manage_users');
        echo '</div>';
    }
Пример #22
0
?>
</select></td>
		</tr>
		<tr valign="top">
			<th scope="row"><?php 
_e('Folder Delete');
?>
</th><td><select name="options[ckfinder][permissions][folderDelete]"><?php 
wp_dropdown_roles($this->get_role('ckeditor_ckfinder_folderDelete'));
?>
</select></td>
			<th scope="row"><?php 
_e('File Delete');
?>
</th><td><select name="options[ckfinder][permissions][fileDelete]"><?php 
wp_dropdown_roles($this->get_role('ckeditor_ckfinder_fileDelete'));
?>
</select></td>
		</tr>
		</tbody>
		</table>

		<table class="widefat" style="width:560px;margin-top:10px">
		<thead>
		<tr>
			<th colspan="2"><?php 
_e('Images');
?>
</th><th colspan="2"><?php 
_e('Thumbnails');
?>
Пример #23
0
 public static function dropdown_roles($selected_role)
 {
     add_filter('editable_roles', array(__CLASS__, 'update_roles_order'));
     wp_dropdown_roles($selected_role);
     remove_filter('editable_roles', array(__CLASS__, 'update_roles_order'));
 }
/**
 * Outputs the settings screen and saves data when submitted
 * @since 1.0 
 */
function bpahpf_settings_page()
{
    //check for capability to manage options
    if (!current_user_can('manage_options')) {
        wp_die(__('You do not have sufficient permissions to access this page.', 'bpahpf-menu'));
    }
    $opt_name = 'bpahpf_role_choice';
    $data_field_name = 'bpahpf_role_choice';
    $opt_val = get_option($opt_name);
    //if nonce checks out then save submitted data
    $nonce = $_REQUEST['_wpnonce'];
    if (wp_verify_nonce($nonce, 'bpahpf')) {
        $opt_val = $_POST[$data_field_name];
        update_option($opt_name, $opt_val);
        ?>
		<div class="updated"><p><strong><?php 
        _e('Settings saved.', 'bpahpf-menu');
        ?>
</strong></p></div>
		<?php 
    }
    echo '<div class="wrap">';
    echo "<h2>" . __('BP Profile as Homepage Fork Settings', 'bpahpf-menu') . "</h2>";
    ?>
	<p>
	<?php 
    _e('Disable Profile as Homepage for a particular user role.', 'bpahpf-menu');
    ?>
	</p>
	<form name="bpahpf-settings-form" method="post" action="">
	<?php 
    wp_nonce_field('bpahpf');
    ?>
	<p><b>
	<?php 
    _e('You have selected:', 'bpahpf-menu');
    ?>
	</b> 
	<?php 
    if ('' == $opt_val) {
        _e('No One', 'bpahpf-menu');
    } else {
        echo $opt_val;
    }
    ?>
 
		<hr />
	<?php 
    _e('Disable redirect to Profile for this role :', 'bpahpf-menu');
    ?>
 
		<select name="<?php 
    echo $data_field_name;
    ?>
">
			<option value="">
				<?php 
    _e('No One', 'bpahpf-menu');
    ?>
			</option>
			<?php 
    wp_dropdown_roles();
    ?>
		</select>
	</p>
<p class="submit">
<input type="submit" name="Submit" class="button-primary" value="<?php 
    esc_attr_e('Save Changes', 'bpahpf-menu');
    ?>
" />
</p>
</form>
</div>
<?php 
}
    ?>
 />
<?php 
    _e('Anyone can register');
    ?>
</label>
</fieldset></td>
</tr>
<tr>
<th scope="row"><label for="default_role"><?php 
    _e('New User Default Role');
    ?>
</label></th>
<td>
<select name="default_role" id="default_role"><?php 
    wp_dropdown_roles(get_option('default_role'));
    ?>
</select>
</td>
</tr>
<?php 
} else {
    ?>
<tr>
<th scope="row"><label for="new_admin_email"><?php 
    _e('E-mail Address');
    ?>
 </label></th>
<td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php 
    form_option('admin_email');
    ?>
Пример #26
0
    function display($agent_type, $id_suffix, $current_selections = array(), $args = array())
    {
        $defaults = array('agent_id' => 0, 'context' => '', 'label_select' => _x('Select &gt;', 'user', 'pp'), 'label_unselect' => _x('&lt; Unselect', 'user', 'pp'), 'label_selections' => __('Current Selections:', 'pp'), 'display_stored_selections' => true, 'create_dropdowns' => false, 'width' => '', 'width_current' => '', 'label_headline' => true, 'multi_select' => true, 'use_selection_js' => true);
        $args = apply_filters('pp_agents_selection_ui_args', array_merge($defaults, $args), $agent_type, $id_suffix);
        extract($args, EXTR_SKIP);
        $width = $width ? "width:{$width}px;" : '';
        $this->register_ajax_js($agent_type, $id_suffix, $context, $agent_id, $args);
        if (true === $label_headline) {
            $label_headline = 'user' == $agent_type ? __('Select Users', 'pp') : __('Select Groups', 'pp');
        }
        ?>
		<table id="pp-agent-selection_<?php 
        echo $id_suffix;
        ?>
-wrapper" class="pp-agents-selection">
		<tr><td id="pp-agent-selection_<?php 
        echo $id_suffix;
        ?>
">
		<h4><?php 
        echo $label_headline;
        ?>
</h4>
		<input id="agent_search_text_<?php 
        echo $id_suffix;
        ?>
" type="text" size="8" />
		<button type="button" class="pp-agent-search-submit" id="agent_submit_<?php 
        echo $id_suffix;
        ?>
"><?php 
        echo __ppw("Search");
        ?>
</button>
		<img class="waiting" style="display:none;" src="<?php 
        echo esc_url(admin_url('images/wpspin_light.gif'));
        ?>
" alt="" />
		
		<?php 
        if ('user' == $agent_type && pp_get_option('user_search_by_role')) {
            ?>
			<br /><select id="pp_search_role_<?php 
            echo $id_suffix;
            ?>
">
			<option value=""><?php 
            _e('(any WP role)', 'pp');
            ?>
</option>
			<?php 
            wp_dropdown_roles();
            ?>
			</select>
		<?php 
        }
        ?>
		
		</td>
		
		<?php 
        if ($display_stored_selections) {
            ?>
		<td style="vertical-align:bottom" class="pp-members-current"><h4><?php 
            echo $label_selections;
            ?>
</h4></td>
		<?php 
        }
        ?>
		
		</tr>
		
		<tr><td>
		<select id="agent_results_<?php 
        echo $id_suffix;
        ?>
" class="pp_agent_results" <?php 
        if ($multi_select) {
            ?>
multiple="multiple" style="height:160px;<?php 
        } else {
            ?>
style="display:none;<?php 
        }
        echo $width;
        ?>
"></select>
		<span id="agent_msg_<?php 
        echo $id_suffix;
        ?>
"></span>
		</td>

		<?php 
        if ($display_stored_selections) {
            if ($width_current) {
                $width = "width:{$width_current}px;";
            }
            ?>
		<td class="pp-members-current">
		<select id='<?php 
            echo $id_suffix;
            ?>
' name='<?php 
            echo $id_suffix;
            ?>
[]' multiple='multiple' style='height:160px;<?php 
            echo $width;
            ?>
float:right'>
		
<?php 
            $display_property = 'user' == $agent_type ? 'user_login' : 'display_name';
            foreach ($current_selections as $agent) {
                $attribs = isset($agent->display_name) && $agent->user_login != $agent->display_name ? 'title="' . esc_attr($agent->display_name) . '"' : '';
                ?>
		<?php 
                $data = apply_filters('pp_agents_selection_ui_attribs', array('attribs' => $attribs, 'user_caption' => $agent->{$display_property}), $agent_type, $id_suffix, $agent);
                ?>
		<option value="<?php 
                echo $agent->ID;
                ?>
" <?php 
                echo $data['attribs'];
                ?>
><?php 
                echo $data['user_caption'];
                ?>
</option>
<?php 
            }
            ?>

		</select><br />
		</td>
		<?php 
        }
        ?>
		
		</tr>
		
		<?php 
        do_action('_pp_agents_selection_ui_select_pre', $id_suffix);
        ?>
		<tr>
		<?php 
        do_action('pp_agents_selection_ui_select_pre', $id_suffix);
        ?>
		

		<td><button type="button" id="select_agents_<?php 
        echo $id_suffix;
        ?>
" class="pp_add" style="float:right<?php 
        if (!$multi_select) {
            ?>
;display:none;<?php 
        }
        ?>
"><?php 
        echo $label_select;
        ?>
</button></td>
		
		<?php 
        if ($display_stored_selections) {
            ?>
		<td class="pp-members-current"><button type="button" id="unselect_agents_<?php 
            echo $id_suffix;
            ?>
" class="pp_remove"><?php 
            echo $label_unselect;
            ?>
</button></td>
		<?php 
        }
        ?>
		
		</tr>
		</table>	
<?php 
        if (!defined('PPM_VERSION') && pp_get_option('display_extension_hints')) {
            if (0 === validate_plugin("pp-membership/pp-membership.php")) {
                $msg = __('To set date limits on group membership, activate the PP Membership plugin.', 'pp');
            } elseif (true == pp_key_status()) {
                $msg = sprintf(__('To set date limits on group membership, %1$sinstall%2$s the PP Membership plugin.', 'pp'), '<a href="admin.php?page=pp-settings&pp_tab=install">', '</a>');
            } else {
                $msg = sprintf(__('To set date limits on group membership, %1$senter%2$s or %3$spurchase%4$s a support key and install the PP Membership plugin.', 'pp'), '<a href="admin.php?page=pp-settings&pp_tab=install">', '</a>', '<a href="http://presspermit.com/purchase">', '</a>');
            }
            echo "<div class='pp-ext-promo'>{$msg}</div>";
        }
        $csv = $current_selections ? implode(',', array_keys($current_selections)) : '';
        $csv = apply_filters('pp_agents_selection_ui_csv', $csv, $id_suffix, $current_selections);
        ?>
		<input type="hidden" id="<?php 
        echo $id_suffix;
        ?>
_csv" name="<?php 
        echo $id_suffix;
        ?>
_csv" value="<?php 
        echo $csv;
        ?>
" />
		<?php 
    }
Пример #27
0
	</tr>
<?php 
        }
        ?>

	<tr>
		<th scope="row"><?php 
        _e('Role');
        ?>
</th>
		<td><select name="role" id="role">
			<?php 
        if (!$new_user_role) {
            $new_user_role = get_option('default_role');
        }
        wp_dropdown_roles($new_user_role);
        ?>
			</select>
		</td>
	</tr>
</table>
<p class="submit">
	<?php 
        echo $referer;
        ?>
	<input name="adduser" type="submit" id="addusersub" value="<?php 
        _e('Add User &raquo;');
        ?>
" />
</p>
</form>
Пример #28
0
 /**
  *
  * @TODO document
  *
  */
 function _get_select_role($oid, $o)
 {
     $opts = $this->input_option('', selected('', $o['val'], false), esc_html('Any Role'));
     ob_start();
     wp_dropdown_roles($o['val']);
     $opts .= ob_get_clean();
     echo $this->input_label($o['input_id'], $o['inputlabel']);
     echo $this->input_select($o['input_id'], $o['input_name'], $opts);
 }
Пример #29
0
	</tr>

<?php 
        if (!IS_PROFILE_PAGE && !is_network_admin()) {
            ?>
<tr class="user-role-wrap"><th><label for="role"><?php 
            _e('Role');
            ?>
</label></th>
<td><select name="role" id="role">
<?php 
            // Compare user role against currently editable roles
            $user_roles = array_intersect(array_values($profileuser->roles), array_keys(get_editable_roles()));
            $user_role = reset($user_roles);
            // print the full list of roles with the primary one selected.
            wp_dropdown_roles($user_role);
            // print the 'no role' option. Make it selected if the user has no role yet.
            if ($user_role) {
                echo '<option value="">' . __('&mdash; No role for this site &mdash;') . '</option>';
            } else {
                echo '<option value="" selected="selected">' . __('&mdash; No role for this site &mdash;') . '</option>';
            }
            ?>
</select></td></tr>
<?php 
        }
        //!IS_PROFILE_PAGE
        if (is_multisite() && is_network_admin() && !IS_PROFILE_PAGE && current_user_can('manage_network_options') && !isset($super_admins)) {
            ?>
<tr class="user-super-admin-wrap"><th><?php 
            _e('Super Admin');
Пример #30
0
_e('Moderate new adverts', 'adrotate-pro');
?>
</th>
		<td>
			<label for="adrotate_moderate"><select name="adrotate_moderate">
				<?php 
wp_dropdown_roles($adrotate_config['moderate']);
?>
			</select> <?php 
_e('Role to approve ads submitted by advertisers.', 'adrotate-pro');
?>
</label>
		</td>
	</tr>
	<tr>
		<th valign="top"><?php 
_e('Approve/Reject adverts in Moderation Queue', 'adrotate-pro');
?>
</th>
		<td>
			<label for="adrotate_moderate_approve"><select name="adrotate_moderate_approve">
				<?php 
wp_dropdown_roles($adrotate_config['moderate_approve']);
?>
			</select> <?php 
_e('Role to approve or reject ads submitted by advertisers.', 'adrotate-pro');
?>
</label>
		</td>
	</tr>
</table>