<input type="hidden" name="dosql" value="update"> <table cellspacing="1" cellpadding="2" border="0" class="data"> <tr> <th colspan = "2"> <?php if ($ingredient_id) { echo $LangUI->_('Edit Ingredient'); } else { echo $LangUI->_('Add Ingredient'); } ?> </th> </tr> <?php $units = Units::getAllUnits(); // Load the units $rc_locations = DBUtils::fetchColumn($db_table_locations, 'location_desc', 'location_id', 'location_desc'); $locations = DBUtils::createList($rc_locations, 'location_id', 'location_desc'); $liqsol = array("FALSE" => $LangUI->_('Liquid'), "TRUE" => $LangUI->_('Solid')); $ingredient_name = ""; $ingredient_desc = ""; $ingredient_unit = ""; $ingredient_loc = ""; $ingredient_solid = ""; $coreingredient_id = ""; $coreingredient_Name = ""; if ($ingredient_id) { $ingredient_name = $ingredients->fields['ingredient_name']; $ingredient_desc = $ingredients->fields['ingredient_desc']; $ingredient_unit = $ingredients->fields['ingredient_unit'];
<th><?php echo $LangUI->_('Ingredient') . " - "; ?> <a href="#" id="addNewIngredientsLink" style="color: #FFFFFF;">[<?php echo $LangUI->_('add new'); ?> ]</a></th> <th><?php echo $LangUI->_('Optional'); ?> </th> </tr> </thead> <tbody class="content"> <?php $localUnits = Units::getAllUnits(); // Print out the ingredient fields for ($i = 0; $i < $total_ingredients; $i++) { if ($ingredients != null) { $ingredient_id = $ingredients->fields['map_ingredient']; $ingredient_name = $ingredients->fields['ingredient_name']; $ingredient_qual = $ingredients->fields['map_qualifier']; $ingredient_quant = $ingredients->fields['map_quantity']; $ingredient_unit = $ingredients->fields['map_unit']; $ingredient_optional = $ingredients->fields['map_optional'] == $DB_LINK->true ? 'checked' : ''; } $ingredient_delete = ''; // default starting out value (nothing selected) if ($i >= $n) { $ingredient_id = 0; $ingredient_name = "";