#!/usr/bin/perl -w use CGI; $query = new CGI; $lab = $query->param( "lab" ); $button = $query->param( "button" ); $password = $query->param( "password" ); if ( $button eq "Display the code" ) { if ( $password eq "password" ) { print( "Content-type: text/plain\n\n" ); if ( $lab == 1 ) { system( "cat lab1.asm" ); } elsif ( $lab == 2 ) { system( "cat lab2.asm" ); } elsif ( $lab == 3 ) { system( "cat lab3.asm" ); } elsif ( $lab == 4 ) { system( "cat lab4.asm" ); } elsif ( $lab == 5 ) { system( "cat lab5.asm" ); } elsif ( $lab == 6 ) { system( "cat lab6.asm" ); } elsif ( $lab == 7 ) { system( "cat lab7.asm" ); } else { print( "\n\n\n No such lab: $lab" ); } } else { print( "Content-type: text/html\n\n" ); print( "



Wrong password: " ); print( "$password
" ); } } elsif ( $button eq "Help" ) { print ( "Content-type: text/html\n\n" ); system( "cat Help.html" ); } else { print( "Content-type: text/html\n\n" ); print( "


No such option: " ); print( "$button
" ); }