Example #1
0
						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':
        // Update status of email address
        // Check that this action request is not a CSRF hacked request:
        $Session->assert_received_crumb('emadrstatus');
        // Check permission:
        $current_User->check_perm('emails', 'edit', true);
        $new_status = param('new_status', 'string');
        $emadr_ID = param('emadr_ID', 'integer', true);
        load_funcs('tools/model/_email.funcs.php');
        $DB->query('UPDATE T_email__address
						SET emadr_status = ' . (empty($new_status) ? 'NULL' : $DB->quote($new_status)) . '
						WHERE emadr_ID =' . $DB->quote($emadr_ID));
        echo '<a href="#" rel="' . $new_status . '" color="' . emadr_get_status_color($new_status) . '">' . emadr_get_status_title($new_status) . '</a>';
        break;
    case 'user_level_edit':
        // Update level of an user from list screen by clicking on the level column
        // Check that this action request is not a CSRF hacked request:
        $Session->assert_received_crumb('userlevel');
        $user_level = param('new_user_level', 'integer');
        $user_ID = param('user_ID', 'integer');
        // Check permission:
        $current_User->can_moderate_user($user_ID, true);
        $UserCache =& get_UserCache();
        if ($User =& $UserCache->get_by_ID($user_ID, false)) {
            $User->set('level', $user_level);
            $User->dbupdate();
            echo '<a href="#" rel="' . $user_level . '">' . $user_level . '</a>';
        }
Example #2
0
/**
 * Get array of status icons for email address
 *
 * @return array Status icons
 */
function emadr_get_status_icons()
{
    return array('unknown' => get_icon('bullet_white', 'imgtag', array('title' => emadr_get_status_title('unknown'))), 'redemption' => get_icon('bullet_magenta', 'imgtag', array('title' => emadr_get_status_title('redemption'))), 'warning' => get_icon('bullet_yellow', 'imgtag', array('title' => emadr_get_status_title('warning'))), 'suspicious1' => get_icon('bullet_orange', 'imgtag', array('title' => emadr_get_status_title('suspicious1'))), 'suspicious2' => get_icon('bullet_orange', 'imgtag', array('title' => emadr_get_status_title('suspicious2'))), 'suspicious3' => get_icon('bullet_orange', 'imgtag', array('title' => emadr_get_status_title('suspicious3'))), 'prmerror' => get_icon('bullet_red', 'imgtag', array('title' => emadr_get_status_title('prmerror'))), 'spammer' => get_icon('bullet_brown', 'imgtag', array('title' => emadr_get_status_title('spammer'))));
}