/[cricket]/generate-overview.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 /generate-overview.pl

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

revision 1.10 by dpavlin, Sat May 24 12:21:42 2003 UTC revision 1.11 by dpavlin, Sat May 24 12:35:19 2003 UTC
# Line 116  foreach my $key (keys %html_file) { Line 116  foreach my $key (keys %html_file) {
116          print OUT "<html><head><title>$key</title>";          print OUT "<html><head><title>$key</title>";
117          print OUT '<meta content="no-cache" http-equiv="Pragma">          print OUT '<meta content="no-cache" http-equiv="Pragma">
118                  <meta content="300" http-equiv="Refresh">' if ($filename =~ m/Daily/i);                  <meta content="300" http-equiv="Refresh">' if ($filename =~ m/Daily/i);
119          print OUT <<'HTMLEND' if ($dynamic_js);          print OUT '</head><body>';
120            my $html=<<'HTMLEND';
121    
122  <script language="JavaScript">  <script language="JavaScript">
123  var Selected = "";  var Selected = "";
124    
125  function Switch(elm)  function Switch(elm)
126  {  {
127          var cookie = Get_Cookie("overview");          var cookie = Get_Cookie("##cookie_name##");
128    
129          var elmref;          var elmref;
130    
# Line 164  function Switch(elm) Line 165  function Switch(elm)
165                  cookie ^= 1 << Selected;                  cookie ^= 1 << Selected;
166          }          }
167    
168          Set_Cookie("overview",cookie);          Set_Cookie("##cookie_name##",cookie);
169          return false;          return false;
170  }  }
171    
# Line 179  function SwitchThis() Line 180  function SwitchThis()
180  <table border=0 id=DynamicTable bgColor='#e0e0e0' cellpadding=2 cellspacing=1>  <table border=0 id=DynamicTable bgColor='#e0e0e0' cellpadding=2 cellspacing=1>
181    
182  HTMLEND  HTMLEND
183          print OUT "</head><body>";          if ($dynamic_js) {
184                    my $cookie_name = $key;
185                    $cookie_name =~ s/[^a-zA-Z0-9]//g;
186                    $html =~ s/##cookie_name##/$cookie_name/g;
187                    print OUT $html;
188            }
189    
190          print OUT $html_file{$key};          print OUT $html_file{$key};
191          print OUT <<'HTMLEND' if ($dynamic_js);          $html = <<'HTMLEND';
192  </table>  </table>
193    
194  <script language=javascript>  <script language=javascript>
# Line 213  function Delete_Cookie(name,path,domain) Line 220  function Delete_Cookie(name,path,domain)
220    
221  var table = document.getElementById("DynamicTable");  var table = document.getElementById("DynamicTable");
222  var links = table.getElementsByTagName("a");  var links = table.getElementsByTagName("a");
223  var cookie = Get_Cookie("overview");  var cookie = Get_Cookie("##cookie_name##");
224  var new_cookie = 0;  var new_cookie = 0;
225  for (var i = 0; i < links.length; i++) {  for (var i = 0; i < links.length; i++) {
226      if (links[i].id == "DynMessLink") {      if (links[i].id == "DynMessLink") {
# Line 236  for (var i = 0; i < links.length; i++) { Line 243  for (var i = 0; i < links.length; i++) {
243          }          }
244      }      }
245  }  }
246  if (new_cookie) Set_Cookie("overview",new_cookie);  if (new_cookie) Set_Cookie("##cookie_name##",new_cookie);
247  </script>  </script>
248  HTMLEND  HTMLEND
249    
250            if ($dynamic_js) {
251                    my $cookie_name = $key;
252                    $cookie_name =~ s/[^a-zA-Z0-9]//g;
253                    $html =~ s/##cookie_name##/$cookie_name/g;
254                    print OUT $html;
255            }
256    
257          print OUT "</body></html>";          print OUT "</body></html>";
258          close(OUT);          close(OUT);
259    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26