<?php echo $header; ?>  
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/customer.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a>
	  <?php if($gemstone_id <> ''){ ?>
		<a onclick="location = '<?php echo $ExcelUpdate; ?>';" class="button">Update all Products</a>
	  <?php  } ?>  
	  <a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a>
	  </div>
    </div>
    <div class="content">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
        <table class="form">
        <!--
          <tr>
            <td><span class="required">*</span> <?php echo $entry_code; ?></td>
            <td>
            	<input type="text" name="code" value="<?php echo $code; ?>" />
              	<?php if ($error_code) { ?>
              		<span class="error"><?php echo $error_code; ?></span>
              	<?php  } ?></td>
          </tr>
         -->
         <input type="hidden" name="code" value="0" />
          <tr>
                <td><?php echo $entry_gemstone; ?></td>
                <td><select name="gemstone_id">
                    <?php foreach ($gemstonelists as $gemstonelist) { ?>
                    <?php if ($gemstonelist['gemstone_id'] == $gemstone_id) { ?>
                    <option value="<?php echo $gemstonelist['gemstone_id']; ?>" selected="selected"><?php echo $gemstonelist['gemname']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $gemstonelist['gemstone_id']; ?>"><?php echo $gemstonelist['gemname']; ?></option>
                    <?php } ?>
                    <?php } ?>
                  </select></td>
          </tr>
		   <tr>
                <td><?php echo $entry_lowclarity; ?></td>
                <td><select name="lowclarity">
                    <?php foreach ($claritymasters as $claritymaster) { ?>
                    <?php if ($claritymaster['clarity_id'] == $lowclarity) { ?>
                    <option value="<?php echo $claritymaster['clarity_id']; ?>" selected="selected"><?php echo $claritymaster['clarity_code'] . ' - ' . $claritymaster['clarity_id']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $claritymaster['clarity_id']; ?>"><?php echo $claritymaster['clarity_code']. ' - ' . $claritymaster['clarity_id'];; ?></option>
                    <?php } ?>
                    <?php } ?>
                  </select></td>
          </tr>
		   <tr>
                <td><?php echo $entry_highclarity; ?></td>
                <td><select name="highclarity">
                    <?php foreach ($highclaritymasters as $highclaritymaster) { ?>
                    <?php if ($highclaritymaster['clarity_id'] == $highclarity) { ?>
                    <option value="<?php echo $highclaritymaster['clarity_id']; ?>" selected="selected"><?php echo $highclaritymaster['clarity_code'] . ' - ' . $highclaritymaster['clarity_id']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $highclaritymaster['clarity_id']; ?>"><?php echo $highclaritymaster['clarity_code']. ' - ' . $highclaritymaster['clarity_id'];; ?></option>
                    <?php } ?>
                    <?php } ?>
                  </select></td>
          </tr>
		    <tr>
                <td><?php echo $entry_lowcolor; ?></td>
                <td><select name="lowcolour">
                    <?php foreach ($lowcolorclaritys as $lowcolorclarity) { ?>
                    <?php if ($lowcolorclarity['colour_id'] == $lowcolour) { ?>
                    <option value="<?php echo $lowcolorclarity['colour_id']; ?>" selected="selected"><?php echo $lowcolorclarity['colour_code']. ' - ' . $lowcolorclarity['colour_id']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $lowcolorclarity['colour_id']; ?>"><?php echo $lowcolorclarity['colour_code']. ' - ' . $lowcolorclarity['colour_id']; ?></option>
                    <?php } ?>
                    <?php } ?>
                  </select></td>
          </tr>
		    <tr>
                <td><?php echo $entry_highcolor; ?></td>
                <td><select name="highcolour">
                    <?php foreach ($highcolorclaritys as $highcolorclarity) { ?>
                    <?php if ($highcolorclarity['colour_id'] == $highcolour) { ?>
                    <option value="<?php echo $highcolorclarity['colour_id']; ?>" selected="selected"><?php echo $highcolorclarity['colour_code']. ' - ' . $highcolorclarity['colour_id']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $highcolorclarity['colour_id']; ?>"><?php echo $highcolorclarity['colour_code']. ' - ' . $highcolorclarity['colour_id']; ?></option>
                    <?php } ?>
                    <?php } ?>
                  </select></td>
          </tr>
		   <tr>
            <td><span class="required">*</span> <?php echo $entry_lowweight; ?></td>
            <td><input type="text" name="lowweight" value="<?php echo $lowweight; ?>" />
              <?php if ($error_lowweight) { ?>
              <span class="error"><?php echo $error_lowweight; ?></span>
              <?php  } ?></td>
          </tr>
		   <tr>
            <td><span class="required">*</span> <?php echo $entry_highweight; ?></td>
            <td><input type="text" name="highweight" value="<?php echo $highweight; ?>" />
              <?php if ($error_highweight) { ?>
              <span class="error"><?php echo $error_highweight; ?></span>
              <?php  } ?></td>
          </tr>
		   <tr>
                <td><?php echo $entry_shape; ?></td>
                <td><select name="shape">
                    <?php foreach ($gemshapes as $gemshape) { ?>
                    <?php if ($gemshape['shape_id'] == $shape) { ?>
                    <option value="<?php echo $gemshape['shape_id']; ?>" selected="selected"><?php echo $gemshape['shape']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $gemshape['shape_id']; ?>"><?php echo $gemshape['shape']; ?></option>
                    <?php } ?>
                    <?php } ?>
                  </select></td>
          </tr>
          
          
          <input type="hidden" name="pricepercarat" value="0" />
          <input type="hidden" name="priceperpiece" value="0" />
          
           <tr>
            <td><span class="required">*</span> <?php echo $entry_pricetype; ?></td>
              <td><select name="pricetype">
                  <?php if ($pricetype == 0) { ?>
                  <option value="0" selected="selected">Price Per Carat</option>
                  <option value="1">Price Per Piece</option>
                  <?php } else { ?>
                  <option value="0" >Price Per Carat</option>
                  <option value="1" selected="selected">Price Per Piece</option> 
                  <?php } ?>
                </select></td>
                
          </tr>
		  <tr>
            <td><span class="required">*</span> <?php echo $entry_price; ?></td>
            <td><input type="text" name="price" value="<?php echo $price; ?>" />
              <?php if ($error_price) { ?>
              <span class="error"><?php echo $error_price; ?></span>
              <?php  } ?></td>
          </tr>
          
		   <tr>
              <td> <?php echo $entry_currency; ?></td>
              <td><select name="ccurrency">
                  <?php foreach ($currencies as $currency) { ?>
                  <?php if ($currency['code'] == $ccurrency) { ?>
                  <option value="<?php echo $currency['code']; ?>" selected="selected"><?php echo $currency['title']; ?></option>
                  <?php } else { ?>
                  <option value="<?php echo $currency['code']; ?>"><?php echo $currency['title']; ?></option>
                  <?php } ?>
                  <?php } ?>
                </select></td>
            </tr>

          
        </table>
      </form>
    </div>
  </div>
</div>
<?php echo $footer; ?>