~;
exit;
} #subsearch_it
#######################################################
# Add An Entry
#######################################################
sub add_me {
# $getpic = yes no - if yes then transfer to upload script
# $babycode = id number - go with upload script.
# Add the baby,and then show a confirm screen with ADD ANOTHER
open(DT,"$cgipath/$nbdb");
while (
) {
if($_ =~ /^$babycode/) { $notfound=0; &error('Baby Code already exists. Please use the BACK button and re-enter an new Baby Code.','EX08'); }
else { $notfound=1; }
} #while
close(DT);
if($notfound==1) {
open(NDT,">>$cgipath/$nbdb");
print NDT "$babycode|$momfirst|$momlast|$babywt|$babylength|$babyhair|$babyrace|";
close(NDT);
$added=1;
} #if$notfound
if($added==1) { &add_confirm; }
exit;
} #subadd_me
#######################################################
# Reset the Database
#######################################################
sub reset_me {
print_header();
if($rst eq "str") {
unless($ga==1) { &error('Administrator Use Only','RS05'); }
open(NWDB, ">$cgipath/$nbdb");
print NWDB "";
close(NWDB);
opendir(NPX,"$picpath");
@oldpix = readdir(NPX);
close(NPX);
foreach $nofil (@oldpix) { unlink("$picpath/$nofil" ); }
&reset_complete;
} #if$rst
else {
&resetpage;
} #else
exit;
} #subreset_me
#######################################################
# Delete an entry
#######################################################
sub SetVars {
open(VARS,">$varfile");
print VARS qq~
#################################################
# File: ceinb_vars.pl
# By: Tim Coston
# This is the User Variables File used
# to install CEINewBorn!
#################################################
\$mothersname=$mothersname;
\$babyweight=$babyweight;
\$babywtunit="$babywtunit";
\$babysize=$babysize;
\$babylenunit="$babylenunit";
\$babyhaircolor=$babyhaircolor;
\$babytype=$babytype;
return 1;
~;
close(VARS);
&setvars_good;
exit;
} #subSetVars
#######################################################
# Set the Styles of the CEINewBorn
#######################################################
sub SetStyles {
print_header();
print qq~
Variables - $scriptname Version $ver - C.E.I.
This function is coming in Version 2.0 Please contact www.Coston.net for more info.