<?php
$page = 'category';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Admin</title>
    <link href="<?php echo base_url(); ?>assets/Backend/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/Backend/css/sb-admin.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/Backend/css/plugins/morris.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/Backend/font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="<?php echo base_url();?>assets/Backend/editor/css/froala_editor.min.css" rel="stylesheet" type="text/css">

<style>
.p{
	border:1px solid #CCC;
  }
</style>
</head>


<body>

    <div id="wrapper">

        <!-- Navigation -->
        <?php
		include "include/header.php";
		?>
        <?php
		//foreach($about as $row)
		//$p_id = $row->p_id;%
		?>

        <div id="page-wrapper">

            <div class="container-fluid">
             <?php foreach($category as $row)
			 ?>
                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            New Product <small><?php echo '['.$row->c_name.']';?></small>
                           <a href="<?php echo base_url();?>app/chemical_products/<?php echo $row->c_id;?>" class="pull-right btn btn-primary">Back</a>

                        </h1>
                       
                    </div>
                </div>
            <form role="form" action="<?php echo base_url();?>insert/in_chemical/<?php echo $row->c_id;?>" method="post" enctype="multipart/form-data">
            <div class="row">
         
            	<div class="col-lg-6">
             		<div class="form-group">
                		<label>Select Category</label>
                        <select class="form-control" name="c_id">
                        <option value="<?php echo $row->c_id ?>"><?php echo $row->c_name;?></option>
                        </select>
                    </div>
                </div> 
                <div class="col-lg-6">
             		<div class="form-group">
                		<label>Product Name</label>
             			<input type="text" class="form-control" name="p_name" required/>
                    </div>
                </div>
          </div> 
           <div class="row">    
                 <div class="col-lg-3">
             		<div class="form-group">
                		<label>Revision Date</label>
             			<input type="date" class="form-control" name="p_revision_date"/>
                    </div>
                </div>
                <div class="col-lg-3">
             		<div class="form-group">
                		<label>Status</label>
             			<select class="form-control" name="p_status">
                        <option value="New">New Product</option>
                        <option value="Old">Old Product</option>
                        </select>
                    </div>
                </div>  
                <div class="col-lg-6">
                 	<div class="form-group">
                        <label>Select Image for Uploading <b>(JPG Files Only)</b></label>
                        <input type="file" name="p_image" class="form-control">
                    </div>
                 </div>
           </div> 
           
           <div class="row">      
                    <div class="col-lg-12">
							<div class="form-group">
                                <label>Product Information</label>
                                <textarea class="form-control" id="edit" name="p_description" rows="25"></textarea>
                            </div>
                    </div>
              </div>
           
             <div cass="row">
                    <div class="col-lg-12"><legend>Product Details</legend>
                        <div class="table-responsive">
                            <table class="table table-hover">
                                <tr>
                                <td width="20%"><input type="text" value="Article No" class="form-control" name="pd_property[]" readonly  required/></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" required></td>
                                <td width="20%"><input type="text" value="Grade" class="form-control" name="pd_property[]" readonly /></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" /></td>
                                </tr>
                                <tr>
                                <td width="20%"><input type="text" value="Purity" class="form-control" name="pd_property[]" readonly /></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" /></td>
                                <td width="20%"><input type="text" value="CAS No" class="form-control" name="pd_property[]" readonly required/></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" required/></td>
                                </tr>
                                <tr>
                                <td width="20%"><input type="text" value="Molecular Formula" class="form-control" name="pd_property[]" readonly /></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" /></td>
                                <td width="20%"><input type="text" value="Molecular Weight" class="form-control" name="pd_property[]" readonly /></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" /></td>
                                </tr>
                                <tr>
                                <td width="20%"><input type="text" value="H.S.Code" class="form-control" name="pd_property[]" readonly /></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]"/></td>
                                <td width="20%"><input type="text" value="Shelf Life" class="form-control" name="pd_property[]" readonly /></td>
                                <td width="30%"><input type="text" class="form-control" name="pd_value[]" /></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    </div>
               <br>
               <div class="row">
               		<div class="col-lg-6">
                    <legend>Physical Properties</legend>
                    <table class="table table-hover">
                    <thead>
                    <th width="5%"></th>
                    <th width="20%">Property</th>
                    <th width="20%">Property Details</th>
                    </thead>
                    </table>
                    <table class="table" id="dataTable1">
                       <tr>
                          <td width="5%"><input type="checkbox" name="ch_p[]"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_property[]" id="pp_property[]" value="Physical state at 20c"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_value[]" id="pp_value[]" value=""/></td>
                       </tr>
                       <tr>
                          <td width="5%"><input type="checkbox" name="ch_p[]"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_property[]" id="pp_property[]" value="Colour"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_value[]" id="pp_value[]" value=""/></td>
                       </tr>
                       <tr>
                          <td width="5%"><input type="checkbox" name="ch_p[]"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_property[]" id="pp_property[]" value="Density"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_value[]" id="pp_value[]" value=""/></td>
                       </tr>
                       <tr>
                          <td width="5%"><input type="checkbox" name="ch_p[]"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_property[]" id="pp_property[]" value="Odour"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_value[]" id="pp_value[]" value=""/></td>
                       </tr>
                        <tr>
                          <td width="5%"><input type="checkbox" name="ch_p[]"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_property[]" id="pp_property[]" value="Melting Point"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_value[]" id="pp_value[]" value=""/></td>
                       </tr>
                        <tr>
                          <td width="5%"><input type="checkbox" name="ch_p[]"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_property[]" id="pp_property[]" value="Boiling Point"/></td>
                          <td width="20%"><input type="text" class="form-control" name="pp_value[]" id="pp_value[]" value=""/></td>
                       </tr>
                    </table>
                    <table class="mws-table mws-datatable">	
                         <tr>
                            <td><input type="button" value="+" class="btn btn-danger btn-sm" onclick="addRow('dataTable1')"/></td>
                            <td>&nbsp;<input type="button" value="-" class="btn btn-primary btn-sm" onclick="deleteRow('dataTable1')"/></td>
                         </tr>
                    </table>
                    
                    </div>
                    <div class="col-lg-6 ">
                    <legend>Specification Details</legend>
                    <table class="table table-hover">
                    <thead>
                    <th width="5%"></th>
                    <th width="20%">Property</th>
                    <th width="20%">Property Details</th>
                    </thead>
                    </table>
                    <table class="table table-hover" id="dataTable2">
                           <tr>
                              <td width="5%"><input type="checkbox" name="ch[]"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_property[]" value="Appearance"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_value[]" value=""/></td>
                           </tr>
                            <tr>
                              <td width="5%"><input type="checkbox" name="ch[]"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_property[]" value="Amount of substance concentration"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_value[]" value=""/></td>
                           </tr>
                            <tr>
                              <td width="5%"><input type="checkbox" name="ch[]"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_property[]" value="Matrix"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_value[]" value=""/></td>
                           </tr>
                            <tr>
                              <td width="5%"><input type="checkbox" name="ch[]"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_property[]" value="Assay"/></td>
                              <td width="20%"><input type="text" class="form-control" name="sd_value[]" value=""/></td>
                           </tr>
                    </table>
                    <table class="mws-table mws-datatable">	
                             <tr>
                                <td><input type="button" value="+" class="btn btn-danger btn-sm" onclick="addRow('dataTable2')"/></td>
                                <td>&nbsp;<input type="button" value="-" class="btn btn-primary btn-sm" onclick="deleteRow('dataTable2')"/></td>
                             </tr>
                    </table>
                                       
                    </div>
               </div>
               <br><br>
               <div class="row">
               		<div class="col-lg-6">
                    
                    <legend>Packings</legend>
                    <table class="table table-hover">
                    <thead>
                    <th width="5%"></th>
                    <th width="20%">Package No</th>
                    <th width="20%">Stock</th>
                    </thead>
                    </table>
                    <table class="table table-hover" id="dataTable3">
                        <tbody>
                           <tr>
                              <td width="5%"><input type="checkbox" name="ch[]"/></td>
                              <td width="20%"><input type="text" class="form-control" name="pkg_no[]" value=""/></td>
                              <td width="20%"><input type="text" class="form-control" name="pkg_stk[]"/></td>
                           </tr>
                        </tbody>
                    </table>
                    <table class="mws-table mws-datatable">	
                    	<tbody>
                             <tr>
                                <td><input type="button" value="+" class="btn btn-danger btn-sm" onclick="addRow('dataTable3')"/></td>
                                <td>&nbsp;<input type="button" value="-" class="btn btn-primary btn-sm" onclick="deleteRow('dataTable3')"/></td>
                             </tr>
                        </tbody>
                    </table>
                                       
                    </div>
                    
                    <div class="col-lg-6">
                    <legend>Safety Information</legend>
                      <div class="col-lg-4">
                      <input type="checkbox" value="1" name="chk[]"/>
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_1.png" alt="ho"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="2" name="chk[]"/>
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_2.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="3" name="chk[]" />
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_3.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="4" name="chk[]" />
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_4.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="5" name="chk[]"/>
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_5.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="6" name="chk[]" />
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_6.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="7" name="chk[]"/>
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_7.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4">
                      <input type="checkbox" value="8" name="chk[]" />
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_8.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4"> 
                      <input type="checkbox" value="9" name="chk[]" />
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_9.png"/>
                      </a>
                      </div>
                      <div class="col-lg-4" style="display:none"> 
                      <input type="checkbox" value="0" name="chk[]" checked />
                      <a href="#" class="">
                      <img src="<?php echo base_url();?>assets/safety img/symbols_9.png" />
                      </a>
                      </div>
                     </div>
                   </div>
                 
                   <br><br>
                        <input type="submit" class="btn btn-primary" value="Save Information"/>
                        <input type="reset" class="btn btn-default"/>   
               </form>
			
            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
   <!-- jQuery Version 1.11.0 -->
    <script src="<?php echo base_url(); ?>assets/Backend/js/jquery-1.11.0.js"></script>
    <script src="<?php echo base_url(); ?>assets/Backend/js/addrow.js"></script>
    <!-- Bootstrap Core JavaScript -->
    <script src="<?php echo base_url(); ?>assets/Backend/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="<?php echo base_url(); ?>assets/Backend/js/plugins/morris/raphael.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/Backend/js/plugins/morris/morris.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/Backend/js/plugins/morris/morris-data.js"></script>
	<script src="<?php echo base_url(); ?>assets/Backend/editor/js/libs/jquery-1.11.1.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/Backend/editor/js/froala_editor.min.js"></script>
  
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/tables.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/lists.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/colors.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/font_family.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/font_size.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/block_styles.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/media_manager.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/Backend/editor/js/plugins/video.min.js"></script>

  <script>
      $(function(){
        $('#edit').editable({inlineMode: false})
      });
  </script>
</body>

</html>
