#!/usr/bin/perl # Welcome to the www.dtp-aus.com VizBook scripts. VERSION 2.2 Dec 2000 # # IMPORTANT INFORMATION THAT MUST BE READ IF YOU WISH TO USE THESE SCRIPTS # ############################################################################## # Scripts VIZBOOK.CGI, VIZADMIN.CGI, TESTBIN.CGI, MAKEDIR.CGI, PICLOAD.CGI, # # and VIZADMDEL.CGI were written (c) by Ron F Woolley, Melbourne Australia. # # Copyright 1999,2000. These scripts CANNOT BE ALTERED for personal site use # # OR commercial site use except as instructed here in, NOR can whole or # # portions of code be copied, AND, # # all of the header notices in the scripts MUST REMAIN intact as is, AND, # # using the scripts without first reading the README file(s), is prohibited. # # IF YOU DO NOT AGREE, destroy all files NOW! # # This code MUST NOT be sold, hired, or given/made available to others. # # Changing output English words to another language is permitted except for # # program name and copyright notices! # # Australian copyright is recognised/supported in over 130 countries... # # per the Berne Convention and other treaties ( including USA! ) # # # # The scripts and associated files remain the property of Ron F Woolley. # # NO PROFIT what so ever is to be gained from users of these scripts for # # the use of these scripts, except that a reasonable minimal charge for # # installation may be allowed if installing, as a site developer, for a # # user on the users site that is not on the developers site. This program # # must NOT be used for multiple VizBook users on one site OR offered as a # # remote service. # # # # Ron Woolley, the author, MUST be notified via the addresses/URLs below # # if any gain is to be made from the installation of these scripts. # # # # You MUST RETAIN the small identifying text line at the base of each page # # IF YOU DISAGREE, you must immediately destroy all files. # ############################################################################## # NOTE: If you use these files, you do so entirely at your own risk, and # # take on full responsibility for the consequences of using the described # # files. You must first agree that Ron Woolley / HostingNet, the ONLY # # permitted suppliers of this or accompanying files are exempt from any # # responsibility for all or any resulting problems, losses or costs caused # # by your using these or any associated files. # # IF YOU DISAGREE, you must immediately destroy all files. # ############################################################################## # These program scripts are free to use, but if you use them, a donation of # # of A$25.00 would be appreciated and help in continuing support for VizBook # # and the creation of other scripts for users of the internet. # # Secure On-Line payments can be made for support donations or installations # ############################################################################## # Support Information is available at: # # http://www.dtp-aus.com/cgiscript/scrpthlp.htm # # Files from: # # http://www.dtp-aus.com/cgiscript/vizbook.shtml # # # # THESE FILES can only be obtained via the above web addresses, and MUST # # NOT BE PASSED ON TO OTHERS in any form by any means what so ever. # # This does not contradict any other statements above. # ############################################################################## # TO KEEP IT FREE, WE NEED your support on link and resource listing sites! # #--- Alter these two paths only (TWICE), if needed! -------------------------------------# if (-s "sets/gmtset.pl") {require "sets/gmtset.pl";} else {print "Content-type: text/html\n\n"; print "Missing/Bad Path to GMTime file\n"; exit;} if (-s "sets/vizbkset.pl") {require "sets/vizbkset.pl";} else {print "Content-type: text/html\n\n"; print "Missing/Bad Path to Config file\n"; exit;} #--- Do Not make any changes below this line; country-language texts excepted. ----------# sub readem { local $insFile = shift; local $back = ""; if (-s "$insFile") { if (open(FL, "<$insFile")) { while () {$back .= $_;} close(FL); } else {&showErr('Fatal File Read Error');} } $back =~ s/()//sg; $back =~ s/\$siteis/$siteis/sg; $back =~ s/\$webmstr/$webmstr/sg; if ($back =~ /(< *meta([^>])*Author([^>])*>)/i) {$back =~ s/(< *meta([^>])*Author([^>])*>)//i;} $back =~ s/\$return_url/$return_url/sg; $back =~ s/\$htm_url/$htm_url/sg; return $back; } sub date_time { local($s1) = shift; if (!$s1) {$datein = time + $gmtPlusMinus;} else { my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($s1); if ($year < 39) { $year = "20$year" } elsif ($year > 99 && $year < 2000) { $year = 2000 + ( $year - 100 ) } elsif ($year > 38) { $year = "19$year" } local(@mnths) = ('January','February','March','April','May','June','July','August','September','October','November','December'); local(@days) = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); if ($hrs12) {local($apm = "am"); if ($hour > 11) {$apm = "pm";} if ($hour > 12) {$hour = $hour - 12;}} if ($shwSecs > 0) {$shwScs = sprintf(":%02d",$sec);} else {$shwScs = "";} $datein = sprintf("$days[$wday] $mnths[$mon] $mday, %04d - %02d:%02d$shwScs$apm",$year,$hour,$min); } } sub read_rcrds { open(RF,"<$BinSub_pth$records") || &showErr('Records-File Read Access'); eval "flock(RF,2)"; @vizrcrds = ; eval "flock(RF,8)"; close(RF); } sub read_mods { if ( -s "$modfiles/onhold.db") { open(MF,"<$modfiles/onhold.db") || &showErr('OnHold-File Read Access'); eval "flock(MF,2)"; @holdrcrds = ; eval "flock(MF,8)"; close(RF); } } sub do_type { local $onL = shift; print "Content-type: text/html\n\n\n"; print &readem("$BinSub_pth$meta_tags"); print qq~\n~; } sub check_method { if ( $ENV{'REQUEST_METHOD'} eq 'GET' ) { $query_string = $ENV{'QUERY_STRING'}; } elsif ( $ENV{'REQUEST_METHOD'} eq 'POST' ) { read(STDIN,$query_string,$ENV{'CONTENT_LENGTH'}); } else { &showErr('Request Method'); } } sub check_ref { $crf = 0; if ($ENV{'HTTP_REFERER'}) { foreach $referer (@referers) { if ($ENV{'HTTP_REFERER'} =~ m|\Ahttps?://([^/]*)$referer|i) { $crf = 1; last; } } } if ($crf eq 0) {&showErr('Bad Referrer, remote access denied!
Use only links and forms ON this site.');} } sub Mrefs { open(NF,"<$BinSub_pth$numbfile") || &showErr('ID-File Read Failure'); eval" flock(NF,2)"; @idn = ; eval" flock(NF,8)"; close(NF); foreach $tmp (@idn) { chomp($tmp); ($arry = $tmp) =~ s/:.*//; @$arry = split (/:/,$tmp); } } sub make_page { &read_rcrds; &Mrefs; if ($FORM{'nxtfrm'}) {$pics_dir = $admn_picsdir;} if ($FORM{'rstfrm'}) {$strt_num = @vizrcrds;} $per_page = 30 if $per_page <= 0; $TTLrecs = $ttl_recs = @vizrcrds; if ($add_blank) {$blnk = '" target="_blank"';} $cnts = $per_page; if ($FORM{'nxtfrm'} && $FORM{'strt_is'}) {$strt_num = $FORM{'strt_is'};} elsif ($FORM{'addfrm'}) {$strt_num = $ttl_recs;} if ($strt_num < $per_page) {$cnts = $strt_num;} $views .= "$cnts of $ttl_recs "; $s2 = int($ttl_recs / $per_page); $s2 += 1 if ($ttl_recs / $per_page) > $s2; $rFrsh = $s2; if ($FORM{'strt_is'}) {$views .= ": view page $s2";} elsif ($ttl_recs > $per_page) {$views .= ": view page $s2";} $s2--; for($s1 = $ttl_recs - $per_page; $s1 > 0; $s1 = $s1 - $per_page) { if ($s1 ne $FORM{'strt_is'}) {$views .= " $s2";} else {$views .= " $s2"; $rFrsh = $s2;} $s2--; } $do_midban = int($cnts / 2); $ModRefresh = "if your new entry does not appear, please refresh the page"; $ModRefresh = "all submissions to this list are moderated" if $isMod; $page .= qq~\n~; $page .= &readem("$BinSub_pth$meta_tags"); $page .= qq~\n"; $page .= qq~\n \n~ if $allowSRCH; $page .= " "; $page .= $views; $page .= "
\n"; $page .= "\n"; &prntpages; $page .= "
\n"; $page .= " \n"; $page .= " "; $page .= "

