<?
function fillDD($min, $max, $selected) {
   for(
$i=$min; $i<$max+1; $i++) {
      if(
$i == $selected) {
         print(
"<option SELECTED value=\"$i\">$i</option>\n");
     } else {
         print(
"<option value=\"$i\">$i</option>\n");
     }
  }
}
?>
<html>
<body>
<table border="0" width="100%" height="300">
  <tr>
    <td width="29%" height="44">
      <p align="right">Run at X Minutes:<br>
      <b><font color="#008000">0</font> - <font color="#008000">59</font></b></td>
    <td width="71%" height="44"><select size="1" name="minutes">
<option selected value="-1">*</option>
<?fillDD(0, 59, -1);?>
      </select> OR <input type="text" name="minutes_o" size="20"> <font size="1">(separate
      multiple by comma)</font><br>
      Example: Run in January only</td>
  </tr>
  <tr>
    <td width="29%" height="44">
      <p align="right">Run at X hours:<br>
      <b><font color="#008000">0</font> - <font color="#008000">23</font></b></td>
    <td width="71%" height="44"><select size="1" name="hours">
<option selected value="-1">*</option>
<?fillDD(0, 23, -1);?>
      </select>OR <input type="text" name="hours_o" size="20"> <font size="1">(separate
      multiple by commas)</font><br>
      Example: Run in January only</td>
  </tr>
  <tr>
    <td width="29%" height="44">
      <p align="right">Run at X days:<br>
      <b><font color="#008000">1</font> - <font color="#008000">31</font></b></td>
    <td width="71%" height="44"><select size="1" name="days">
<option selected value="-1">*</option>
<?fillDD(1, 31, -1);?>
      </select>OR <input type="text" name="days_o" size="20"> <font size="1">(separate
      multiple by commas)</font><br>
      Example: Run in January only</td>
  </tr>
  <tr>
    <td width="29%" height="44">
      <p align="right">Run at X months:<br>
      <b><font color="#008000">1</font> - <font color="#008000">12</font></b></td>
    <td width="71%" height="44"><select size="1" name="months">
<option selected value="-1">*</option>
<?fillDD(1, 12, -1);?>
      </select>OR <input type="text" name="months_o" size="20"> <font size="1">(separate
      multiple by commas)</font><br>
      Example: Run in January only</td>
  </tr>
  <tr>
    <td width="29%" height="44">
      <p align="right">Run at X weekdays:<br>
      <b><font color="#008000">0</font> (Sun) - <font color="#008000">6</font>
      (Sat)</b></td>
    <td width="71%" height="44"><select size="1" name="weekday">
<option selected value="-1">*</option>
<?fillDD(0, 6, -1);?>
      </select>OR <input type="text" name="weekdays_o" size="20"> <font size="1">(separate
      multiple by commas)</font><br>
      Example: Run on mondays only</td>
  </tr>
  <tr>
    <td width="29%" height="25">
      <p align="right">Script/program to execute:</td>
    <td width="71%" height="25"><input type="text" name="execute" size="28">
      must be full path</td>
  </tr>
  <tr>
    <td width="29%" height="27"></td>
    <td width="71%" height="27">
      <p align="center"><input type="submit" value="Build Crontab Entry"></td>
  </tr>
</table>
</body>
</html>