Example #1
0
						WHERE dom_name =' . $DB->quote($dom_name));
        echo '<a href="#" rel="' . $dom_type . '">' . stats_dom_type_title($dom_type) . '</a>';
        break;
    case 'dom_status_edit':
        // Update status of a reffering domain from list screen by clicking on the type column
        // Check that this action request is not a CSRF hacked request:
        $Session->assert_received_crumb('domstatus');
        // Check permission:
        $current_User->check_perm('stats', 'edit', true);
        load_funcs('sessions/model/_hitlog.funcs.php');
        $dom_status = param('new_dom_status', 'string');
        $dom_name = param('dom_name', 'string');
        $DB->query('UPDATE T_basedomains
						SET dom_status = ' . $DB->quote($dom_status) . '
						WHERE dom_name =' . $DB->quote($dom_name));
        echo '<a href="#" rel="' . $dom_status . '" color="' . stats_dom_status_color($dom_status) . '">' . stats_dom_status_title($dom_status) . '</a>';
        break;
    case 'iprange_status_edit':
        // Update status of IP range from list screen by clicking on the status column
        // Check that this action request is not a CSRF hacked request:
        $Session->assert_received_crumb('iprange');
        // Check permission:
        $current_User->check_perm('spamblacklist', 'edit', true);
        $new_status = param('new_status', 'string');
        $iprange_ID = param('iprange_ID', 'integer', true);
        $DB->query('UPDATE T_antispam__iprange
						SET aipr_status = ' . (empty($new_status) ? 'NULL' : $DB->quote($new_status)) . '
						WHERE aipr_ID =' . $DB->quote($iprange_ID));
        echo '<a href="#" rel="' . $new_status . '" color="' . aipr_status_color($new_status) . '">' . aipr_status_title($new_status) . '</a>';
        break;
    case 'emadr_status_edit':
Example #2
0
        // User can edit Domain
        global $admin_url;
        $initial_referer_domain = $domain_name = url_part($initial_referer, 'host');
        $domain_status_action = '';
        if (!$Domain || $initial_referer_domain != $Domain->get('name')) {
            // Link to create a new domain
            $domain_status_action .= action_icon(sprintf(T_('Add domain %s'), $initial_referer_domain), 'new', $admin_url . '?ctrl=stats&amp;tab=domains&amp;action=domain_new&amp;dom_name=' . $initial_referer_domain . '&amp;dom_status=blocked');
        }
        if ($Domain) {
            // Link to edit existing domain
            $domain_status_action .= action_icon(sprintf(T_('Edit domain %s'), $Domain->get('name')), 'edit', $admin_url . '?ctrl=stats&amp;tab=domains&amp;action=domain_edit&amp;dom_ID=' . $Domain->ID);
        }
        $Form->select_input_array('edited_initial_referer_status', $domain_status, stats_dom_status_titles(), T_('Initial referer status'), '', array('force_keys_as_values' => true, 'background_color' => stats_dom_status_colors(), 'field_suffix' => $domain_status_icon . $domain_status_action));
    } else {
        // Only view status of Domain
        $Form->info(T_('Initial referer status'), $domain_status_icon . stats_dom_status_title($domain_status));
    }
}
//$registration_ts = strtotime( $edited_User->get( 'datecreated' ) );
if ($edited_User->check_status('is_closed')) {
    $account_close_ts = $UserSettings->get('account_close_ts', $edited_User->ID);
    $account_close_date = empty($account_close_ts) ? T_('Unknown date') : format_to_output(date2mysql($account_close_ts));
    //$days_on_site = empty( $account_close_ts ) ? T_( 'Unknown' ) : ( round( ( $account_close_ts - $registration_ts ) / 86400/* 60*60*24 */) );
} else {
    $account_close_date = 'n/a';
    //$days_on_site = ( round( ( $servertimenow - $registration_ts ) / 86400/* 60*60*24 */) );
}
$Form->info_field(T_('Account closed on'), $account_close_date);
$textarea_params = array('cols' => 40, 'maxlength' => 255, 'style' => 'resize: none');
if ($edited_User->ID == 1) {
    $textarea_params['disabled'] = "disabled";