ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/moderator/collectorCrontabSchedulingReports.pl view on Meta::CPAN
$sql = "select distinct $SERVERTABLCLLCTRDMNS.collectorDaemon from $SERVERTABLCLLCTRDMNS, $SERVERTABLCRONTABS, $SERVERTABLSERVERS where $SERVERTABLCLLCTRDMNS.catalogID = '$CcatalogID' and $SERVERTABLCLLCTRDMNS.activated = 1 and $SERVERTABLCLLCTRD...
$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;
$sth->bind_columns( \$collectorDaemon ) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID) if $rv;
if ( $rv ) {
if ( $sth->rows ) {
while( $sth->fetch() ) { push (@collectorDaemons, $collectorDaemon); }
} else {
$errorMessage .= "<br>There are no Collector Daemons available<br>\n";
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
# 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 = ($currentTimeslot eq 'on') ? ' checked' : '';
my $currentTimeslotOutputBox = "<input type=\"checkbox\" name=\"currentTimeslot\"$dummy>Endpoint used from latest timeslot\n";
$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;
}
}
return true;
}
</script>
<form action="$ENV{SCRIPT_NAME}" method="post" name="crontabs" onSubmit="return validateForm();">
<input type="hidden" name="pagedir" value="$pagedir">
<input type="hidden" name="pageset" value="$pageset">
<input type="hidden" name="debug" value="$debug">
<input type="hidden" name="CGISESSID" value="$sessionID">
<input type="hidden" name="catalogIDreload" value="0">
<table border="0">
<tr><td><b>Catalog ID: </b></td><td>
<input type="text" name="catalogID" value="$CcatalogID" size="5" maxlength="5" disabled> $catalogIDSelect
</td></tr>
<tr align="left">
<td>Periode:</td><td><input name="sqlPeriode" type="text" value="$sqlPeriode" size="4" maxlength="4"> </td>
<td>Width:</td><td><input name="width" type="text" value="$width" size="4" maxlength="4"> </td>
<td>x offset:</td><td><input name="xOffset" type="text" value="$xOffset" size="3" maxlength="3"></td>
</tr>
<tr align="left"><td>Options:</td><td colspan="5">$currentTimeslotOutputBox $printerFriendlyOutputBox</td></tr>
<tr align="left"><td align="right"><br>
<input type="submit" value="Scheduling"></td><td colspan="5"><br><input type="reset" value="Reset">
</td></tr>
</table>
</form>
<hr>
HTML
}
( run in 1.230 second using v1.01-cache-2.11-cpan-d8267643d1d )