/[local]/search/filters/default.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /search/filters/default.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Thu Jun 13 17:25:53 2002 UTC revision 1.4 by dpavlin, Sun Jun 16 19:39:45 2002 UTC
# Line 34  package default; Line 34  package default;
34  # Application Constants  # Application Constants
35  #  #
36    
 # Field Names  
 %default::FieldNames = (          
         '700+', 'Autor(i)',  
         '200',  'Naslov',  
         '205',  'Izdanje',  
         '210',  'Izdavanje',  
         '215',  'Materijalni opis',  
         '225',  'Nakladnička cjelina',  
         '300+', 'Napomena',  
         '330',  'Sadržaj',  
         '423',  'Prikriveni radovi',  
         '464',  'Analitički radovi',  
         '610',  'Ključne riječi',  
         '675+', 'Klasifik. oznaka',  
         '990',  'Signatura',  
         '991',  'Inventarni broj',  
         'ISBN', 'ISBN',  
         'MFN',  'MFN',  
         '994a', 'Knjižnica',  
   
   
         'A',    'Author(s)',  
         'B',    'Book',  
         'C',    'City',  
         'D',    'Date',  
         'E',    'Editor',  
         'F',    'Footnote',  
         'G',    'Order Info',  
         'H',    'Commentary',  
         'I',    'Publisher',  
         'J',    'Journal',  
         'K',    'Keyword',  
         'L',    'Label',  
         'M',    'Bell',  
         'N',    'Issue',  
         'O',    'Other',  
         'P',    'Page',  
         'Q',    'Corporate',  
         'R',    'Report',  
         'S',    'Series',  
         'T',    'Title',  
         'U',    'Annotation',  
         'V',    'Volume',  
         'W',    'URL',  
         'X',    'Abstract',  
         'Y',    'Table of Contents',  
         'Z',    'Reference',  
         '$',    'Price',  
         '*',    'Copyright',  
         '^',    'Parts',  
 );  
   
   
   
 # Field Display Order  
 @default::FieldDisplayOrder = (  
         'ISBN',  
         '700+',  
         '200',  
         '205',  
         '210',  
         '215',  
         '225',  
         '300+',  
         '330',  
         '423',  
         '464',  
         '610',  
         '675+',  
         '990',  
         '991',  
         'MFN',  
         '994a',  
   
         'M',  
         'L',  
         'T',  
         'S',  
         'E',  
         'Q',  
         'A',  
         'J',  
         'B',  
         'D',  
         'V',  
         'N',  
         'P',  
         'C',  
         'I',  
         'G',  
         '$',  
         'K',  
         '*',  
         'W',  
         'O',  
         'Y',  
         'X',  
         'R',  
         '.',  
         'F',  
         'H',  
         'U',  
         'Z',  
         '^'  
 );  
   
 # separators  
 %default::Separator = (  
         '700+', ', ',  
         '990',  ' ',  
         '991', ', ',  
         '300+', '.- ',  
         '225', ', ',  
         '610', ' * ',  
   
           
 );  
   
37  #--------------------------------------------------------------------------  #--------------------------------------------------------------------------
38  #  #
39  #       Function:       DocumentParser()  #       Function:       DocumentParser()
# Line 247  sub DocumentFilter { Line 129  sub DocumentFilter {
129          # Loop over each line in the document list          # Loop over each line in the document list
130          foreach $FieldTag ( @default::FieldDisplayOrder ) {          foreach $FieldTag ( @default::FieldDisplayOrder ) {
131    
132    #               print "-- $FieldTag = $Document{$FieldTag} --";
133    
134                  # Skip empty slots                  # Skip empty slots
135                  if ( !(defined($Document{$FieldTag}) && ($Document{$FieldTag} ne "")) ) {                  if ( !(defined($Document{$FieldTag}) && ($Document{$FieldTag} ne "")) ) {
136                          next;                          next;
# Line 256  sub DocumentFilter { Line 140  sub DocumentFilter {
140                  # Print the row start                  # Print the row start
141                  $DocumentFinal .= "<TR><TD VALIGN=TOP ALIGN=RIGHT BGCOLOR=\"#EEEEEE\" WIDTH=\"130\"> $default::FieldNames{$FieldTag}: </TD><TD VALIGN=TOP ALIGN=LEFT> ";                  $DocumentFinal .= "<TR><TD VALIGN=TOP ALIGN=RIGHT BGCOLOR=\"#EEEEEE\" WIDTH=\"130\"> $default::FieldNames{$FieldTag}: </TD><TD VALIGN=TOP ALIGN=LEFT> ";
142    
143                    sub html_enc {
144                            my $tmp = $_[0];
145                            $tmp =~ s/&/&and;/g;
146                            $tmp =~ s/</&lt;/g;
147                            $tmp =~ s/>/&gt;/g;
148                            # fix some tags
149                            $tmp =~ s/&lt;br&gt;/<br>/gi;
150                            return $tmp;
151                    }
152    
153                    $Document{$FieldTag} = html_enc($Document{$FieldTag});
154    
155                  # Print the field data, marking up if needed                  # Print the field data, marking up if needed
156                  if ( $FieldTag eq "A" || $FieldTag eq "E" ) {                  if ( $FieldTag eq "A" || $FieldTag eq "E" ) {
157                          $CommaFlag = 0;                          $CommaFlag = 0;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26