|
<? $tottg = 10; $totcr = 2; if (!$group) { $group="tg"; $page=1; $amt=3;} if ($group == "tg") { $tot=$tottg; } if ($group == "cr") { $tot=$totcr; } echo "<form action=galf.php>"; echo "<select name=group><option value=tg "; if (!$group || $group == "tg") { echo "selected"; } echo ">2D have $tottg pics <option value=cr "; if ($group == "cr") { echo "selected"; } echo ">3D have $totcr pics </select>"; echo "Page number:<input name=page value="; if ($page) { echo $page; } else { echo "1";}; echo "> Pic/Page:<input name=amt value="; if ($amt) { echo $amt; } else { echo "3";}; echo "><input type=submit value=GO></form>"; if ($pic) { echo "<center>Header or your baner<br>"; echo "$pic<br><img src=$pic>"; echo "<br>Your name or Company name"; exit; } $first=$amt*($page-1)+1; $last=$amt*$page; if ($last >$tot) {$last = $tot;} for ($i=$first;$i<=$last;$i++) { printf("<a href=galf.php?pic=$group%02.0f.jpg><img src=$group%02.0ft.jpg></a> ",$i,$i); } $tpage = round($tot / $amt); if (($tot / $amt) > $tpage) { $tpage++; } echo "<form action=galf.php>"; echo "<input type=hidden name=group value=$group>"; echo "<input type=hidden name=amt value=$amt>"; echo "Page: "; for ($i=1;$i<=$tpage;$i++) { if ($i == $page) { echo "<input type=button name=page value=$i>"; } else { echo "<input type=submit name=page value=$i>"; } } echo "</form>"; ?> |