1509 |
# Initialize the search string |
# Initialize the search string |
1510 |
$SearchString = ""; |
$SearchString = ""; |
1511 |
|
|
1512 |
sub nuke_accents { |
# tip gradje |
1513 |
my $tmp = $_[0]; |
if ( defined($main::FormData{'tip'}) ) { |
1514 |
$tmp =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'-".'',"'Rr/; |
my @t; |
1515 |
# convert search string to lower case -> make search case insensitive |
foreach my $tip ( split(/\0/, $main::FormData{'tip'}) ) { |
1516 |
$tmp =~ tr/A-Z/a-z/; |
push @t,"tip=$tip"; |
1517 |
return $tmp; |
} |
1518 |
} |
$SearchString .= "(".join(" or ",@t).") and "; |
1519 |
|
} |
1520 |
|
|
1521 |
# Add the search terms |
# Add the search terms |
1522 |
$SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . nuke_accents($Content{'Any'}) ) : ""; |
$SearchString .= defined($Content{'Any'}) ? ((($SearchString ne "") ? " AND " : "") . nuke_accents($Content{'Any'}) ) : ""; |
2998 |
|
|
2999 |
# Send the start of the form and the buttons |
# Send the start of the form and the buttons |
3000 |
print("<TD ALIGN=RIGHT VALIGN=TOP>\n"); |
print("<TD ALIGN=RIGHT VALIGN=TOP>\n"); |
3001 |
print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/GetSearchResults\" NAME=\"Search\" METHOD=POST> <INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\">\n"); |
print("<FORM ACTION=\"$ENV{'SCRIPT_NAME'}/GetSearchResults\" NAME=\"Search\" METHOD=POST> <INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\">\n"); |
3002 |
print("</TD></TR>\n"); |
print("</TD></TR>\n"); |
3003 |
|
|
3004 |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><BR></TD></TR>\n"); |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><BR></TD></TR>\n"); |
3035 |
} elsif ($i == ($field - 1)) { |
} elsif ($i == ($field - 1)) { |
3036 |
$Selected = "SELECTED"; |
$Selected = "SELECTED"; |
3037 |
} |
} |
|
|
|
3038 |
print("<OPTION VALUE=\"$ItemEntry\" $Selected> $main::SearchFieldDescriptions{$ItemEntry}\n"); |
print("<OPTION VALUE=\"$ItemEntry\" $Selected> $main::SearchFieldDescriptions{$ItemEntry}\n"); |
3039 |
} |
} |
3040 |
my $Value = ""; |
my $Value = ""; |
3055 |
print("<OPTION VALUE=\"OR\" $Value> Bilo koju rijeè (OR)\n"); |
print("<OPTION VALUE=\"OR\" $Value> Bilo koju rijeè (OR)\n"); |
3056 |
print("</SELECT> </TD></TR>\n"); |
print("</SELECT> </TD></TR>\n"); |
3057 |
|
|
3058 |
|
print "<tr><td align=left valign=top> Prika¾i samo tip graðe: </td><td align=left valign=top colspan=2>"; |
3059 |
|
foreach my $tip (keys %default::tip) { |
3060 |
|
print '<input TYPE="checkbox" NAME="tip" VALUE="',nuke_accents($default::tip{$tip}),'" >',$default::tip{$tip},"  "; |
3061 |
|
} |
3062 |
|
print "</td></tr>\n"; |
3063 |
|
|
3064 |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n"); |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n"); |
3065 |
|
|
3180 |
|
|
3181 |
|
|
3182 |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n"); |
print("<TR><TD ALIGN=CENTER VALIGN=TOP COLSPAN=3><HR WIDTH=50%></TD></TR>\n"); |
3183 |
print("<TR><TD ALIGN=RIGHT COLSPAN=3><INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Pobri¹i polja\"></TD></TR>\n"); |
print("<TR><TD ALIGN=RIGHT COLSPAN=3><INPUT TYPE=SUBMIT VALUE=\"Pretra¾i bazu\"> <INPUT TYPE=RESET VALUE=\"Vrati poèetne vrijednosti\"></TD></TR>\n"); |
3184 |
|
|
3185 |
print("</FORM>\n"); |
print("</FORM>\n"); |
3186 |
print("</TABLE>\n"); |
print("</TABLE>\n"); |
3227 |
my ($DatabaseRelevanceFeedbackFilterKey, $DatabaseRelevanceFeedbackFilterFunction); |
my ($DatabaseRelevanceFeedbackFilterKey, $DatabaseRelevanceFeedbackFilterFunction); |
3228 |
my (@Values, %Value, $Value); |
my (@Values, %Value, $Value); |
3229 |
|
|
|
|
|
|
|
|
3230 |
# Check to see if there are any documents selected, if there are, they need |
# Check to see if there are any documents selected, if there are, they need |
3231 |
# to be converted to RF documents before we put up the header, this is because |
# to be converted to RF documents before we put up the header, this is because |
3232 |
# the header creates a search link from existing search fields, we also deduplicate |
# the header creates a search link from existing search fields, we also deduplicate |
3331 |
$main::FormData{'Max'} = $main::DefaultMaxDoc; |
$main::FormData{'Max'} = $main::DefaultMaxDoc; |
3332 |
} |
} |
3333 |
|
|
|
|
|
3334 |
# Generate the search string |
# Generate the search string |
3335 |
$SearchString = &sMakeSearchString(%main::FormData); |
$SearchString = &sMakeSearchString(%main::FormData); |
3336 |
|
|
7381 |
my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3); |
my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3); |
7382 |
$main::SearchFieldDescriptions{$FieldName} = $FieldDescription; |
$main::SearchFieldDescriptions{$FieldName} = $FieldDescription; |
7383 |
} |
} |
7384 |
|
} else { |
7385 |
|
&vLog("Error - cant read database description from '$Database'\n"); |
7386 |
} |
} |
7387 |
} |
} |
7388 |
|
|
7444 |
|
|
7445 |
print("</TABLE>\n"); |
print("</TABLE>\n"); |
7446 |
} |
} |
7447 |
|
|
7448 |
|
#-------------------------------------------------------------------------- |
7449 |
|
# |
7450 |
|
sub nuke_accents { |
7451 |
|
my $tmp = $_[0]; |
7452 |
|
$tmp =~ tr/Çüéâäùæç³ëÕõî¬ÄÆÉÅåôö¥µ¦¶ÖÜ«»£èáíóú¡±®¾Êê¼ÈºÁÂ̪¯¿ÃãðÐÏËïÒÍÎìÞÙÓÔÑñò©¹ÀÚàÛýÝþ´½²·¢¸¨ÿØø/CueaauccleOoiZACELlooLlSsOUTtLcaiouAaZzEezCsAAESZzAadDDEdNIIeTUOoNnnSsRUrUyYt'".'',"'Rr/; |
7453 |
|
# convert search string to lower case -> make search case insensitive |
7454 |
|
$tmp =~ tr/A-Z/a-z/; |
7455 |
|
return $tmp; |
7456 |
|
} |
7457 |
|
|