| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
$base_name = plugin_basename('wp-useronline/useronline-options.php'); |
|---|
| 22 |
$base_page = 'admin.php?page='.$base_name; |
|---|
| 23 |
$mode = trim($_GET['mode']); |
|---|
| 24 |
$useronline_tables = array($wpdb->useronline); |
|---|
| 25 |
$useronline_settings = array('useronline_most_users', 'useronline_most_timestamp', 'useronline_timeout', 'useronline_bots', 'useronline_url', 'useronline_naming', 'useronline_template_useronline', 'useronline_template_browsingsite', 'useronline_template_browsingpage', 'widget_useronline'); |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
if(!empty($_POST['Submit'])) { |
|---|
| 31 |
$useronline_bots = array(); |
|---|
| 32 |
$useronline_timeout = intval($_POST['useronline_timeout']); |
|---|
| 33 |
$useronline_bots_name = explode("\n", trim($_POST['useronline_bots_name'])); |
|---|
| 34 |
$useronline_bots_agent = explode("\n", trim($_POST['useronline_bots_agent'])); |
|---|
| 35 |
$useronline_bots_keys = array_values((array) $useronline_bots_name); |
|---|
| 36 |
$useronline_bots_vals = array_values((array) $useronline_bots_agent); |
|---|
| 37 |
$n = max(count($useronline_bots_keys), count($useronline_bots_vals)); |
|---|
| 38 |
for($i = 0; $i < $n; $i++) { |
|---|
| 39 |
$useronline_bots[trim($useronline_bots_keys[$i])] = trim($useronline_bots_vals[$i]); |
|---|
| 40 |
} |
|---|
| 41 |
$useronline_url = trim($_POST['useronline_url']); |
|---|
| 42 |
$useronline_naming_user = trim($_POST['useronline_naming_user']); |
|---|
| 43 |
$useronline_naming_users = trim($_POST['useronline_naming_users']); |
|---|
| 44 |
$useronline_naming_member = trim($_POST['useronline_naming_member']); |
|---|
| 45 |
$useronline_naming_members = trim($_POST['useronline_naming_members']); |
|---|
| 46 |
$useronline_naming_guest = trim($_POST['useronline_naming_guest']); |
|---|
| 47 |
$useronline_naming_guests = trim($_POST['useronline_naming_guests']); |
|---|
| 48 |
$useronline_naming_bot = trim($_POST['useronline_naming_bot']); |
|---|
| 49 |
$useronline_naming_bots = trim($_POST['useronline_naming_bots']); |
|---|
| 50 |
$useronline_naming = array('user' => $useronline_naming_user, 'users' => $useronline_naming_users, 'member' => $useronline_naming_member, 'members' => $useronline_naming_members, 'guest' => $useronline_naming_guest, 'guests' => $useronline_naming_guests, 'bot' => $useronline_naming_bot, 'bots' => $useronline_naming_bots); |
|---|
| 51 |
$useronline_template_useronline = trim($_POST['useronline_template_useronline']); |
|---|
| 52 |
$useronline_template_browsingsite = array($_POST['useronline_separator_browsingsite_members'], $_POST['useronline_separator_browsingsite_guests'], $_POST['useronline_separator_browsingsite_bots'], trim($_POST['useronline_template_browsingsite'])); |
|---|
| 53 |
$useronline_template_browsingpage = array($_POST['useronline_separator_browsingpage_members'], $_POST['useronline_separator_browsingpage_guests'], $_POST['useronline_separator_browsingpage_bots'], trim($_POST['useronline_template_browsingpage'])); |
|---|
| 54 |
$update_useronline_queries = array(); |
|---|
| 55 |
$update_useronline_text = array(); |
|---|
| 56 |
$update_useronline_queries[] = update_option('useronline_timeout', $useronline_timeout); |
|---|
| 57 |
$update_useronline_queries[] = update_option('useronline_bots', $useronline_bots); |
|---|
| 58 |
$update_useronline_queries[] = update_option('useronline_url', $useronline_url); |
|---|
| 59 |
$update_useronline_queries[] = update_option('useronline_naming', $useronline_naming); |
|---|
| 60 |
$update_useronline_queries[] = update_option('useronline_template_useronline', $useronline_template_useronline); |
|---|
| 61 |
$update_useronline_queries[] = update_option('useronline_template_browsingsite', $useronline_template_browsingsite); |
|---|
| 62 |
$update_useronline_queries[] = update_option('useronline_template_browsingpage', $useronline_template_browsingpage); |
|---|
| 63 |
$update_useronline_text[] = __('Useronline Timeout', 'wp-useronline'); |
|---|
| 64 |
$update_useronline_text[] = __('Useronline Bots', 'wp-useronline'); |
|---|
| 65 |
$update_useronline_text[] = __('Useronline URL', 'wp-useronline'); |
|---|
| 66 |
$update_useronline_text[] = __('Useronline Naming Conventions', 'wp-useronline'); |
|---|
| 67 |
$update_useronline_text[] = __('User(s) Online Template', 'wp-useronline'); |
|---|
| 68 |
$update_useronline_text[] = __('User(s) Browsing Site Template', 'wp-useronline'); |
|---|
| 69 |
$update_useronline_text[] = __('User(s) Browsing Page Template', 'wp-useronline'); |
|---|
| 70 |
$i=0; |
|---|
| 71 |
$text = ''; |
|---|
| 72 |
foreach($update_useronline_queries as $update_useronline_query) { |
|---|
| 73 |
if($update_useronline_query) { |
|---|
| 74 |
$text .= '<font color="green">'.$update_useronline_text[$i].' '.__('Updated', 'wp-useronline').'</font><br />'; |
|---|
| 75 |
} |
|---|
| 76 |
$i++; |
|---|
| 77 |
} |
|---|
| 78 |
if(empty($text)) { |
|---|
| 79 |
$text = '<font color="red">'.__('No Useronline Option Updated', 'wp-useronline').'</font>'; |
|---|
| 80 |
} |
|---|
| 81 |
} |
|---|
| 82 |
|
|---|
| 83 |
if(!empty($_POST['do'])) { |
|---|
| 84 |
switch($_POST['do']) { |
|---|
| 85 |
case __('UNINSTALL WP-UserOnline', 'wp-useronline') : |
|---|
| 86 |
if(trim($_POST['uninstall_useronline_yes']) == 'yes') { |
|---|
| 87 |
echo '<div id="message" class="updated fade">'; |
|---|
| 88 |
echo '<p>'; |
|---|
| 89 |
foreach($useronline_tables as $table) { |
|---|
| 90 |
$wpdb->query("DROP TABLE {$table}"); |
|---|
| 91 |
echo '<font style="color: green;">'; |
|---|
| 92 |
printf(__('Table \'%s\' has been deleted.', 'wp-useronline'), "<strong><em>{$table}</em></strong>"); |
|---|
| 93 |
echo '</font><br />'; |
|---|
| 94 |
} |
|---|
| 95 |
echo '</p>'; |
|---|
| 96 |
echo '<p>'; |
|---|
| 97 |
foreach($useronline_settings as $setting) { |
|---|
| 98 |
$delete_setting = delete_option($setting); |
|---|
| 99 |
if($delete_setting) { |
|---|
| 100 |
echo '<font color="green">'; |
|---|
| 101 |
printf(__('Setting Key \'%s\' has been deleted.', 'wp-useronline'), "<strong><em>{$setting}</em></strong>"); |
|---|
| 102 |
echo '</font><br />'; |
|---|
| 103 |
} else { |
|---|
| 104 |
echo '<font color="red">'; |
|---|
| 105 |
printf(__('Error deleting Setting Key \'%s\'.', 'wp-useronline'), "<strong><em>{$setting}</em></strong>"); |
|---|
| 106 |
echo '</font><br />'; |
|---|
| 107 |
} |
|---|
| 108 |
} |
|---|
| 109 |
echo '</p>'; |
|---|
| 110 |
echo '</div>'; |
|---|
| 111 |
$mode = 'end-UNINSTALL'; |
|---|
| 112 |
} |
|---|
| 113 |
break; |
|---|
| 114 |
} |
|---|
| 115 |
} |
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
switch($mode) { |
|---|
| 120 |
|
|---|
| 121 |
case 'end-UNINSTALL': |
|---|
| 122 |
$deactivate_url = 'plugins.php?action=deactivate&plugin=wp-useronline/wp-useronline.php'; |
|---|
| 123 |
if(function_exists('wp_nonce_url')) { |
|---|
| 124 |
$deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-useronline/wp-useronline.php'); |
|---|
| 125 |
} |
|---|
| 126 |
echo '<div class="wrap">'; |
|---|
| 127 |
echo '<h2>'.__('Uninstall WP-UserOnline', 'wp-useronline').'</h2>'; |
|---|
| 128 |
echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-UserOnline Will Be Deactivated Automatically.', 'wp-useronline'), $deactivate_url).'</strong></p>'; |
|---|
| 129 |
echo '</div>'; |
|---|
| 130 |
break; |
|---|
| 131 |
|
|---|
| 132 |
default: |
|---|
| 133 |
$useronline_options_naming = get_option('useronline_naming'); |
|---|
| 134 |
$useronline_options_bots = get_option('useronline_bots'); |
|---|
| 135 |
$useronline_template_browsingsite = get_option('useronline_template_browsingsite'); |
|---|
| 136 |
$useronline_template_browsingpage = get_option('useronline_template_browsingpage'); |
|---|
| 137 |
$useronline_options_bots_name = ''; |
|---|
| 138 |
$useronline_options_bots_agent = ''; |
|---|
| 139 |
foreach($useronline_options_bots as $botname => $botagent) { |
|---|
| 140 |
$useronline_options_bots_name .= $botname."\n"; |
|---|
| 141 |
$useronline_options_bots_agent .= $botagent."\n"; |
|---|
| 142 |
} |
|---|
| 143 |
$useronline_options_bots_name = trim($useronline_options_bots_name); |
|---|
| 144 |
$useronline_options_bots_agent = trim($useronline_options_bots_agent); |
|---|
| 145 |
?> |
|---|
| 146 |
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?> |
|---|
| 147 |
<script type="text/javascript"> |
|---|
| 148 |
/* <![CDATA[*/ |
|---|
| 149 |
function useronline_default_templates(template) { |
|---|
| 150 |
var default_template; |
|---|
| 151 |
switch(template) { |
|---|
| 152 |
case "useronline": |
|---|
| 153 |
default_template = "<a href=\"%USERONLINE_PAGE_URL%\" title=\"%USERONLINE_USERS%\"><strong>%USERONLINE_USERS%</strong> <?php _e('Online', 'wp-useronline'); ?></a>"; |
|---|
| 154 |
break; |
|---|
| 155 |
} |
|---|
| 156 |
document.getElementById("useronline_template_" + template).value = default_template; |
|---|
| 157 |
} |
|---|
| 158 |
|
|---|
| 159 |
function useronline_default_naming() { |
|---|
| 160 |
document.getElementById('useronline_naming_user').value = "<?php _e('1 User', 'wp-useronline'); ?>"; |
|---|
| 161 |
document.getElementById('useronline_naming_users').value = "<?php _e('%USERONLINE_COUNT% Users', 'wp-useronline'); ?>"; |
|---|
| 162 |
document.getElementById('useronline_naming_member').value = "<?php _e('1 Member', 'wp-useronline'); ?>"; |
|---|
| 163 |
document.getElementById('useronline_naming_members').value = "<?php _e('%USERONLINE_COUNT% Members', 'wp-useronline'); ?>"; |
|---|
| 164 |
document.getElementById('useronline_naming_guest').value = "<?php _e('1 Guest', 'wp-useronline'); ?>"; |
|---|
| 165 |
document.getElementById('useronline_naming_guests').value = "<?php _e('%USERONLINE_COUNT% Guests', 'wp-useronline'); ?>"; |
|---|
| 166 |
document.getElementById('useronline_naming_bot').value = "<?php _e('1 Bot', 'wp-useronline'); ?>"; |
|---|
| 167 |
document.getElementById('useronline_naming_bots').value = "<?php _e('%USERONLINE_COUNT% Bots', 'wp-useronline'); ?>"; |
|---|
| 168 |
} |
|---|
| 169 |
function useronline_default_browsing_site() { |
|---|
| 170 |
document.getElementById('useronline_separator_browsingsite_members').value = ', '; |
|---|
| 171 |
document.getElementById('useronline_separator_browsingsite_guests').value = ', '; |
|---|
| 172 |
document.getElementById('useronline_separator_browsingsite_bots').value = ', '; |
|---|
| 173 |
document.getElementById('useronline_template_browsingsite').value = "<?php _e('Users', 'wp-useronline'); ?>: <strong>%USERONLINE_MEMBER_NAMES%%USERONLINE_GUESTS_SEPERATOR%%USERONLINE_GUESTS%%USERONLINE_BOTS_SEPERATOR%%USERONLINE_BOTS%</strong>"; |
|---|
| 174 |
} |
|---|
| 175 |
function useronline_default_browsing_page() { |
|---|
| 176 |
document.getElementById('useronline_separator_browsingpage_members').value = ', '; |
|---|
| 177 |
document.getElementById('useronline_separator_browsingpage_guests').value = ', '; |
|---|
| 178 |
document.getElementById('useronline_separator_browsingpage_bots').value = ', '; |
|---|
| 179 |
document.getElementById('useronline_template_browsingpage').value = "<strong>%USERONLINE_USERS%</strong> <?php _e('Browsing This Page.', 'wp-useronline'); ?><br /><?php _e('Users', 'wp-useronline'); ?>: <strong>%USERONLINE_MEMBER_NAMES%%USERONLINE_GUESTS_SEPERATOR%%USERONLINE_GUESTS%%USERONLINE_BOTS_SEPERATOR%%USERONLINE_BOTS%</strong>"; |
|---|
| 180 |
} |
|---|
| 181 |
/* ]]> */ |
|---|
| 182 |
</script> |
|---|
| 183 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> |
|---|
| 184 |
<div class="wrap"> |
|---|
| 185 |
<h2><?php _e('Useronline Options', 'wp-useronline'); ?></h2> |
|---|
| 186 |
<h3><?php _e('Useronline Options', 'wp-useronline'); ?></h3> |
|---|
| 187 |
<table class="form-table"> |
|---|
| 188 |
<tr> |
|---|
| 189 |
<th scope="row" valign="top"><?php _e('Time Out', 'wp-useronline'); ?></th> |
|---|
| 190 |
<td> |
|---|
| 191 |
<input type="text" name="useronline_timeout" value="<?php echo get_option('useronline_timeout'); ?>" size="4" /><br /><?php _e('How long till it will remove the user from the database (In seconds).', 'wp-useronline'); ?> |
|---|
| 192 |
</td> |
|---|
| 193 |
</tr> |
|---|
| 194 |
<tr> |
|---|
| 195 |
<th scope="row" valign="top"><?php _e('UserOnline URL', 'wp-useronline'); ?></th> |
|---|
| 196 |
<td> |
|---|
| 197 |
<input type="text" name="useronline_url" value="<?php echo get_option('useronline_url'); ?>" size="50" /><br /><?php _e('URL To UserOnline Page (leave blank if you do not want to link it to the UserOnline Page)<br />Example: http://www.yoursite.com/blogs/useronline/<br />Example: http://www.yoursite.com/blogs/?page_id=2', 'wp-useronline'); ?> |
|---|
| 198 |
</td> |
|---|
| 199 |
</tr> |
|---|
| 200 |
<tr> |
|---|
| 201 |
<th scope="row" valign="top"><?php _e('Bots Name/User Agent', 'wp-useronline'); ?></th> |
|---|
| 202 |
<td> |
|---|
| 203 |
<?php _e('Here are a list of bots and their partial browser agents.<br />On the left column will be the <strong>Bot\'s Name</strong> and on the right column will be their <strong>Partial Browser Agent</strong>.<br />Start each entry on a new line.', 'wp-useronline'); ?> |
|---|
| 204 |
<br /><br /> |
|---|
| 205 |
<textarea cols="20" rows="30" name="useronline_bots_name"><?php echo $useronline_options_bots_name; ?></textarea> |
|---|
| 206 |
<textarea cols="20" rows="30" name="useronline_bots_agent"><?php echo $useronline_options_bots_agent; ?></textarea> |
|---|
| 207 |
</td> |
|---|
| 208 |
</tr> |
|---|
| 209 |
<tr> |
|---|
| 210 |
<td width="30%"> |
|---|
| 211 |
<strong><?php _e('Naming Conventions:', 'wp-useronline'); ?></strong><br /><br /><br /> |
|---|
| 212 |
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br /> |
|---|
| 213 |
- %USERONLINE_COUNT%<br /><br /> |
|---|
| 214 |
<input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_naming();" class="button" /> |
|---|
| 215 |
</td> |
|---|
| 216 |
<td> |
|---|
| 217 |
<table class="form-table"> |
|---|
| 218 |
<thead> |
|---|
| 219 |
<tr> |
|---|
| 220 |
<th><?php _e('Singular Form', 'wp-useronline'); ?></th> |
|---|
| 221 |
<th><?php _e('Plural Form', 'wp-useronline'); ?></th> |
|---|
| 222 |
</tr> |
|---|
| 223 |
</thead> |
|---|
| 224 |
<tbody> |
|---|
| 225 |
<tr> |
|---|
| 226 |
<td><input type="text" id="useronline_naming_user" name="useronline_naming_user" value="<?php echo stripslashes($useronline_options_naming['user']); ?>" size="20" /></td> |
|---|
| 227 |
<td><input type="text" id="useronline_naming_users" name="useronline_naming_users" value="<?php echo stripslashes($useronline_options_naming['users']); ?>" size="40" /></td> |
|---|
| 228 |
</tr> |
|---|
| 229 |
<tr> |
|---|
| 230 |
<td><input type="text" id="useronline_naming_member" name="useronline_naming_member" value="<?php echo stripslashes($useronline_options_naming['member']); ?>" size="20" /></td> |
|---|
| 231 |
<td><input type="text" id="useronline_naming_members" name="useronline_naming_members" value="<?php echo stripslashes($useronline_options_naming['members']); ?>" size="40" /></td> |
|---|
| 232 |
</tr> |
|---|
| 233 |
<tr> |
|---|
| 234 |
<td><input type="text" id="useronline_naming_guest" name="useronline_naming_guest" value="<?php echo stripslashes($useronline_options_naming['guest']); ?>" size="20" /></td> |
|---|
| 235 |
<td><input type="text" id="useronline_naming_guests" name="useronline_naming_guests" value="<?php echo stripslashes($useronline_options_naming['guests']); ?>" size="40" /></td> |
|---|
| 236 |
</tr> |
|---|
| 237 |
<tr> |
|---|
| 238 |
<td><input type="text" id="useronline_naming_bot" name="useronline_naming_bot" value="<?php echo stripslashes($useronline_options_naming['bot']); ?>" size="20" /></td> |
|---|
| 239 |
<td><input type="text" id="useronline_naming_bots" name="useronline_naming_bots" value="<?php echo stripslashes($useronline_options_naming['bots']); ?>" size="40" /></td> |
|---|
| 240 |
</tr> |
|---|
| 241 |
</tbody> |
|---|
| 242 |
</table> |
|---|
| 243 |
<br /> |
|---|
| 244 |
</td> |
|---|
| 245 |
</tr> |
|---|
| 246 |
</table> |
|---|
| 247 |
|
|---|
| 248 |
<h3><?php _e('Useronline Templates', 'wp-useronline'); ?></h3> |
|---|
| 249 |
<table class="form-table"> |
|---|
| 250 |
<tr> |
|---|
| 251 |
<td width="30%"> |
|---|
| 252 |
<strong><?php _e('User(s) Online:', 'wp-useronline'); ?></strong><br /><br /><br /> |
|---|
| 253 |
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br /> |
|---|
| 254 |
- %USERONLINE_USERS%<br /> |
|---|
| 255 |
- %USERONLINE_PAGE_URL%<br /> |
|---|
| 256 |
- %USERONLINE_MOSTONLINE_COUNT%<br /> |
|---|
| 257 |
- %USERONLINE_MOSTONLINE_DATE%<br /><br /> |
|---|
| 258 |
<input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_templates('useronline');" class="button" /> |
|---|
| 259 |
</td> |
|---|
| 260 |
<td><textarea cols="80" rows="12" id="useronline_template_useronline" name="useronline_template_useronline"><?php echo htmlspecialchars(stripslashes(get_option('useronline_template_useronline'))); ?></textarea></td> |
|---|
| 261 |
</tr> |
|---|
| 262 |
<tr> |
|---|
| 263 |
<td width="30%"> |
|---|
| 264 |
<strong><?php _e('User(s) Browsing Site:', 'wp-useronline'); ?></strong><br /><br /><br /> |
|---|
| 265 |
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br /> |
|---|
| 266 |
- %USERONLINE_USERS%<br /> |
|---|
| 267 |
- %USERONLINE_MEMBERS%<br /> |
|---|
| 268 |
- %USERONLINE_MEMBER_NAMES%<br /> |
|---|
| 269 |
- %USERONLINE_GUESTS_SEPERATOR%<br /> |
|---|
| 270 |
- %USERONLINE_GUESTS%<br /> |
|---|
| 271 |
- %USERONLINE_BOTS_SEPERATOR%<br /> |
|---|
| 272 |
- %USERONLINE_BOTS%<br /><br /> |
|---|
| 273 |
<input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_browsing_site();" class="button" /> |
|---|
| 274 |
</td> |
|---|
| 275 |
<td> |
|---|
| 276 |
<table class="form-table"> |
|---|
| 277 |
<thead> |
|---|
| 278 |
<tr> |
|---|
| 279 |
<th><?php _e('Member Names Separator', 'wp-useronline'); ?></th> |
|---|
| 280 |
<th><?php _e('Guests Separator', 'wp-useronline'); ?></th> |
|---|
| 281 |
<th><?php _e('Bots Separator', 'wp-useronline'); ?></th> |
|---|
| 282 |
</tr> |
|---|
| 283 |
</thead> |
|---|
| 284 |
<tr> |
|---|
| 285 |
<td><input type="text" id="useronline_separator_browsingsite_members" name="useronline_separator_browsingsite_members" value="<?php echo stripslashes($useronline_template_browsingsite[0]); ?>" size="15" /></td> |
|---|
| 286 |
<td><input type="text" id="useronline_separator_browsingsite_guests" name="useronline_separator_browsingsite_guests" value="<?php echo stripslashes($useronline_template_browsingsite[1]); ?>" size="15" /></td> |
|---|
| 287 |
<td><input type="text" id="useronline_separator_browsingsite_bots" name="useronline_separator_browsingsite_bots" value="<?php echo stripslashes($useronline_template_browsingsite[2]); ?>" size="15" /></td> |
|---|
| 288 |
</tr> |
|---|
| 289 |
</table> |
|---|
| 290 |
<br /> |
|---|
| 291 |
<textarea cols="80" rows="12" id="useronline_template_browsingsite" name="useronline_template_browsingsite"><?php echo htmlspecialchars(stripslashes($useronline_template_browsingsite[3])); ?></textarea> |
|---|
| 292 |
</td> |
|---|
| 293 |
</tr> |
|---|
| 294 |
<tr> |
|---|
| 295 |
<td width="30%"> |
|---|
| 296 |
<strong><?php _e('User(s) Browsing Page:', 'wp-useronline'); ?></strong><br /><br /><br /> |
|---|
| 297 |
<?php _e('Allowed Variables:', 'wp-useronline'); ?><br /> |
|---|
| 298 |
- %USERONLINE_USERS%<br /> |
|---|
| 299 |
- %USERONLINE_MEMBERS%<br /> |
|---|
| 300 |
- %USERONLINE_MEMBER_NAMES%<br /> |
|---|
| 301 |
- %USERONLINE_GUESTS_SEPERATOR%<br /> |
|---|
| 302 |
- %USERONLINE_GUESTS%<br /> |
|---|
| 303 |
- %USERONLINE_BOTS_SEPERATOR%<br /> |
|---|
| 304 |
- %USERONLINE_BOTS%<br /><br /> |
|---|
| 305 |
<input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-useronline'); ?>" onclick="useronline_default_browsing_page();" class="button" /> |
|---|
| 306 |
</td> |
|---|
| 307 |
<td> |
|---|
| 308 |
<table class="form-table"> |
|---|
| 309 |
<thead> |
|---|
| 310 |
<tr> |
|---|
| 311 |
<th><?php _e('Member Names Separator', 'wp-useronline'); ?></th> |
|---|
| 312 |
<th><?php _e('Guests Separator', 'wp-useronline'); ?></th> |
|---|
| 313 |
<th><?php _e('Bots Separator', 'wp-useronline'); ?></th> |
|---|
| 314 |
</tr> |
|---|
| 315 |
</thead> |
|---|
| 316 |
<tr> |
|---|
| 317 |
<td><input type="text" id="useronline_separator_browsingpage_members" name="useronline_separator_browsingpage_members" value="<?php echo stripslashes($useronline_template_browsingpage[0]); ?>" size="15" /></td> |
|---|
| 318 |
<td><input type="text" id="useronline_separator_browsingpage_guests" name="useronline_separator_browsingpage_guests" value="<?php echo stripslashes($useronline_template_browsingpage[1]); ?>" size="15" /></td> |
|---|
| 319 |
<td><input type="text" id="useronline_separator_browsingpage_bots" name="useronline_separator_browsingpage_bots" value="<?php echo stripslashes($useronline_template_browsingpage[2]); ?>" size="15" /></td> |
|---|
| 320 |
</tr> |
|---|
| 321 |
</table> |
|---|
| 322 |
<br /> |
|---|
| 323 |
<textarea cols="80" rows="12" id="useronline_template_browsingpage" name="useronline_template_browsingpage"><?php echo htmlspecialchars(stripslashes($useronline_template_browsingpage[3])); ?></textarea> |
|---|
| 324 |
</td> |
|---|
| 325 |
</tr> |
|---|
| 326 |
</table> |
|---|
| 327 |
<p class="submit"> |
|---|
| 328 |
<input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-useronline'); ?>" /> |
|---|
| 329 |
</p> |
|---|
| 330 |
</div> |
|---|
| 331 |
</form> |
|---|
| 332 |
<p> </p> |
|---|
| 333 |
|
|---|
| 334 |
<!-- Uninstall WP-UserOnline --> |
|---|
| 335 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"> |
|---|
| 336 |
<div class="wrap"> |
|---|
| 337 |
<h2><?php _e('Uninstall WP-UserOnline', 'wp-useronline'); ?></h2> |
|---|
| 338 |
<p style="text-align: left;"> |
|---|
| 339 |
<?php _e('Deactivating WP-UserOnline plugin does not remove any data that may have been created, such as the useronline options. To completely remove this plugin, you can uninstall it here.', 'wp-useronline'); ?> |
|---|
| 340 |
</p> |
|---|
| 341 |
<p style="text-align: left; color: red"> |
|---|
| 342 |
<strong><?php _e('WARNING:', 'wp-useronline'); ?></strong><br /> |
|---|
| 343 |
<?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-useronline'); ?> |
|---|
| 344 |
</p> |
|---|
| 345 |
<p style="text-align: left; color: red"> |
|---|
| 346 |
<strong><?php _e('The following WordPress Options/Tables will be DELETED:', 'wp-useronline'); ?></strong><br /> |
|---|
| 347 |
</p> |
|---|
| 348 |
<table class="widefat"> |
|---|
| 349 |
<thead> |
|---|
| 350 |
<tr> |
|---|
| 351 |
<th><?php _e('WordPress Options', 'wp-polls'); ?></th> |
|---|
| 352 |
<th><?php _e('WordPress Tables', 'wp-polls'); ?></th> |
|---|
| 353 |
</tr> |
|---|
| 354 |
</thead> |
|---|
| 355 |
<tr> |
|---|
| 356 |
<td valign="top"> |
|---|
| 357 |
<ol> |
|---|
| 358 |
<?php |
|---|
| 359 |
foreach($useronline_settings as $settings) { |
|---|
| 360 |
echo '<li>'.$settings.'</li>'."\n"; |
|---|
| 361 |
} |
|---|
| 362 |
?> |
|---|
| 363 |
</ol> |
|---|
| 364 |
</td> |
|---|
| 365 |
<td valign="top" class="alternate"> |
|---|
| 366 |
<ol> |
|---|
| 367 |
<?php |
|---|
| 368 |
foreach($useronline_tables as $tables) { |
|---|
| 369 |
echo '<li>'.$tables.'</li>'."\n"; |
|---|
| 370 |
} |
|---|
| 371 |
?> |
|---|
| 372 |
</ol> |
|---|
| 373 |
</td> |
|---|
| 374 |
</tr> |
|---|
| 375 |
</table> |
|---|
| 376 |
<p> </p> |
|---|
| 377 |
<p style="text-align: center;"> |
|---|
| 378 |
<input type="checkbox" name="uninstall_useronline_yes" value="yes" /> <?php _e('Yes', 'wp-useronline'); ?><br /><br /> |
|---|
| 379 |
<input type="submit" name="do" value="<?php _e('UNINSTALL WP-UserOnline', 'wp-useronline'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-UserOnline From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-useronline'); ?>')" /> |
|---|
| 380 |
</p> |
|---|
| 381 |
</div> |
|---|
| 382 |
</form> |
|---|
| 383 |
<?php |
|---|
| 384 |
} |
|---|
| 385 |
?> |
|---|