    public function backup($type='json')
    {
        global $DB;
        global $website;

        $out = array();

        $DB->query('SELECT * FROM nv_webusers WHERE website = '.protect($website->id), 'object');

        if($type='json')
            $out['nv_webusers'] = json_encode($DB->result());

        $DB->query('SELECT nwp.* FROM nv_webuser_profiles nwp, nv_webusers nw
                    WHERE nwp.webuser = nw.id
                      AND nw.website = '.protect($website->id),
            'object');

        if($type='json')
            $out['nv_webuser_profiles'] = json_encode($DB->result());

        if($type='json')
            $out = json_encode($out);

        return $out;
    }
