#!/perl/bin/perl.exe
###########################
##
## this is a debug script to simply test each module's abilities
##
## if a new subroutine has been added to any module within
## the pm folder AND it requires testing, search THIS
## document for
## "# [modulename] TESTS"
## where [modulename] is the name of a module. eg: "bc_sql"
## add the new test in the same way as other tests found in this script
##
###########################
# must have's!
use strict;
use warnings;
use CGI::Carp qw(fatalsToBrowser);
use DBI;
use URI::Escape;
use pm::bc_chef;
use pm::bc_misc;
use pm::bc_sql;
use pm::subdesc;
use pm::redir;
use pm::search;
use pm::security;
my $BORDER = 0;
my $navheight = 20;
my $navcontainerheight = $navheight + 20;
my $loggedin = pm::bc_chef::cookie_get("loggedin");
my $db = sql_connect("ns.db");
if ($loggedin !~ /^A6DE0E8077|7EE22A4BBF$/i) {
if (not isUserAdmin($loggedin)) {
print error_redir("/", "Access Denied");
exit 1;
}
}
##################################################################################
##################################################################################
##################################################################################
##################################################################################
##################################################################################
# much of the code is redacted here, and only what you need is included
# things like "display_debug_one" and related are redacted, since they just
# display things and have no real affect / effect on the data at all
my $COOL_DOT = " • ";
my $rv = "cache-control: no-store\n";
$rv .= "content-type: text/html\n\n";
$rv .= "\n";
$rv .= "
\n";
$rv .= " NS Debug Page\n";
$rv .= " \n";
$rv .= "\n";
$rv .= "\n";
# a paramater to capture the selected PM with
my $debug_page = get_constant($db, "QUERY_DEBUG_PAGE");
my $pm = lc(get_param($debug_page));
if (not $pm) {
# this part redacted, since it simply displays a menu...
# end if (not $pm)
} else { # if $pm contains a value
if ($pm eq "chef") {
################################
# bc_chef TESTS
$rv .= display_module("bc_chef", "Chef");
$rv .= "