ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/moderator/pluginCrontabSchedulingReports.pl view on Meta::CPAN
my $currentSec = 0;
# URL Access Parameters
my $cgi = new CGI;
my $pagedir = (defined $cgi->param('pagedir')) ? $cgi->param('pagedir') : 'index'; $pagedir =~ s/\+/ /g;
my $pageset = (defined $cgi->param('pageset')) ? $cgi->param('pageset') : 'index-cv'; $pageset =~ s/\+/ /g;
my $debug = (defined $cgi->param('debug')) ? $cgi->param('debug') : 'F';
my $CcatalogID = (defined $cgi->param('catalogID')) ? $cgi->param('catalogID') : $CATALOGID;
my $CcatalogIDreload = (defined $cgi->param('catalogIDreload')) ? $cgi->param('catalogIDreload') : 0;
my $CuKey = (defined $cgi->param('uKey')) ? $cgi->param('uKey') : '';
my $width = (defined $cgi->param('width')) ? $cgi->param('width') : 1000;
my $xOffset = (defined $cgi->param('xOffset')) ? $cgi->param('xOffset') : 48;
my $yOffset = (defined $cgi->param('yOffset')) ? $cgi->param('yOffset') : 42;
my $labelOffset = (defined $cgi->param('labelOffset')) ? $cgi->param('labelOffset') : 18;
my $AreaBOffset = (defined $cgi->param('AreaBOffset')) ? $cgi->param('AreaBOffset') : 78;
my $hightMin = (defined $cgi->param('hightMin')) ? $cgi->param('hightMin') : 195;
my $pf = (defined $cgi->param('pf')) ? $cgi->param('pf') : 'off';
my $htmlToPdf = (defined $cgi->param('htmlToPdf')) ? $cgi->param('htmlToPdf') : 0;
my $htmlTitle = $prgtext;
# 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, 'modera...
# Serialize the URL Access Parameters into a string
my $urlAccessParameters = "pagedir=$pagedir&pageset=$pageset&debug=$debug&CGISESSID=$sessionID&catalogID=$CcatalogID&catalogIDreload=$CcatalogIDreload&width=$width&xOffset=$xOffset&yOffset=$yOffset&labelOffset=$labelOffset&AreaBOffset=$AreaBOffset&hi...
# 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>width : $width<br>xOffset : $xOffset<br>yOffset : $yOffset...
unless ( defined $errorUserAccessControl ) {
my ($rv, $dbh, $sth, $sql, $errorMessage, $catalogIDSelect, $uKeySelect, $nextAction);
# 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 ) {
$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);
my $hostname = '';
(undef, undef, $hostname, undef) = split ( /\//, $ENV{HTTP_REFERER} ) if ( $ENV{HTTP_REFERER} );
$sql = "select distinct $SERVERTABLPLUGINS.uKey, concat( LTRIM(SUBSTRING_INDEX(title, ']', -1)), ' (', $SERVERTABLENVIRONMENT.label, ')' ) as optionValueTitle from $SERVERTABLPLUGINS, $SERVERTABLENVIRONMENT, $SERVERTABLCRONTABS, $SERVERTABLCLLCTR...
($rv, $uKeySelect, $htmlTitle) = create_combobox_from_DBI ($rv, $dbh, $sql, 1, '', $CuKey, 'uKey', 'none', '-Select-', '', '', $pagedir, $pageset, $htmlTitle, $subTitle, $sessionID, $debug);
# Close database connection - - - - - - - - - - - - - - - - - - - - -
$dbh->disconnect or $rv = error_trap_DBI("Sorry, the database was unable to disconnect", $debug, '', "", '', "", '', -1, '', $sessionID);
}
if ( $rv ) {
# HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ($htmlToPdf) {
print <<EndOfHtml;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$htmlTitle</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="$HTTPSURL/asnmtap.css">
</head>
<BODY>
<H1>$DEPARTMENT \@ $BUSINESS: '$APPLICATION' $prgtext</H1>
EndOfHtml
} else {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
my $dummy = ($pf eq 'on') ? ' checked' : '';
my $printerFriendlyOutputBox = "<input type=\"checkbox\" name=\"pf\"$dummy> Printer friendly output\n";
print <<HTML;
<script language="JavaScript1.2" type="text/javascript">
function submitForm() {
document.crontabs.catalogIDreload.value = 1;
document.crontabs.submit();
return true;
}
function validateForm() {
var objectRegularExpressionSqlPeriode = /\^(12|24|36|48|60|72|84|94)00\$/;
if ( document.crontabs.sqlPeriode.value == null || document.crontabs.sqlPeriode.value == '' ) {
document.crontabs.sqlPeriode.focus();
alert('Please enter Periode!');
return false;
} else {
if ( ! objectRegularExpressionSqlPeriode.test(document.crontabs.sqlPeriode.value) ) {
document.crontabs.sqlPeriode.focus();
alert('Please re-enter Periode (1200|2400|3600|4800|6000|7200|8400|9400): Bad Periode value!');
return false;
}
}
var objectRegularExpressionWidth = /\^(1[0-9][0-9][0-9])\$/;
if ( document.crontabs.width.value == null || document.crontabs.width.value == '' ) {
document.crontabs.width.focus();
alert('Please enter Width!');
return false;
} else {
if ( ! objectRegularExpressionWidth.test(document.crontabs.width.value) ) {
document.crontabs.width.focus();
alert('Please re-enter Width (1000-1999): Bad Width value!');
return false;
}
}
var objectRegularExpressionXoffset = /\^([1-3][0-9][0-9])\$/;
if ( document.crontabs.xOffset.value == null || document.crontabs.xOffset.value == '' ) {
document.crontabs.xOffset.focus();
alert('Please enter x Offset!');
return false;
} else {
if ( ! objectRegularExpressionXoffset.test(document.crontabs.xOffset.value) ) {
document.crontabs.xOffset.focus();
alert('Please re-enter x Offset (100-399): Bad x Offset value !');
return false;
}
}
( run in 1.609 second using v1.01-cache-2.11-cpan-d8267643d1d )