<?php 
	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$rivermedia->auth();
	$rivermedia->add_product();
?>
                  <div class="form-group">
                    
                    <div class="col-md-6 col-sm-6 col-xs-12">
                      <label class="control-label" for="product">Product name <span class="required">*</span> </label>
                      <input type="text" id="product" name="product" required class="form-control col-md-7 col-xs-12" >
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-md-6 col-sm-6 col-xs-12">
                      <label class="control-label" for="product_description">Product description </label>
                      <textarea id="product_description" maxlength="1000" class="form-control" name="product_description"></textarea>
                      <h6 class="pull-right" id="product_description_length">0/1000</h6>
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="col-md-2 col-sm-2 col-xs-12">
                      <label class="control-label" for="select_media_type">Media type </label>
                      <select name="select_media_type" id="select_media_type" class="form-control">
                      <?php
						$rivermedia->selectfield_media_type();
					  ?>
                      </select>
                    </div>
                    <div class="col-md-2 col-sm-2 col-xs-12">
                      <label class="control-label" for="select_media_origin">Media origin </label>
                      <select name="select_media_origin" id="select_media_origin" class="form-control">
                      <?php
						$rivermedia->selectfield_media_origin();
					  ?>
                      </select>
                    </div>
                    <div class="col-md-2 col-sm-2 col-xs-12">
                      <label class="control-label" for="select_event">Event </label>
                      <select name="select_event" id="select_event" class="form-control">
                      <option value="N/A">N/A</option>
                      <?php
						$rivermedia->selectfield_event();
					  ?>
                      </select>
                    </div>
                    <div class="clearfix"></div>
                    <div class="ln_solid"></div>
                    <div id="cb_physmed" class="col-md-3 col-sm-2 col-xs-12">
                      <div class="control-label pull-left"><b>Available on physical medium</b></div>
                      <div class="clearfix"></div>
					  <?php $rivermedia->selectfield_physical_medium(); ?>
                      <div class="clearfix"></div>
                      <input type="hidden" name="arr_phys_med" id="arr_phys_med" class="form-control" />
                      <br />
                      <div>
                      	<label class="control-label" for="reference">Reference</label>
                        <input type="text" class="form-control" id="reference" name="reference" maxlength="20" />
                      </div>
                    </div>
                    <div class="col-md-3 col-sm-2 col-xs-12">
                    
                    <h4>PRICING</h4>
                    
                      <div class="form-group col-md-6 col-sm-6 col-xs-12">
                        <label class="control-label" for="price_ex_vat">Price (excl VAT)<span class="required">*</span> </label>
                        <input type="text" id="price_ex_vat" name="price_ex_vat" data-thousands=" " data-decimal="." data-prefix="R " maxlength="10" placeholder="R 0.00" required class="form-control col-md-7 col-xs-12 price_fields" >
                      </div>
                      <div class="form-group col-md-6 col-sm-6 col-xs-12">
                        <label class="control-label" for="price_inc_vat">Price (incl VAT)<span class="required">*</span> </label>
                        <input type="text" id="price_inc_vat" name="price_inc_vat" data-thousands=" " data-decimal="." data-prefix="R " maxlength="11" placeholder="R 0.00" required class="form-control col-md-7 col-xs-12 price_fields" >
                      </div>
                      
                      <div class="clearfix"></div>
                      <h4>DIMENSIONS and WEIGHT</h4>
                      <div class="form-group col-md-4 col-sm-4 col-xs-12">
                        <label class="control-label" for="width">Width (cm)</label>
                        <input type="text" id="width" name="width" data-thousands=" " data-decimal="." data-prefix="" maxlength="7" placeholder="0.00" required class="form-control col-md-12 col-xs-12 dimensions" >
                      </div>
                      <div class="form-group col-md-4 col-sm-4 col-xs-12">
                        <label class="control-label" for="height">Height (cm) </label>
                        <input type="text" id="height" name="height" data-thousands=" " data-decimal="." data-prefix="" maxlength="7" placeholder="0.00" required class="form-control col-md-12 col-xs-12 dimensions" >
                      </div>
                      <div class="form-group col-md-4 col-sm-4 col-xs-12">
                        <label class="control-label" for="depth">Depth (cm) </label>
                        <input type="text" id="depth" name="depth" data-thousands=" " data-decimal="." data-prefix="" maxlength="7" placeholder="0.00" required class="form-control col-md-12 col-xs-12 dimensions" >
                      </div>
                      <div class="clearfix"></div>
                      <div class="form-group col-md-6 col-sm-6 col-xs-12">
                        <label class="control-label" for="weight">Weight (kg) </label>
                        <input type="text" id="weight" name="weight" data-thousands=" " data-decimal="." data-prefix="" maxlength="7" placeholder="0.00000" required class="form-control col-md-12 col-xs-12 weight" >
                      </div>
                    </div>
                    <div class="clearfix"></div>
                    <div class="ln_solid"></div>
                    <div class="form-group col-md-3 col-sm-3 col-xs-12">
                      <div class="checkbox checkbox-primary">
                        <input name="kids_item" id="kids_item" type="checkbox" value="Y">
                        <label for="kids_item">Is this a kids' item?</label>
                      </div>
                      <div class="checkbox checkbox-primary">
                        <input name="dynamis_item" id="dynamis_item" type="checkbox" value="Y">
                        <label for="dynamis_item">Dynamis product</label>
                      </div>
                    </div>
                    <div class="col-md-3 col-sm-3 col-xs-12">
                      <div class="form-group">
                        <label class="control-label" for="external_url_text">External link text </label>
                        <input type="text" class="form-control" id="external_url_text" name="external_url_text" maxlength="30" />
                      </div>
                      <div class="form-group">
                        <label class="control-label" for="external_url">External link url </label>
                        <input type="text" class="form-control" id="external_url" name="external_url" maxlength="255" />
                      </div>
                    </div>
                    <div class="clearfix"></div>
                    <div class="ln_solid"></div>
                    <div class="form-group col-md-2 col-sm-2 col-xs-12">
                        <label class="control-label" for="quantity">Quantity </label>
                        <input type="text" id="quantity" name="quantity" maxlength="7" placeholder="0" required class="form-control col-md-12 col-xs-12" >
                    </div>
                  </div>
                  <div class="ln_solid"></div>
                    <div>
                      <button type="reset" class="btn btn-primary">Cancel</button>
                      <button id="submit_add_product" class="btn btn-success">Add New</button>
                    </div>
                  </div>
                  <input type="hidden" name="vat_rate" id="vat_rate" class="form-control" value="<?php echo $rivermedia->get_vat(); ?>" />
                  <div class="clearfix"></div>
                  <div id="statusmessage_success" class="status_messages"><?php if (isset($_SESSION['statusmessage_success'])) {echo "<i class=\"fa fa-check\"></i> ".$_SESSION['statusmessage_success']; unset($_SESSION['statusmessage_success']);};?></div>
                  <div id="statusmessage_fail" class="status_messages"><?php if (isset($_SESSION['statusmessage_fail'])) {echo "<i class=\"fa fa-times\"></i> ".$_SESSION['statusmessage_fail']; unset($_SESSION['statusmessage_fail']);};?></div>
                 
