\n\n";
print "\n\n";
# @parsekeywords = split(/:/, $matchQuestionsAndAnswers[$i]{'keywords'});
print "$call{'user'}, your location is: \n";
while ($i <= $#formkeys){
$j = ($i + 1);
print "\n";
$formkeys[$i] =~ s/=/ = /g;
print "$formkeys[$i] \n";
$formkeys[$i] =~ s/ = /=/g;
$i++;
}
$j = 0;
$i = 0;
print "
\n";
print "\n\n";
# print the array
while ($i <= $#matchQuestionsAndAnswers){
# print "matchQuestionsAndAnswers $i \n";
# print "ID: $matchQuestionsAndAnswers[$i]{'ID'} \n";
# print "datatype: $matchQuestionsAndAnswers[$i]{'datatype'} \n";
# print "user: $matchQuestionsAndAnswers[$i]{'user'} \n";
# print "linkid: $matchQuestionsAndAnswers[$i]{'linkid'} \n";
# print "$matchQuestionsAndAnswers[$i]{'question'}
\n";
if ($matchQuestionsAndAnswers[$i]{'datatype'} eq '1'){
if ($call{'user'} eq $hash{'1'}){
$k += 1;
print "Question:
\n";
print "\n";
print "\n";
}
else {
print "Question: $matchQuestionsAndAnswers[$i]{'question'}
\n";
}
#$questions--;
#$ques = ($questions +1);
$j = ($j + 1);
if ($matchQuestionsAndAnswers[$i+1]{'datatype'} eq '3'){
print "Answer:
\n";
print "\n";
print "\n";
print " \n";
}
else {
print "Answer:
\n";
print "\n";
print "\n";
print " \n";
}
$i++;
}
elsif ($matchQuestionsAndAnswers[$i]{'datatype'} eq '2'){
$yeah = 'yeah';
$notelocation = $i;
$i++;
}
else {
$i++;
}
}
$i = 0;
$j = 0;
$k = 0;
print "\n\n";
# Now we print the wildcard q's the array is full of Q's and A's in no order
while ($i <= $#wildcards){
if ($wildcards[$i]{'datatype'} eq '1'){
$k += 1;
if ($call{'user'} eq $hash{'1'}){
print "Question:
\n";
print "\n";
print "\n";
}
else {
print "Question: $wildcards[$i]{'question'}
\n";
print "\n";
}
#loop through the array again, looking for the answer
# if no answer, print empty answer field
while ($j <= $#wildcards){
$jid = $wildcards[$j]{'linkid'};
$jid =~ s/w//;
#print "jid: $jid \n";
if (( $jid eq $wildcards[$i]{'ID'}) &&
($wildcards[$j]{'datatype'} eq '3')){
print "Answer:
\n";
print "\n";
print "\n";
print " \n";
$j = $#wildcards;
$yeah2 = 'yeah';
}
$j++;
}
$j = 0;
if ($yeah2 ne 'yeah'){
print "Answer:
\n";
print "\n";
print "\n";
print " \n";
}
}
$i++;
}
print "\n\n";
# Time to print the notes...
if ($yeah ne 'yeah'){
print " Your notes on this location:
\n";
print "\n";
}
elsif ($yeah eq 'yeah'){
print " Your notes on this location:
\n";
print "\n";
}
print "\n";
print "\n";
print " |