Thanks,
John M
Code: Select all
<?php
for($x=1 ; $x < 12 ; $x++)
{
$check=0;
echo "<tr>\n";
echo "<td>Position $x</td>\n";
echo "<td><select name=pos_$x ";
if ($x < 11)
echo "onChange='check_lineup_pos(this.form.pos_$x, this.form.gap_$x)'";
echo ">\n";
echo "<option value=""> \n";
$sql="select j.job_number
from job j,job_opts o
where j.modify >=".$start_am."
and (j.engineer="".$user_info['name']."" or j.engineer2="".$user_info['name']."")
and (o.type=0 or o.type=2 or o.type=4 or o.type=8 )
and o.utype < 3
and o.job = j.job_number order by j.job_number";
$qry=ifx_query($sql,$dbid);
while($row=ifx_fetch_row($qry,"next"))
{
$check++;
echo "<option>".$row['job_number']."\n";
}
if ($x < 11)
{
echo "<option value=_GAP>Gap\n";
}
echo "</select></td>\n";
if ($x < 11 && $x < $check)
{
echo "<td>Gap Dim: <input type=text name=gap_$x size=4>in.<script>disable(document.forms[0].gap_$x)</script></td>\n";
}
else
{
echo "<td> <input type=hidden name=gap_$x ></td>\n";
}
echo "</tr>\n";
if ( $check==0 || $x == $check)
{
break;
}
}
if ( $check==0 )
{
echo "<tr><td colspan=2 bgcolor=pink>\n";
echo "You have no configured units that are elegible for inclusion in a lineup. This functionality is ";
echo "only for use with custom or RanChef units that have been configured in the past ".$DAY_LIMIT." days\n";
echo "</td></td>\n";
}
else
echo "<tr><td colspan=4 align=center><input type=submit value=Continue>\n";
?>