<?php header('Content-type: text/html; charset=utf-8'); require_once dirname(__FILE__) . '/init.php'; require_once FS_ABS_PATH . '/php/html-utils.php'; require_once FS_ABS_PATH . '/php/db-sql.php'; $user = fs_get_user($_GET['user_id']); if ($user === false) { die(fs_db_error()); } if ($user === null) { die(fs_r("No such user")); } $arr = array(); $arr[] = fs_mkPair(1, fs_r('Administrator')); $arr[] = fs_mkPair(2, fs_r('User')); ?> <div class='<?php echo fs_lang_dir(); ?> '> <h3><?php fs_e('Edit user'); ?> </h3> <table> <tr> <td><label for='new_username'><?php fs_e('User name'); ?> </label></td>
<h3><?php fs_e('Permissions'); ?> </h3> <?php fs_e("Select the minimum user role that can access FireStats (Only administrators can manage FireStats)"); ?> <br/> <?php $selected = fs_get_local_option('firestats_min_view_security_level', 3); $arr = array(); $arr[] = fs_mkPair(5, fs_r('Administrator')); $arr[] = fs_mkPair(4, fs_r('Editor')); $arr[] = fs_mkPair(3, fs_r('Author')); $arr[] = fs_mkPair(2, fs_r('Contributor')); $arr[] = fs_mkPair(1, fs_r('Subscriber')); $onchange = "saveLocalOption('wordpress_view_security_level','firestats_min_view_security_level','string')"; echo fs_create_dropbox($arr, $selected, 'wordpress_view_security_level', $onchange); ?> </td> </tr> <tr> <td class="config_cell" colspan="2"> <h3><?php fs_e('Advanced'); ?> </h3> <?php fs_e('WordPress site ID, every hit From this blog is recorded with this as the source Site ID'); ?> <br />
function fs_get_archive_dropbox() { $selected = fs_get_archive_older_than(); $arr = array(); $arr[] = fs_mkPair(30, fs_r('One month')); $arr[] = fs_mkPair(60, fs_r('Two months')); $arr[] = fs_mkPair(90, fs_r('Three months')); $arr[] = fs_mkPair(180, fs_r('Half a year')); $arr[] = fs_mkPair(365, fs_r('One year')); $arr[] = fs_mkPair(365 * 2, fs_r('Two years')); $onchange = "saveSystemOption('archive_older_than','archive_older_than','positive_num','fs_archive_status')"; return fs_create_dropbox($arr, $selected, 'archive_older_than', $onchange); }
function fs_get_time_range_dropbox($key, $onchange) { $arr = array(); $arr[] = fs_mkPair(1, fs_r('the last 24 hours')); $arr[] = fs_mkPair(7, fs_r('the last week')); $arr[] = fs_mkPair(30, fs_r('the last month')); $arr[] = fs_mkPair(90, fs_r('the three months')); $arr[] = fs_mkPair(180, fs_r('the last six months')); $arr[] = fs_mkPair(365, fs_r('the last year')); $arr[] = fs_mkPair('ever', fs_r('all time')); $arr[] = fs_mkPair('time_range', fs_r('time range')); $selected = fs_get_option($key, 90); return fs_create_dropbox($arr, $selected, $key, $onchange); }