<?php
include ("../include/session.php");
if (!$session->logged_in) {
	header("Location: ../../main.php");
} else {
	include ("../header.php");
//	include ("../include/db.php");
	
?>
<link href="calendar.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../include/calendar.js"></script>


<?php
$entryDate = isset($_REQUEST["date3"]) ? $_REQUEST["date3"] : "";

$query = "SELECT * FROM agenda WHERE entrydate ='" . $entryDate . "'";
	$result = execsql($query);
	$i = 0;
	$num = mysql_num_rows($result);
	
	//if ($num==0) { $exist = true; }
	
	$num = mysql_num_rows($result);
	$b1 = mysql_result($result, 0, "productionNo1");
	$b2 = mysql_result($result, 0, "selectColor1");
	$b3 = mysql_result($result, 0, "productionNo2");
	$b4 = mysql_result($result, 0, "selectColor2");
	$n1 = mysql_result($result, 0, "note1");
	$n2 = mysql_result($result, 0, "note2");
	$n3 = mysql_result($result, 0, "note3");
	$n4 = mysql_result($result, 0, "note4");
	$n5 = mysql_result($result, 0, "note5");
	$n6 = mysql_result($result, 0, "note6");
?>
<style type="text/css">
<!--
.style5 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: small;
	font-weight: bold;
}
.style7 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small; }
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; }
-->
</style>
<div class="headerbox">Agenda Entries</div><br /><br /><br />
<div class="subheaderbox">
Agenda entries for:<b>
  <?php  echo $entryDate;  ?>
</b></div><br /><br />
<form id="form1" name="form1" method="post" action="updateAgendaEntries.php">
  <table width="593" border="0">
    <tr>
      <td colspan="3"><span class="style5">Production targets:</span>
        <label>
        <input name="entryDate" type="hidden" value="<?php  echo $entryDate;  ?>" />
        <span class="style7"><strong>Double Roman Tiles</strong></span></label></td>
    </tr>
    <tr>
      <td width="149" valign="top"><span class="style9">&nbsp;
      &nbsp;first batch: </span></td>
      <td width="195" valign="top"><span class="style9">color:
          <label>
          <select name="selectColor1">
            <option value="black">black</option>
            <option value="brown">brown</option>
            <option value="grey">grey</option>
            <option value="kalahari">kalahari</option>
            <option value="red">red</option>
            <option value="terra cotta">terra cotta</option>
            <option value="black antique">black antique</option>
            <option value="brown antique">brown antique</option>
            <option value="kalahari antique">kalahari antique</option>
            <option value="red antique">red antique</option>
            <option value="terra cotta antique">terra cotta antique</option>
            <option selected="selected"><?php echo $b2;?></option>
          </select>
          </label>
      </span></td>
      <td width="235" valign="top"><span class="style9">&nbsp;&nbsp;number:&nbsp;&nbsp;
          <label>
          <input name="productionNo1" type="text" value="<?php if ($b1=="") {$b1=0;} echo $b1 ?>" size="6" maxlength="6" />
          </label>
      </span></td>
    </tr>
    <tr>
      <td valign="top"><span class="style9">&nbsp;second batch:</span></td>
      <td valign="top"><span class="style9">color:
          <select name="selectColor2">
            <option value="black">black</option>
            <option value="brown">brown</option>
            <option value="grey">grey</option>
            <option value="kalahari">kalahari</option>
            <option value="red">red</option>
            <option value="terra cotta">terra cotta</option>
            <option value="black antique">black antique</option>
            <option value="brown antique">brown antique</option>
            <option value="kalahari antique">kalahari antique</option>
            <option value="red antique">red antique</option>
            <option value="terra cotta antique">terra cotta antique</option>
            <option selected="selected"><?php echo $b4;?></option>
          </select>
      </span></td>
      <td valign="top"><span class="style9">&nbsp;number:
  &nbsp;&nbsp;
  <input name="productionNo2" type="text" value="<?php if ($b3=="") {$b3=0;} echo $b3 ?>" size="6" maxlength="6" />
      </span></td>
    </tr>
  </table>
  <table width="591" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="2" align="left" valign="top"><span class="style5">Agenda notes / reminders: </span></td>
    </tr>
    <tr>
      <td width="112" align="left" valign="top">note 1:</td>
      <td width="479" align="left" valign="top"><span class="style9">
        <textarea name="note1" cols="80" rows="2"><?php echo $n1 ?> </textarea>
      </span></td>
    </tr>
    <tr>
      <td align="left" valign="top">note 2:</td>
      <td align="left" valign="top"><textarea name="note2" cols="80" rows="2"><?php echo $n2 ?></textarea></td>
    </tr>
    <tr>
      <td align="left" valign="top">note 3:</td>
      <td align="left" valign="top"><textarea name="note3" cols="80" rows="2"><?php echo $n3 ?></textarea></td>
    </tr>
    <tr>
      <td align="left" valign="top">note 4:</td>
      <td align="left" valign="top"><textarea name="note4" cols="80" rows="2"><?php echo $n4 ?></textarea></td>
    </tr>
    <tr>
      <td align="left" valign="top">note 5:</td>
      <td align="left" valign="top"><textarea name="note5" cols="80" rows="2"><?php echo $n5 ?></textarea></td>
    </tr>
    <tr>
      <td align="left" valign="top">note 6:</td>
      <td align="left" valign="top"><textarea name="note6" cols="80" rows="2"><?php echo $n6 ?></textarea></td>
    </tr>
    <tr>
      <td align="left" valign="top">&nbsp;</td>
      <td align="left" valign="top"><div align="right">
        <input name="submitok"  type="image" src="../../Images/go_btn.png" align="right" width="40" height="25" />
      </div></td>
    </tr>
  </table>
  <p>&nbsp;
    <label></label>
  </p>
  <p align="right">&nbsp; </p>
</form>

  <?php  
	include("../footer.php");
	
}

 ?>
  
