#!/usr/bin/perl # ================================================================== # Gossamer Community # # Website : http://gossamer-threads.com/ # Support : http://gossamer-threads.com/scripts/support/ # CVS Info : # NAme : birthdays.cgi # # Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. # Redistribution in part or in whole strictly prohibited. Please # see LICENSE file for full details. # ================================================================== use strict; use lib '/path/to/admin'; use Links qw/$DB $IN $USER $CFG/; use Links::SiteHTML; use GT::Mail; use CGI::Carp qw(fatalsToBrowser); use Links::Plugins; use Links; use vars qw/$REC_CFG/; Links::init('/path/to/admin'); Links::init_user(); print $IN->header(); username_ajax_check(); sub username_ajax_check { my $username = $IN->param('username'); print $IN->header; if (!$username) { # print qq|Username ($username) Unavailable|; print qq|Please select a username!|; exit; } if ($DB->table('Users')->count( { Username => $username } ) > 0) { print qq|Username Unavailable|; exit; } print qq|Username ($username) Available|; }