Beispiel #1
0
function delete_user_wb_entries($user_id)
{
    global $dbh;
    $select = "SELECT sid " . "FROM wblist " . "WHERE rid = ?";
    $sth = $dbh->query($select, array($user_id));
    while ($row = $sth->fetchRow()) {
        delete_wb_entry($user_id, $row["sid"]);
    }
    $sth->free();
}
Beispiel #2
0
function delete_user_wb_entries($user_id)
{
    global $dbh;
    $sth = $dbh->prepare("SELECT sid " . "FROM wblist " . "WHERE rid = ?");
    $res = $sth->execute(array($user_id));
    if (PEAR::isError($sth)) {
        die($sth->getMessage());
    }
    while ($row = $res->fetchRow()) {
        delete_wb_entry($user_id, $row["sid"]);
    }
    $sth->free();
}
Beispiel #3
0
        case 'addallow':
            $result = add_address_to_wb_list($euid, $_REQUEST['newaddr'], 'W');
            break;
        case 'addblock':
            $result = add_address_to_wb_list($euid, $_REQUEST['newaddr'], 'B');
            break;
        case 'block':
            $result = set_wb_status($euid, $_REQUEST['id'], 'B');
            $actiontext = $lang['text_allow_address'];
            break;
        case 'allow':
            $result = set_wb_status($euid, $_REQUEST['id'], 'W');
            $actiontext = $lang['text_block_address'];
            break;
        case 'remove':
            $result = delete_wb_entry($euid, $_REQUEST['id']);
            $actiontext = $lang['text_remove_rule'];
            break;
    }
    if ($_REQUEST['ajax'] == 'true') {
        ?>
          $('#viewmessage').html('<div class="messagebox"><?php 
        echo htmlspecialchars($lang[$result]);
        ?>
</div>');
          $('#viewmessage div').effect("highlight", {
                     color: "#FFD324"
                 },
                 2000);
          <?php 
        if ($_REQUEST['id']) {