view release on metacpan or search on metacpan
applications/archive.pl view on Meta::CPAN
$debug = 0 if ($opt_D eq 'F');
$debug = 1 if ($opt_D eq 'T');
$debug = 2 if ($opt_D eq 'L');
} else {
usage("Invalid debug: $opt_D\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $logger = LOG_init_log4perl ( 'archive', undef, $debug );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my @archivelisttable;
if ( $debug ) {
print "Current day : <", scalar(localtime($currentEpoch)), "><", $currentEpoch, ">\n";
print "Yesterday : <", scalar(localtime($yesterdayEpoch)), "><", $yesterdayEpoch, ">\n";
print "First day of yesterday week : <", scalar(localtime($firstDayOfWeekEpoch)), "><", $firstDayOfWeekEpoch, ">\n";
print "GZIP not debug files older then : <", scalar(localtime($gzipEpoch)), "><", $gzipEpoch, ">\n";
applications/archive.pl view on Meta::CPAN
} else {
$sql = "select SQL_NO_CACHE catalogID, id, endDate from $SERVERTABLEVENTS force index (key_timeslot) where timeslot < '" .$timeslot. "'";
print EMAILREPORT "\nTable: '$SERVERTABLEVENTS', Year: '$year', Month: '$month', Day: '$day', Timeslot: '$timeslot'\n";
}
$sth = $dbh->prepare($sql) or $rv = errorTrapDBI("dbh->prepare: $sql", $debug);
$rv = $sth->execute() or $rv = errorTrapDBI("sth->execute: $sql", $debug) if $rv;
if ( $rv ) {
while (my $ref = $sth->fetchrow_hashref()) {
($yearMOVE, $monthMOVE, undef) = split (/-/, $ref->{endDate});
print "\n", $ref->{catalogID}, " ", $ref->{id}, " ", $ref->{uKey}, " ", $ref->{startDate}, " ", $ref->{endDate}, " ",$ref->{timeslot}, " \n" if ($debug);
$sqlMOVE = 'REPLACE INTO `' .$SERVERTABLEVENTS. '_' .$yearMOVE. '_' .$monthMOVE. '` SELECT * FROM `' .$SERVERTABLEVENTS. '` WHERE catalogID = "' .$ref->{catalogID}. '" and id = "' .$ref->{id}. '"';
if ( $yearMOVE ne '0000' and $monthMOVE ne '00' ) {
print "$sqlMOVE\n" if ($debug);
$dbh->do( $sqlMOVE ) or $rv = errorTrapDBI("Cannot dbh->do: $sql", $debug) unless ( $debug );
if ( $rv ) {
applications/archive.pl view on Meta::CPAN
print "\nTable: '$SERVERTABLCOMMENTS', Year: '$year', Month: '$month', Day: '$day', Timeslot: '$timeslot', Date: " .scalar(localtime($timeslot)). "\n<$sql>\n";
} else {
print EMAILREPORT "\nTable: '$SERVERTABLCOMMENTS', Year: '$year', Month: '$month', Day: '$day', Timeslot: '$timeslot'\n";
}
$sth = $dbh->prepare($sql) or $rv = errorTrapDBI("dbh->prepare: $sql", $debug);
$rv = $sth->execute() or $rv = errorTrapDBI("sth->execute: $sql", $debug) if $rv;
if ( $rv ) {
while (my $ref = $sth->fetchrow_hashref()) {
($yearMOVE, undef, undef) = split (/-/, $ref->{solvedDate});
print "\n", $ref->{catalogID}, " ", $ref->{id}, " ", $ref->{uKey}, " ", $ref->{solvedDate}, " ", $ref->{solvedTimeslot}, "\n" if ($debug);
$sqlMOVE = 'REPLACE INTO `' .$SERVERTABLCOMMENTS. '_' .$yearMOVE. '` SELECT * FROM `' .$SERVERTABLCOMMENTS. '` WHERE catalogID = "' .$ref->{catalogID}. '" and id = "' .$ref->{id}. '"';
if ( $yearMOVE ne '0000' ) {
print "$sqlMOVE\n" if ($debug);
$dbh->do( $sqlMOVE ) or $rv = errorTrapDBI("Cannot dbh->do: $sql", $debug) unless ( $debug );
if ( $rv ) {
$sqlMOVE = 'DELETE FROM `' .$SERVERTABLCOMMENTS. '` WHERE catalogID = "' .$ref->{catalogID}. '" and id = "' .$ref->{id}. '"';
applications/archive.pl view on Meta::CPAN
print "Report Filename: <$reportFilename>\n" if ($debug >= 2);
removeOldReportFiles ($removeReportsEpoch, $removeGzipEpoch, $reportPath, $reportFilename);
}
closedir(DIR);
}
}
foreach $dtest (@stest) {
my ($catalogID_uKey, $test) = split(/\#/, $dtest);
($command, undef) = split(/\.pl/, $test);
my ($catalogID, $uKey) = split(/_/, $catalogID_uKey);
unless ( defined $uKey ) {
$uKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uKey = $catalogID .'_'. $uKey unless ( $catalogID eq 'CID' );
}
my ( $tWeek, $tYear ) = get_week('yesterday');
$weekFilename = get_year('yesterday') ."w$tWeek-$command-$catalogID_uKey-csv-week.txt";
applications/archive.pl view on Meta::CPAN
sub removeCgisessFiles {
my ($removeCgisessEpoch) = @_;
my $emailreport = "\nRemove cgisess files:\n---------------------\n";
if ( $debug ) { print "$emailreport"; } else { print EMAILREPORT "$emailreport"; }
my @cgisessPathFilenames = glob("$CGISESSPATH/cgisess_*");
foreach my $cgisessPathFilename (@cgisessPathFilenames) {
my (undef, $cgisessFilename) = split (/^$CGISESSPATH\//, $cgisessPathFilename);
my (undef, $sessionID) = split (/^cgisess_/, $cgisessFilename);
print "Filename : <$cgisessFilename><$sessionID>\n" if ($debug >= 2);
my ($sessionExists, %session) = get_session_param ($sessionID, $CGISESSPATH, $cgisessFilename, $debug);
if ( $sessionExists ) {
if (defined $session{ASNMTAP}) {
if ($session{ASNMTAP} eq 'LEXY') {
print " : <$removeCgisessEpoch><" .$session{_SESSION_CTIME}. ">\n" if ($debug >= 2);
if ($removeCgisessEpoch > $session{_SESSION_CTIME}) {
if ($debug) {
applications/archive.pl view on Meta::CPAN
print "Usage: $PROGNAME [-A <archivelist>] [-c F|T] [-r F|T] [-d F|T] [-y <years ago>] [-f F|T] [-D <debug>] [-V version] [-h help]\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub print_help () {
print_revision($PROGNAME, $version);
print "ASNMTAP Archiver for the '$APPLICATION'
-A, --archivelist=<filename>
FILENAME : filename from the archivelist for the html output loop (default undef)
-c, --cgisess=F|T
F(alse) : don't remove the cgisess files
T(true) : remove the cgisess files (default)
-r, --reports=F|T
F(alse) : don't backup Csv, Sql, Error, Week, Debug reports
T(true) : remove backup Csv, Sql, Error, Week, Debug reports (default)
-d, --database=F|T
F(alse) : don't archive the '$SERVERTABLEVENTS' and '$SERVERTABLCOMMENTS' tables (default)
T(true) : archive the '$SERVERTABLEVENTS' and '$SERVERTABLCOMMENTS' tables
-y, --yearsago=<years ago>
applications/bin/generateReports.pl view on Meta::CPAN
} else {
usage("Invalid current day: $opt_d\n");
}
} else {
usage("Invalid current day: $opt_d\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $logger = LOG_init_log4perl ( 'generate::reports', undef, $debug );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my ($emailReport, $rvOpen) = init_email_report (*EMAILREPORT, "generateReports.txt", $debug);
create_dir ($RESULTSPATH);
my @arrayDays = ('<NIHIL>', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
my @arrayMonths = ('<NIHIL>', 'January', 'Februari', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
applications/bin/holidayBundleSetDowntimes.pl view on Meta::CPAN
$debug = 0 if ($opt_D eq 'F');
$debug = 1 if ($opt_D eq 'T');
$debug = 2 if ($opt_D eq 'L');
} else {
usage("Invalid debug: $opt_D\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $logger = LOG_init_log4perl ( 'holiday::bundle::set::downtimes', undef, $debug );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my ($emailReport, $rvOpen) = init_email_report (*EMAILREPORT, 'holidayBundleSetDowntimes.txt', $debug);
# Init parameters
my ($rv, $dbh, $sth, $sql);
# open connection to database and query data
$rv = 1;
applications/bin/holidayBundleSetDowntimes.pl view on Meta::CPAN
my $entryDate = "$currentYear-$currentMonth-$currentDay";
my $entryTime = "$currentHour:$currentMin:$currentSec";
my $entryTimeslot = timelocal($currentSec, $currentMin, $currentHour, $currentDay, $localMonth, $localYear);
while( $sth->fetch() ) {
print "--> $catalogID, $holidayBundleID, $holidayBundleName, $holidayID\n" if ($debug);
if ($holidayID ne '') {
chop $holidayID;
my (undef, @holidayID) = split (/\//, $holidayID);
foreach my $holidayID (@holidayID) {
my $holidayYear;
my ($holidayFormule, $holidayMonth, $holidayDay, $holidayOffset, undef) = split (/-/, $holidayID);
print " $holidayID, $holidayFormule, $holidayMonth, $holidayDay, $holidayOffset" if ($debug >= 2);
if ($holidayFormule == 0) {
$holidayYear = ($currentMonth == 12 and $currentDay > (31 - $daysBefore) and $holidayMonth == 1 and $holidayDay <= $daysBeforeDay) ? $daysBeforeYear : $currentYear;
print ", Fixed day: $holidayMonth/$holidayDay, " if ($debug >= 2);
} elsif ($holidayFormule == 1) {
print ", Easter offset: $holidayOffset, " if ($debug >= 2);
($holidayYear, $holidayMonth, $holidayDay) = Add_Delta_Days(Easter_Sunday($daysBeforeYear), $holidayOffset);
} else {
if ($debug) {
applications/bin/holidayBundleSetDowntimes.pl view on Meta::CPAN
$alert .= "\n E $sql" if ($debug >= 2);
$sth = $dbh->prepare( $sql ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->finish: $sql", \$logger, $debug);
$sth->execute() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->finish: $sql", \$logger, $debug) if $rv;
$sth->bind_columns( \$TremoteUser, \$Temail, \$Tpagedir ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->finish: $sql", \$logger, $debug) if $rv;
if ( $rv ) {
while( $sth->fetch() ) {
$alert .= "\n E - $TremoteUser, $Temail, $Tpagedir" if ($debug >= 2);
chop $Tpagedir;
my (undef, @pagedirs) = split (/\//, $Tpagedir);
foreach my $Tpagedirs (@pagedirs) {
if ($pagedirs =~ /\/$Tpagedirs\//) {
$alert .= "\n E + send email to: $TremoteUser, $Temail for $Tpagedirs" if ($debug);
if ( defined $holidayBundleApplications {$Temail}{$holidayBundleName} ) {
$holidayBundleApplications {$Temail}{$holidayBundleName} = $holidayBundleApplications {$Temail}{$holidayBundleName} . $commentData . "\n";
} else {
$holidayBundleApplications {$Temail}{$holidayBundleName} = $commentData . "\n";
}
applications/bin/importDataThroughCatalog.pl view on Meta::CPAN
$type = 2;
} elsif ($opt_T eq 'ALL') {
$type = 3;
} else {
usage("Invalid type: $opt_T\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $logger = LOG_init_log4perl ( 'import::data::through::catalog', undef, $boolean_debug_all );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $boolean_daemonQuit = 0;
my $boolean_signal_hup = 0;
my $boolean_daemonControl = !$booleanQuit;
my $pidfile = $PIDPATH .'/importDataThroughCatalog.pid';
# Init parameters
applications/bin/importDataThroughCatalog.pl view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub do_importDataThroughCatalog {
printDebugAll (" IN: do_importDataThroughCatalog <$PROGNAME v$version pid: <$pidfile>");
($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $SERVERNAMEREADWRITE, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&DBI_error_trap, [*EMAILREPORT, "Cannot connect to the database"], \$logger, $debug, $boolean_deb...
if ($dbh and $rv) {
my ($catalogID, $catalogType, $databaseFQDN, $databasePort);
$sql = "select catalogID, catalogType, databaseFQDN, databasePort from $SERVERTABLCATALOG where catalogID <> '$CATALOGID' and catalogType <> 'central' and activated = '1'";
$sth = $dbh->prepare( $sql ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot dbh->prepare: $sql", \$logger, $debug);
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&DBI_error_trap, [*EMAILREPORT, "Cannot sth->execute: $sql"], \$logger, $debug);
$sth->bind_columns( \$catalogID, \$catalogType, \$databaseFQDN, \$databasePort ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sth->bind_columns: $sql", \$logger, $debug) if $rv;
if ( $rv ) {
my %catalog;
if ( $sth->rows ) {
while( $sth->fetch() ) {
print "- $catalogID, $catalogType, $databaseFQDN, $databasePort\n" if ($debug);
$catalog{$catalogID}{catalogType} = $catalogType;
$catalog{$catalogID}{databaseFQDN} = $databaseFQDN;
applications/bin/importDataThroughCatalog.pl view on Meta::CPAN
sub importData {
my ($EMAILREPORT, $dbhSOURCE, $dbh, $replicationStatus, $table, $whereCLAUSE, @primaryKeys) = @_;
printDebugAll (" IN: importData <$PROGNAME v$version pid: <$pidfile>: $replicationStatus, $table, $whereCLAUSE, @primaryKeys");
print $EMAILREPORT " - importData: $replicationStatus, $table, $whereCLAUSE, @primaryKeys\n" unless ($debug);
my $sqlSOURCE = "select * from `$table` where $whereCLAUSE limit $limit";
print "+ $sqlSOURCE\n" if ($debug);
my $sthSOURCE = $dbhSOURCE->prepare( $sqlSOURCE ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot dbhSOURCE->prepare: $sqlSOURCE", \$logger, $debug);
($rv, undef) = DBI_execute ($rv, \$sthSOURCE, $alarm, \&DBI_error_trap, [*EMAILREPORT, "Cannot sthSOURCE->execute: $sqlSOURCE"], \$logger, $debug);
if ( $rv ) {
while (my $ref = $sthSOURCE->fetchrow_hashref()) {
my ($whereReplicationStatus, $where, $action) = ("where $whereCLAUSE", '');
foreach my $primaryKey (@primaryKeys) { $whereReplicationStatus .= " and $primaryKey = '$ref->{$primaryKey}'" };
my $sqlVERIFY = "select count(catalogID) from `$table` $whereReplicationStatus";
print "... $sqlVERIFY\n" if ( $debug );
my $sthVERIFY = $dbh->prepare( $sqlVERIFY ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot dbh->prepare: $sqlVERIFY", \$logger, $debug);
($rv, undef) = DBI_execute ($rv, \$sthVERIFY, $alarm, \&DBI_error_trap, [*EMAILREPORT, "Cannot $sthVERIFY->execute: $sqlVERIFY"], \$logger, $debug);
if ( $rv ) {
my $updateRecord = $sthVERIFY->fetchrow_array();
$sthVERIFY->finish() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sthVERIFY->finish: $sqlVERIFY", \$logger, $debug);
if ( $updateRecord ) {
$action = "UPDATE `$table` SET";
$where = $whereReplicationStatus;
} else {
$action = "INSERT INTO `$table` SET";
applications/bin/importDataThroughCatalog.pl view on Meta::CPAN
foreach my $databaseField ( @{$sthSOURCE->{NAME}} ) {
my $value = ( ( defined $ref->{$databaseField} ) ? $ref->{$databaseField} : '' );
$action .= " $table.$databaseField = \"$value\",";
}
chop $action if (defined $action);
my $sql = "$action $where";
print " - $sql\n" if ($debug);
($rv, undef, undef) = DBI_do ($rv, \$dbh, $sql, $alarm, \&DBI_error_trap, [*EMAILREPORT, "Cannot dbh->do: $sql"], \$logger, $debug);
if ( $rv and $replicationStatus ) {
$sql = "UPDATE `$table` SET replicationStatus = 'R' $whereReplicationStatus";
print " + $sql\n" if ($debug);
$dbhSOURCE->do ( $sql ) or $rv = DBI_error_trap(*EMAILREPORT, "Cannot $dbhSOURCE->do: $sql", \$logger, $debug);
}
}
}
$sthSOURCE->finish() or $rv = DBI_error_trap(*EMAILREPORT, "Cannot sthSOURCE->finish: $sqlSOURCE", \$logger, $debug);
applications/collector-test.pl view on Meta::CPAN
if ($opt_s) {
if ($opt_s eq 'N' || $opt_s eq 'A' || $opt_s eq 'W' || $opt_s eq 'C' || $opt_s eq 'U') {
$dumphttp = $opt_s;
} else {
usage("Invalid dumphttp: $opt_s\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $logger = LOG_init_log4perl ( "collector::$collectorlist", undef, $boolean_debug_all );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $boolean_daemonQuit = 0;
my $boolean_signal_hup = 0;
my $boolean_signal_kill = 0;
my $boolean_daemonControl = !$boolean_loopQuit;
my @crontabtable = ();
my $pidfile = $PIDPATH .'/'. $collectorlist .'.pid';
applications/collector-test.pl view on Meta::CPAN
printDebugAll ("Einde collector - : <$mode> <$PROGNAME v$version -C $collectorlist>") if ($debug eq 'T');
} until ($boolean_loopQuit);
}
exit;
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dcron (@crontabtable) {
(undef, undef, undef, undef, undef, undef, $tcommand) = split(/ +/, $dcron, 7);
my @scommand = split(/\|/, $tcommand);
foreach my $dcommand (@scommand) {
my (undef, $resultsdir, undef, undef, undef) = split(/\#/, $dcommand);
$logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$httpdump = $logging .'/'. $DEBUGDIR;
create_dir ($httpdump);
$logging .= "/";
create_header ($logging."HEADER.html");
create_footer ($logging."FOOTER.html");
applications/collector-test.pl view on Meta::CPAN
if ($doIt) {
# open connection to database and query comment data
my ($sth, $sql, $firstRecordPersistentTrue, $firstRecordPersistentFalse, $activationTimeslotPersistentTrue, $activationTimeslotPersistentFalse, $suspentionTimeslotPersistentTrue, $suspentionTimeslotPersistentFalse);
$firstRecordPersistentTrue = $firstRecordPersistentFalse = 1;
my ($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $SERVERNAMEREADWRITE, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&errorTrapDBIdowntime, [$collectorlist, "Cannot connect to the database"], \$logger, $...
if ($dbh and $rv) {
$sql = "select SQL_NO_CACHE activationTimeslot, suspentionTimeslot, instability, persistent from $SERVERTABLCOMMENTS where catalogID = '$catalogID' and uKey = '$uniqueKey' and downtime = '1' and problemSolved = '0' order by persistent des...
$sth = $dbh->prepare( $sql ) or $rv = errorTrapDBIdowntime($collectorlist, "Cannot dbh->prepare: $sql", \$logger, $debug);
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBIdowntime, [$collectorlist, "Cannot sth->execute: $sql"], \$logger, $debug);
if ( $rv ) {
if ( $sth->rows ) {
my ($TactivationTimeslot, $TsuspentionTimeslot, $Tinstability, $Tpersistent);
$activationTimeslotPersistentTrue = $activationTimeslotPersistentFalse = 9999999999;
$suspentionTimeslotPersistentTrue = $suspentionTimeslotPersistentFalse = 0;
while( ($TactivationTimeslot, $TsuspentionTimeslot, $Tinstability, $Tpersistent) = $sth->fetchrow_array() ) {
$instability = ( $Tinstability ) ? 1 : $instability;
applications/collector-test.pl view on Meta::CPAN
}
if ($doOffline or $downtime) {
print "Write 'Offline/No Test' status to mysql databases on: ", get_csvfiletime(), "\n" if ($debug eq 'T');
my ($startDate, $startTime, $endDate, $endTime, $msgCommand);
$startDate = get_csvfiledate();
$startTime = get_csvfiletime();
$endDate = $startDate;
$endTime = $startTime;
($msgCommand, undef) = split(/\.pl/, $command);
my $insertData = 1;
my $status = 'OFFLINE';
if ($noOFFLINE) {
if ($noOFFLINE eq 'noOFFLINE') {
if ($downtime) {
$queryMySQL = 1;
} else {
$insertData = 0;
applications/collector-test.pl view on Meta::CPAN
my $action = '';
my $httpdumpFilename = '';
my $httpdumpFilenameTmp = '';
my $debugFilename = '<NIHIL>';
my $dumphttpRename = '<NIHIL>';
my ($stdout, $stderr, $exit_value, $signal_num, $dumped_core);
my ($loggedStatus, $returnStatus, $startDate, $startTime, $endDate, $endTime, $msgCommand);
$startDate = get_csvfiledate();
$startTime = get_csvfiletime();
($msgCommand, undef) = split(/\.pl/, $system_action);
if ($dumphttp ne 'N') {
$httpdumpFilename = $httpdump . get_datetime() .'-'. $msgCommand .'-'. $catalogID_uniqueKey;
$httpdumpFilenameTmp = $httpdumpFilename .'.tmp';
}
$boolean_signal_kill = 0;
if (-e "$PLUGINPATH/$msgCommand.pl") {
my $systemAction = "cd $PLUGINPATH; ./$system_action --status=$status --debug=$debug --logging=$logging --asnmtapEnv='$asnmtapEnv'";
applications/collector-test.pl view on Meta::CPAN
$insertEntryDBI = 0;
$updateEntryDBI = 0;
my ($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $serverName, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $st...
if ($dbh and $rv) {
if ($queryMySQL) {
my $numbersEntryDBI = 0;
$findString = 'select SQL_NO_CACHE status from '.$SERVERTABLEVENTS.' where catalogID = "' .$catalogID. '" and uKey = "' .$uniqueKey. '" and step <> "0" and timeslot = "' . get_timeslot ($currentDate) . '" order by id desc';
printDebugAll ("query Entry DBI: <$findString>") if ($debug eq 'T');
$sth = $dbh->prepare($findString) or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instabilit...
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $i...
if ($rv) {
while (my $ref = $sth->fetchrow_hashref()) {
$numbersEntryDBI++;
if ( $ref->{status} eq '<NIHIL>' or $ref->{status} eq 'OFFLINE' or $ref->{status} eq 'NO TEST' ) { $updateEntryDBI = 1; }
}
$insertEntryDBI = 1 unless ( $numbersEntryDBI );
printDebugAll ("query Entry DBI: # <$numbersEntryDBI> insert <$insertEntryDBI> change <$updateEntryDBI>") if ($debug eq 'T');
}
applications/collector-test.pl view on Meta::CPAN
$insertEntryDBI = 1;
}
} else {
$logger->info(" DBI_connect - Cannot connect to the database - alarm: $alarm - alarmMessage: $alarmMessage") if ( defined $logger and $logger->is_info() );
}
if ($insertEntryDBI or $updateEntryDBI) {
if ($lockMySQL) {
if ($dbh and $rv) {
$lockString = 'LOCK TABLES ' .$SERVERTABLEVENTS. ' WRITE, ' .$SERVERTABLEVENTSCHNGSLGDT. ' WRITE';
($rv, undef, undef) = DBI_do ($rv, \$dbh, $lockString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfda...
}
}
if ($dbh and $rv) {
$statusMessage =~ s/"/'/g;
if ($updateEntryDBI) {
$updateString = 'UPDATE ' .$SERVERTABLEVENTS. ' SET catalogID="' .$catalogID. '", uKey="' .$uniqueKey. '", replicationStatus="U", test="' .$test. '", title="' .$title. '", status="' .$status. '", startDate="' .$startDate. '", startTime="' .$s...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $updateString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perf...
} elsif ($insertEntryDBI) {
$insertString = 'INSERT INTO ' .$SERVERTABLEVENTS. ' SET catalogID="' .$catalogID. '", uKey="' .$uniqueKey. '", replicationStatus="I", test="' .$test. '", title="' .$title. '", status="' .$status. '", startDate="' .$startDate. '", startTime="...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $insertString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perf...
}
my ( $lastStatus, $lastTimeslot, $prevStatus, $prevTimeslot ) = ( $status, get_timeslot ($currentDate), '', '' );
my $sql = "select SQL_NO_CACHE lastStatus, lastTimeslot from $SERVERTABLEVENTSCHNGSLGDT where catalogID = '$catalogID' and uKey = '$uniqueKey'";
my $sth = $dbh->prepare( $sql ) or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability,...
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $i...
if ( $rv ) {
if ( $sth->rows ) {
($prevStatus, $prevTimeslot) = $sth->fetchrow_array() or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $...
$sth->finish() or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability, $persistent,...
$updateString = 'UPDATE ' .$SERVERTABLEVENTSCHNGSLGDT. ' SET replicationStatus="U", lastStatus="' .$lastStatus. '", lastTimeslot="' .$lastTimeslot. '", prevStatus="' .$prevStatus. '", prevTimeslot="' .$prevTimeslot. '" where catalogID="' .$...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $updateString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $pe...
} else {
$insertString = 'INSERT INTO ' .$SERVERTABLEVENTSCHNGSLGDT. ' SET catalogID="' .$catalogID. '", uKey="' .$uniqueKey. '", replicationStatus="I", lastStatus="' .$lastStatus. '", lastTimeslot="' .$lastTimeslot. '", prevStatus="' .$prevStatus. ...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $insertString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $pe...
}
}
}
if ($lockMySQL) {
if ($dbh and $rv) {
$unlockString = 'UNLOCK TABLES';
($rv, undef, undef) = DBI_do ($rv, \$dbh, $unlockString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perf...
}
}
}
if ($dbh and $rv) {
$dbh->disconnect or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability, $persistent, $do...
my $environment = (($test =~ /\-\-environment=([PASTDL])/) ? $1 : 'P');
$rv = graphEntryDBI ($catalogID, $uniqueKey, $title, $environment, $dbiFilename, $interval, 121, 6, 1, 0, get_trendline_from_test ($test), 0, $debug) if ($interval > 0);
}
applications/collector-test.pl view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub errorTrapDBI {
my ($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability, $persistent, $downtime, $filename, $error_message, $l...
print $error_message, "\nERROR: $DBI::err ($DBI::errstr)\n";
my $tlogging = $logging . get_logfiledate();
my ($msgCommand, undef) = split(/\.pl/, $test);
# APE # TODO - REMOVE
# my $rvOpen = open(DEBUG,">>$tlogging-$msgCommand-$catalogID_uniqueKey.sql");
# if ($rvOpen) {
# print DEBUG '"', $catalogID, '","","', $uniqueKey, '","I","', $test, '","', $title, '","', $status, '","', $startDate, '","', $startTime, '","', $endDate, '","', $endTime, '","', $duration, '","', $statusMessage, '","', $perfdata, '","', $inter...
# close(DEBUG);
# } else {
# print "Cannot open $tlogging-$msgCommand-$catalogID_uniqueKey.sql to print debug information\n";
# }
applications/collector.pl view on Meta::CPAN
if ($opt_s) {
if ($opt_s eq 'N' || $opt_s eq 'A' || $opt_s eq 'W' || $opt_s eq 'C' || $opt_s eq 'U') {
$dumphttp = $opt_s;
} else {
usage("Invalid dumphttp: $opt_s\n");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $logger = LOG_init_log4perl ( "collector::$collectorlist", undef, $boolean_debug_all );
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $boolean_daemonQuit = 0;
my $boolean_signal_hup = 0;
my $boolean_signal_kill = 0;
my $boolean_daemonControl = !$boolean_loopQuit;
my @crontabtable = ();
my $pidfile = $PIDPATH .'/'. $collectorlist .'.pid';
applications/collector.pl view on Meta::CPAN
printDebugAll ("Einde collector - : <$mode> <$PROGNAME v$version -C $collectorlist>") if ($debug eq 'T');
} until ($boolean_loopQuit);
}
exit;
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dcron (@crontabtable) {
(undef, undef, undef, undef, undef, undef, $tcommand) = split(/ +/, $dcron, 7);
my @scommand = split(/\|/, $tcommand);
foreach my $dcommand (@scommand) {
my (undef, $resultsdir, undef, undef, undef) = split(/\#/, $dcommand);
$logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$httpdump = $logging .'/'. $DEBUGDIR;
create_dir ($httpdump);
$logging .= "/";
create_header ($logging."HEADER.html");
create_footer ($logging."FOOTER.html");
applications/collector.pl view on Meta::CPAN
if ($doIt) {
# open connection to database and query comment data
my ($sth, $sql, $firstRecordPersistentTrue, $firstRecordPersistentFalse, $activationTimeslotPersistentTrue, $activationTimeslotPersistentFalse, $suspentionTimeslotPersistentTrue, $suspentionTimeslotPersistentFalse);
$firstRecordPersistentTrue = $firstRecordPersistentFalse = 1;
my ($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $SERVERNAMEREADWRITE, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&errorTrapDBIdowntime, [$collectorlist, "Cannot connect to the database"], \$logger, $...
if ($dbh and $rv) {
$sql = "select SQL_NO_CACHE activationTimeslot, suspentionTimeslot, instability, persistent from $SERVERTABLCOMMENTS where catalogID = '$catalogID' and uKey = '$uniqueKey' and downtime = '1' and problemSolved = '0' order by persistent des...
$sth = $dbh->prepare( $sql ) or $rv = errorTrapDBIdowntime($collectorlist, "Cannot dbh->prepare: $sql", \$logger, $debug);
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBIdowntime, [$collectorlist, "Cannot sth->execute: $sql"], \$logger, $debug);
if ( $rv ) {
if ( $sth->rows ) {
my ($TactivationTimeslot, $TsuspentionTimeslot, $Tinstability, $Tpersistent);
$activationTimeslotPersistentTrue = $activationTimeslotPersistentFalse = 9999999999;
$suspentionTimeslotPersistentTrue = $suspentionTimeslotPersistentFalse = 0;
while( ($TactivationTimeslot, $TsuspentionTimeslot, $Tinstability, $Tpersistent) = $sth->fetchrow_array() ) {
$instability = ( $Tinstability ) ? 1 : $instability;
applications/collector.pl view on Meta::CPAN
}
if ($doOffline or $downtime) {
print "Write 'Offline/No Test' status to mysql databases on: ", get_csvfiletime(), "\n" if ($debug eq 'T');
my ($startDate, $startTime, $endDate, $endTime, $msgCommand);
$startDate = get_csvfiledate();
$startTime = get_csvfiletime();
$endDate = $startDate;
$endTime = $startTime;
($msgCommand, undef) = split(/\.pl/, $command);
my $insertData = 1;
my $status = 'OFFLINE';
if ($noOFFLINE) {
if ($noOFFLINE eq 'noOFFLINE') {
if ($downtime) {
$queryMySQL = 1;
} else {
$insertData = 0;
applications/collector.pl view on Meta::CPAN
my $action = '';
my $httpdumpFilename = '';
my $httpdumpFilenameTmp = '';
my $debugFilename = '<NIHIL>';
my $dumphttpRename = '<NIHIL>';
my ($stdout, $stderr, $exit_value, $signal_num, $dumped_core);
my ($loggedStatus, $returnStatus, $startDate, $startTime, $endDate, $endTime, $msgCommand);
$startDate = get_csvfiledate();
$startTime = get_csvfiletime();
($msgCommand, undef) = split(/\.pl/, $system_action);
if ($dumphttp ne 'N') {
$httpdumpFilename = $httpdump . get_datetime() .'-'. $msgCommand .'-'. $catalogID_uniqueKey;
$httpdumpFilenameTmp = $httpdumpFilename .'.tmp';
}
$boolean_signal_kill = 0;
if (-e "$PLUGINPATH/$msgCommand.pl") {
my $systemAction = "cd $PLUGINPATH; ./$system_action --status=$status --debug=$debug --logging=$logging --asnmtapEnv='$asnmtapEnv'";
applications/collector.pl view on Meta::CPAN
$insertEntryDBI = 0;
$updateEntryDBI = 0;
my ($dbh, $rv, $alarmMessage) = DBI_connect ( $DATABASE, $serverName, $SERVERPORTREADWRITE, $SERVERUSERREADWRITE, $SERVERPASSREADWRITE, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $st...
if ($dbh and $rv) {
if ($queryMySQL) {
my $numbersEntryDBI = 0;
$findString = 'select SQL_NO_CACHE status from '.$SERVERTABLEVENTS.' where catalogID = "' .$catalogID. '" and uKey = "' .$uniqueKey. '" and step <> "0" and timeslot = "' . get_timeslot ($currentDate) . '" order by id desc';
printDebugAll ("query Entry DBI: <$findString>") if ($debug eq 'T');
$sth = $dbh->prepare($findString) or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instabilit...
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $i...
if ($rv) {
while (my $ref = $sth->fetchrow_hashref()) {
$numbersEntryDBI++;
if ( $ref->{status} eq '<NIHIL>' or $ref->{status} eq 'OFFLINE' or $ref->{status} eq 'NO TEST' ) { $updateEntryDBI = 1; }
}
$insertEntryDBI = 1 unless ( $numbersEntryDBI );
printDebugAll ("query Entry DBI: # <$numbersEntryDBI> insert <$insertEntryDBI> change <$updateEntryDBI>") if ($debug eq 'T');
}
applications/collector.pl view on Meta::CPAN
$insertEntryDBI = 1;
}
} else {
$logger->info(" DBI_connect - Cannot connect to the database - alarm: $alarm - alarmMessage: $alarmMessage") if ( defined $logger and $logger->is_info() );
}
if ($insertEntryDBI or $updateEntryDBI) {
if ($lockMySQL) {
if ($dbh and $rv) {
$lockString = 'LOCK TABLES ' .$SERVERTABLEVENTS. ' WRITE, ' .$SERVERTABLEVENTSCHNGSLGDT. ' WRITE';
($rv, undef, undef) = DBI_do ($rv, \$dbh, $lockString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfda...
}
}
if ($dbh and $rv) {
$statusMessage =~ s/"/'/g;
if ($updateEntryDBI) {
$updateString = 'UPDATE ' .$SERVERTABLEVENTS. ' SET catalogID="' .$catalogID. '", uKey="' .$uniqueKey. '", replicationStatus="U", test="' .$test. '", title="' .$title. '", status="' .$status. '", startDate="' .$startDate. '", startTime="' .$s...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $updateString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perf...
} elsif ($insertEntryDBI) {
$insertString = 'INSERT INTO ' .$SERVERTABLEVENTS. ' SET catalogID="' .$catalogID. '", uKey="' .$uniqueKey. '", replicationStatus="I", test="' .$test. '", title="' .$title. '", status="' .$status. '", startDate="' .$startDate. '", startTime="...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $insertString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perf...
}
my ( $lastStatus, $lastTimeslot, $prevStatus, $prevTimeslot ) = ( $status, get_timeslot ($currentDate), '', '' );
my $sql = "select SQL_NO_CACHE lastStatus, lastTimeslot from $SERVERTABLEVENTSCHNGSLGDT where catalogID = '$catalogID' and uKey = '$uniqueKey'";
my $sth = $dbh->prepare( $sql ) or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability,...
($rv, undef) = DBI_execute ($rv, \$sth, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $i...
if ( $rv ) {
if ( $sth->rows ) {
($prevStatus, $prevTimeslot) = $sth->fetchrow_array() or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $...
$sth->finish() or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability, $persistent,...
$updateString = 'UPDATE ' .$SERVERTABLEVENTSCHNGSLGDT. ' SET replicationStatus="U", lastStatus="' .$lastStatus. '", lastTimeslot="' .$lastTimeslot. '", prevStatus="' .$prevStatus. '", prevTimeslot="' .$prevTimeslot. '" where catalogID="' .$...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $updateString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $pe...
} else {
$insertString = 'INSERT INTO ' .$SERVERTABLEVENTSCHNGSLGDT. ' SET catalogID="' .$catalogID. '", uKey="' .$uniqueKey. '", replicationStatus="I", lastStatus="' .$lastStatus. '", lastTimeslot="' .$lastTimeslot. '", prevStatus="' .$prevStatus. ...
($rv, undef, undef) = DBI_do ($rv, \$dbh, $insertString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $pe...
}
}
}
if ($lockMySQL) {
if ($dbh and $rv) {
$unlockString = 'UNLOCK TABLES';
($rv, undef, undef) = DBI_do ($rv, \$dbh, $unlockString, $alarm, \&errorTrapDBI, [$currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perf...
}
}
}
if ($dbh and $rv) {
$dbh->disconnect or $rv = errorTrapDBI($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability, $persistent, $do...
my $environment = (($test =~ /\-\-environment=([PASTDL])/) ? $1 : 'P');
$rv = graphEntryDBI ($catalogID, $uniqueKey, $title, $environment, $dbiFilename, $interval, 121, 6, 1, 0, get_trendline_from_test ($test), 0, $debug) if ($interval > 0);
}
applications/collector.pl view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub errorTrapDBI {
my ($currentDate, $catalogID_uniqueKey, $catalogID, $uniqueKey, $test, $title, $status, $startDate, $startTime, $endDate, $endTime, $duration, $statusMessage, $perfdata, $interval, $instability, $persistent, $downtime, $filename, $error_message, $l...
print $error_message, "\nERROR: $DBI::err ($DBI::errstr)\n";
my $tlogging = $logging . get_logfiledate();
my ($msgCommand, undef) = split(/\.pl/, $test);
# APE # TODO - REMOVE
# my $rvOpen = open(DEBUG,">>$tlogging-$msgCommand-$catalogID_uniqueKey.sql");
# if ($rvOpen) {
# print DEBUG '"', $catalogID, '","","', $uniqueKey, '","I","', $test, '","', $title, '","', $status, '","', $startDate, '","', $startTime, '","', $endDate, '","', $endTime, '","', $duration, '","', $statusMessage, '","', $perfdata, '","', $inter...
# close(DEBUG);
# } else {
# print "Cannot open $tlogging-$msgCommand-$catalogID_uniqueKey.sql to print debug information\n";
# }
applications/custom/sde-supportRequest.pm-orig view on Meta::CPAN
perfdataLabel => $method .'\@'. $FQDN,
TYPE_ERROR_RETURN => 'APPEND'
);
last unless ( $returnCode );
}
$succeeded = 'SR <#>' unless ( $objectPlugins->pluginValue ( 'stateValue' ) );
my $alert = $objectPlugins->pluginValue ('alert');
my $error = $objectPlugins->pluginValue ('error');
undef $objectPlugins;
$succeeded = error_SupportRequest(*STDOUT, $error, $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -2, $onload, $sessionID) unless ( $succeeded );
return ( $succeeded, $alert, $error );
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub insertSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $outageStartDate, $outageStartTime, $description, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
return ( webserviceSupportRequest( $catalogID, $uKey, 'InsertSupportRequest', undef, undef, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug ) );
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub getSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $problemSolved, $list, $updated, $supportRequest, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
return ( webserviceSupportRequest($catalogID, $uKey, ( ( defined $list && $list ) ? 'GetSupportRequestList' : 'GetSupportRequest' ), "Customer='ASNMTAP MONITORING' and source='Alarm' CompletionCode<>'SOLVED'", 'Number,Status,CompletionCode,CI,Categ...
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub updateSupportRequest {
my ($catalogID, $uKey, $title, $remoteUser, $outageEndDate, $outageEndTime, $description, $supportRequest, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug) = @_;
return ( webserviceSupportRequest( $catalogID, $uKey, 'UpdateSupportRequest', undef, undef, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID, $debug ) );
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub error_SupportRequest {
my ($HTML, $error_message, $debug, $pagedir, $pageset, $htmlTitle, $subTitle, $refresh, $onload, $sessionID) = @_;
my $subject = "$htmlTitle / error_SupportRequest: " . get_datetimeSignal();
my $message = get_datetimeSignal() . "\npagedir : $pagedir\npageset : $pageset\nhtml title: $htmlTitle\n\nerror message:\n$error_message\n";
my $returnCode = sending_mail ( $SERVERLISTSMTP, $SENDEMAILTO, $SENDMAILFROM, $subject, $message, $debug );
applications/display-test.pl view on Meta::CPAN
exit 0;
}
# if ($boolean_daemonControl) { waitpid($pid,0); }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dchecklist (@checklisttable) {
my (undef, undef, $resultsdir, undef) = split(/\#/, $dchecklist, 4);
my $logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$logging .= "/";
create_header ($logging ."HEADER.html");
create_footer ($logging ."FOOTER.html");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/display-test.pl view on Meta::CPAN
my ($catalogID_uniqueKey, $title, $test, $help) = split(/\#/, $dtest);
my ($catalogID, $uniqueKey) = split(/_/, $catalogID_uniqueKey);
unless ( defined $uniqueKey ) {
$uniqueKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uniqueKey = $catalogID .'_'. $uniqueKey unless ( $catalogID eq 'CID' );
}
my ($command, undef) = split(/\.pl/, $test);
my $environment = (($test =~ /\-\-environment=([PASTDL])/) ? $1 : 'P');
next if (defined $environment and $environment ne $Cenvironment);
$configNumber++;
my $trendline = get_trendline_from_test($test);
my $commandPopup = maskPassword ($test);
$commandPopup =~ s/(?:\s+(--environment=[PASTDL]|--trendline=\d+))//g;
my $popup = "<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Command</TD><TD BGCOLOR=#0000FF>$commandPopup</TD></TR><TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Environment</TD><TD BGCOLOR=#0000FF>".$ENVIRONMENT{$environment}."</TD></TR><TR><T...
print "<", $CATALOGID, "><", $environment, "><", $trendline, "><", $tgroep, "><", $resultsdir, "><", $catalogID_uniqueKey, "><", $catalogID, "><", $uniqueKey, "><", $title, "><", $test, ">\n" if ($debug);
applications/display-test.pl view on Meta::CPAN
my (@itemTimelocal, @itemStatus, @itemStarttime, @itemTimeslot, @tempStatusMessage);
@itemTimelocal = @itemStatus = @itemStarttime = @itemTimeslot = @tempStatusMessage = ();
$timeValue = $lastTimeslot;
for (; $number <= $NUMBEROFFTESTS; $number++) {
push (@itemTimelocal, $timeValue);
push (@itemStatus, ($number == 1) ? 'IN PROGRESS' : 'NO DATA');
push (@itemStarttime, sprintf ("%02d:%02d:%02d", (localtime($timeValue+$timeCorrectie))[2,1,0]));
push (@itemTimeslot, $timeValue);
push (@tempStatusMessage, undef);
$timeValue -= $step;
}
$timeValue = $lastTimeslot;
$inIMW = 1;
if ($rv) {
while (my $ref = $sth->fetchrow_hashref()) {
$timeslot = ( $step ? int(($lastTimeslot - $ref->{timeslot}) / $step) : 0 );
print "<", $timeslot, "><", $ref->{title}, "><", $ref->{startTime}, "><", $ref->{timeslot}, ">\n" if ($debug);
applications/display-test.pl view on Meta::CPAN
if ($dstatus eq 'OK' and $trendline) {
my $tSeconden = int(substr($ref->{duration}, 6, 2)) + int(substr($ref->{duration}, 3, 2)*60) + int(substr($ref->{duration}, 0, 2)*3600);
$tstatus = 'TRENDLINE' if ($tSeconden > $trendline);
}
$itemStatus[$timeslot] = $tstatus;
$itemStarttime[$timeslot] = $ref->{startTime};
$itemTimeslot[$timeslot] = $ref->{timeslot};
unless ( defined $ref->{perfdata} and $ref->{perfdata} ne '' ) { # remove performance data
# ($ref->{statusMessage}, undef) = split(/\|/, $ref->{statusMessage}, 2);
my $statusMessage = reverse $ref->{statusMessage};
my ($_statusMessage, undef) = reverse split(/\|/, $statusMessage, 2);
$ref->{statusMessage} = reverse $_statusMessage;
}
if ( -e $RESULTSPATH .'/'. $ref->{filename} ) {
$ref->{filename} = $RESULTSURL .'/'. $ref->{filename};
} else {
if ( -e $ref->{filename} ) {
$ref->{filename} =~ s/^$RESULTSPATH\//$RESULTSURL\//g;
} else { # work arround for when switching from ASNMTAP_PATH in mixed environment
$ref->{filename} =~ s*^/opt/asnmtap(-3.000.xxx)+/results/*$RESULTSPATH/*g;
applications/display-test.pl view on Meta::CPAN
@multiarrayMinimalCondensedView = ( sort { $a->[3] <=> $b->[3] } @multiarrayMinimalCondensedView );
@multiarrayMinimalCondensedView = ( sort { $a->[1] cmp $b->[1] } @multiarrayMinimalCondensedView );
my $currPriorityGroup = '-MVM-P01-';
foreach my $arrayFullCondensedView ( @multiarrayMinimalCondensedView ) {
# print @$arrayFullCondensedView[2], "-", @$arrayFullCondensedView[0], "-", @$arrayFullCondensedView[3], "-", @$arrayFullCondensedView[1], "\n" if ($debug);
if ( $currPriorityGroup ne @$arrayFullCondensedView[1] ) {
$currPriorityGroup = @$arrayFullCondensedView[1];
my (undef, undef, $priorityGroup) = split( /-/, $currPriorityGroup );
print HTMLMCV '<TR><TD class="GroupHeader" COLSPAN=', $colspanDisplayTime, '>', 'Priority: '. $priorityGroup, '</TD></TR>', "\n";
}
print HTMLMCV @$arrayFullCondensedView[4];
}
print HTMLMCV '<tr style="{height: 4;}"><TD></TD></TR>', "\n";
delete @multiarrayMinimalCondensedView[0..@multiarrayMinimalCondensedView];
}
applications/display-test.pl view on Meta::CPAN
}
return ($InIMW);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printHtmlHeader {
my $htmlTitle = shift(@_);
print_header (*HTML, $pagedir, "$pageset-cv", $htmlTitle, "Full View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTML '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLCV, $pagedir, "$pageset-mcv", $htmlTitle, "Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTMLCV '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLMCV, $pagedir, "$pageset", $htmlTitle, "Minimal Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef...
print HTMLMCV '<TABLE WIDTH="100%">', "\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printGroepHeader {
my ($title, $show) = @_;
if ($show) {
$groupFullView = $groupCondensedView = 0;
applications/display.pl view on Meta::CPAN
exit 0;
}
# if ($boolean_daemonControl) { waitpid($pid,0); }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub resultsdirCreate {
foreach $dchecklist (@checklisttable) {
my (undef, undef, $resultsdir, undef) = split(/\#/, $dchecklist, 4);
my $logging = $RESULTSPATH .'/'. $resultsdir;
create_dir ($logging);
$logging .= "/";
create_header ($logging ."HEADER.html");
create_footer ($logging ."FOOTER.html");
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/display.pl view on Meta::CPAN
my ($catalogID_uniqueKey, $title, $test, $help) = split(/\#/, $dtest);
my ($catalogID, $uniqueKey) = split(/_/, $catalogID_uniqueKey);
unless ( defined $uniqueKey ) {
$uniqueKey = $catalogID;
$catalogID = $CATALOGID;
$catalogID_uniqueKey = $catalogID .'_'. $uniqueKey unless ( $catalogID eq 'CID' );
}
my ($command, undef) = split(/\.pl/, $test);
my $environment = (($test =~ /\-\-environment=([PASTDL])/) ? $1 : 'P');
next if (defined $environment and $environment ne $Cenvironment);
$configNumber++;
my $trendline = get_trendline_from_test($test);
my $commandPopup = maskPassword ($test);
$commandPopup =~ s/(?:\s+(--environment=[PASTDL]|--trendline=\d+))//g;
my $popup = "<TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Command</TD><TD BGCOLOR=#0000FF>$commandPopup</TD></TR><TR><TD BGCOLOR=#000080 WIDTH=100 ALIGN=RIGHT>Environment</TD><TD BGCOLOR=#0000FF>".$ENVIRONMENT{$environment}."</TD></TR><TR><T...
print "<", $CATALOGID, "><", $environment, "><", $trendline, "><", $tgroep, "><", $resultsdir, "><", $catalogID_uniqueKey, "><", $catalogID, "><", $uniqueKey, "><", $title, "><", $test, ">\n" if ($debug);
applications/display.pl view on Meta::CPAN
my (@itemTimelocal, @itemStatus, @itemStarttime, @itemTimeslot, @tempStatusMessage);
@itemTimelocal = @itemStatus = @itemStarttime = @itemTimeslot = @tempStatusMessage = ();
$timeValue = $lastTimeslot;
for (; $number <= $NUMBEROFFTESTS; $number++) {
push (@itemTimelocal, $timeValue);
push (@itemStatus, ($number == 1) ? 'IN PROGRESS' : 'NO DATA');
push (@itemStarttime, sprintf ("%02d:%02d:%02d", (localtime($timeValue+$timeCorrectie))[2,1,0]));
push (@itemTimeslot, $timeValue);
push (@tempStatusMessage, undef);
$timeValue -= $step;
}
$timeValue = $lastTimeslot;
$inIMW = 1;
if ($rv) {
while (my $ref = $sth->fetchrow_hashref()) {
$timeslot = ( $step ? int(($lastTimeslot - $ref->{timeslot}) / $step) : 0 );
print "<", $timeslot, "><", $ref->{title}, "><", $ref->{startTime}, "><", $ref->{timeslot}, ">\n" if ($debug);
applications/display.pl view on Meta::CPAN
if ($dstatus eq 'OK' and $trendline) {
my $tSeconden = int(substr($ref->{duration}, 6, 2)) + int(substr($ref->{duration}, 3, 2)*60) + int(substr($ref->{duration}, 0, 2)*3600);
$tstatus = 'TRENDLINE' if ($tSeconden > $trendline);
}
$itemStatus[$timeslot] = $tstatus;
$itemStarttime[$timeslot] = $ref->{startTime};
$itemTimeslot[$timeslot] = $ref->{timeslot};
unless ( defined $ref->{perfdata} and $ref->{perfdata} ne '' ) { # remove performance data
# ($ref->{statusMessage}, undef) = split(/\|/, $ref->{statusMessage}, 2);
my $statusMessage = reverse $ref->{statusMessage};
my ($_statusMessage, undef) = reverse split(/\|/, $statusMessage, 2);
$ref->{statusMessage} = reverse $_statusMessage;
}
if ( -e $RESULTSPATH .'/'. $ref->{filename} ) {
$ref->{filename} = $RESULTSURL .'/'. $ref->{filename};
} else {
if ( -e $ref->{filename} ) {
$ref->{filename} =~ s/^$RESULTSPATH\//$RESULTSURL\//g;
} else { # work arround for when switching from ASNMTAP_PATH in mixed environment
$ref->{filename} =~ s*^/opt/asnmtap(-3.000.xxx)+/results/*$RESULTSPATH/*g;
applications/display.pl view on Meta::CPAN
@multiarrayMinimalCondensedView = ( sort { $a->[3] <=> $b->[3] } @multiarrayMinimalCondensedView );
@multiarrayMinimalCondensedView = ( sort { $a->[1] cmp $b->[1] } @multiarrayMinimalCondensedView );
my $currPriorityGroup = '-MVM-P01-';
foreach my $arrayFullCondensedView ( @multiarrayMinimalCondensedView ) {
# print @$arrayFullCondensedView[2], "-", @$arrayFullCondensedView[0], "-", @$arrayFullCondensedView[3], "-", @$arrayFullCondensedView[1], "\n" if ($debug);
if ( $currPriorityGroup ne @$arrayFullCondensedView[1] ) {
$currPriorityGroup = @$arrayFullCondensedView[1];
my (undef, undef, $priorityGroup) = split( /-/, $currPriorityGroup );
print HTMLMCV '<TR><TD class="GroupHeader" COLSPAN=', $colspanDisplayTime, '>', 'Priority: '. $priorityGroup, '</TD></TR>', "\n";
}
print HTMLMCV @$arrayFullCondensedView[4];
}
print HTMLMCV '<tr style="{height: 4;}"><TD></TD></TR>', "\n";
delete @multiarrayMinimalCondensedView[0..@multiarrayMinimalCondensedView];
}
applications/display.pl view on Meta::CPAN
}
return ($InIMW);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printHtmlHeader {
my $htmlTitle = shift(@_);
print_header (*HTML, $pagedir, "$pageset-cv", $htmlTitle, "Full View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTML '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLCV, $pagedir, "$pageset-mcv", $htmlTitle, "Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef);
print HTMLCV '<TABLE WIDTH="100%">', "\n";
print_header (*HTMLMCV, $pagedir, "$pageset", $htmlTitle, "Minimal Condenced View", 60, "ONLOAD=\"startRefresh(); initSound();\"", 'T', "<script type=\"text/javascript\" src=\"$HTTPSURL/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>", undef...
print HTMLMCV '<TABLE WIDTH="100%">', "\n";
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub printGroepHeader {
my ($title, $show) = @_;
if ($show) {
$groupFullView = $groupCondensedView = 0;
applications/htmlroot/CalendarPopup.js view on Meta::CPAN
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================
function CalendarPopup(){var c;if(arguments.length>0){c = new PopupWindow(arguments[0]);}else{c = new PopupWindow();c.setSize(150,175);}c.offsetX = -152;c.offsetY = 25;c.autoHide();c.monthNames = new Array("January","February","March","April","May","...
function CP_copyMonthNamesToWindow(){if(typeof(window.MONTH_NAMES)!="undefined" && window.MONTH_NAMES!=null){window.MONTH_NAMES = new Array();for(var i=0;i<this.monthNames.length;i++){window.MONTH_NAMES[window.MONTH_NAMES.length] = this.monthNames[i]...
function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt = new Date(y,m-1,d,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow();}window.CP_targetInput.value = formatDate(dt,window.CP_dateForm...
function CP_tmpReturnMonthFunction(y,m){alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m);}
function CP_tmpReturnQuarterFunction(y,q){alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q);}
function CP_tmpReturnYearFunction(y){alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y);}
function CP_setReturnFunction(name){this.returnFunction = name;}
function CP_setReturnMonthFunction(name){this.returnMonthFunction = name;}
function CP_setReturnQuarterFunction(name){this.returnQuarterFunction = name;}
function CP_setReturnYearFunction(name){this.returnYearFunction = name;}
function CP_setMonthNames(){for(var i=0;i<arguments.length;i++){this.monthNames[i] = arguments[i];}this.copyMonthNamesToWindow();}
function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++){this.monthAbbreviations[i] = arguments[i];}this.copyMonthNamesToWindow();}
applications/htmlroot/CalendarPopup.js view on Meta::CPAN
function CP_setDisabledWeekDays(){this.disabledWeekDays = new Object();for(var i=0;i<arguments.length;i++){this.disabledWeekDays[arguments[i]] = true;}}
function CP_addDisabledDates(start, end){if(arguments.length==1){end=start;}if(start==null && end==null){return;}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+= "||";}if(start!=null){start = parseDate(start);start=""+start.getFull...
function CP_setTodayText(text){this.todayText = text;}
function CP_setCssPrefix(val){this.cssPrefix = val;}
function CP_showNavigationDropdowns(){this.isShowNavigationDropdowns =(arguments.length>0)?arguments[0]:true;}
function CP_showYearNavigationInput(){this.isShowYearNavigationInput =(arguments.length>0)?arguments[0]:true;}
function CP_hideCalendar(){if(arguments.length > 0){window.popupWindowObjects[arguments[0]].hidePopup();}else{this.hidePopup();}}
function CP_refreshCalendar(index){var calObject = window.popupWindowObjects[index];if(arguments.length>1){calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));}else{calObject.populate(calObject....
function CP_showCalendar(anchorname){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date();}else{this.currentDate=new Date(parseDate(arguments[1]));}}this.populate(this.getCalendar());this.showPopup(anchorname);}
function CP_select(inputobj, linkname, format){var selectedDate=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return;}if(this.disp...
function getCalendarStyles(){var result = "";var p = "";if(this!=null && typeof(this.cssPrefix)!="undefined" && this.cssPrefix!=null && this.cssPrefix!=""){p=this.cssPrefix;}result += "<STYLE>\n";result += "."+p+"cpYearNavigation,."+p+"cpMonthNavigat...
function CP_getCalendar(){var now = new Date();if(this.type == "WINDOW"){var windowref = "window.opener.";}else{var windowref = "";}var result = "";if(this.type == "WINDOW"){result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BO...
applications/htmlroot/cgi-bin/admin/countries.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&countryID=$CcountryID&countryName=$CcountryName&activated=$Cactivated";
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action : $action<br>country ID ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($matchingCountries, $navigationBar);
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton, $uKeySelect);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&lineNumber=$ClineNumber&uKey=...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $collectorDaemonSelect, $matchingCrontabs, $navigationBar);
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
} else {
$htmlTitle = "All crontabs listed";
$nextAction = "listView";
$sqlWhereCount = "where $SERVERTABLCRONTABS.catalogID='$CcatalogID'";
$sqlWhereList = " $SERVERTABLCRONTABS.catalogID='$CcatalogID' and";
$urlWithAccessParametersQuery = "&catalogID=$CcatalogID";
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(lineNumber) from $SERVERTABLCRONTABS $sqlWhereCount";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=$nextAction&orderBy=$orderBy$urlWithAcces...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLCRONTABS, 'uKey', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISES...
my ($catalogID, $lineNumber, $uKey, $groupName, $minute, $hour, $dayOfTheMonth, $monthOfTheYear, $dayOfTheWeek, $noOffline, $activated, $title);
$sql = "select $SERVERTABLCRONTABS.catalogID, $SERVERTABLCRONTABS.lineNumber, $SERVERTABLCRONTABS.uKey, $SERVERTABLCLLCTRDMNS.groupName, $SERVERTABLCRONTABS.minute, $SERVERTABLCRONTABS.hour, $SERVERTABLCRONTABS.dayOfTheMonth, $SERVERTABLCRONTAB...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
applications/htmlroot/cgi-bin/admin/crontabs.pl view on Meta::CPAN
if ($action eq 'insertView' or $action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'crontabView') {
if ($CuKey eq 'none' or $action eq 'duplicateView') {
$sql = "select uKey, concat( title, ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where catalogID = '$CcatalogID' and $SERVERTABLPLUGINS.environment = $SERVERTABLENVIRONMENT.envi...
} else {
$sql = "select uKey, concat( title, ' (', $SERVERTABLENVIRONMENT.label, ')' ) from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where uKey = '$CuKey' and catalogID = '$CcatalogID' and $SERVERTABLPLUGINS.environment = $SERVERTABLENVIRONMENT.envi...
}
($rv, $uKeySelect, $htmlTitle) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, $nextAction, $CuKey, 'uKey', 'none', '-Select-', $formDisabledPrimaryKey, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select collectorDaemon, groupName from $SERVERTABLCLLCTRDMNS where catalogID = '$CcatalogID' order by groupName";
($rv, $collectorDaemonSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcollectorDaemon, 'collectorDaemon', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
if ( $rv ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ($action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView' or $action eq 'crontabView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $numberCentralServers, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton);
my (@matchingAsnmtapCollectorCTscript, @matchingAsnmtapDisplayCTscript, %ASNMTAP_PATH);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=$action&auto=$Cauto";
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>action : $action<br>auto : $Cauto<br>URL ... : $urlAccessParameters</pre>" i...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my $urlWithAccessParameters = $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ( $rv ) {
if ( $sth->rows ) {
my @plugins = glob("$PLUGINPATH/*.pl");
while( $sth->fetch() ) {
my $teller = 0;
foreach my $plugin (@plugins) {
if ( defined $plugin and defined $test and $plugin eq "$PLUGINPATH/$test" ) {
$plugins[$teller] = undef;
last;
}
$teller++
}
}
foreach my $pluginPath (@plugins) {
if (defined $pluginPath) {
(undef, my $plugin) = split (/^$PLUGINPATH\//, $pluginPath);
$actionItem = "<a href=\"$urlWithAccessParameters&action=updateView&plugin=$plugin&todo=delete\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{delete}\" title=\"Delete Plugin\" alt=\"Delete Plugin\" border=\"0\"></a>"...
$matchingWarnings .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$plugin</td><td>plugin uploaded without plugin configuration</td><td align=\"center\">$actionItem</td></tr>";
$countWarnings++;
}
}
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ( $rv ) {
if ( $sth->rows ) {
my @helpPluginFilenames = glob("$PDPHELPPATH/*");
while( $sth->fetch() ) {
my $teller = 0;
foreach my $helpPluginPathFilename (@helpPluginFilenames) {
if ( $helpPluginPathFilename eq "$PDPHELPPATH/$helpPluginFilename" ) {
$helpPluginFilenames[$teller] = undef;
last;
}
$teller++
}
}
foreach my $helpPluginPathFilename (@helpPluginFilenames) {
if (defined $helpPluginPathFilename) {
(undef, $helpPluginFilename) = split (/^$PDPHELPPATH\//, $helpPluginPathFilename);
$actionItem = "<a href=\"$urlWithAccessParameters&action=updateView&helpPluginFilename=$helpPluginFilename&todo=delete\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{delete}\" title=\"Delete Help Plugin Filename\" al...
$matchingWarnings .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$helpPluginFilename</td><td>help plugin filename without plugin reference</td><td align=\"center\">$actionItem</td></tr>";
$countWarnings++;
}
}
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID);
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ( $prevCollectorDaemon ne '' ) {
if ($rvOpen) {
print CollectorCT "#\n# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n# Einde CollectorCT-$prevCollectorDaemon - $prevServerID";
close(CollectorCT);
$rvOpen = 0;
$typeMonitoringCharDorC = ($prevTypeMonitoring) ? 'D' : 'C';
if ($prevTypeServers) {
$matchingCollectorCT .= system_call ("cp", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$prevTypeActiveServer-$prevMasterFQDN/etc/CollectorCT-$prevCollectorDaemon $APPLICATIONPATH/tmp/$CONFIGDIR/gene...
my ($hostnameAdminCollector, undef) = split (/\./, $prevMasterFQDN, 2);
if ( $prevCollectorDaemon eq $hostnameAdminCollector ) {
unlink ("$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$prevTypeActiveServer-$prevSlaveFQDN/etc/CollectorCT-$prevCollectorDaemon");
} else {
my ($hostnameAdminCollector, undef) = split (/\./, $prevSlaveFQDN, 2);
unlink ("$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$prevTypeActiveServer-$prevMasterFQDN/etc/CollectorCT-$prevCollectorDaemon") if ( $prevCollectorDaemon eq $hostnameAdminCollector );
}
}
$matchingCollectorCT .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>CollectorCT-$prevCollectorDaemon - $serverID, generated on $configDateTime, ASNMTAP v$version or higher</td></tr>";
}
}
$matchingCollectorCT .= "\n <tr><th>CollectorCT - $serverID</th></tr>" if ( $prevServerID ne $serverID and $prevCollectorDaemon ne $collectorDaemon );
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
if ($rvOpen) {
print CollectorCT "#\n# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n# Einde CollectorCT-$collectorDaemon - $serverID\n";
close(CollectorCT);
$rvOpen = 0;
$typeMonitoringCharDorC = ($typeMonitoring) ? 'D' : 'C';
if ($prevTypeServers) {
$matchingCollectorCT .= system_call ("cp", "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/CollectorCT-$collectorDaemon $APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMoni...
my ($hostnameAdminCollector, undef) = split (/\./, $masterFQDN, 2);
if ( $collectorDaemon eq $hostnameAdminCollector ) {
unlink ("$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/etc/CollectorCT-$collectorDaemon");
} else {
my ($hostnameAdminCollector, undef) = split (/\./, $slaveFQDN, 2);
unlink ("$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN/etc/CollectorCT-$collectorDaemon") if ( $collectorDaemon eq $hostnameAdminCollector );
}
}
$matchingCollectorCT .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>CollectorCT-$collectorDaemon - $serverID, generated on $configDateTime, ASNMTAP v$version or higher</td></tr>";
}
} else {
$matchingCollectorCT .= " <tr><td>No records found for any CollectorCT</td></tr>\n";
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$matchingRsyncMirror .= createRsyncMirrorScriptsFailover ($prevServerID, $prevTypeMonitoring, $prevTypeServers, $prevTypeActiveServer, $prevMasterFQDN, $prevMasterASNMTAP_PATH, $prevMasterRSYNC_PATH, $prevMasterSSH_PATH, $prevSlaveF...
$matchingRsyncMirror .= createRsyncMirrorScriptsDistributed ($prevServerID, $prevTypeMonitoring, $prevTypeServers, $prevTypeActiveServer, $prevMasterFQDN, $prevMasterASNMTAP_PATH, $prevMasterRSYNC_PATH, $prevMasterSSH_PATH, $prevSla...
$matchingRsyncMirror .= "\n <tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>Rsync Mirror Scripts - $prevServerID, generated on $configDateTime, ASNMTAP v$version or higher</td></tr>" unless ($sameServerID);
$matchingRsyncMirrorConfigFailover = $matchingRsyncMirrorConfigDistributedMaster = $matchingRsyncMirrorConfigDistributedSlave = '';
}
$matchingRsyncMirror .= "\n <tr><th>Rsync Mirroring Setup - $serverID</th></tr>" unless ($sameServerID);
}
if ($typeServers) {
my ($hostnameAdminCollector, undef) = split (/\./, $slaveFQDN, 2);
if ( $collectorDaemon eq $hostnameAdminCollector ) {
$matchingRsyncMirrorConfigFailover .= "$SSHLOGONNAME\@$slaveFQDN:$slaveASNMTAP_PATH/results/$resultsdir/ $masterASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-KnownError --exclude=*.tm...
} else {
$matchingRsyncMirrorConfigFailover .= "$SSHLOGONNAME\@$masterFQDN:$masterASNMTAP_PATH/results/$resultsdir/ $slaveASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-KnownError --exclude=*.t...
}
}
if ($typeMonitoring) {
$matchingRsyncMirrorConfigDistributedMaster .= "$masterASNMTAP_PATH/results/$resultsdir/ $SSHLOGONNAME\@$centralMasterFQDN:$centralMasterASNMTAP_PATH/results/$resultsdir/ -v -c -z --exclude=*-all.txt --exclude=*-nok.txt --exclude=*-Kn...
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_legend (*STDOUT);
print '</BODY>', "\n", '</HTML>', "\n";
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub createCollectorCTscript {
my ($typeMonitoringCharDorC, $typeServersCharMorS, $typeActiveServer, $serverFQDN, $serverAdminCollectorFQDN, $serverASNMTAP_PATH , $serverRSYNC_PATH , $serverSSH_PATH, $databaseFQDN, $subdir, $collectorDaemon, $mode, $dumphttp, $status, $debugDaem...
my ($hostnameAdminCollector, undef) = split (/\./, $serverAdminCollectorFQDN, 2);
return ('') if ( "CollectorCT-$collectorDaemon.sh" eq "CollectorCT-${hostnameAdminCollector}.sh" );
my $filename = "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/$typeMonitoringCharDorC$typeServersCharMorS-$typeActiveServer-$serverFQDN/$subdir/CollectorCT-$collectorDaemon.sh";
my $command = "cat $APPLICATIONPATH/tools/templates/CollectorCT-template.sh >> $filename";
my $rvOpen = open(CollectorCT, ">$filename");
if ($rvOpen) {
print CollectorCT <<STARTUPFILE;
#!/bin/bash
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
STARTUPFILE
foreach my $choise ('start', 'stop', 'reload', 'restart', 'status') {
print AsnmtapCollectorCTscript <<STARTUPFILE;
$choise() {
# $choise daemons
echo "\u$choise: '\$AMNAME' ..."
cd \$AMPATH
STARTUPFILE
my ($hostname, undef) = split (/\./, $serverFQDN, 2);
my ($hostnameAdminCollector, undef) = split (/\./, $serverAdminCollectorFQDN, 2);
if ( $typeServersCharMorS eq $typeActiveServer or $choise eq 'stop' ) {
foreach my $matchingAsnmtapCollectorCTscript (@matchingAsnmtapCollectorCTscript) {
unless ( $matchingAsnmtapCollectorCTscript eq "CollectorCT-${hostnameAdminCollector}.sh" ) {
print AsnmtapCollectorCTscript " ./$matchingAsnmtapCollectorCTscript $choise\n";
}
}
} else {
print AsnmtapCollectorCTscript " ./CollectorCT-${hostname}.sh $choise\n";
}
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
close (RsyncMirror);
}
$statusMessage .= do_system_call ($command, $debug);
$statusMessage .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><a href=\"/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/master/rsync-wrapper-failover-$masterFQDN.sh\" target=\"_blank\">rsync-wrapper-failover-$...
}
$statusMessage .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td>Failover Monitoring from $slaveFQDN for Collector Daemon '$collectorDaemon'</td></tr>";
my ($hostnameAdminCollector, undef) = split (/\./, $slaveFQDN, 2);
if ( $collectorDaemon eq $hostnameAdminCollector ) {
# ------------------------------------------------------------------------
# Failover between $slaveFQDN and $masterFQDN
# ------------------------------------------------------------------------
$filename = "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN/slave/rsync-wrapper-failover-$slaveFQDN.sh";
unless ( -e $filename ) {
$statusMessage .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td>Failover between $slaveFQDN and $masterFQDN</td></tr>";
$command = "cat $APPLICATIONPATH/tools/templates/master/rsync-wrapper-failover-template.sh >> $filename";
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
close (RsyncMirror);
}
$statusMessage .= do_system_call ($command, $debug);
$statusMessage .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td><a href=\"/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "S-$typeActiveServer-$slaveFQDN/slave/rsync-wrapper-failover-$slaveFQDN.sh\" target=\"_blank\">rsync-wrapper-failover-$s...
}
$statusMessage .= "<tr bgcolor=\"$COLORSTABLE{ENDBLOCK}\"><td>Failover Monitoring from $masterFQDN for Admin Collector Daemon '$collectorDaemon'</td></tr>";
my ($hostnameAdminCollector, undef) = split (/\./, $slaveFQDN, 2);
return ($statusMessage) unless ( $collectorDaemon eq $hostnameAdminCollector );
$filename = "$APPLICATIONPATH/tmp/$CONFIGDIR/generated/" .$typeMonitoringCharDorC. "M-$typeActiveServer-$masterFQDN/master/rsync-mirror-failover-$masterFQDN-$collectorDaemon.sh";
$command = "cat $APPLICATIONPATH/tools/templates/slave/rsync-mirror-failover-template.sh >> $filename";
$rvOpen = open(RsyncMirror, ">$filename");
if ($rvOpen) {
print RsyncMirror <<RSYNCMIRRORFILE;
#!/bin/bash
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
sub do_compare_view {
my ($command, $details, $debug) = @_;
sub do_compare_diff {
my ($compareView, $type, $details, $debug) = @_;
my ($path, $generated, $installed, $compareDiff);
$path = $generated = $installed = '';
if ($type == 1) {
my (undef, $dummy) = split (/Only in generated\//, $compareView);
($path, $generated) = split (/: /, $dummy);
$compareDiff = "$path/$generated added" if ( $debug eq 'T' );
} elsif ($type == 2) {
my (undef, $dummy) = split (/Only in installed\//, $compareView);
($path, $installed) = split (/: /, $dummy);
$compareDiff = "$path/$installed removed" if ( $debug eq 'T' );
} elsif ($type == 3) {
my (undef, $dummy) = split (/Files /, $compareView);
($generated, $dummy) = split (/ and /, $dummy);
($installed, undef) = split (/ differ/, $dummy);
$compareDiff = "$generated and $installed differ<BR>" if ( $debug eq 'T' );
if ($details) {
my $command = "$DIFFCOMMAND -bra -I 'generated on 20[0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]' $APPLICATIONPATH/tmp/$CONFIGDIR/$generated $APPLICATIONPATH/tmp/$CONFIGDIR/$installed";
my @compareDiff = `$command 2>&1`;
foreach my $compareLine (@compareDiff) { $compareDiff .= "$compareLine<BR>"; };
}
}
return ($path, $generated, $installed, $compareDiff);
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$commands {$server} {TODO} {$_id} {active} = $active;
$commands {$server} {TODO} {$_id} {command} = "Add 'n-59/5 * * * * $APPLICATIONPATH/$path/$generated > /dev/null' to crontab ?";
$compareText .= '<br><FONT COLOR="yellow"> ['. $_id .'] '. $commands {$server} {TODO} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
$todo = 1;
}
}
} elsif ( $compareView =~ /^Only in generated:/ ) {
if ($details) {
$compareText = "$compareView";
} else {
my (undef, $servername) = split (/: /, $compareView, 2);
($type, $activeServer, $server) = split (/-/, $servername, 3);
my $active = ( ( $type =~ /^[CD]${activeServer}$/ ) ? 1 : 0 );
$commands {$server} {SCP} {++$_id} {auto} = 1;
$commands {$server} {SCP} {$_id} {label} = '+f';
$commands {$server} {SCP} {$_id} {active} = $active;
$commands {$server} {SCP} {$_id} {command} = "$SCPCOMMAND $connectArguments $APPLICATIONPATH/tmp/$CONFIGDIR/generated/$servername $SSHLOGONNAME\@$server ". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } .'/applications';
$compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {SCP} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
$commands {$server} {TODO} {++$_id} {auto} = 0;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$commands {$server} {STOP} {$_id} {command} = "$SSHCOMMAND $connectArguments $SSHLOGONNAME\@$server ". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } .'/applications'. ( (defined $directory) ? "/$directory" : '' ) ."/$installed stop"...
$compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {STOP} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
} elsif ((($type eq 'CS' or $type eq 'DS') and ($installed =~ /^rsync-mirror-failover-[\w\-.]+.sh$/))
or (($type eq 'DM' or $type eq 'DS') and ($installed =~ /^rsync-mirror-distributed-[\w\-.]+.sh$/))) {
$commands {$server} {CRONTAB} {++$_id} {auto} = 0;
$commands {$server} {CRONTAB} {$_id} {label} = '-b';
$commands {$server} {CRONTAB} {$_id} {active} = $active;
$commands {$server} {CRONTAB} {$_id} {command} = "$SSHCOMMAND $connectArguments $SSHLOGONNAME\@$server DELETE ". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } .'/applications'. ( (defined $directory) ? "/$directory" : '' ) ."/$insta...
$compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {CRONTAB} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
# my ($installedConf, undef) = split (/.sh/, $installed);
# $commands {$server} {REMOVE} {++$_id} {auto} = 0;
# $commands {$server} {REMOVE} {$_id} {label} = '-c';
# $commands {$server} {REMOVE} {$_id} {active} = $active;
# $commands {$server} {REMOVE} {$_id} {command} = "$SSHCOMMAND $connectArguments $SSHLOGONNAME\@$server rm ". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } .'/applications'. ( (defined $directory) ? "/$directory" : '' ) ."/$installedC...
# $compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {REMOVE} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
$todo = 1;
} elsif ((($type eq 'CM' or $type eq 'DM') and ($installed =~ /^rsync-wrapper-failover-[\w\-.]+.sh$/))
or (($type eq 'CM' or $type eq 'CS') and ($installed =~ /^rsync-wrapper-distributed-[\w\-.]+.sh$/))) {
$commands {$server} {TODO} {++$_id} {auto} = 0;
$commands {$server} {TODO} {$_id} {label} = '-d';
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$commands {$server} {REMOVE} {++$_id} {auto} = 1;
$commands {$server} {REMOVE} {$_id} {label} = '-f';
$commands {$server} {REMOVE} {$_id} {active} = $active;
$commands {$server} {REMOVE} {$_id} {command} = "$SSHCOMMAND $connectArguments $SSHLOGONNAME\@$server rm ". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } .'/applications'. ( (defined $directory) ? "/$directory" : '' ) ."/$installed";
$compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {REMOVE} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
}
} elsif ( $compareView =~ /^Only in installed:/ ) {
if ($details) {
$compareText = "$compareView";
} else {
my (undef, $servername) = split (/: /, $compareView, 2);
($type, $activeServer, $server) = split (/-/, $servername, 3);
my $active = ( ( $type =~ /^[CD]${activeServer}$/ ) ? 1 : 0 );
$commands {$server} {TODO} {++$_id} {auto} = 0;
$commands {$server} {TODO} {$_id} {label} = '-g';
$commands {$server} {TODO} {$_id} {active} = $active;
$commands {$server} {TODO} {$_id} {command} = read_directory ("$APPLICATIONPATH/tmp/$CONFIGDIR/installed", '', '', '', $debug) ." ?";
$compareText .= '<br><FONT COLOR="yellow"> ['. $_id .'] '. $commands {$server} {TODO} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
$commands {$server} {STOP} {++$_id} {auto} = 0;
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$compareText .= '<br><FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {REMOVE} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
$todo = 1;
}
} elsif ( $compareView =~ /^Files generated\// ) {
($path, $generated, $installed, $compareDiff) = do_compare_diff ($compareView, 3, $details, $debug);
if ($details) {
$compareText = "File '$generated' changed into the generated configuration.";
} else {
my (undef, $servername, $filename) = split (/\//, $generated, 3);
($type, $activeServer, $server) = split (/-/, $servername, 3);
my $active = ( ( $type =~ /^[CD]${activeServer}$/ ) ? 1 : 0 );
# Replace 'distributed.citap.be:/opt/asnmtap/applications/slave/asnmtap-display.sh' with '/opt/asnmtap/applications/tmp/$CONFIGDIR/generated/DS-[SM]-distributed.citap.be/slave/asnmtap-display.sh'
# <----- $server ---->:$APPLICATIONPATH/<------ $filename -----> $APPLICATIONPATH/tmp/ /<---------------------- $generated ---------------------->
$commands {$server} {SCP} {++$_id} {auto} = 1;
$commands {$server} {SCP} {$_id} {label} = '=a';
$commands {$server} {SCP} {$_id} {active} = $active;
$commands {$server} {SCP} {$_id} {command} = "$SCPCOMMAND $connectArguments $APPLICATIONPATH/tmp/$CONFIGDIR/$generated $SSHLOGONNAME\@$server:". $ASNMTAP_PATH { substr ($type, -1, 1) } { $server } ."/applications/$filename";
$compareText .= '<FONT COLOR="#99CC99"> ['. $_id .'] '. $commands {$server} {SCP} {$_id} {command} .'</FONT>' if ( $debug eq 'T' );
applications/htmlroot/cgi-bin/admin/holidays.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&holidayID=$CholidayID&formule...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action : $action<br>catalog ID ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $countryIDSelect, $matchingHolidays, $navigationBar);
applications/htmlroot/cgi-bin/admin/holidays.pl view on Meta::CPAN
}
} elsif ($action eq 'listView') {
$htmlTitle = "All holidays listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(holidayID) from $SERVERTABLHOLIDYS where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLHOLIDYS, 'holiday', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGIS...
$sql = "select $SERVERTABLHOLIDYS.catalogID, $SERVERTABLHOLIDYS.holidayID, $SERVERTABLHOLIDYS.formule, $SERVERTABLHOLIDYS.month, $SERVERTABLHOLIDYS.day, $SERVERTABLHOLIDYS.offset, $SERVERTABLCOUNTRIES.countryName, $SERVERTABLHOLIDYS.holiday, $S...
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, formule asc, countryName asc, holiday asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccess...
$header .= "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=countryName desc, holiday asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Country <a href=\"$urlWithAccessParameters&action=listView&...
applications/htmlroot/cgi-bin/admin/holidays.pl view on Meta::CPAN
$CholidayID = '';
}
$Cactivated = ($Cactivated == 1) ? 'on' : 'off';
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
$sql = "select countryID, countryName from $SERVERTABLCOUNTRIES where activated = '1' order by countryName";
($rv, $countryIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcountryID, 'countryID', 'none', '-Select-', $formDisabledPrimaryKey, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
if ( $rv ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ($action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, "onload=\"javascript:enableDisableFields();\"", 'F', '', $sessionID);
applications/htmlroot/cgi-bin/admin/holidaysBundle.pl view on Meta::CPAN
my $CholidayID = (@CholidayID) ? '/'. join ('/', @CholidayID) .'/' : '';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledNoCountryID, $formDisabledPrimaryKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&holidayBundleID=$CholidayBund...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>actio...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $countryIDSelect, $holidaysSelect, $matchingHolidaysBundle, $matchingPlugins, $navigationBar);
applications/htmlroot/cgi-bin/admin/holidaysBundle.pl view on Meta::CPAN
}
} elsif ($action eq 'listView') {
$htmlTitle = "All holiday bundles listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(holidayBundleID) from $SERVERTABLHOLIDYSBNDL where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLHOLIDYSBNDL, 'holidayBundleName', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$...
$sql = "select $SERVERTABLHOLIDYSBNDL.catalogID, $SERVERTABLHOLIDYSBNDL.holidayBundleID, $SERVERTABLHOLIDYSBNDL.holidayBundleName, $SERVERTABLHOLIDYSBNDL.activated from $SERVERTABLHOLIDYSBNDL where $SERVERTABLHOLIDYSBNDL.catalogID = '$CcatalogI...
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, holidayBundleName asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action...
($rv, $matchingHolidaysBundle, $nextAction) = record_navigation_table ($rv, $dbh, $sql, 'Holiday Bundle', 'catalogID|holidayBundleID', '0|1', '1', '', '', $orderBy, $header, $navigationBar, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $nextA...
applications/htmlroot/cgi-bin/admin/holidaysBundle.pl view on Meta::CPAN
$CholidayBundleID = 'new';
}
$Cactivated = ($Cactivated == 1) ? 'on' : 'off';
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
$sql = "select countryID, countryName from $SERVERTABLCOUNTRIES where activated = '1' order by countryName";
($rv, $countryIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcountryID, 'countryID', 'none', '-Select-', $formDisabledAll, 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $de...
if ( $CcountryID ne 'none' ) {
$sql = "select holidayID, holiday from $SERVERTABLHOLIDYS where catalogID = '$CcatalogID' and (countryID = '$CcountryID' or countryID = '00') order by holiday";
($rv, $holidaysSelect) = create_combobox_multiple_from_DBI ($rv, $dbh, $sql, $action, $CholidayID, 'holidayID', 'Country missing', 20, 64, $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$formDisabledNoCountryID = '';
} else {
$holidaysSelect = 'Country missing';
$formDisabledNoCountryID = 'disabled';
}
}
applications/htmlroot/cgi-bin/admin/index.pl view on Meta::CPAN
my $cgi = new CGI;
my $pagedir = (defined $cgi->param('pagedir')) ? $cgi->param('pagedir') : '<NIHIL>'; $pagedir =~ s/\+/ /g;
my $pageset = (defined $cgi->param('pageset')) ? $cgi->param('pageset') : 'admin'; $pageset =~ s/\+/ /g;
my $debug = (defined $cgi->param('debug')) ? $cgi->param('debug') : 'F';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID";
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>URL ... : $urlAccessParameters</pre>" if ( $debug eq 'T' );
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
applications/htmlroot/cgi-bin/admin/languages.pl view on Meta::CPAN
my $ClanguageActive = (defined $cgi->param('languageActive')) ? $cgi->param('languageActive') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&keyLanguage=$CkeyLanguage&languageName=$ClanguageName&languageFamily=$ClanguageFamily...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action : $action<br>unique key ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($matchingLanguages, $navigationBar);
applications/htmlroot/cgi-bin/admin/plugins.pl view on Meta::CPAN
my $Cpagedir = (@Cpagedir) ? '/'. join ('/', @Cpagedir) .'/' : '';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledUniqueKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&filter=$filter&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&uKey=$CuKey&te...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>filter : $filter<br>order by ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
if ( $ChelpPluginFilename eq '' or $ChelpPluginFilename eq '<NIHIL>' ) {
$ChelpPluginFilename = ( $ChelpPluginTextname eq '' ? '<NIHIL>' : $ChelpPluginTextname );
applications/htmlroot/cgi-bin/admin/plugins.pl view on Meta::CPAN
$htmlTitle = ( $doFilter ) ? "All plugins matching filter: $filter" : "All plugins listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
my $andFilter = ( ( $doFilter ) ? "AND title regexp '$filter'" : '' );
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(uKey) from $SERVERTABLPLUGINS where catalogID = '$CcatalogID' $andFilter";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&fi...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLPLUGINS, 'title', "catalogID = '$CcatalogID' $andFilter", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug...
$sql = "select catalogID, uKey, title, environment, ondemand, production, pagedir, resultsdir, activated from $SERVERTABLPLUGINS where catalogID = '$CcatalogID' $andFilter order by $orderBy limit $pageOffset, $RECORDSONPAGE";
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, uKey asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action=listView&am...
$header .= "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=production desc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Production <a href=\"$urlWithAccessParameters&action=listView&orderBy...
applications/htmlroot/cgi-bin/admin/plugins.pl view on Meta::CPAN
}
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
$environmentSelect = create_combobox_from_keys_and_values_pairs ('P=>Production|A=>Acceptation|S=>Simulation|T=>Test|D=>Development|L=>Local', 'V', 0, $Cenvironment, 'environment', '', '', $formDisabledAll, '', $debug);
$sql = "select pagedir, groupName from $SERVERTABLPAGEDIRS where catalogID = '$CcatalogID' order by groupName";
($rv, $pagedirsSelect) = create_combobox_multiple_from_DBI ($rv, $dbh, $sql, $action, $Cpagedir, 'pagedirs', 'Pagedirs missing.', 5, 100, $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select resultsdir, groupName from $SERVERTABLRESULTSDIR where catalogID = '$CcatalogID' order by groupName";
($rv, $resultsdirSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $Cresultsdir, 'resultsdir', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select holidayBundleID, holidayBundleName from $SERVERTABLHOLIDYSBNDL where catalogID = '$CcatalogID' and activated = '1' order by holidayBundleName";
($rv, $holidayBundleSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CholidayBundleID, 'holidayBundleID', '1', '+ No Holiday Bundle', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'editView') {
$matchingViewsCrontabs .= "<table border=0 cellpadding=1 cellspacing=1 bgcolor=\"$COLORSTABLE{TABLE}\">";
my ($VdisplayDaemon, $Vactivated, $DGgroupTitle, $DGactivated, $DDdisplayDaemon, $DDgroupName, $DDactivated, $ScatalogID, $SserverID, $SserverTitle, $StypeServers, $StypeMonitoring, $StypeActiveServer, $SmasterFQDN, $SslaveFQDN, $Sactivated, $C...
my ($prevSserverID, $prevDDdisplayDaemon, $prevCDcollectorDaemon, $urlWithAccessParametersAction, $actionItem, $notActivated);
$matchingViewsCrontabs .= "<tr><th colspan=\"3\">Servers, Display Daemons, Views & Display Groups:</th></tr>\n";
$sql = "select $SERVERTABLVIEWS.displayDaemon, $SERVERTABLVIEWS.activated, $SERVERTABLDISPLAYGRPS.groupTitle, $SERVERTABLDISPLAYGRPS.activated, $SERVERTABLDISPLAYDMNS.displayDaemon, $SERVERTABLDISPLAYDMNS.groupName, $SERVERTABLDISPLAYDMNS.activ...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
applications/htmlroot/cgi-bin/admin/reports.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton, $uKeySelect);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&id=$Cid&uKey=$CuKey&reportTit...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action : $action<br>catalog ID ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $matchingReports, $navigationBar);
applications/htmlroot/cgi-bin/admin/reports.pl view on Meta::CPAN
} elsif ($action eq 'listView') {
$htmlTitle = "All reports listed";
$formDisabledPrimaryKey = '';
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(id) from $SERVERTABLREPORTS where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLREPORTS, 'reportTitle', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&...
$sql = "select $SERVERTABLREPORTS.catalogID, $SERVERTABLREPORTS.id, $SERVERTABLREPORTS.uKey, $SERVERTABLREPORTS.reportTitle, $SERVERTABLREPORTS.periode, $SERVERTABLTIMEPERIODS.timeperiodName, $SERVERTABLREPORTS.formatOutput, $SERVERTABLREPORTS....
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, reportTitle desc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action=list...
$header .= "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=timeperiodName desc, reportTitle asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> SLA Window <a href=\"$urlWithAccessParameters&action...
applications/htmlroot/cgi-bin/admin/reports.pl view on Meta::CPAN
}
}
if ($action eq 'insertView' or $action eq 'deleteView' or $action eq 'duplicateView' or $action eq 'displayView' or $action eq 'editView') {
if ($CuKey eq 'none' or $action eq 'insertView' or $action eq 'duplicateView' or $action eq 'editView') {
$sql = "select uKey, concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where $SERVERTABLPLUGINS.catalogID = '$CcatalogID' and $SERVERT...
} else {
$sql = "select uKey, concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where uKey = '$CuKey' and $SERVERTABLPLUGINS.catalogID = '$CcatalogID' and $SERVERT...
}
($rv, $uKeySelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CuKey, 'uKey', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
if ( $rv ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ($action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, "onload=\"javascript:enableDisableFields();\"", 'F', '', $sessionID);
applications/htmlroot/cgi-bin/admin/reports.pl view on Meta::CPAN
my $showDetailsChecked = ($CshowDetails eq 'on') ? " checked" : '';
my $showCommentsChecked = ($CshowComments eq 'on') ? " checked" : '';
my $showPerfdataChecked = ($CshowPerfdata eq 'on') ? " checked" : '';
my $showTop20SlowTestsChecked = ($CshowTop20SlowTests eq 'on') ? " checked" : '';
my $printerFriendlyOutputChecked = ($CprinterFriendlyOutput eq 'on') ? " checked" : '';
my $activatedChecked = ($Cactivated eq 'on') ? " checked" : '';
my $formatPeriodeSelect = create_combobox_from_keys_and_values_pairs ('N=>Never|D=>Daily|W=>Weekly|M=>Monthly|Q=>Quarterly|Y=>Yearly', 'K', 0, $Cperiode, 'periode', 'none', '-Select-', $formDisabledAll, 'onChange="javascript:enableDisableFields...
my $slaWindowSelect = '';
($rv, $slaWindowSelect, undef) = create_combobox_from_DBI ($rv, $dbh, "select timeperiodID, timeperiodName from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID' and activated = 1 order by timeperiodName", 1, '', $CtimeperiodID, 'timeperio...
my $formatOutputSelect = create_combobox_from_keys_and_values_pairs ('pdf=>PDF', 'V', 0, $CformatOutput, 'formatOutput', 'none', '-Select-', $formDisabledAll, '', $debug);
print <<HTML;
<tr><td> </td></tr>
<tr><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>Catalog ID: </b></td><td>
<input type="text" name="catalogID" value="$CcatalogID" size="5" maxlength="5" disabled>
</td></tr>
applications/htmlroot/cgi-bin/admin/reports_perfdata.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledNoMetricID, $formDisabledPrimaryKey, $submitButton, $uKeySelect, $metric_idSelect);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&uKeyReload=$CuKeyReload&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&uKey=...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action : $action<br>uKey Reload ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $matchingReportsPerfdata, $navigationBar);
applications/htmlroot/cgi-bin/admin/reports_perfdata.pl view on Meta::CPAN
$nextAction = "listView" if ($rv);
} elsif ($action eq 'listView') {
$htmlTitle = "All reports perfdata listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(uKey) from $SERVERTABLREPORTSPRFDT where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLREPORTSPRFDT, 'uKey', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CG...
$sql = "select $DATABASE.$SERVERTABLREPORTSPRFDT.catalogID, $DATABASE.$SERVERTABLREPORTSPRFDT.uKey, $DATABASE.$SERVERTABLREPORTSPRFDT.metric_id, concat( LTRIM(SUBSTRING_INDEX($DATABASE.$SERVERTABLPLUGINS.title, ']', -1)), ' (', $DATABASE.$SERVE...
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalog desc, title desc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog <a href=\"$urlWithAccessParameters&action=listView&or...
applications/htmlroot/cgi-bin/admin/reports_perfdata.pl view on Meta::CPAN
my $catalogID_uKey = ( ( $CcatalogID eq 'CID' ) ? '' : $CcatalogID .'_' ) . $CuKey;
if ( $PERFPARSEVERSION eq '20' ) {
$sqlWherePERFDATA = "where service_id in (select service_id from $PERFPARSEDATABASE.perfdata_service where service_description = '$catalogID_uKey')";
} else {
$sqlWherePERFDATA = "where service_description = '$catalogID_uKey'";
}
if ( $rv ) {
$sql = "select metric_id, metric from $PERFPARSEDATABASE.perfdata_service_metric $sqlWherePERFDATA and metric not regexp '^(Compilation|Execution|Duration)\$' and unit regexp '^(s|ms)\$' order by metric";
($rv, $metric_idSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, $nextAction, $Cmetric_id, 'metric_id', 'none', '-Select-', $formDisabledPrimaryKey, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
$formDisabledNoMetricID = '';
} else {
$metric_idSelect = "Application missing";
$formDisabledNoMetricID = 'disabled';
}
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
applications/htmlroot/cgi-bin/admin/resultsdirs.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&resultsdir=$Cresultsdir&group...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $matchingResultsdir, $navigationBar);
applications/htmlroot/cgi-bin/admin/resultsdirs.pl view on Meta::CPAN
$nextAction = "listView" if ($rv);
} elsif ($action eq 'listView') {
$htmlTitle = "All resultsdir listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(resultsdir) from $SERVERTABLRESULTSDIR where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLRESULTSDIR, 'groupName', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&...
$sql = "select catalogID, resultsdir, groupName, activated from $SERVERTABLRESULTSDIR where catalogID = '$CcatalogID' order by $orderBy limit $pageOffset, $RECORDSONPAGE";
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, resultsdir asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action=listVi...
($rv, $matchingResultsdir, $nextAction) = record_navigation_table ($rv, $dbh, $sql, 'Resultsdir', 'catalogID|resultsdir', '0|1', '', '', '', $orderBy, $header, $navigationBar, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $nextAction, $pagedi...
applications/htmlroot/cgi-bin/admin/timeperiods.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&timeperiodID=$CtimeperiodID&t...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action : $action<br>catalog ID ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $matchingTimeperiods, $navigationBar);
applications/htmlroot/cgi-bin/admin/timeperiods.pl view on Meta::CPAN
} elsif ($action eq 'listView') {
$formDisabledPrimaryKey = '';
$htmlTitle = "All timeperiods listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(timeperiodID) from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLTIMEPERIODS, 'timeperiodName', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$deb...
$sql = "select catalogID, timeperiodID, timeperiodName, activated from $SERVERTABLTIMEPERIODS where $SERVERTABLTIMEPERIODS.catalogID = '$CcatalogID' order by $orderBy limit $pageOffset, $RECORDSONPAGE";
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, timeperiodID asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action=list...
($rv, $matchingTimeperiods, $nextAction) = record_navigation_table ($rv, $dbh, $sql, 'Timeperiod', 'catalogID|timeperiodID', '0|1', '', '', '', $orderBy, $header, $navigationBar, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $nextAction, $pag...
applications/htmlroot/cgi-bin/admin/users.pl view on Meta::CPAN
my $Cpagedir = (@Cpagedir) ? '/'. join ('/', @Cpagedir) .'/' : '';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledRemoteUser, $submitButton, $givenName, $familyName, $password);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, $userType, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, ...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&remoteUser=$CremoteUser&remot...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>actio...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $keyLanguageSelect, $pagedirsSelect, $matchingUsers, $navigationBar);
applications/htmlroot/cgi-bin/admin/users.pl view on Meta::CPAN
$nextAction = "listView" if ($rv);
} elsif ($action eq 'listView') {
$htmlTitle = "All users listed";
if ( $CcatalogIDreload ) {
$pageNo = 1;
$pageOffset = 0;
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(remoteUser) from $SERVERTABLUSERS where catalogID = '$CcatalogID'";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=listView&catalogID=$CcatalogID&or...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLUSERS, 'remoteUser', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGI...
$sql = "select catalogID, remoteUser, givenName, familyName, userType, activated from $SERVERTABLUSERS where catalogID = '$CcatalogID' and userType <= $userType order by $orderBy limit $pageOffset, $RECORDSONPAGE";
$header = "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=catalogID desc, remoteuser asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Catalog ID <a href=\"$urlWithAccessParameters&action=listVi...
$header .= "<th><a href=\"$urlWithAccessParameters&action=listView&orderBy=givenName desc, familyName asc\"><IMG SRC=\"$IMAGESURL/$ICONSRECORD{up}\" ALT=\"Up\" BORDER=0></a> Given Name <a href=\"$urlWithAccessParameters&action=listV...
applications/htmlroot/cgi-bin/admin/users.pl view on Meta::CPAN
$CdowntimeScheduling = ($CdowntimeScheduling == 1) ? 'on' : 'off';
$CgeneratedReports = ($CgeneratedReports == 1) ? 'on' : 'off';
$Cactivated = ($Cactivated == 1) ? 'on' : 'off';
$Cpassword = '***************' if ($Cpassword ne '');
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
}
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
$sql = "select keyLanguage, languageName from $SERVERTABLLANGUAGE where languageActive = '1' order by languageName";
($rv, $keyLanguageSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CkeyLanguage, 'keyLanguage', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select pagedir, groupName from $SERVERTABLPAGEDIRS where catalogID = '$CcatalogID' order by groupName";
($rv, $pagedirsSelect) = create_combobox_multiple_from_DBI ($rv, $dbh, $sql, $action, $Cpagedir, 'pagedirs', 'Pagedirs missing.', 10, 100, $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
if ( $rv ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
applications/htmlroot/cgi-bin/admin/views.pl view on Meta::CPAN
my $Cactivated = (defined $cgi->param('activated')) ? $cgi->param('activated') : 'off';
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $htmlTitle = $APPLICATION;
# Init parameters
my ($rv, $dbh, $sth, $sql, $header, $numberRecordsIntoQuery, $nextAction, $formDisabledAll, $formDisabledPrimaryKey, $submitButton, $uKeySelect);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'admin', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&pageNo=$pageNo&pageOffset=$pageOffset&orderBy=$orderBy&action=$action&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&uKey=$CuKey&displayDaemon=$Cd...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>page no : $pageNo<br>page offset : $pageOffset<br>order by : $orderBy<br>action ...
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
my ($catalogIDSelect, $displayDaemonSelect, $displayGroupSelect, $matchingViews, $navigationBar);
applications/htmlroot/cgi-bin/admin/views.pl view on Meta::CPAN
$htmlTitle = "All views listed";
$nextAction = "listView";
$sqlWhereCount = "where $SERVERTABLVIEWS.catalogID='$CcatalogID'";
$sqlWhereList = " $SERVERTABLVIEWS.catalogID='$CcatalogID' and";
# $urlWithAccessParametersQuery = "&catalogID=$CcatalogID";
$urlWithAccessParametersQuery = "";
}
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select SQL_NO_CACHE count(uKey) from $SERVERTABLVIEWS $sqlWhereCount";
($rv, $numberRecordsIntoQuery) = do_action_DBI ($rv, $dbh, $sql, $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$navigationBar = record_navigation_bar ($pageNo, $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&action=$nextAction&orderBy=$orderBy$urlWithAccessParametersQuery...
$navigationBar .= record_navigation_bar_alpha ($rv, $dbh, $SERVERTABLVIEWS, 'displayDaemon', "catalogID = '$CcatalogID'", $numberRecordsIntoQuery, $RECORDSONPAGE, $ENV{SCRIPT_NAME} . "?pagedir=$pagedir&pageset=$pageset&debug=$debug&...
# $sql = "select $SERVERTABLVIEWS.catalogID, $SERVERTABLVIEWS.displayDaemon, $SERVERTABLVIEWS.uKey, $SERVERTABLDISPLAYDMNS.groupName, $SERVERTABLDISPLAYGRPS.groupTitle, concat( LTRIM(SUBSTRING_INDEX($SERVERTABLPLUGINS.title, ']', -1)), ' (', $SER...
$sql = "select $SERVERTABLVIEWS.catalogID, $SERVERTABLVIEWS.displayDaemon, $SERVERTABLVIEWS.uKey, $SERVERTABLDISPLAYDMNS.groupName, $SERVERTABLDISPLAYGRPS.groupTitle, concat( LTRIM(SUBSTRING_INDEX($SERVERTABLPLUGINS.title, ']', -1)), ' (', $SER...
applications/htmlroot/cgi-bin/admin/views.pl view on Meta::CPAN
if ($action eq 'insertView' or $action eq 'deleteView' or $action eq 'duplicateView' or $action eq 'displayView' or $action eq 'editView' or $action eq 'viewView') {
if ($CuKey eq 'none' or $action eq 'duplicateView') {
$sql = "select uKey, concat( title, ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where catalogID = '$CcatalogID' and $SERVERTABLPLUGINS.environment = $SERVERTABLENVIRONMENT.envi...
} else {
$sql = "select uKey, concat( title, ' (', $SERVERTABLENVIRONMENT.label, ')' ) from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where uKey = '$CuKey' and catalogID = '$CcatalogID' and $SERVERTABLPLUGINS.environment = $SERVERTABLENVIRONMENT.envi...
}
($rv, $uKeySelect, $htmlTitle) = create_combobox_from_DBI ($rv, $dbh, $sql, 0, $nextAction, $CuKey, 'uKey', 'none', '-Select-', $formDisabledPrimaryKey, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select displayDaemon, groupName from $SERVERTABLDISPLAYDMNS where catalogID = '$CcatalogID' order by groupName";
($rv, $displayDaemonSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CdisplayDaemon, 'displayDaemon', 'none', '-Select-', $formDisabledPrimaryKey, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select displayGroupID, groupTitle from $SERVERTABLDISPLAYGRPS where catalogID = '$CcatalogID' order by groupTitle";
($rv, $displayGroupSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CdisplayGroupID, 'displayGroupID', 'none', '-Select-', $formDisabledAll, '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
}
$dbh->disconnect or $rv = error_trap_DBI(*STDOUT, "Sorry, the database was unable to add your entry.", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
if ( $rv ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ($action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView' or $action eq 'viewView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
applications/htmlroot/cgi-bin/admin/views.pl view on Meta::CPAN
<td class="StatusItem"> </td>
<td class="StatusItem"><a href="$urlWithAccessParameters&pageNo=1&pageOffset=0&action=viewView&orderBy=$orderBy">[List selected views]</a></td>
</tr></table>
</td></tr>
HTML
if ($action eq 'deleteView' or $action eq 'displayView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView' or $action eq 'viewView') {
my $activatedChecked = ($Cactivated eq 'on') ? ' checked' : '';
my $supportWindowSelect = '';
($rv, $supportWindowSelect, undef) = create_combobox_from_DBI ($rv, $dbh, "select timeperiodID, timeperiodName from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID' and activated = 1 order by timeperiodName", 1, '', $CtimeperiodID, 'timep...
print <<HTML;
<tr><td> </td></tr>
<tr><td>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><b>Catalog ID: </b></td><td>
<input type="text" name="catalogID" value="$CcatalogID" size="5" maxlength="5" disabled>
</td></tr>
<tr><td><b>Display Daemon: </b></td><td>
$displayDaemonSelect
applications/htmlroot/cgi-bin/comments.pl view on Meta::CPAN
my $CcommentData = (defined $cgi->param('commentData')) ? $cgi->param('commentData') : '';
$CcommentData =~ s/"/'/g;
my ($pageDir, $environment) = split (/\//, $pagedir, 2);
$environment = 'P' unless (defined $environment);
my $htmlTitle = $APPLICATION .' - '. $ENVIRONMENT{$environment};
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, $remoteUserLoggedOn, undef, undef, $givenNameLoggedOn, $familyNameLoggedOn, undef, undef, $userType, undef, undef, undef, $subTitle) = us...
unless ( defined $errorUserAccessControl ) {
unless ( defined $userType ) {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print "<br>\n<table WIDTH=\"100%\" border=0><tr><td class=\"HelpPluginFilename\">\n<font size=\"+1\">$errorUserAccessControl</font>\n</td></tr></table>\n<br>\n";
} else {
$action = "listView" if ( $userType == 0 and ($action eq 'insertView' or $action eq 'insert' or $action eq 'createView' or $action eq 'create' or $action eq 'deleteView' or $action eq 'delete' or $action eq 'editView' or $action eq 'edit' or $act...
my $urlWithAccessParameters = $ENV{SCRIPT_NAME} ."?pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID";
my ($CactivationTimeslot, $CsuspentionTimeslot, $tsec, $tmin, $thour, $tday, $tmonth, $tyear);
applications/htmlroot/cgi-bin/comments.pl view on Meta::CPAN
my ($remoteUser, $givenName, $familyName);
if (($action eq 'insertView' or $action eq 'createView') and defined $remoteUserLoggedOn) {
$CremoteUser = $remoteUserLoggedOn;
$sql = "select remoteUser, email from $SERVERTABLUSERS where catalogID = '$CcatalogID' and remoteUser = '$CremoteUser'";
} else {
my $andActivated = ($action eq 'insertView' or $action eq 'createView') ? "and activated = 1" : '';
$sql = "select remoteUser, email from $SERVERTABLUSERS where catalogID = '$CcatalogID' and pagedir REGEXP '/$pageDir/' and remoteUser <> 'admin' and remoteUser <> 'sadmin' $andActivated order by email";
}
($rv, $remoteUsersSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 0, '', $CremoteUser, 'remoteUser', 'none', '-Select-', '', '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
} else {
if ($dbh and $rv) {
if ($action eq 'insert' or $action eq 'create') {
if ($CactivationDate eq '' or $CactivationTime eq '') {
$CactivationDate = $CentryDate;
$CactivationTime = $CentryTime;
$CactivationTimeslot = $CentryTimeslot;
}
if ($CsuspentionDate eq '' or $CsuspentionTime eq '') {
applications/htmlroot/cgi-bin/comments.pl view on Meta::CPAN
}
$sql = "select email, pagedir from $SERVERTABLUSERS where catalogID = '$CcatalogID' and activated = 1 and downtimeScheduling = 1 and userType > 0";
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
$sth->bind_columns( \$Temail, \$Tpagedir ) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
if ( $rv ) {
while( $sth->fetch() ) {
chop $Tpagedir;
my (undef, @pagedirs) = split (/\//, $Tpagedir);
foreach my $pagedirs (@pagedirs) {
if ($Tpagedirs =~ /\/$pagedirs\//) {
$sendEmailTo .= "$Temail,";
last;
}
}
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
applications/htmlroot/cgi-bin/contact.pl view on Meta::CPAN
my ($pageDir, $environment) = split (/\//, $pagedir, 2);
$environment = 'P' unless (defined $environment);
my $htmlTitle = $APPLICATION .' - '. $ENVIRONMENT{$environment};
# Init parameters
my ($nextAction, $submitButton, $sendMessage);
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (0, 'guest', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&subject=$Csubject&message=$Cmessage";
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>subject : $Csubject<br>message : $Cmessage<br>URL ... : $urlAccessParameters</pre>" if ( $debug eq 'T' );
if ( defined $sessionID and ! defined $errorUserAccessControl ) {
if ($action eq 'sendView') {
$htmlTitle = "Send contact email";
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
my $formatOutput = (defined $cgi->param('formatOutput')) ? $cgi->param('formatOutput') : 'html';
my $htmlToPdf = (defined $cgi->param('htmlToPdf')) ? $cgi->param('htmlToPdf') : 0;
my ($pageDir, $environment) = split (/\//, $pagedir, 2);
$environment = 'P' unless (defined $environment);
if ( defined $cgi->param('endDate') and $cgi->param('endDate') ) { $endDate = $cgi->param('endDate'); } else { $endDate = ''; }
my $htmlTitle = ( ( $selDetailed eq 'on' ) ? 'Detailed Statistics and Report Generation' : 'Compare Response Time Trends' );
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'guest', $c...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&detailed=$selDetailed&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&uKey1=$uKey1&uKey2=$uKey2&uKey3=$uKey3&startDate=$startDate&endDate=$endDate&...
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>detailed : $selDetailed<br>catalog ID : $CcatalogID<br>catalog ID reload : $CcatalogIDreload<br>uKey1 : $uKey1<br>uKey2 ...
unless ( defined $errorUserAccessControl ) {
if ( $formatOutput eq 'pdf' and ! $htmlToPdf ) {
my $url = "$HTTPSURL/cgi-bin/htmlToPdf.pl?HTMLtoPDFprg=$HTMLTOPDFPRG&HTMLtoPDFhow=$HTMLTOPDFHOW&scriptname=". $ENV{SCRIPT_NAME} ."&". encode_html_entities('U', $urlAccessParameters);
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
my @arrMonths = qw(January Februari March April May June July August September October November December);
# open connection to database and query data
$rv = 1;
$dbh = DBI->connect("dbi:mysql:$DATABASE:$SERVERNAMEREADONLY:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY" ) or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, ...
if ( $dbh and $rv ) {
$uKey1 = $uKey2 = $uKey3 = 'none' if ( $CcatalogIDreload );
$sqlQuery = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sqlQuery, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sqlQuery = "select uKey, concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where $SERVERTABLPLUGINS.catalogID = '$CcatalogID' and $SERVER...
$sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
$sth->bind_columns( \$uKey, \$title) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
if ( $rv ) {
$dummy = ($uKey1 eq 'none') ? " selected" : '';
$uKeySelect1 = " <option value=\"none\"$dummy>-Select-</option>\n";
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
$dummy = ($inputType eq "fromto") ? ' checked' : '';
$fromto = "<input type=\"radio\" name=\"inputType\" value=\"fromto\"$dummy>From:";
# Section: Years
$dummy = ($inputType eq "year") ? ' checked' : '';
$years = "<input type=\"radio\" name=\"inputType\" value=\"year\"$dummy>Year:</td><td>\n";
$years .= " <select name=\"year\">\n";
($selectedWeek, $selectedYear) = Week_of_Year( $currentYear, $currentMonth, $currentDay );
$selectedYear = $selYear if ($selYear != 0);
my ($firstSelectedYear, undef, undef) = split (/-/, $FIRSTSTARTDATE);
for ($i = $firstSelectedYear; $i <= $currentYear; $i++) {
$dummy = ($i == $selectedYear) ? " selected" : '';
$years .= " <option value=\"". $i ."\"$dummy>". $i ."</option>\n";
}
$years .= " </select>";
# Section: Weeks
$dummy = ($inputType eq "week") ? ' checked' : '';
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
$selectedQuarter = ($selQuarter == 0) ? (int (($localMonth + 2) / 3)) : $selQuarter;
for ($i = 1; $i <= 4; $i++) {
$dummy = ($i == $selectedQuarter) ? " selected" : '';
$quarters .= " <option value=\"". $i ."\"$dummy>". $i ."</option>\n";
}
$quarters .= " </select>\n";
# Section: SLA windows
($rv, $slaWindows, undef) = create_combobox_from_DBI ($rv, $dbh, "select SQL_NO_CACHE timeperiodID, timeperiodName from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID' and activated = 1 order by timeperiodName", 1, '', $timeperiodID, 'ti...
$sqlPeriode = '';
if ( $timeperiodID > 1 ) {
$sqlQuery = "select SQL_NO_CACHE timeperiodName, sunday, monday, tuesday, wednesday, thursday, friday, saturday from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID' and timeperiodID = '$timeperiodID'";
$sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
if ( $rv ) {
($slaWindow, my ($sunday, $monday, $tuesday, $wednesday, $thursday, $friday, $saturday)) = $sth->fetchrow_array() or $rv = error_trap_DBI(*STDOUT, "Cannot $sth->fetchrow_array: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, ...
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sqlQuery", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
$sqlQuery = "select SQL_NO_CACHE test, resultsdir from $SERVERTABLPLUGINS $sqlWhere";
$sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
if ( $rv ) {
($test, $resultsdir) = $sth->fetchrow_array() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
$sth->finish() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
if ( $rv ) {
($test, undef) = split(/\.pl/, $test);
$sqlQuery = create_sql_query_events_from_range_year_month ($inputType, $sqlStartDate, $sqlEndDate, $sqlSelect, $forceIndex, $sqlWhere, $sqlPeriode, "AND status <> 'OK' AND status <> 'OFFLINE' AND status <> 'NO TEST'", '', "", "order by ...
$sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
$sth->bind_columns( \$startDateQ, \$startTime, \$endDateQ, \$endTime, \$duration, \$status, \$statusMessage ) or $rv = error_trap_DBI("", "Cannot sth->bind_columns: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
}
}
if ( $rv ) {
sub createLinkToDebugFile {
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
} else {
return ($statusMessage);
}
}
}
$firstrun = 1; $oneblock = $tel = $wtel = 0;
while( $sth->fetch() ) {
$seconden = int(substr($duration, 6, 2)) + int(substr($duration, 3, 2)*60) + int(substr($duration, 0, 2)*3600);
(undef, $rest) = split(/:/, $statusMessage, 2);
# ($rest, undef) = split(/\|/, $rest, 2) if (defined $rest); # remove performance data
if (defined $rest) {
my $_rest = reverse $rest;
my ($_rest, undef) = reverse split(/\|/, $_rest, 2);
my $rest = reverse $_rest;
}
if ($firstrun) {
$firstrun = 0;
} else {
($oneblock, $block, $rrest, $dummy) = setBlockBGcolor ($oneblock, $status, $step, $startDateQ, $startTime, $nyear, $nmonth, $nday, $nhours, $nminuts, $nseconds, $nstatus, $nrest);
if ($rrest =~ /^Response/) {
$wtel++;
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
$sqlQuery = create_sql_query_events_from_range_year_month ($inputType, $sqlStartDate, $sqlEndDate, $sqlSelect, $forceIndex, $sqlWhere, $sqlPeriode, "AND status = 'OK' AND statusMessage regexp ': Response time [[:alnum:]]+.[[:alnum:]]+ > tre...
$sth = $dbh->prepare( $sqlQuery ) or $rv = error_trap_DBI("", "Cannot dbh->prepare: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI("", "Cannot sth->execute: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
$sth->bind_columns( \$startDateQ, \$startTime, \$endDateQ, \$endTime, \$duration, \$status, \$statusMessage ) or $rv = error_trap_DBI("", "Cannot sth->bind_columns: $sqlQuery", $debug, '', "", '', "", -1, '', $sessionID) if $rv;
if ( $rv ) {
$oneblock = $wtel = 0;
while( $sth->fetch() ) {
$seconden = int(substr($duration, 6, 2)) + int(substr($duration, 3, 2)*60) + int(substr($duration, 0, 2)*3600);
(undef, $rest) = split(/:/, $statusMessage, 2);
# ($rest, undef) = split(/\|/, $rest, 2) if (defined $rest); # remove performance data
if (defined $rest) {
my $_rest = reverse $rest;
my ($_rest, undef) = reverse split(/\|/, $_rest, 2);
my $rest = reverse $_rest;
}
if ($wtel) {
($oneblock, $block, $rrest, $dummy) = setBlockBGcolor ($oneblock, $status, $step, $startDateQ, $startTime, $nyear, $nmonth, $nday, $nhours, $nminuts, $nseconds, $nstatus, $nrest);
$responseTable .= "<tr $block><td>$dummy$wtel</td><td> $nstartDateQ \@ $nstartTime</td><td>$nendDateQ \@ $nendTime</td><td align=\"center\">".$nseconden."s</td><td><font color=\"".$COLORS {$nstatus}."\"> " .encode_html_entities('S', $...
} else {
$responseTable .= "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"$COLORSTABLE{TABLE}\"><tr><th width=\"40\"> # </th><th>Start</th><th>Stop</th><th>Duration</th><th>Status</th><th>Status Message</th><...
}
applications/htmlroot/cgi-bin/detailedStatisticsReportGenerationAndCompareResponsetimeTrends.pl view on Meta::CPAN
if ( $rv ) {
my (%problemSummary);
if ($sth->rows) {
while( $sth->fetch() ) {
my ($dummy, $rest) = split(/:/, $statusMessage, 2);
$rest = $dummy unless ( $rest );
if ($rest) {
# ($rest, undef) = split(/\|/, $rest, 2); # remove performance data
my $_rest = reverse $rest;
my ($_rest, undef) = reverse split(/\|/, $_rest, 2);
my $rest = reverse $_rest;
($dummy, $rest) = split(/,/, $rest, 2);
$rest = $dummy unless ( $rest );
} else {
$rest = 'UNDEFINED';
}
if (exists $problemSummary{$rest}) {
$problemSummary{$rest} += $count;
applications/htmlroot/cgi-bin/generateChart.pl view on Meta::CPAN
}
if ( $rv ) {
# open connection to database and query data
$dbh = DBI->connect("DBI:mysql:$DATABASE:$SERVERNAMEREADONLY:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY" ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("Cannot connect to the database", $debug, '',...
if ( $dbh and $rv ) {
if ( $uKey1 eq 'none' ) {
$rv = 0; $errorMessage = "URL Access Parameters Error: Application 1";
} else {
($rv, $errorMessage, $dbiErrorCode, $dbiErrorString, $applicationTitle1, $trendvalue, undef) = get_title( $dbh, $rv, $CcatalogID, $uKey1, $debug, 0, $sessionID );
}
if ( $rv ) { if ( $uKey2 ne 'none' ) { ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString, $applicationTitle2, undef, undef) = get_title( $dbh, $rv, $CcatalogID, $uKey2, $debug, 0, $sessionID ); } }
if ( $rv ) { if ( $uKey3 ne 'none' ) { ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString, $applicationTitle3, undef, undef) = get_title( $dbh, $rv, $CcatalogID, $uKey3, $debug, 0, $sessionID ); } }
if ( $rv ) {
if ( $uKey1 eq 'none' and $applicationTitle1 eq '<NIHIL>' ) {
$rv = 0; $errorMessage = "URL Access Parameters Error: Application 1: $applicationTitle1";
} else {
if ( $uKey2 eq 'none' and $applicationTitle2 eq '<NIHIL>' ) {
if ( $selChart eq "Status" ) {
$chartTitle = "Status";
} elsif ( $selChart eq "ErrorDetails" ) {
$chartTitle = "Error Details";
applications/htmlroot/cgi-bin/generateChart.pl view on Meta::CPAN
} elsif ( $inputType eq "week" ) {
$chartTitle .= "for $selYear week $selWeek from $CcatalogID";
} else {
$rv = 0; $errorMessage = "Whoops - title error! ($inputType)";
}
my ($sqlStartDate, $sqlEndDate);
if ( $rv ) {
$AreaBOffset += $addAreaBOffset;
($goodDate, $sqlStartDate, $sqlEndDate, undef) = get_sql_startDate_sqlEndDate_numberOfDays_test ($STRICTDATE, $FIRSTSTARTDATE, $inputType, $selYear, $selQuarter, $selMonth, $selWeek, $startDateIN, $endDateIN, $currentYear, $currentMonth, $cu...
if ( $goodDate ) {
$sqlPeriode = "AND startDate between '$sqlStartDate' AND '$sqlEndDate' ";
if ( $timeperiodID > 1 ) {
$sql = "select timeperiodName, sunday, monday, tuesday, wednesday, thursday, friday, saturday from $SERVERTABLTIMEPERIODS where catalogID = '$CcatalogID' and timeperiodID = '$timeperiodID'";
$sth = $dbh->prepare( $sql ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot dbh->prepare: $sql", $debug, '', "", '', "", 0, '', $sessionID);
$sth->execute() or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->execute: $sql", $debug, '', "", '', "", 0, '', $sessionID) if $rv;
if ( $rv ) {
applications/htmlroot/cgi-bin/generateChart.pl view on Meta::CPAN
$sth->execute() or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->execute: $sql", $debug, '', "", '', "", 0, '', $sessionID) if $rv;
$sth->bind_columns( \$title, \$statusmessage, \$aantal ) or ($rv, $errorMessage, $dbiErrorCode, $dbiErrorString) = error_trap_DBI("", "Cannot sth->bind_columns: $sql", $debug, '', "", '', "", 0, '', $sessionID) if $rv;
if ( $rv ) {
if ( $sth->rows ) {
while( $sth->fetch() ) {
my ($dummy, $rest) = split(/:/, $statusmessage, 2);
$rest = $dummy unless ( $rest );
if ($rest) {
# ($rest, undef) = split(/\|/, $rest, 2); # remove performance data
my $_rest = reverse $rest;
my ($_rest, undef) = reverse split(/\|/, $_rest, 2);
my $rest = reverse $_rest;
($dummy, $rest) = split(/,/, $rest, 2);
$rest = $dummy unless ( $rest);
} else {
$rest = ' UNDEFINED';
}
if (exists $problemSummary{$rest}) {
$problemSummary{$rest} += $aantal;
applications/htmlroot/cgi-bin/getArchivedDebug.pl view on Meta::CPAN
my $debug = (defined $cgi->param('debug')) ? $cgi->param('debug') : 'F';
my $ascending = (defined $cgi->param('ascending')) ? $cgi->param('ascending') : 0;
my $archived = (defined $cgi->param('archived')) ? $cgi->param('archived') : 'off';
my ($pageDir, $environment) = split (/\//, $pagedir, 2);
$environment = 'P' unless (defined $environment);
my $htmlTitle = "Get Archived Debug Report(s) from $CcatalogID";
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, undef, undef, undef, undef, undef, undef, undef, $userType, undef, undef, undef, $subTitle) = user_session_and_access_control (1, 'member...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&uKey=$uKey&ascending=$ascending";
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>catalog ID: $CcatalogID<br>catalog ID reload : $CcatalogIDreload<br>uKey : $uKey<br>ascending : $ascending<br>URL ... : $urlAccessParam...
unless ( defined $errorUserAccessControl ) {
unless ( defined $userType ) {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
applications/htmlroot/cgi-bin/getArchivedDebug.pl view on Meta::CPAN
my ($rv, $dbh, $sth, $sql, $title, $resultsdir, $catalogIDSelect, $uKeySelect, $debugsSelect);
# open connection to database and query data
$rv = 1;
$dbh = DBI->connect("dbi:mysql:$DATABASE:$SERVERNAMEREADONLY:$SERVERPORTREADONLY", "$SERVERUSERREADONLY", "$SERVERPASSREADONLY", ) or $rv = error_trap_DBI(*STDOUT, "Cannot connect to the database", $debug, $pagedir, $pageset, $htmlTitle, $subTitl...
if ( $dbh and $rv ) {
$uKey = '<NIHIL>' if ( $CcatalogIDreload );
$sql = "select catalogID, catalogName from $SERVERTABLCATALOG where not catalogID = '$CATALOGID' and activated = '1' order by catalogName asc";
($rv, $catalogIDSelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CcatalogID, 'catalogID', $CATALOGID, '-Parent-', '', 'onChange="javascript:submitForm();"', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
$sql = "select distinct $SERVERTABLPLUGINS.uKey, concat( LTRIM(SUBSTRING_INDEX($SERVERTABLPLUGINS.title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where $SERVERTABLP...
($rv, $uKeySelect, undef) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $uKey, 'uKey', '', '', '', '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
if ($uKey ne '<NIHIL>') {
$sql = "select concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ), resultsdir from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT where catalogID = '$CcatalogID' and uKey = '$uKey' and $SERVERTABLPLUGINS.env...
$sth = $dbh->prepare( $sql ) or $rv = error_trap_DBI(*STDOUT, "Cannot dbh->prepare: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
$sth->execute() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->execute: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
if ( $rv ) {
($title, $resultsdir) = $sth->fetchrow_array() or $rv = error_trap_DBI(*STDOUT, "Cannot $sth->fetchrow_array: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if ($sth->rows);
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
applications/htmlroot/cgi-bin/getArchivedDisplays.pl view on Meta::CPAN
my $CcatalogID = (defined $cgi->param('catalogID')) ? $cgi->param('catalogID') : $CATALOGID;
my $CcreationDate = (defined $cgi->param('creationDate')) ? $cgi->param('creationDate') : '';
my $CcreationTime = (defined $cgi->param('creationTime')) ? $cgi->param('creationTime') : '';
my ($pageDir, $environment) = split (/\//, $pagedir, 2);
$environment = 'P' unless (defined $environment);
my $htmlTitle = "Get Archived Display(s) from $CcatalogID";
# User Session and Access Control
my ($sessionID, $iconAdd, $iconDelete, $iconDetails, $iconEdit, $iconQuery, $iconTable, $errorUserAccessControl, $remoteUser, undef, undef, undef, undef, undef, undef, $userType, undef, undef, undef, $subTitle) = user_session_and_access_control (1, '...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&catalogID=$CcatalogID&CcreationDate=$CcreationDate&CcreationTime=$CcreationTime";
# Debug information
print "<pre>pagedir : $pagedir<br>pageset : $pageset<br>debug : $debug<br>CGISESSID : $sessionID<br>catalog ID: $CcatalogID<br>date : $CcreationDate<br>time : $CcreationTime<br>URL ... : $urlAccessParameters</pre>" if ( $debug eq ...
unless ( defined $errorUserAccessControl ) {
unless ( defined $userType ) {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);