
<?php 
$page_name = "Production-new mix design";
include ("../navigation/access.php");

if ($permission_num==1) {

	$table_name = $_SESSION['db_prefix']."_list_packaging_design";
	$table_name2 = $_SESSION['db_prefix']."_packaging_design";
    $position_query = "SELECT item_name FROM $table_name WHERE item_name NOT IN (SELECT packaging_design FROM $table_name2) ";
	$arrId3 = array ();
	$arrName3 = array ();
	$position_result = execsql($position_query);
	if ($position_result!="") {
	$position_num = mysql_num_rows($position_result);
	$b = 0;
	while ($b < $position_num) {
		$arrId3[$b] = mysql_result($position_result, $b, "item_name");
		$arrName3[$b] = mysql_result($position_result, $b, "item_name");
		$b++;
	}
	}	

?> 

</head>

<?php include('../include/wait.php') ?>

<body onLoad="MM_showHideLayers('wait','','hide');" onFocus="MM_showHideLayers('wait','','hide');"  onBlur="MM_showHideLayers('wait','','hide');">

<div class="page_middle_frame">
  <form id="form1" name="form1" method="get" action="packing_designWizbase.php">
    <table width=595 border="0" align="left" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
    <tr>
      <td align="left" valign="top" >
      Select product type to make packaging receipe for: 
     </td> 
	 <td>&nbsp; </td>
     </tr>
      <tr>
        <td>
          <select name="design_select" class="select200"  >
            <option value="<?php echo $_SESSION['packaging_design'] ?>" selected="selected"><?php echo $_SESSION['packaging_design'] ?></option>
            <?php
        	for ($j = 0; $j < count($arrId3); $j++) {
    		echo "<option value=" . "\"" . $arrId3[$j] . "\"" . ">" . $arrName3[$j] . "</option>";
	}
?>
          </select>
        </td>
        <td width="1"></td>
      </tr>
      <tr>
        <td><img src="../images/info_blue.png" alt="" width="16" height="16">
        <label class="label_info">The list displays the designs which are defined in the pre-defined list for packaging design and are not made yet. If you don't find the design in the list, you need to define it first in the packaging design list.</label></td>
        <td></td>
      </tr>
    
    <tr>
      <td><table width="590" height="50" align="left" id="table_button_bar">
          <tr>
            <td width="117">&nbsp;</td>
            <td width="115"></td>
            <td width="99"><input name="p" type="hidden" id="p" value="1" />
              <input name="error" type="hidden" id="error" value="0" />
              <input name="s" type="hidden" id="s" value="1" /></td>
            <td width="125" align="left"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onClick="needToConfirm = false; cancel_confirmation(1, '../production/production_main.php?date=0&subCatSelect=Tiles');" value="Cancel"  tabindex="-1"/></td>
            <td width="110" align="left"><input type="submit" name="next_button" id="next_button" class="imagebutton" value="Next" onClick="needToConfirm = false; MM_showHideLayers('wait','','show'); validate();  " tabindex="5" /></td>
          </tr>
      </table></td>
    </tr>
  </table>
</form>

<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("sub_cat_group","selone","Please select a product.");
  </script>

</body>
<?php } else { ?>
<script> needToConfirm = false; </script>
<?php
    $_SESSION['denied_return'] = "store/store_main.php?date=0&subCatSelect=Tiles";	?>
<body onLoad="accessdenied(); return false">
</body>
<?php }
?>
