#!/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 ''; use Community qw/comm_init comm_config comm_fatal $DB $IN $CFG/; use GT::CGI; use GT::Date; use GT::SQL::Condition; use CGI::Carp qw(fatalsToBrowser); use Carp; require Community::Web::User; local $SIG{__DIE__} = \&fatal; Community::init(); 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('comm_users')->count( { comm_username => $username } ) > 0) { print qq|Username Unavailable|; exit; } print qq|Username ($username) Available|; }