Esempio n. 1
0
<?php

echo '<div class="wrap" id="poststuff">
		<h2>' . __('Your Minder Block List', 'ymind') . '</h2>';
echo ymind_start_box('Your Minder - Block List');
if (isset($_POST['delete'])) {
    ymind_blocks_delete();
}
if (isset($_REQUEST['block_edit'])) {
    ymind_block_edit();
} else {
    if (isset($_POST['block_save'])) {
        ymind_block_save();
    } else {
        ymind_block_list();
    }
}
echo ymind_end_box();
function ymind_block_save()
{
    global $wpdb;
    $id = htmlspecialchars($_POST['id']);
    $ip = htmlspecialchars($_POST['ip']);
    if (!$ip) {
        ymind_display_error(__('Please fill in all the fields', 'ymind'));
        ymind_block_edit();
        return;
    }
    if ($id > 0) {
        $ret = ymind_block_update($id, $ip);
    } else {
Esempio n. 2
0
<?php

echo '	<div class="wrap" id="poststuff">
			<h2 style="margin-bottom: 0px;">' . __('Your Minder', 'ymind') . '</h2>';
ymind_get_messages();
echo '<div style="float:left; width: 75%; padding-right: 15px;">';
echo ymind_start_box('Your Minder');
echo __('<p>Welcome to Your Minder. This plugin offers protection for your blog in that only one IP address per login can ever be used.</p><p>Use the settings page to set up your preferences. You can configure Your Minder allow a variable number of logins from the same IP over a variable number of minutes.</p><p>You have the option to lock out the account for a number of minutes or just log them out. If a lockout is chosen then you can set a time period for the lockout or require an email activation.</p><p>Using the admin links within Your Minder you can block IP addresses manually if need be and view any existing lockouts on the "Members" page.</p>', 'ymind');
echo ymind_end_box();
echo '</div>';
echo '<div style="float:left; width: 15%;">';
echo ymind_start_box(__('Version Check', 'ymind'));
ymind_check_version();
echo ymind_end_box();
echo '	</div>';
echo '	</div>';
echo '<div style="clear: both; height: 1px;">&nbsp;</div>';
ymind_render_footer();
Esempio n. 3
0
<?php

echo '<div class="wrap" id="poststuff">
		<h2>' . __('Your Minder Locked Members', 'ymind') . '</h2>

			<div style="clear:left;">
				' . __('The following users are currently locked out. Click the unlock button to release the account.', 'ymind') . '
			</div>';
echo ymind_start_box('Your Minder - Locked Members');
ymind_render_locked_out_user_table();
echo ymind_end_box();
echo '</div>';
ymind_render_footer();
function ymind_key_check()
{
    global $ymind_auth;
    //	$ymind_auth->render_activation_form();
    echo '<div class="wrap" id="poststuff">';
    echo '<div id="message" class="error fade ymind_auth">';
    if ($ymind_auth->message) {
        echo '<div style="margin: 5px 0px; color:red; font-weight:bold;">' . $ymind_auth->message . '</div>';
    }
    echo '<p>' . __('Your Minder will not function until a valid License Key has been entered. Please enter the email address you used to purchase the plugin in the box below to activate it. We also ask for the site that you purchased YMIND at so that the license check can be performed on the correct database.', 'ymind') . '</p>';
    echo '<p>' . __('If you don\'t have a key then please visit <a href=\'http://www.yourmembers.co.uk/\'>http://www.yourmembers.co.uk/</a> to purchase one.', 'ymind') . '</p>';
    echo '</div>';
    echo ymind_start_box('Your Minder Activation');
    echo '<div style="margin-bottom:10px;">
			<form method="POST">
				<table class="form-table">
					<tr>
						<th style="width: 230px; vertical-align: top; text-align: left;">Where did you purchase YMIND?</th>
						<td>
							<ul>
								<li><label><input type="radio" name="method" checked="checked" value="' . YMIND_PLUGIN_LICENSING . '" /> http://www.yourmembers.co.uk</label></li>
								<li><label><input type="radio" name="method" value="' . YMIND_PLUGIN_LICENSING_OLD . '" /> http://www.newmedias.co.uk</label></li>
								<li><label><input type="radio" name="method" value="other" /> Other</label> <input type="text" name="other_site" value="Where from?" /></li>
							</ul>
						</td>
					</tr>
					<tr>
						<th style="text-align: left;">Email / Activation Code</th>
						<td>
							<input name="registration_email" value="' . $default_text . '" style="width:300px;" type="text" />
						</td>
					</tr>
					<tr>
						<td colspan="2" style="text-align: right;">
							<input name="activate_plugin_yourminder" value="Activate" type="submit" class="button"/>
						</td>
					</tr>
				</table>
			</form>
		</div>';
    echo ymind_end_box();
    echo '</div>';
}
Esempio n. 5
0
										<input name="activate_redirect" style="width: 350px;" value="' . $activate_redirect . '" />
										<br/>
										<div ' . $caption_style . '>' . __('This is an optional redirect for the user once an accepted activation link has been processed. If this box is left empty then then it will not redirect.', 'ymind') . '</div>
									</td>
								</tr>


					</tbody>
				</table>
						

							<input type="submit" name="submit" value="Update" class="button" />

				</form>';
echo ymind_end_box();
echo ymind_start_box('Remove the Plugin, License or both');
if (ymind_get('ymind_deactivate')) {
    $deactivate_url = YMIND_ADMIN_DIR_URL . 'admin.php?page=ymind/admin/ymind_admin.php';
    delete_option('ymind_license_key');
    echo '<script>window.location="' . $deactivate_url . '";</script>';
} else {
    if (isset($_REQUEST['ymind_uninstall']) && isset($_POST['go']) && current_user_can('edit_plugins')) {
        check_admin_referer('deactivate-plugin_' . YMIND_PLUGIN_DIRNAME . 'ymind.php');
        // deactivate using WP's plugin deactivation algorithm
        $current = get_option('active_plugins');
        array_splice($current, array_search(YMIND_PLUGIN_DIRNAME . 'ymind.php', $current), 1);
        update_option('active_plugins', $current);
        do_action('deactivate_' . YMIND_PLUGIN_DIRNAME . '/ymind.php');
        ymind_deactivate();
        //ymind_uninstall is in post so it will do a hard uninstall instead
        echo '<script>document.location="' . YMIND_ADMIN_DIR_URL . '";</script>';