#!/usr/bin/perl -w

# $Id: draw_choose_icon.pl,v 1.1 1996/01/20 08:33:51 hoagland Exp $

# draw_choose_icon.pl, by Jim Hoagland (hoagland@cs) 1/96

# this routine generates the icon selection page for the ARPA IDS
# demo GUI
# its second argument indicates which folder this is for if present; otherwise
# the user chooses
# outputs HTML to STDOUT

require 5.000;

require '/pkg/www/arpa/secret/cgi-bin/gui-helper.pl';

sub draw_choose_icon {
  my($state,$folder)= @_;
  my $folder_text;
  
  my $icon_text= '';
  foreach $icon (sort &icons_avail) {
    $icon_text.= "<INPUT TYPE=image SRC=\"http://seclab.cs.ucdavis.edu/arpa/secret/icons/$icon\" NAME=\"$icon\">\n";
  }

  print "Content-type:  text/html\n\n";
  &output_instantiated_file('/pkg/www/arpa/secret/gui/html-src/choose_icon.html',*STDOUT,
			    '<!!! Insert folder here !!!>',$folder,
			    '<!!! Insert icon list here !!!>',$icon_text);

}
1;
