<script src="<?php echo base_url();?>assets/js/jquery.js"></script>
<script src="<?php echo base_url();?>assets/js/jquery-ui.min.js"></script>
<script src="<?php echo base_url();?>assets_front/js/frontendvalidations.js"></script>
<style>
.reg_error {
	color: #FF0000;
	margin-top: 28px;
	font-size: 14px;
	font-family: sans-serif;
	margin-top: 6px;
	margin-bottom: 17px;
}
#fname_error, #lname_error, #email_error, #email_error_valid, #pass_error, #location_error, #job_title_error, #secters_error, #pass_must, #address_can_error, #phone_error {
	display: none;
}
.ui-autocomplete {
	z-index: 2147483647!important;
}
</style>
<div class="modal-header">
  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <h4 class="modal-title" id="myModalLabel" style="text-align:center;">Update Work History</h4>
</div>
<div class="container">
  <div class="profile-wrap margin-top-30">
    <div class="row">
      <div class="col-sm-9">
        <div class="tab-content">
          <div role="tabpanel" class="tab-paneas">
            <ul class="looking-for">
              <form name="work"  method="post" action="<?php echo base_url();?>front_end/update_work_hostory" onsubmit="return fromwork()">
                <?php
foreach($query as $val)
{
?>
                <input type="hidden" name="work_id" id="work_id" value="<?php echo $val->work_id; ?>"/>
                <li>
                  <div class="edit-cntnts margin-bottom-20">
                    <h3>Job Title</h3>
                  </div>
                  <div class="edit-filds">
                    <div class="row">
                      <div class="col-xs-12">
                        <input type="text" class="form-control" id="job_title" name="job_title" placeholder="Job Title" nkeypress="return alphaOnly(event)" value="<?php echo $val->job_title; ?>">
                      </div>
                    </div>
                  </div>
                </li>
                <li>
                  <div class="edit-cntnts margin-bottom-20">
                    <h3>Company Name</h3>
                  </div>
                  <div class="edit-filds">
                    <div class="row">
                      <div class="col-xs-12">
                        <input type="text" id="cname" name="cname" class="form-control" placeholder="Company name" nkeypress="return alphaOnly(event)" value="<?php echo $val->cname; ?>">
                      </div>
                    </div>
                  </div>
                </li>
                <li>
                  <div class="edit-cntnts margin-bottom-20">
                    <h3>From</h3>
                  </div>
                  <div class="edit-filds">
                    <div class="row">
                      <div class="col-xs-6">
                        <select class="form-control"  name="fmonth" id="fmonth">
                          <option value="">Month</option>
                          <?php
for($fm=1;$fm<13;$fm++)
{?>
                          <option value="<?php echo $fm ;?>"<?php if($val->fmonth==$fm){?> selected="selected" <?php }?>>
                          <?php 
								if($fm == 1)
								{
									echo "January";
								}elseif($fm == 2)
								{
									echo "February";
								}elseif($fm == 3)
								{
									echo "March";
								}elseif($fm == 4)
								{
									echo "April";
								}elseif($fm == 5)
								{
									echo "May";
								}elseif($fm == 6)
								{
									echo "June";
								}elseif($fm == 7)
								{
									echo "July";
								}elseif($fm == 8)
								{
									echo "August";
								}elseif($fm == 9)
								{
									echo "September";
								}
								elseif($fm == 10)
								{
									echo "October";
								}
								elseif($fm == 11)
								{
									echo "Novemeber";
								}
								elseif($fm == 12)
								{
									echo "December";
								}?>
                          </option>
                          <?php }?>
                        </select>
                      </div>
                      <div class="col-xs-6">
                        <select class="form-control"  name="fyear" id="fyear">
                          <option value="">Year</option>
                          <?php
$endyear=date('Y');						  
for($fy=1901;$fy<=$endyear;$fy++)
{?>
                          <option value="<?php echo $fy ;?>" <?php if($fy==$val->fyear){?> selected="selected" <?php }?>><?php echo $fy ;?></option>
                          <?php }?>
                        </select>
                      </div>
                    </div>
                  </div>
                  <div class="lable-section">
                    <label>
          <input type="checkbox" name="currently" id="currently" value="1" <?php if($val->currently==1){?> checked="checked" <?php }?>>
                      I currently work here</label>
                  </div>
                </li>
                <li>
                  <div class="edit-cntnts margin-bottom-20">
                    <h3>To</h3>
                  </div>
                  <div class="edit-filds">
                    <div class="row">
                      <div class="col-xs-6">
                        <select class="form-control" id="tmonth" name="tmonth" >
                          <option value="">Month</option>
                          <?php
for($tm=1;$tm<13;$tm++)
{?>
                          <option value="<?php echo $tm ;?>"<?php if($val->tmonth==$tm){?> selected="selected" <?php }?>>
                          <?php 
								if($tm == 1)
								{
									echo "January";
								}elseif($tm == 2)
								{
									echo "February";
								}elseif($tm == 3)
								{
									echo "March";
								}elseif($tm == 4)
								{
									echo "April";
								}elseif($tm == 5)
								{
									echo "May";
								}elseif($tm == 6)
								{
									echo "June";
								}elseif($tm == 7)
								{
									echo "July";
								}elseif($tm == 8)
								{
									echo "August";
								}elseif($tm == 9)
								{
									echo "September";
								}
								elseif($tm == 10)
								{
									echo "October";
								}
								elseif($tm == 11)
								{
									echo "Novemeber";
								}
								elseif($tm == 12)
								{
									echo "December";
								}?>
                          </option>
                          <?php }?>
                        </select>
                      </div>
                      <div class="col-xs-6">
                        <select class="form-control" id="tyear" name="tyear">
                          <option value="">Year</option>
<?php
$endyear23=date('Y');							  
for($ty=1901;$ty<=$endyear23;$ty++)
{?>
<option value="<?php echo $ty ;?>" <?php if($ty==$val->tyear){?> selected="selected" <?php }?>><?php echo $ty ;?></option>
<?php }?>
                        </select>
                      </div>
                    </div>
                  </div>
                </li>
                <li>
                  <div class="edit-cntnts margin-bottom-20">
                    <h3>What did you do there?</h3>
                  </div>
                  <div class="examp-section">
                    <textarea class="form-control" id="exampleTextarea" name="details" rows="3" style="width: 546px;"><?php echo $val->details; ?></textarea>
                    <!--<span>2000 characters remaining </span>--> 
                  </div>
                </li>
                <div class="butten-section" style="    margin-top: 10px;margin-bottom: 20px;">
                  <input type="submit" name="add_work" id="add_work" value="Save Changes">
                  <!--<input class="right-cont" type="button" value="Save & add another">-->
                  <input class="right" type="reset"  name="reset" id="reset" data-dismiss="modal" aria-label="Close" value="Cancel">
                  <!--<button type="button" class="close"  ><span aria-hidden="true">&times;</span></button>--> 
                </div>
                <?php }?>
              </form>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
<script src="<?php echo base_url();?>assets_front/js/bootstrap.min.js"></script> 
<script src="<?php echo base_url();?>assets_front/js/owl.carousel.min.js"></script> 
<script src="<?php echo base_url();?>assets_front/js/script.js"></script>
<?php //$this->load->view('footer_front'); ?>