$views
$closecenter\n"; } else {$page .= "

This page is new, and ready for your input!

$closecenter";} if ($botbanna) {$page .= &readem("$BinSub_pth$banna3");} $page .= &readem("$BinSub_pth$footer"); $page .= qq~$LcenteredVizBook v2.2 copyright$closecenter\n~; # All name/copyright notices must remain as is and visible... These scripts CAN NOT BE ALTERED except for output-text language translation. $page .= "\n"; if (!$FORM{'nxtfrm'}) { open(HF,">$htm_path") || &showErr('HTML Page Read Access'); eval "flock(HF,2)"; print HF $page; eval "flock(HF,8)"; close(HF); print "location: $htm_url\n\n"; } else {print "Content-type: text/html\n\n"; print $page;} } sub prntpages { if (!$noLabel) {$miscbox_txt =~ s/ /\ /g; $drpdwn_txt =~ s/ /\ /g; $OT =~ s/ /\ /g; $N =~ s/ /\ /g; $C =~ s/ /\ /g; $E =~ s/ /\ /g; $IC =~ s/ /\ /g; $CM =~ s/ /\ /g; $U =~ s/ /\ /g; $CY =~ s/ /\ /g; $ST =~ s/ /\ /g; $CN =~ s/ /\ /g; $PM =~ s/ /\ /g; $PC =~ s/ /\ /g; $lCl = "10%"; $rCl = "90%"; $cCS = "2";} else {$lCl = "0%"; $rCl = "100%"; $cCS = "1";} $dNums = substr("00000000",1,length($TTLrecs)); if (@Lnumbs) {$TTLrecs = ($Lnumbs[@Lnumbs-1]+1)} else {$TTLrecs = $strt_num;} for($ss = $strt_num - 1; $cnts >= 1; $ss--) { $dNum = (substr($dNums,1,length($dNums) - length($TTLrecs)).($TTLrecs)); ($i1,$i2,$i3,$i4,$i5,$i6,$i7,$i8,$i9,$i10,$i11,$i12,$i13,$i14,$i17,$i18) = split(/\|/,$vizrcrds[$ss]); (@Lnumbs) ? ($TTLrecs = ($Lnumbs[$ss-1]+1)) : $TTLrecs--; if ($i3 || ($list_email && $i4 && $$i1[2]) || ($shw_icq && $i5)) { $page .= ""; if (!$noLabel) { $page .= " "; if ($i3) {$page .= "$N: \n";} else {$page .= " 
\n";} } $page .= ""; $href = $i3; if ($shw_url && $i7 && $i3) {$href = "$i3";} elsif ($shw_url && $i7 && !$i3) {$href = "$U";} $page .= " $href  "; if ($list_email && $i4 && $$i1[2]) { $popm = qq~ \n~; $page .= qq~  $E: $popm  ~;} if ($shw_icq && $i5) { if ($icqImg) {$icqIm = qq~~;} else {$icqIm = qq~$i5~;} $page .= " $IC#: $icqIm";} $page .= "\n";} if ($shw_cmpny && $i6) {$page .= ""; if (!$noLabel) { $page .= ""; $page .= "$CM: \n";} $page .= ""; $page .= " $i6\n";} if ($shw_city && $i11) { $page .= ""; if (!$noLabel) { $page .= ""; $page .= "$CY: \n";} $page .= ""; $page .= " $i11, $i12 $i13\n";} if ($list_miscbox && $shw_miscbox && $i8) {$page .= ""; if (!$noLabel) { $page .= " "; $page .= "$miscbox_txt: \n";} $page .= ""; $page .= " $i8\n";} if ($list_drpdwn && $shw_drpdwn && ($i9 || $i10)) {$page .= ""; if (!$noLabel) { $page .= ""; $page .= "$drpdwn_txt: \n";} $page .= ""; if ($i10) {$page .= " $i10 \n";} else {$page .= " $i9
\n";}} if ($i17 =~ /^[0-9]+$/) {&date_time($i17);} else {$datein = $i17;} if ($allow_pics && $i14 && $i2 eq 1) {$page .= ""; if (!$noLabel) { $page .= ""; $page .= "\n";}} else {$page .= ""; if (!$noLabel) { $page .= ""; $page .= "$C:\n";}} $iS = " Page ".($iSS - (int(($rEcS - ($dNum )) / $per_page)))."" if $rEcS; $page .= "\n"; $page .= qq~~; $page .= qq~~; $page .= qq~~; $page .= qq~
$dNumadmin delete~; $page .= qq~admin edit  $datein  $iS
~; $page .= "$i18\n"; if ($cnts > 1) {$page .= ""; if (!$noLabel) {$page .= "  ";} $page .= "";} else {$page .= " >
";}} $cnts--; if (!$FORM{'popsch'} && $do_midban == $cnts && $midbanna && $do_midban > 1 ) { $page .= "\n"; $page .= &readem("$BinSub_pth$banna2"); $page .= " \n";} } return $page; } sub resubmit_add { $adderror_is = shift ; &do_type(); if (!$FORM{'mailOK'}) {$mltmp = "";} $ERRtbl = qq~
$adderror_isplease check all entries
~ if $adderror_is; $FORM{'msg'} =~ s/
/\n/ig; $FORM{'msg'} =~ s/

/\n\n/ig; &add_entry; } sub read_rjct_file { if (-e,"<$BinSub_pth$rjctfile") { open(RF,"<$BinSub_pth$rjctfile") || &showErr('Reject File Read Access'); eval "flock(RF,2)"; @rjcts = ; eval "flock(RF,8)"; close(RF); } } sub getADR { local ($tmp,$OK,$cnt); open(NF,"<$BinSub_pth$numbfile") || &showErr('ID-File Read Failure'); eval" flock(NF,2)"; @idn = ; eval" flock(NF,8)"; close(NF); foreach $tmp (@idn) { if ($tmp =~ /^$FORM{'mid'}:/ && $tmp =~ /^\d{5,6}:N\d{5,6}:1:/) { $OK = 1; last;} } if ($OK) { &read_rcrds; $tmp=""; for ($cnt=0;$cnt<@vizrcrds;$cnt++) { @tmp = split(/\|/,$vizrcrds[$cnt]); if ($tmp[0] eq $FORM{'mid'} && $tmp[3] =~ /\@/) {$OK=$tmp[3]; $OKnme=$tmp[2]; last;} } } else {$myerr = " Address not found or display not allowed! ";} if($OK =~ /\@/ && !$myerr) { $OKo = "The requested address is
$OK
$N: $OKnme";} elsif ($myerr) {$OKo = $myerr;} else {$OKo = "Address not found or display not allowed!";} if ($FORM{'popm'} eq "1") { $rtrn = qq~\n ~;} else { if ($FORM{'nxtfrm'} && $FORM{'strt_is'}) {$rtrn ="return link to $listis";} else {$rtrn ="return link to $listis";} } print "Content-type: text/html\n\n"; print qq~VizBook - Address View

 
$OKo
 $rtrn 
~; exit; } sub lstREQs { local ($tmp,$islst,$chk); foreach $tmp (@OBs) { $chk = ""; if ($REQuire{$tmp} && $OBS{$tmp}) { if ($FORM{'srchIn'} eq $tmp) {$chk = "selected";} $islst .= qq~~;} } return $islst; } sub srchForm { local $fRm = shift; if ($FORM{'srchAs'} eq "all") {$As1 = "checked";} elsif ($FORM{'srchAs'} eq "any") {$As2 = "checked";} elsif ($FORM{'srchAs'} eq "str") {$As3 = "checked";} else {$As1 = "checked";} if ($FORM{'vue'} eq "10") {$Vw1 = "selected";} elsif ($FORM{'vue'} eq "15") {$Vw2 = "selected";} elsif ($FORM{'vue'} eq "20") {$Vw3 = "selected";} elsif ($FORM{'vue'} eq "30") {$Vw4 = "selected";} elsif ($FORM{'vue'} eq "50") {$Vw5 = "selected";} else {$Vw2 = "checked";} $As4 = "checked" if $FORM{'whole'}; if ($FORM{'popsch'} =~ /^(1|3)$/) { $rtrn = qq~\n ~;} else { if ($FORM{'nxtfrm'} && $FORM{'strt_is'}) {$rtrn ="return link to $listis";} else {$rtrn ="return link to $listis";} } $toP .= &readem("$BinSub_pth$srchbanna"); $mets .= &readem("$BinSub_pth$meta_tags"); return qq~$mets
$toP
 Word Search $listis
use ONLY words - NO quotes/and/or
 Find   in    
All Any String whole word view 
 $rtrn 
~; } sub getSCH { $schOpt = &lstREQs; if ($FORM{'popsch'} < "2") {$FORM{'popsch'} = 3;} print "Content-type: text/html\n\n"; print &srchForm($FORM{'popsch'})."
"; exit; } sub doSrch { &read_rcrds; $Lcentered = "
"; $closecenter = "
" if $Lcentered; &Mrefs if !@idn; $strt_nums = $strtP = $Recs = $showCnt = $srchFnd = 0; $strtP = $FORM{'strtP'} if $FORM{'strtP'}; $TTLrecs = @vizrcrds; $srchShow = 15; $srchShow = $FORM{'vue'} if $FORM{'vue'}; $bnd = '\b' if $FORM{'whole'}; @preLst=(); @pstLst=(); $Recs = @vizrcrds - 1; $strtP = 0 if !$strtP; if (!$FORM{'strtP'}) {$strt_nums = $Recs;} else {$strt_nums = $FORM{'strtP'};} ($words=$FORM{'srchIs'}) =~ s/([^\w-])/ /g; $words =~ s/\s+/ /g; @wrds = split(/ /,$words); $wAll = join "|", @wrds; $FORM{'srchIs'} = $words; $rEcS = @vizrcrds; $iSS = int($rEcS / $per_page); $iSS += 1 if ($rEcS / $per_page) > $iSS; for($sss = $Recs; $sss >= 0; $sss--) { @lines = split(/\|/,$vizrcrds[$sss]); $tmp = $lines[$OBS{$FORM{'srchIn'}}]; $tmp =~ s/<([^>])*>/ /g; $tmp =~ s/ +|\W+/ /g; $chk = $tmp; $Yes = 0; $YAll = 0; if ($FORM{'srchAs'} eq "str") { while ($chk =~ /$bnd$words$bnd/i) {$chk =~ s/$bnd$words$bnd//i; $Yes++;} $lines[$OBS{$FORM{'srchIn'}}] =~ s/$bnd($words)$bnd/$1<\/b><\/font>/sig if $Yes; } if ($FORM{'srchAs'} =~ /^(all|any)$/) { foreach $See (@wrds) {if ($chk =~ /$bnd$See$bnd/i) {$YAll++; last if $FORM{'srchAs'} eq "any"} } if (($FORM{'srchAs'} eq "all" && $YAll == @wrds) || ($FORM{'srchAs'} eq "any" && $YAll)) { $Yes++; $lines[$OBS{$FORM{'srchIn'}}] =~ s/$bnd($wAll)$bnd/$+<\/b><\/font>/sig; } } $srchFnd++ if $Yes; if ($Yes && $sss <= $strt_nums && ($showCnt < $srchShow)) { $showCnt++; $strinG = join "|", @lines; push(@fnds,$strinG); push(@Lnumbs,$sss);} elsif ($Yes && $sss > $strt_nums) {push(@preLst,$sss)} elsif ($Yes && $sss < $strt_nums && ($showCnt >= $srchShow)) {push(@pstLst,$sss);} $ttlFnd += $Yes; } if ($FORM{'popsch'} =~ /^(1|3)$/) {$tbl_wid = "95%"; $use_divider = 0; $FORM{'popsch'} = 3;} else {$FORM{'popsch'} = 2;} $cntss = 0; $cnt=0; foreach $tmp (@preLst) { if (!($cnt % $srchShow) && $tmp) {$cntss++; $preStrng .= qq~ $cntss~;} $cnt++; } $cntss++; $Iis = $cntss; $cnt=0; foreach $tmp (@pstLst) { if (!($cnt % $srchShow) && $tmp) {$cntss++; $pstStrng .= qq~ $cntss~;} $cnt++; } print "Content-type: text/html\n\n"; $page .= qq~
~; $mtcht = ""; $mtcht = "in $srchFnd" if $FORM{'srchAs'} eq "str"; $schOpt = &lstREQs; $page .= &srchForm($FORM{'popsch'}); $page .= qq~~; $page .= qq~~; $page .= qq~~ if @preLst || @pstLst; @vizrcrds = reverse @fnds; $strt_num = @fnds; $cnts = @fnds; @Lnumbs = reverse @Lnumbs; &prntpages; $page .= qq~~ if @preLst || @pstLst; $page .= qq~~; $page .= "
$ttlFnd matched $mtcht Records; [~; $page .= @vizrcrds.qq~ searched] $showCnt displayed
Other results $preStrng $Iis $pstStrng
Other results $preStrng $Iis $pstStrng

\n"; $page .= "
 \n"; print "$page"; exit; } sub showErr { print "Content-type: text/html\n\n"; print qq~ Error Response

 

$listis Error
 The program has responded with an error 
The result is:
$_[0]

Contact webmaster if the problem persists
VizBook v2.2 copyright

 Use your Back Arrow to return. Thank you. 
~; exit; # All name/copyright notices must remain as is and visible... These scripts CAN NOT BE ALTERED except for output-text language translation. } &check_method; @pairs = split(/&/, $query_string); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $name =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $name =~ s/~!/ ~!/g; $name =~ s/<([^>]|\n)*>//g; $value =~ s/<([^>]|\n)*>//g unless ($name eq "msg" && $allow_tgs == 1); $value =~ s///g; $name =~ s///g; $value =~ s/<(.*?href.*?>|\/a)>//ig unless ($name eq "msg" && $allow_tgs == 1); $value =~ s/(<.*?h\d.*?>|<.*?\/h.*?>)//mig; $value =~ s/\|/\//g; $name =~ s/\|/\//g; $value =~ s/`/\0/g; $name =~ s/`|\0//g; $value =~ s/\&/\&\;/g; $value =~ s/"/\"\;/g unless $allow_tgs == 1; $value =~ s//\>\;/g unless $allow_tgs == 1; $FORM{$name} = $value; } $closecenter = "" if $Lcentered; $noLabel = 0 if $allow_pics == 1; $REQuire{'viznam'} = $N; $REQuire{'email'} = $E; if (!$tbl_wid) {$tbl_wid = "590";} if (!$sze_3) {$sze_3 = 2;}; $mltmp = "checked"; @OBs = ("vizname","email","icq","cmpny","miscbox","dlist","url","city","state","cntry","msg"); %OBS=("vizname"=>"2","icq"=>"4","cmpny"=>"5","miscbox"=>"7","dlist"=>"8","url"=>"6","city"=>"10","state"=>"11","cntry"=>"12","msg"=>"15"); $FORM{'url'} =~ s/\s//g; if (!$FORM{'url'}) {$FORM{'url'} = "http://";} $REQuire{'msg'} = "$C"; foreach $tmp (keys (%REQuire)) {$OBjcts{$tmp} = qq~*~;} if ($FORM{'popm'} eq "1" && $FORM{'mid'} =~ /^\d{5,6}$/ && $ENV{'HTTP_USER_AGENT'} && $ENV{'REQUEST_METHOD'} eq 'GET') {&getADR;} if ($FORM{'popsch'} eq "1" && !$FORM{'srchIn'} && $allowSRCH && $ENV{'HTTP_USER_AGENT'} && $ENV{'REQUEST_METHOD'} eq 'GET') {&getSCH;} &check_ref ; &read_rjct_file; foreach $reject(@rjcts) { chomp($reject); if ($reject eq $ENV{'REMOTE_ADDR'}) {&showErr('Access Denied');} elsif (lc($reject) eq lc($FORM{'email'})) {&showErr('Access Denied');} } if ($FORM{'adviz'}) {require $BinSub_pth.$add_form; &do_type(); &do_add_head; &add_entry;} elsif ($FORM{'popm'} =~ /^(1|2)$/ && $FORM{'mid'} =~ /^\d{5,6}$/) {&getADR;} elsif ($FORM{'srchAs'} && $FORM{'srchIn'} && $FORM{'popsch'} =~ /^(2|3)$/ && $allowSRCH) {&doSrch;} elsif ($FORM{'strtP'} =~ /^\d+/ && $FORM{'popsch'} =~ /^(2|3)$/ && $allowSRCH) {&doSrch;} elsif ($FORM{'popsch'} =~ /^(1|2|3)$/ && $allowSRCH) {&getSCH;} elsif ($FORM{'nxtfrm'}) {&make_page;} elsif ($FORM{'rstfrm'}) {&make_page;} elsif ($FORM{'addfrm'}) {require $BinSub_pth.$add_form2; &save_entry;} else {&showErr('Unknown Response requested');} exit(0);