#!/usr/local/bin/perl use CGI qw(:all); use DBI; print header; use lib '/var/www/wilcoxassoc.com/perl/'; use lib 'E:/WAIWeb/Perl/'; use mymod qw(dbconnect dienice isadmin $cwd $remoteuser getprivilege $servername); $query = new CGI; #== Some Variables ==# $title = "Internal Training Area"; $page = "View Sessions"; $viewby = param('viewby'); #Check that remote user is admin or can read the sales repository (code 2). $isadmin = isadmin("check"); $privilege = getprivilege(); if (!$isadmin){ dienice("Admin code for remote user to access this page was found."); } if ($isadmin ne "Y" and $isadmin ne "S" and $privilege ne "2" and $privilege ne "1" ){ dienice("You do not have privileges to access this page."); } else { $dbh=dbconnect(); if ($isadmin ne "Y" and $isadmin ne "S"){ #display normal user template template_header_user(); } else { #display admin template template_header_admin(); } print p,"Testing...Remote User is $remoteuser"; # Returned from mymod.pm print p,"Testing...Privilege is $privilege"; # Returned from mymod.pm print p,"Testing...isadmin is $isadmin"; # Returned from mymod.pm print p,"Testing...servername is $servername"; # Returned from mymod.pm print ""; print "

Welcome to the View Training Sessions page. This page details internal training sessions scheduled for Hexagon Metrology personnel. Click on the links below to get more information about a particular training event.

View by Descending Date | View by Ascending Date

"; display_contents(); print ""; exit; }