<?php include "../../Connections/connect_mysql.php"; ?>
<div data-parsley-validate class="form-horizontal form-label-left">
<div class="form-group">
  <label class="control-label col-md-3 col-sm-3 col-xs-12" >ชื่อสาขา <span class="required">*</span></label>
  <div class="col-md-9 col-sm-9 col-xs-12">
    <input type="text" id="branchA1" required="required" class="form-control col-md-7 col-xs-12" onblur="chkdlgbranch(this.id);">
  </div>
</div>
<div class="form-group">
  <label class="control-label col-md-3 col-sm-3 col-xs-12" >รหัสสาขา <span class="required">*</span></label>
  <div class="col-md-9 col-sm-9 col-xs-12">
    <input type="text" id="branchA2" required="required" class="form-control col-md-7 col-xs-12" onblur="chkdlgbranch(this.id);">
  </div>
</div>
<div class="form-group">
    <label class="control-label col-md-3 col-sm-3 col-xs-12" >คำอธิบายเพิ่มเติม <span class="required"></span></label>
    <div class="col-md-9 col-sm-9 col-xs-12">
    <textarea id="branchA3" class="form-control col-md-7 col-xs-12" type="text" ></textarea>
  </div>
</div>
<div class="form-group">
    <label class="control-label col-md-3 col-sm-3 col-xs-12" >บริษัท <span class="required">*</span></label>
            <div class="col-md-9 col-sm-9 col-xs-12">
                 <select class="form-control" id="branchA4">
                   <option value="0"> # เลือกบริษัท # </option>
                   <?php
                   $sqlcom = 'SELECT * FROM company_tb';
                   $resultcom = mysql_query($sqlcom) or die(mysql_error());
                   while ($rowcom = mysql_fetch_array($resultcom)) {
                     ?>
                     <option value="<?php echo $rowcom['compid']; ?>" ><?php echo $rowcom['compname']; ?></option>
                   <?php } ?>
                 </select>
               </div>
  </div>
</div>

<script>
    CKEDITOR.replace( 'branchA3' );
</script>
