Example #1
0
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
    if ($extnumdel) {
        $ret = gs_user_external_number_del($edit_user, $extnumdel);
        if (isGsError($ret)) {
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
    if ($bp_del_h > 0) {
        $query = 'DELETE FROM `boi_perms` WHERE `user_id`=' . $uid . ' AND `host_id`=' . $bp_del_h;
        $ok = $DB->execute($query);
    }
}
if ($action === 'save' && $edit_user && $uid > 0) {
    $ret = gs_user_change($edit_user, $user_pin, $user_fname, $user_lname, @$_REQUEST['ulang'], $user_host, false, $user_email);
    if (isGsError($ret)) {
        echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
    }
    if (!in_array($canreinvite, array('yes', 'no'), true)) {
        $canreinvite = 'no';
    }
    if (!isGsError($ret)) {
        $boi_api = gs_host_get_api((int) $user_host);
        if ($boi_api == '') {
            $DB->execute('UPDATE `ast_sipfriends` SET `secret`=\'' . $DB->escape(preg_replace('/[^0-9a-zA-Z]/', '', @$_REQUEST['usecret'])) . '\', `canreinvite` = \'' . $canreinvite . '\' WHERE `_user_id`=' . $uid);
        }
    }
    if ($cbregexp) {
        $ret = gs_callblocking_set($edit_user, $cbregexp, $cbpin);
        if (isGsError($ret)) {
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
    if ($extnumdel) {
        $ret = gs_user_external_number_del($edit_user, $extnumdel);
        if (isGsError($ret)) {
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
    if ($bp_del_h > 0) {
        $query = 'DELETE FROM `boi_perms` WHERE `user_id`=' . $uid . ' AND `host_id`=' . $bp_del_h;
        $ok = $DB->execute($query);
    }
}
if ($action === 'save' && $edit_user && $uid > 0) {
    $ret = gs_user_change($edit_user, $user_pin, $user_fname, $user_lname, $user_host, false, $user_email);
    if (isGsError($ret)) {
        echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
    }
    if (!isGsError($ret)) {
        $boi_api = gs_host_get_api((int) $user_host);
        if ($boi_api == '') {
            $DB->execute('UPDATE `ast_sipfriends` SET `secret`=\'' . $DB->escape(preg_replace('/[^0-9a-zA-Z]/', '', @$_REQUEST['usecret'])) . '\' WHERE `_user_id`=' . $uid);
        }
    }
    if ($cbregexp) {
        $ret = gs_callblocking_set($edit_user, $cbregexp, $cbpin);
        if (isGsError($ret)) {
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
Example #3
0
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
    if ($calleriddel_int) {
        $ret = gs_user_callerid_del($edit_user, $calleriddel_int, 'internal');
        if (isGsError($ret)) {
            echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
        }
    }
    if ($bp_del_h > 0) {
        $query = 'DELETE FROM `boi_perms` WHERE `user_id`=' . $uid . ' AND `host_id`=' . $bp_del_h;
        $ok = $DB->execute($query);
    }
}
if ($action === 'save' && $edit_user && $uid > 0) {
    $ret = gs_user_change($edit_user, $user_pin, $user_fname, $user_lname, @$_REQUEST['ulang'], $user_host, false, $user_email, true, $pb_hide, $drop_call, $drop_number, $mailbox);
    /*
    $DB->execute( 'UPDATE `ast_sipfriends` SET `language`=\''. $DB->escape(preg_replace('/[^0-9a-zA-Z]/', '', @$_REQUEST['ulang'])) .'\' WHERE `_user_id`='. $uid );
    if ( GS_BUTTONDAEMON_USE == true ) {
    	gs_user_language_changed_ui ( $edit_user , preg_replace('/[^0-9a-zA-Z]/', '', @$_REQUEST['ulang']) ) ;
    }
    */
    if (isGsError($ret)) {
        echo '<div class="errorbox">', $ret->getMsg(), '</div>', "\n";
    }
    if (!isGsError($ret)) {
        $boi_api = gs_host_get_api((int) $user_host);
        if ($boi_api == '') {
            $DB->execute('UPDATE `ast_sipfriends` SET `secret`=\'' . $DB->escape(preg_replace('/[^0-9a-zA-Z]/', '', @$_REQUEST['usecret'])) . '\' WHERE `_user_id`=' . $uid);
        }
    }