Location: PHPKode > projects > Mozart > Mozart-0.0.4/multidate.php
<?
include("connect.inc");
include("reqlogin.inc");
include("userprefs.inc");
include("loadmontharray.inc");

$ProjectInfoSQL = "SELECT name FROM project WHERE proj_id=$id";
$ProjectInfo    = mysql_query($ProjectInfoSQL);
$projectinfo    = mysql_fetch_array($ProjectInfo);
?>
<html>
<title>Mozart: MultiDate Input for Project <? echo $projectinfo["name"] ?></title>
<body bgcolor=<? echo $bgcolor ?> text=<? echo $txtcolor ?>>
<?
include("links.inc");
?>
<center>
<b>MultiDate Input for Project <? echo $projectinfo["name"] ?></b>
<br>
<font color=red><?echo $Message?></font>
<form action="insmultidate.php" method="post">
<input type=hidden name="id" value="<? echo $id ?>"><br>
<table border=1 cellspacing=0 cellpadding=0>
<tr>
<th>For</th>
<th>Month</th>
<th>Day</th>
<th>Year</th>
<th>Hour</th>
<th>Minute</th>
<th>Contact</th>
<th>Information</th>
</tr>
<?
$LoopNum = 1;
while ($LoopNum < 11) {
  ?>
  <tr>
  <td><select name="ForUser[<?echo $LoopNum?>]" value="<?echo $ForUser[$LoopNum]?>">
  <option value=0 selected>None
  <?
  include("getallusers.inc");
  while ($ownerdata = mysql_fetch_array($OwnerData)) {
	printf("<option value=%s>%s", $ownerdata["user_id"], $ownerdata["system_id"]);
  }
  ?>
  </select></td>
  <td><select name="SelMon[<?echo $LoopNum?>]" value="<?echo $SelMonth[$LoopNum]?>">
  <?
  $x = 0;
  $y = 1;
  while ($y <= 12) {
    printf("<option value=%s>%s", $y, $monthname[$x]);
    $x++;
    $y++;
  }
  ?>
  </select></td>
  <td><select name="SelDay[<?echo $LoopNum?>]" value="<?echo $SelDay[$LoopNum]?>">
  <?
  $x=1;
  while ($x < 32) {
    printf("<option value=%s>%s", $x, $x);
    $x++;
  }
  $current_date = getdate();
  $Year = $current_date["year"];
  ?>
  </select></td>
  <td><select name="SelYear[<?echo $LoopNum?>]" value="<?echo $SelYear[$LoopNum]?>">
  <?
  $x = 0;
  while ($x < 11) {
    printf("<option value=%s>%s", $Year, $Year);
    $x++;
    $Year++;
  }
  ?>
  </select></td>
  <td><select name="SelHour[<?echo $LoopNum?>]" value="<?echo $SelHour[$LoopNum]?>">
  <?
  $x=0;
  while ($x <= 23) {
    printf("<option value=%s>%s", $x, $x);
    $x++;
  }
  ?>
  </select></td>
  <td><select name="SelMinute[<?echo $LoopNum?>]" value="<?echo $SelMinute[$LoopNum]?>">
  <option value=0>00
  <option value=15>15
  <option value=30>30
  <option value=45>45
  </select></td>
  <?
  $ContListSQL = "SELECT contact_id, first, last FROM contact ORDER BY last, first";
  $ContList    = mysql_query($ContListSQL);
  ?>
  <td><select name="SelContact[<?echo $LoopNum?>]" value="<?echo $SelContact[$LoopNum]?>">
  <option value=0>None
  <?
  while ($contlist = mysql_fetch_array($ContList)) {
    printf("<option value=%s>%s, %s", $contlist["contact_id"], $contlist["last"], $contlist["first"]);
  }
  ?>
  </select></td>
  <td><input type="text" name="SelInfo[<?echo $LoopNum?>]" value="<? echo $SelInfo[$LoopNum] ?>"></td>
  </tr>
  <?
  $LoopNum++;
}
?>
<tr><td><input type="submit" value="Add Dates"></td></tr>
</table>
</form>
<?
include("links.inc");
?>
</center>
</body>
</html>
Return current item: Mozart