#!/usr/sbin/perl #************************************************************************** #* * #* Copyright (c) 1996 Silicon Graphics, Inc. * #* All Rights Reserved * #* * #* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI * #* * #* The copyright notice above does not evidence any actual of intended * #* publication of such source code, and is an unpublished work by Silicon * #* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is * #* the property of Silicon Graphics, Inc. Any use, duplication or * #* disclosure not specifically authorized by Silicon Graphics is strictly * #* prohibited. * #* * #* RESTRICTED RIGHTS LEGEND: * #* * #* Use, duplication or disclosure by the Government is subject to * #* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in * #* Technical Data and Computer Software clause at DFARS 52.227-7013, * #* and/or in similar or successor clauses in the FAR, DOD or NASA FAR * #* Supplement. Unpublished - rights reserved under the Copyright Laws of * #* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N. * #* Shoreline Blvd., Mountain View, CA 94039-7311 * #************************************************************************** # DEMO_maint.pl # # Routines that route requests to perform maintenence 1; # Return true sub Generate_Maint_Page { if ( (&Passwd_Entered) && (!&Legal_Passwd) ) { &Generate_Bad_Passwd_Page; } elsif ( (&Is_Passwd) && (&Is_Help_Link) ) { &Generate_Enter_Passwd_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_ADD_TREE_FLAG") { &Generate_Maint_Tree_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_ELEMENTS_FLAG") { &Generate_Maint_Cat_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_UPDATE_FLAG") { &Generate_Maint_Update_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_PASSWD_FLAG") { &Generate_Maint_Passwd_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_CUSTOM_FLAG") { &Generate_Maint_Custom_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_UPDATE_FLAG") { &Generate_Maint_Custom_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_EDIT_FLAG") { &Print_Edit_Front_Page; } elsif ("$in{$CGI_SUB_SWITCH}" eq "$CGI_MAINT_ADD_FLAG") { &Generate_Maint_Add_Page; } else { &Print_Bad_Input_Page; } } sub Is_Help_Link { local($result); $result = 1 unless ("$in{$CGI_MAINT_OUTSIDE_SWITCH}" eq "$CGI_MAINT_FALSE_FLAG"); return($result); } # sub Is_Passwd_Link { # local($result); # $result = 0 unless ("$in{$CGI_MAINT_PASSWD_SWITCH}" eq "$CGI_MAINT_TRUE_FLAG"); # return($result); # } sub Print_Maint_Top { &Print_HTTP_Header("BLANK", "$HTTP_YES_SCRIPT"); print "\n"; print "\n"; print "\n"; } elsif ($_[3]) { print "function UpdateToc() {\n"; print "top.frames[\"$FRAME_TOC\"].location = \"$WWW_SCRIPT?$CGI_SWITCH=$FRAME_TOC\" \n"; print "}\n"; print "// -->\n"; print "\n"; print "\n"; print "\n"; } elsif ($_[4]) { print "function UpdateTables() {\n"; $refreshString = "$WWW_SCRIPT?"; $refreshString .= "$CGI_SWITCH=$FRAME_DIAG&$CGI_SUB_SWITCH=$CGI_UPDATE_FLAG"; $refreshString .= "&$CGI_NOTIFY_SWITCH=$CGI_TRUE_FLAG"; print "\tparent.frames[\"$FRAME_DIAG\"].location = \"$refreshString\"\n"; print "}\n"; print "// -->\n"; print "\n"; print "\n"; print "\n"; } else { print "// -->\n"; print "\n"; print "\n"; print "\n"; } if ($_[1]) { print "
\n"; } else { print "
\n"; } print "
\n"; print "

$_[0]

\n"; print "
\n"; print "

"; # print "


\n"; print "

\n"; print "

\n"; print "\n"; print "\n"; print "\n"; print "
\n"; print "
\n"; } sub Print_Maint_Bottom { print "
\n"; print "
\n"; } sub Print_Look_At_Help { print "
\n"; } sub Print_Maint_Menu { &Generate_Help_Menu(1); }