ASNMTAP

 view release on metacpan or  search on metacpan

applications/htmlroot/cgi-bin/admin/crontabs.pl  view on Meta::CPAN

        alert('Please re-enter day of the month: Bad day of the month format!');
        return false;
      }

	  if ( ! objectRegularExpressionDayOfTheMontValue.test(document.crontabs.dayOfTheMonth.value) ) {
        document.crontabs.dayOfTheMonth.focus();
        alert('Please re-enter day of the month: Bad day of the month value!');
        return false;
      }
    }
  }

  if ( document.crontabs.monthOfTheYear.value == null || document.crontabs.monthOfTheYear.value == '' ) {
    document.crontabs.monthOfTheYear.focus();
    alert('Please enter month of the year!');
    return false;
  } else {
    if ( document.crontabs.monthOfTheYear.value != '*' ) {
	  if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.monthOfTheYear.value) ) {
        document.crontabs.monthOfTheYear.focus();
        alert('Please re-enter month of the year: Bad month of the year format!');
        return false;
      }

	  if ( ! objectRegularExpressionMontOfTheYearValue.test(document.crontabs.monthOfTheYear.value) ) {
        document.crontabs.monthOfTheYear.focus();
        alert('Please re-enter month of the year: Bad month of the year value!');
        return false;
      }
    }
  }

  if ( document.crontabs.dayOfTheWeek.value == null || document.crontabs.dayOfTheWeek.value == '' ) {
    document.crontabs.dayOfTheWeek.focus();
    alert('Please enter day of the week!');
    return false;
  } else {
    if ( document.crontabs.dayOfTheWeek.value != '*' ) {
      if ( ! objectRegularExpressionCrontabFormat.test(document.crontabs.dayOfTheWeek.value) ) {
        document.crontabs.dayOfTheWeek.focus();
        alert('Please re-enter day of the week: Bad day of the week format!');
        return false;
      }

      if ( ! objectRegularExpressionDayOfTheWeekValue.test(document.crontabs.dayOfTheWeek.value) ) {
        document.crontabs.dayOfTheWeek.focus();
        alert('Please re-enter day of the week: Bad day of the week value!');
        return false;
      }
    }
  }
HTML
      }
	
      print <<HTML;

  return true;
}
</script>

<form action="$ENV{SCRIPT_NAME}" method="post" name="crontabs" 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.crontabs.catalogIDreload.value = 1;
  document.crontabs.submit();
  return true;
}
</script>

<form action="$ENV{SCRIPT_NAME}" method="post" name="crontabs">
HTML
    } elsif ($action eq 'deleteView') {
      print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
      print "<form action=\"" . $ENV{SCRIPT_NAME} . "\" method=\"post\" name=\"crontabs\">\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 'crontabView' 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="catalogIDreload" value="0">
HTML
    } else {
      print "<br>\n";
    }

    if ($formDisabledPrimaryKey ne '' and $action ne 'displayView') {
      print "  <input type=\"hidden\" name=\"catalogID\"       value=\"$CcatalogID\">\n";
      print "  <input type=\"hidden\" name=\"uKey\"            value=\"$CuKey\">\n";
      print "  <input type=\"hidden\" name=\"lineNumber\"      value=\"$ClineNumber\">\n";
    } elsif ($action eq 'crontabView') {
      print "  <input type=\"hidden\" name=\"catalogID\"       value=\"$CcatalogID\">\n";
    }

    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&amp;pageNo=1&amp;pageOffset=0&amp;action=insertView&amp;orderBy=$orderBy">[Insert crontab]</a></td>
        <td class="StatusItem">&nbsp;&nbsp;&nbsp;</td>
HTML
    }

    print <<HTML;
        <td class="StatusItem"><a href="$urlWithAccessParameters&amp;pageNo=1&amp;pageOffset=0&amp;action=listView&amp;orderBy=$orderBy">[List all crontabs]</a></td>
        <td class="StatusItem">&nbsp;&nbsp;&nbsp;</td>
        <td class="StatusItem"><a href="$urlWithAccessParameters&amp;pageNo=1&amp;pageOffset=0&amp;action=crontabView&amp;orderBy=$orderBy">[List selected crontabs]</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 'crontabView') {
      my $activatedChecked = ($Cactivated eq 'on') ? ' checked' : '';

      print <<HTML;
    <tr><td>&nbsp;</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>



( run in 0.449 second using v1.01-cache-2.11-cpan-ceb78f64989 )