ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/admin/holidaysBundle.pl view on Meta::CPAN
}
$sth->finish() or $rv = error_trap_DBI(*STDOUT, "Cannot sth->finish: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', $sessionID);
}
$matchingPlugins .= "</table>\n";
}
$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, '', 'F', '', $sessionID);
print <<HTML;
<script language="JavaScript1.2" type="text/javascript">
function submitForm() {
if ( document.holidaysBundle.holidayBundleName.value == null || document.holidaysBundle.holidayBundleName.value == '' ) {
document.holidaysBundle.holidayBundleName.focus();
alert('Please enter a holiday bundle name!');
return false;
}
if ( document.holidaysBundle.countryID.value == null || document.holidaysBundle.countryID.value == 'none' ) {
document.holidaysBundle.countryID.focus();
alert('Please create/select a country!');
return false;
}
document.holidaysBundle.countryIDreload.value = 1;
document.holidaysBundle.submit();
return true;
}
function validateForm() {
if ( document.holidaysBundle.holidayBundleName.value == null || document.holidaysBundle.holidayBundleName.value == '' ) {
document.holidaysBundle.holidayBundleName.focus();
alert('Please enter a holiday bundle name!');
return false;
}
if ( document.holidaysBundle.countryID.value == null || document.holidaysBundle.countryID.value == 'none' ) {
document.holidaysBundle.countryID.focus();
alert('Please create/select a country!');
return false;
}
if ( document.holidaysBundle.holidayID.selectedIndex == -1 ) {
document.holidaysBundle.holidayID.focus();
alert('Please create/select first a holidays for this country!');
return false;
}
return true;
}
</script>
<form action="$ENV{SCRIPT_NAME}" method="post" name="holidaysBundle" onSubmit="return validateForm();">
HTML
} elsif ($action eq 'listView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print <<HTML;
<script language="JavaScript1.2" type="text/javascript">
function submitForm() {
document.holidaysBundle.catalogIDreload.value = 1;
document.holidaysBundle.submit();
return true;
}
</script>
<form action="$ENV{SCRIPT_NAME}" method="post" name="holidaysBundle">
HTML
} elsif ($action eq 'deleteView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print "<form action=\"" . $ENV{SCRIPT_NAME} . "\" method=\"post\" name=\"holidaysBundle\">\n";
$pageNo = 1; $pageOffset = 0;
} else {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
}
if ($action eq 'deleteView' or $action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView' or $action eq 'listView') {
print <<HTML;
<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="pageNo" value="$pageNo">
<input type="hidden" name="pageOffset" value="$pageOffset">
<input type="hidden" name="action" value="$nextAction">
<input type="hidden" name="orderBy" value="$orderBy">
<input type="hidden" name="countryIDreload" value="0">
<input type="hidden" name="catalogIDreload" value="0">
HTML
} else {
print "<br>\n";
}
print " <input type=\"hidden\" name=\"catalogID\" value=\"$CcatalogID\">\n <input type=\"hidden\" name=\"holidayBundleID\" value=\"$CholidayBundleID\">\n" if ($formDisabledPrimaryKey ne '' and $action ne 'displayView');
print <<HTML;
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center"><td>
<table border="0" cellspacing="0" cellpadding="0"><tr>
HTML
if ( $iconAdd ) {
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=insertView&orderBy=$orderBy">[Insert holiday bundle]</a></td>
<td class="StatusItem"> </td>
HTML
}
print <<HTML;
<td class="StatusItem"><a href="$urlWithAccessParameters&action=listView&orderBy=$orderBy">[List all holiday bundles]</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') {
my $activatedChecked = ($Cactivated eq 'on') ? ' checked' : '';
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>
<tr><td><b>Holiday Bundle ID: </b></td><td>
<input type="text" name="holidayBundleID" value="$CholidayBundleID" size="11" maxlength="11" $formDisabledPrimaryKey>
</td></tr>
<tr><td><b>Holiday Bundle Name: </b></td><td>
<input type="text" name="holidayBundleName" value="$CholidayBundleName" size="64" maxlength="64" $formDisabledAll>
</td></tr>
<tr><td><b>Country: </b></td><td>
$countryIDSelect
( run in 0.713 second using v1.01-cache-2.11-cpan-ceb78f64989 )