<h3 align="center"><?php echo $heading ; ?></h3>

<div align="center" style="width:100%;">

<div class="err_msg" >
<?php 
echo validation_errors(); 
echo $str; 
?>
</div>

<div style="width:460px; height:auto; text-align:left;">

<form name="form1" method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="aid" value="<?=$aid?>" />
<p>
<label>Featured * &nbsp;(featured items will be displayed in the front page)</label><br>
<input type="radio" name="featured" value="1" <?php if($featured==1)echo 'checked'; ?> />Yes
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="featured" value="0" <?php if($featured==0)echo 'checked'; ?>/>No
</p>

<!--<p>
<label>Offer Avialable * &nbsp;(these items will be displayed in the offers page)</label><br>
<input type="radio" name="offer" value="1" <?php if($offer==1)echo 'checked'; ?> />Yes
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="offer" value="0" <?php if($offer==0)echo 'checked'; ?>/>No
</p>-->

<p>
<label>Order * </label><br>
<select name="order"  style="width:100px;"  >
<option value="">-Select-</option>
<?php for($i=1;$i<=50;$i++): ?>
<option value="<?=$i?>" <?php if($i==$order){echo 'selected="selected"';}?> ><?=$i?></option>
<?php endfor; ?>
</select>
</p>



<!--<p>
<label>Type *</label><br>
<select name="type_id" id="type_id">
<option value="">Select Type</option>
<?php foreach($type_result as $row_typ):?>
<option value="<?php echo $row_typ['id'] ; ?>" <?php if($type_id==$row_typ['id'])echo 'selected="selected"'; ?> >
<?=$row_typ['title']?>
</option>
<?php endforeach; ?>
</select>
</p>-->





<!--<p>
<label>Category * </label><br>
<div style="padding:10px 10px 10px 10px; border:1px solid #999999;">
<?php foreach($category_result as $row_rel):?>





<p><input type="checkbox" value="<?php echo $row_rel['id'];?>" name="category_id[]" 
<?php foreach($subcategory_result as $row_rel2):?>
<?php  $rela=$row_rel2['cat_id'];  ?>

<?php if($rela==$row_rel['id'])echo 'checked'; ?>
  <?php endforeach; ?>
  
    >&nbsp;&nbsp;<?=$row_rel['title']?>&nbsp;&nbsp;
<?php endforeach;?>
</div>
</p>-->


<p>
<label>Name * &nbsp;&nbsp; Don't use special characters(&,(,@,!,) etc.)</label><br />
<input type="text" name="title" style="width:460px;" value="<?=$title?>" />

</p>


<!--<p>
<label>Select Product/Sub-product *:</label>
<input type="radio" name="entry" value="0" <?php if($entry==0)echo 'checked'; ?> />Product
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="entry" value="1" <?php if($entry==1)echo 'checked'; ?>/>Sub-product
</p>-->

<p>
<label>Description </label><br />
<textarea name="text" cols="50" rows="8" id="elm3"><?=$text?></textarea>
</p>


<p>
<label>Specification </label><br />
<textarea name="specification" cols="50" rows="8" id="elm2"><?=$specification?></textarea>
</p>


<!--<p>
<label>Activity Control </label><br />
<textarea name="activity_control" cols="50" rows="8" id="elm1"><?=$activity_control?></textarea>
</p>


<p>
<label>Offer Details </label><br />
<textarea name="offer_det" cols="50" rows="8" id="elm4"><?=$offer_det?></textarea>
</p>

<!--<p>
<label>unit *</label><br>
<select name="unit_id" id="unit_id">
<option value="">Select Unit</option>
<?php foreach($unit_result as $row_unit):?>
<option value="<?php echo $row_unit['id'] ; ?>" <?php if($unit_id==$row_unit['id'])echo 'selected="selected"'; ?> >
<?=$row_unit['title']?>
</option>
<?php endforeach; ?>
</select>
</p>-->


<p>
<label>Selling Price *</label><br />
<input type="text" name="price" style="width:225px;" value="<?=$price?>" />
</p>

<p>
<label>Nett Price *</label><br />
<input type="text" name="uprice" style="width:225px;" value="<?=$uprice?>" />
</p>

<p>
<label>Image1 ( 400x450, Only jpeg, gif. Maxsize 500 Kb)</label><br/><br />
<input type="file" name="img"/>&nbsp;&nbsp;&nbsp;
<?php if($img!=''){?>

<img src="<?php echo base_url('assets/images/'.$img) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('product_admin/image_delete/'.$aid.'/1/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
</p>

<p>
<label>Image2 ( 400x450, Only jpeg, gif. Maxsize 500 Kb)</label><br/><br />
<input type="file" name="img1"/>&nbsp;&nbsp;&nbsp;
<?php if($img1!=''){?>

<img src="<?php echo base_url('assets/images/'.$img1) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('product_admin/image_delete1/'.$aid.'/1/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
</p>


<p>
<label>Image3 ( 400x450, Only jpeg, gif. Maxsize 500 Kb)</label><br/><br />
<input type="file" name="img2"/>&nbsp;&nbsp;&nbsp;
<?php if($img2!=''){?>

<img src="<?php echo base_url('assets/images/'.$img2) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('product_admin/image_delete2/'.$aid.'/1/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
</p>

<p>
<label>Image4 ( 400x450, Only jpeg, gif. Maxsize 500 Kb)</label><br/><br />
<input type="file" name="img3"/>&nbsp;&nbsp;&nbsp;
<?php if($img3!=''){?>

<img src="<?php echo base_url('assets/images/'.$img3) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('product_admin/image_delete3/'.$aid.'/1/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>

</p>

<p>
<label>Image5 ( 400x450, Only jpeg, gif. Maxsize 500 Kb)</label><br/><br />
<input type="file" name="img4"/>&nbsp;&nbsp;&nbsp;
<?php if($img4!=''){?>

<img src="<?php echo base_url('assets/images/'.$img4) ;?>" width="70" height="70" border="0" />
<a href="<?php echo site_url('product_admin/image_delete4/'.$aid.'/1/') ; ?>" onClick="return confirm('Delete image ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" width="20" height="20" />
</a> 
<?php } ?>
</p>

<p><input name="submit" class="button-primary" value="Submit" type="submit" ></p>


</form>


<p>&nbsp;</p>
