<head><style>
/* Preserve original layout, leave left margin for sidebar */
.right_col {
  margin-left: 220px; /* adjust based on sidebar width */
  padding: 20px;
}

/* Use Flexbox for 3-column alignment */
.tsf-step-content .row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* Ensure input containers align properly */
.tsf-step-content .col-lg-2,
.tsf-step-content .col-lg-3,
.tsf-step-content .col-lg-4,
.tsf-step-content .col-lg-5,
.tsf-step-content .col-lg-6,
.tsf-step-content .col-lg-8 {
  flex: 1 1 calc(33.333% - 20px);
  min-width: 250px;
  box-sizing: border-box;
}

/* Add spacing between sections */
.tsf-step fieldset {
  border: none;
  padding: 10px 0;
  margin-bottom: 30px;
}

/* Label and input styling */
.tsf-step-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.tsf-step-content input,
.tsf-step-content select {
  width: 100% !important;
  padding: 8px;
  font-size: 14px;
}

/* Gender radio inputs inside form-control */
#hostel.form-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
</style>
</head>
<!--- page content -->
         <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
              </div>

              <div class="title_right">
                <div class="col-md-5 col-sm-5 col-xs-12 form-sidoup pull-right top_search">
                                  </div>
              </div>
            </div>
            <div class="clearfix"></div>

            <div class="row">

              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>Student Registration<small></small></h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                     <!-- <li><a class="close-link"><i class="fa fa-close"></i></a> -->
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">

                   
    <div class="demo-settings" data-open="true">
        
        <div class="settings-main">
            <label>Step effect</label>
            <select class="form-control" id="stepEffect">
                <option value="basic" selected="selected">basic</option>
                <option value="bounce">bounce</option>
                <option value="slideRightLeft">slideRightLeft</option>
                <option value="slideLeftRight">slideLeftRight</option>

                <option value="flip">flip</option>
                <option value="transformation">transformation</option>
                <option value="slideDownUp">slideDownUp</option>
                <option value="slideUpDown">slideUpDown</option>
            </select>
            <br />
            <label for="stepTransition">
                Step transition <input type="checkbox" id="stepTransition" name="stepTransition" value="11" checked />
            </label>
            <br />
            <label for="showButtons">
                Show buttons <input type="checkbox" id="showButtons" name="showButtons" value="111" checked />
            </label>
            <br />
            <label for="showStepNum">
                Show stepNum <input type="checkbox" id="showStepNum" name="showStepNum" value="123" checked />
            </label>


        </div>
    </div>

    <div class="container">
        <div class="row">
            
            <!-- BEGIN STEP FORM WIZARD -->
            <div class="tsf-wizard tsf-wizard-1">
                <!-- BEGIN NAV STEP-->
                <div class="tsf-nav-step">
                    <!-- BEGIN STEP INDICATOR-->
                    <ul class="gsi-step-indicator triangle gsi-style-1  gsi-transition ">
                        <li class="current" data-target="step-1">
                            <a href="#1">
                                <span class="number">1</span>
                                <span class="desc">
                                    <label>Personal Information</label>
                                    <!-- <span>Account details</span> -->
                                </span>
                            </a>
                        </li>
                        <!--<li data-target="step-2">-->
                        <!--    <a href="#2">-->
                        <!--        <span class="number">2</span>-->
                        <!--        <span class="desc">-->
                        <!--            <label>Address Information</label>-->
                        <!--        </span>-->
                        <!--    </a>-->
                        <!--</li>-->
                        <!--<li data-target="step-3">-->
                        <!--    <a href="#3">-->
                        <!--        <span class="number">-->
                        <!--            3-->
                        <!--        </span>-->
                        <!--        <span class="desc">-->
                        <!--            <label>School Information</label>-->
                        <!--            <span></span>-->
                        <!--        </span>-->
                        <!--    </a>-->
                        <!--</li>-->
                        <li data-target="step-2">
                            <a href="#2">
                                <span class="number">
                                    2
                                </span>
                                <span class="desc">
                                    <label>Fee Details</label>
                                    <span></span>
                                </span>
                            </a>
                        </li>
                    </ul>
               
                <!-- BEGIN STEP CONTAINER -->

                <div class="tsf-container">
                    <!-- BEGIN CONTENT-->
                    <form  class="tsf-content" id="routePermit"  method="POST" action="<?php echo base_url();?>student/save_short_info"  enctype="multipart/form-data" style="height:1000px;">
                       
                        <!--<form class="tsf-form">-->
                        <!-- BEGIN STEP 1-->
                        <div class="tsf-step step-1 active">
                            <fieldset>
                                <legend>
                                <div class="col-lg-3">
                                   Personal Information
                                </div>
                                <br>
                                 <?php $sid='';if($this->user_model->is_super()){ ?>
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12 text-right" for="name">Branch <span class="text-danger">*</span>
                        </label>
                        <div class="col-md-3 col-sm-3 col-xs-6">
                          <select id="branch" class="form-control" name="branch" required="required" >
                            <option value=''>Select branch</option>
                      <?php
                            $branc = $this->db->select("name,id")->from("branch")->get()->result();
                            foreach ($branc as $value) {
                      ?>
                            <option value="<?php echo $value->id; ?>"><?php echo $value->name?></option>

                      <?php } ?>
                          </select>
                        </div>
                      </div>
                      <?php  } ?>
                                <div class="col-lg-8 col-lg-offset-1">
                               
                            <br>
                                <?php if(!$this->user_model->is_super()){ ?>
	                            <input type="hidden" class="form-control" name="branch" id="branch" value="<?= $branch ?>">
	                                <?php $sid = @$this->db->select('sid')->where('branch',$branch)->order_by('id','DESC')->get('student')->row()->sid; ?>
	                            <?php } ?>
	                    
                                <label for="name" class="col-lg-3 text-right">Roll # <span class="text-danger">*</span></label>
	                            <?php echo form_error('sid',"<p style='color:red;font-size:12px;'>");?>
	                           <input type="hidden" class="col-lg-5 required abc1" id="sid" name="sid" onKeyup="myFunction()" placeholder="Enter Student ID" required="true" style="width: 230px;margin-left:50px;" value="<?php echo $sid+1;?>">
	                            <p class="text-danger lastsid" style="font-size:11px;font-weight:bolder">  <?php if($sid) echo"  (Last SID:  $sid)" ?></p>
	                     <input type="text" class="col-lg-5" id="roll_no" name="roll_no" placeholder="Roll No" required="true" style="width: 230px;margin-left:50px;" value="">

	                        </div>
	                        
                                    <p class="result text-danger bg-danger" style='font-size:14px;'></p>
	                       </legend>
                                <div class="row">
                                   
                                    <div class="tsf-step-content">
                                        <div class="row">
                                                    <input type="hidden" class="form-control abc1" id="grno" name="grno" placeholder="Registration Number" title="Only alphabatic character" required  value="<?php echo $sid+1;?>">
                                                <div class="col-lg-3">
                                                    <label for="doa">Admission Date<span class="text-danger">*</span> </label>
                                                    <input  class="form-control datepicker" id="doa" name="doa" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" placeholder="dd-mm-yyyy" value="<?= $date; ?>" required />
                                                </div>
                                                
                                                <div class =" col-lg-2 ">
                                                    <label for="name">Full Name <span class="text-danger">*</span></label>
                                                    
                                                    <input type="text" class="form-control abc" id="name" name="name" placeholder="Student Name" title="Only alphabatic character" required>
                                                 
                                                </div>
                                                 <div class="col-lg-2">
                                            <label for="f_no">Student Contact</label>
                                            <?php echo form_error('s_number',"<p style='color:red;font-size:12px;'>");?> 
                                                
                                                <input id="student_contact" name="student_contact" class="form-control  col-md-7 col-xs-12 phone" value="+254" type="text" placeholder="+254XXXXXXXXX"  pattern="[\+]\d{3}\d{4}\d{5}" title="Phone No. Format: +254XXXXXXXX">
                                              

                                           </div>
                                            <div class="col-lg-3">
                                                    <label for="student_cnic">Student Adm No. </label>
                                                    
                                                    <input id="student_cnic" name="student_cnic" class="form-control num" type="text" pattern="\d{4}\d{4}" title="1234512 (7 numbers)" placeholder="XXX-XXXX"  >
                                                

                                        </div>
                                        <div class="col-lg-3">
                                         
                                        <label for="familyincome">Class Admitted<span class="text-danger">*</span></label>
                                       <select name="class_admited" id="class_admited" class="form-control col-md-12 col-sm-12 col-xs-12" required="required" style="width:100%">
                                            <option value="">Select Class</option>
                                       </select>  
                                    </div>
                                     <div class="col-lg-3">
                                        <label for="section">Section<span class="text-danger">*</span></label>
                                        <select class="form-control" name="section" id="section" required style="width:100%">
                                      <option value="">Select Section</option>
                                 </select>  

                                    </div>
                                    <div class="col-lg-3">
                                                    <label for="group_name">Group Name</label>
                                                    <input id="group_name" name="group_name" class="form-control" type="text" placeholder="Group Name"  >
                                                

                                        </div>
                            <!--        <div class="col-lg-3">-->
                            <!--            <label for="familyincome">Previous Class</label>-->
                            <!--           <select name="class_id" id="class_id" class="form-control col-md-12 col-sm-12 col-xs-12"  style="width:100%">-->
                            <!--    <option value="">Select Class</option>-->
                            <!--</select>  -->

                            <!--        </div>-->
                                                <!--<div class =" col-lg-2 ">-->
                                                <!--    <label for="surname">Surname<span class="text-danger"></span></label>-->
                                                    
                                                <!--    <input type="text" class="form-control abc" id="surname" name="surname" placeholder="Surname"  title="Only alphabatic character" >-->
                                                 

                                                <!--</div>                                                -->
                                        </div>

<!--<div class="row">-->

<!--                                            <div class="col-lg-3">-->
<!--                                                <label for="fathername">Father Name<span class="text-danger">*</span> </label>-->
                                                    
<!--                                                <input id="fathername" name="fathername" class="form-control col-md-5 col-xs-12 abc" type="text" title="Only alphabatic character " placeholder="Father Name" required >-->
                                             

<!--                                            </div>-->
<!--                                            <div class="col-lg-3">-->
<!--                                                <label for="father_cnic">Father CNIC <span class="text-danger">*</span></label>-->
                                                    
<!--                                                <input id="father_cnic" name="father_cnic" class="form-control num" type="text"  pattern="\d{5}\d{7}\d{1}" title="1234512345671 (13 numbers)" placeholder="XXXXX-XXXXXXX-X" required>-->
                                             
<!--                                            </div>-->
<!--                                        </div>-->

<!--<div class="row">-->
<!--                                            <div class="col-lg-3 col-lg-offset-1">-->
<!--                                                <label for="guardianname">Guardian Name</label>-->
                                                    
<!--                                                <input id="guardianname" name="guardianname" class="form-control col-md-5 col-xs-12 abc" type="text" title="Only alphabatic character" placeholder="Guardian Name">-->
                                            

<!--                                            </div>-->
<!--                                            <div class="col-lg-3">-->
<!--                                                <label for="guardian_cnic">Guardian CNIC</label>-->
                                                    
<!--                                                <input id="student_cnic" name="guardian_cnic" class="form-control num1" type="text"  pattern="\d{5}\d{7}\d{1}" title="1234512345671 (13 numbers)" placeholder="XXXXX-XXXXXXX-X">-->
                                             

<!--                                            </div>-->
<!--                                            <div class="col-lg-3">-->
<!--                                                <label for="Relation">Relation with Guardian</label>-->
<!--                                                <input id="rwg" name="rwg" class="form-control col-md-5 col-xs-12 abc" type="text"  placeholder="e.g Uncle"  >-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--<div class="row">-->
<!--                                            <div class="col-lg-3 col-lg-offset-1 ">-->
<!--                                                <label for="father_occ">Father Occupation</label>-->
<!--                                                <input id="father_occ" name="father_occ" class="form-control abc" type="text"  placeholder="e.g Lawyer" >-->
<!--                                            </div>-->
<!--                                            <div class="col-lg-3 ">-->
<!--                                                <label for="guardian_occ">Guardian Occupation</label>-->
<!--                                                <input id="guardian_occ" name="guardian_occ" class="form-control abc" type="text" placeholder="e.g Lawyer"  >-->
<!--                                            </div>-->
<!--                                            <div class="col-lg-3 ">-->
<!--                                                <label for="family_income">Family Income</label>-->
                                                
<!--                                                <input id="father_income" name="father_income" class="form-control num" type="text" placeholder="Family Income" >-->
                                               

<!--                                            </div>-->
<!--                                        </div>-->
  
<!--        <div class="row">-->
<!--<p class="text-danger"></p>-->
<!--                                            <div class="col-lg-3 col-lg-offset-1">-->
<!--                                                <label for="religion">Religion<span class="text-danger">*</span></label>-->
<!--                                                <input id="religion" name="religion" class="form-control col-md-5 col-xs-12 abc" type="text"  placeholder="e.g Islam">   -->
<!--                                            </div>-->
<!--                                            <p id="valid_date" class="text-danger"></p>-->
<!--                                            <div class="col-lg-3">-->
<!--                                                <label for="dob">Date of Birth<span class="text-danger">*</span> </label>-->
<!--                                                  <input id="dob" name="dob" class="DMY form-control col-md-7 col-xs-12" placeholder="dd-mm-yyyy"  type="text">    -->
                                                  
<!--                                            </div>-->
<!--                                            <div class="col-lg-3">-->
<!--                                                <label for="pob">Place of Birth<span class="text-danger" >*</span></label>-->
<!--                                                  <input id="pob" name="pob" class=" form-control col-md-7 col-xs-12 abc" type="text"  placeholder="e.g Lahore" >-->
<!--                                            </div>-->
<!--                                            <p id="valid_date" class="text-danger"></p>-->
<!--                                        </div>-->
           
            <!--<div class="col-lg-5">-->
            <!--                                <div id="camera"></div>-->
            <!--                                <div>-->
            <!--                                    <button type="button" id="capture_btn" style="color:white;background-color:#10498c;padding:5px 10px;margin:5px;">Capture</button>-->
            <!--                                    <button type="button" id="cam_reset" style="color:white;background-color:#10498c;padding:5px 10px;margin:5px;">Reset</button>-->
            <!--                                    <input type="hidden" id="webcam_pic" name="webcam_pic" value="">-->
            <!--                                </div>-->
            <!--              </div> -->
          
                          
                                   <div class="row">
                                       
                          
                          
                                            <div class="col-lg-3">
                                              <?php
                                                   $pic = array(
                                                       'name' => 'pic',
                                                       'id' => 'pic', 
                                                       'class'=> 'form-control',
                                                        );
                                                     echo form_label('Picture ');
                                                     echo form_upload($pic); 
                                             ?>
                                                
                                            </div>

<div class="col-lg-2">
                                            <label>Gender <span class="text-danger">*</span></label>
                                    <div id="hostel" name="hostel" class="form-control">
                                            <input type="radio" name="gender" value="Male"  required>
                                            Male
                                            <input type="radio" name="gender" value="Female">
                                            Female
                                    </div>
</div>
                                            <!--<div class="col-lg-3">-->
                                            <!--    <label for="dob">Mark of Identification</label>-->
                                            <!--      <input id="mark_of_identification" name="mark_of_identification" class=" form-control col-md-7 col-xs-12 abc" type="text">-->
                                            <!--</div>-->

                                            
                                        </div>
                                

<!--                                    <div class= "row">-->
<!--<div class="col-lg-3 col-lg-offset-1">-->
<!--                                                <label for="dob">Mother Tongue<span class="text-danger"></span></label>-->
<!--                                                  <input id="mother_tongue" name="mother_tongue" class=" form-control col-md-7 col-xs-12 abc" pattern="[A-Za-z\s]{1,}"  type="text"  placeholder="e.g Urdu">-->
<!--                                            </div>   -->
<!--                                            <div class="col-lg-5">-->
<!--                                                <label for="dob_words">Date of Birth in Words<span class="text-danger">*</span></label>-->
<!--                                                  <input id="dob_words" name="dob_words" class="form-control col-md-5 col-xs-12 abc" type="text" required>                                   -->
<!--                                            </div>-->
<!--</div>-->

                               
                                </div>

                            </fieldset>
                        </div>
                        <!-- END STEP 1-->
                        <!-- BEGIN STEP 2-->
                        <!-- <div class="tsf-step step-2">-->
<!--                            <fieldset>-->
<!--                                <legend>Address Information</legend>-->
                              
<!--                                <div class="tsf-step-content">-->
                                    
<!--                                    <span class="fa fa-home" style="font-size:200%;width:4%;float:left;"></span>-->
<!--                                    <legend for="address" style="font-size:150%;font-weight:bold;">Address Details</legend>-->

<!--                                            <div class="row">                                              -->
                                                
<!--                                                <div class="col-lg-2 col-md-3">-->
<!--                                                    <label for="province" >Province<span class="text-danger">*</span></label>-->
<!--                                   <select id="province" name="province" class="form-control col-md-7 col-xs-12"  style="width: 100%" required>-->
<!--                                                        <option value="">Select Province</option>-->
    <?php      
                                $pro=$this->db->where('is_delete',0)->get('province')->result();
                                     foreach ($pro as $valuepro) {
                 ?>
                  <!--<option value="<?php echo $valuepro->province_id; ?>"><?php echo $valuepro->province_name?></option>-->

                 <?php } ?>
<!--                                                    </select>                                                    -->
<!--                                                </div>-->
<!--                                                <div class="col-lg-2 col-md-3">-->
<!--                                                    <label for="p_district" >District<span class="text-danger">*</span></label>-->
<!--                                                        <select id="district" name="district" class="form-control col-md-7 col-xs-12"  style="width: 100%" disabled  required>-->
<!--                                                            <option value="">Select District</option>-->
<!--                                                        </select>-->
<!--                                                </div>-->
<!--                                            <div class="col-lg-2 col-md-3">-->
<!--                                                <label for="p_taluka" class="col-md-7 col-xs-12">Tehsil/Tehsil</label>-->
<!--                                                <select id="taluka" name="taluka" class="form-control"  style="width: 100%" disabled >-->
<!--                                                    <option value="">Select Tehsil</option>-->
<!--                                                </select>                                                    -->
<!--                                            </div>-->
<!--                                            <div class="col-lg-4 col-md-6">-->
<!--                                                <label for="p_city">City/Village</label>-->
<!--                                                <input type="text" class="form-control col-md-7 col-xs-12 abc" id="city" name="city" placeholder="City/Village" title="Only alphabatic character" >-->
<!--                                            </div>                                             -->
<!--                                        </div>-->

<!--<div class="row">-->
<!--                                                <div class="col-lg-11">-->
<!--                                                    <label for="address">Postal Address<span class="text-danger">*</span></label>-->
<!--                                                    <textarea rows="2"  id="postaladdess" name="postaladdess"  class="form-control" required></textarea>-->
<!--                                                </div>-->
<!--                                        </div>-->
<!--<div class="row">-->
<!--                                                <div class="col-lg-11">-->
<!--                                                    <label for="p_address">Permanent Address<span class="text-danger">*</span></label>-->
<!--                                                    <textarea rows="2"  id="address" name="address"  class="form-control" required></textarea>-->
<!--                                                </div>-->
<!--                                        </div>-->

<!--<br>-->
<!--<span class="fa fa-phone-square" style="font-size:200%;width:4%;float:left;"></span>-->
<!--<legend for="contact" style="font-size:150%;font-weight:bold;width:80%;"> Contact Numbers</legend>-->

<!--<div class="row">-->
                                            
<!--                                            <div class="col-lg-5">-->
<!--                                            <label for="f_no">Student Contact</label>-->
                                            <?php //echo form_error('s_number',"<p style='color:red;font-size:12px;'>");?> 
                                                
<!--                                                <input id="student_contact" name="student_contact" class="form-control  col-md-7 col-xs-12 phone" type="text" placeholder="+92XXXXXXXXXX"  pattern="[\+]\d{2}\d{4}\d{6}" title="Phone No. Format: +92XXXXXXXXXX">-->
                                              

<!--                                            </div>-->
                                        
<!--                                            <div class="col-lg-5 ">-->
<!--                                            <label for="f_no">Student Email</label>-->
                                                 <?php //echo form_error('email',"<p style='color:red;font-size:12px;'>");?>
                                                
<!--                                                <input id="email" name="email" class="form-control  col-md-7 col-xs-12 email" type="email"-->
<!--                                                placeholder="abc@example.com" title="email: abc@example.com" >-->
                                               
   
<!--                                            </div>-->
<!--                                         </div> -->

<!--                                        <div class="row">-->
<!--                                            <div class="col-lg-5 ">-->
<!--                                            <label for="f_no">Father Contact<span class="text-danger">*</span></label>-->
                                            <?php //echo form_error('f_number',"<p style='color:red;font-size:12px;'>");?>
                                                
<!--                                                    <input id="father_contact" name="father_contact" class="form-control phone" type="text" placeholder="+92XXXXXXXXXX" pattern="[\+]\d{2}\d{4}\d{6}" title="Phone No. Format: +92XXXXXXXXXX" required>-->
                                                   
    
<!--                                            </div>-->
<!--                                            <div class="col-lg-5 ">-->
<!--                                            <label for="f_no">Guardian Contact</label>-->
<!--                                                <input id="guardian_contact" name="guardian_contact" class="form-control phone" type="text" placeholder="+92XXXXXXXXXX"  pattern="[\+]\d{2}\d{4}\d{6}" title="Phone No. Format: +92XXXXXXXXXX">-->
                                                  
  
<!--                                            </div>-->
<!--                                        </div>-->
                                    
<!--                                </div>-->
                            
<!--                            </fieldset>-->
<!--                        </div>-->
                        <!-- END STEP 2-->
                        <!-- BEGIN STEP 3-->
                    <!--     <div class=" tsf-step step-3 ">-->
<!--                            <fieldset>-->
<!--                                <legend>School Information</legend>-->
                                
<!--                                <div class="tsf-step-content">-->
                                    
<!--                                  <div class="form-sidoup">-->
<!--                                        <label for="familyincome">Previous School</label>-->
<!--                                        <input type="text" class="form-control abc" id="preschool" name="preschool" placeholder="Previous School">-->
<!--                                    </div>-->
<!--<div class="form-sidoup">-->
<!--                                        <label for="familyincome">Previous Class</label>-->
<!--                                       <select name="class_id" id="class_id" class="form-control col-md-12 col-sm-12 col-xs-12"  style="width:100%">-->
<!--                                <option value="">Select Class</option>-->
<!--                            </select>  -->

<!--                                    </div>-->

<?php if(!$this->user_model->is_super()){ ?>
<!--                                    <div class="form-sidoup">-->
<!--                                        <label for="familyincome">Select Branch</label>-->
<!--                                        <select class="form-control" name="branch" id="branch" disabled>-->
<!--                                      <option value="">Select Branch</option>-->
                                       <?php  $branchid=$this->user_model->getbranch(); 
                                       $this->db->where('is_delete',0)->where('id',$branchid) ;
                                $com=$this->db->get('branch')->result();
                              foreach ($com as $value) {
                  ?>
<!--                    <option value="<?php echo $value->id; ?>"<?php if($value->id == $branchid){echo "selected";}?>><?php echo $value->name?></option>-->

<!--                  <?php } ?>-->
<!--                                 </select>  -->

<!--                                    </div>-->
<!--                                    <?php } ?>-->
          

                                    
<!--</div>-->
<!--                                    <div class="form-sidoup">-->
<!--                                        <label for="familyincome">Class Admitted<span class="text-danger">*</span></label>-->
<!--                                       <select name="class_admited" id="class_admited" class="form-control col-md-12 col-sm-12 col-xs-12" required="required" style="width:100%">-->
<!--                                            <option value="">Select Class</option>-->
<!--                                       </select>  -->
<!--                                    </div>-->
                                

<!--                                                                        <div class="form-sidoup">-->
<!--                                        <label for="section">Section<span class="text-danger">*</span></label>-->
<!--                                        <select class="form-control" name="section" id="section" required style="width:100%">-->
<!--                                      <option value="">Select Section</option>-->
<!--                                 </select>  -->

<!--                                    </div>-->
<!--                                 <div class="form-sidoup">-->
<!--                                        <label for="section">Session<span class="text-danger">*</span></label>-->
<!--                                        <select class="form-control" name="session" id="session" style="width:100%" required >-->
<!--                                      <option value="">Select Session</option>-->
                                     <?php  $this->db->select('id,name');$this->db->where('is_delete',0);
                               $com=$this->db->get('session')->result_array();
                                              foreach ($com as $key => $value) {
                  ?>
<!--                                   <option value="<?php echo $value['id']; ?>"><?php echo $value['name'];?></option>-->

                <?php } ?>
<!--                                 </select>  -->

                                    
<!--                                </div>-->
                               

<!--                            </fieldset>-->
<!--                        </div>-->
                        <!-- END STEP 3-->
                        <!-- BEGIN STEP 3-->
                        <div class=" tsf-step step-2 ">
                            <fieldset>
                                <legend>Fee Details</legend>
                                 BEGIN STEP CONTENT
                                <div class="tsf-step-content">
                                    <div class="form-sidoup">
                                        <label for="fee_pack">Tuition Fee</label>
                                        <input type="number" class="form-control" id="fee_pack" name="fee_pack" placeholder="Fee Package" value="0" min="0">
                                    </div>
                                    <div class="form-sidoup">
                                        <label for="siblings">Siblings</label>
                                        <input type="number" class="form-control" disabled id="siblings" name="siblings" placeholder="Siblings" value="0">
                                    </div>
                                    <div class="form-sidoup">
                                        <label for="disc_type">Select Discount Type</label>
                                        <select class="form-control" name="disc_type" id="disc_type">
                                            <option value="">Select Discount Type</option>
                                            <option value="percentage">Percentage (%)</option>
                                            <option value="rupees">Shillings (Ksh)</option>
                                        </select>  
                                    </div>
                                    <div class="row">
                                        <div class="form-sidoup col-md-6 col-sm-6 col-xs-12">
                                            <label for="disc">Discount</label>
                                            <div class="row">
                                                <div class="col-md-6 col-sm-6 col-xs-6">
                                                    <p style="color:red;display:none;" id="d_msg">Value should be less than 0 and greater than 100</p>
                                                    <input type="number" min="0" max="100" name="disc_value" id="disc_per" class="form-control" disabled placeholder="IN %">
                                                </div>
                                                <div class="col-md-6 col-sm-6 col-xs-6">
                                                    <p style="color:red;display:none;" id="rs_msg">Value should be less than fee_pack</p>
                                                    <input type="number" min="0" name="disc_value" id="disc_rs" class="form-control" disabled placeholder="IN RS">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-sidoup col-md-6 col-sm-6 col-xs-12">
                                            <label for="net_fee">Fee Package</label>
                                            <div class="row">
                                                <div class="col-md-12 col-sm-12 col-xs-12">
                                                    <input type="number" name="net_fee" id="net_fee" class="form-control" placeholder="Fee Package" required="required">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <div class="row">
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <label for="doa">Fee for the month of <span class="text-danger">*</span> </label>
                                            <div class="row">
                                                <div class="col-md-6 col-sm-6 col-xs-6">
                                                    <input  class="form-control datepicker" value="<?php echo date('d-m-Y');?>" id="fftmo" name="fftmo" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" placeholder="dd-mm-yyyy" required />
                                                    </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <label for="doa">Expiry Date <span class="text-danger">*</span> </label>
                                            <div class="row">
                                                <div class="col-md-6 col-sm-6 col-xs-6">
                                                    <input  class="form-control datepicker" id="exp_date" value="<?php echo date('d-m-Y');?>" name="exp_date" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" placeholder="dd-mm-yyyy" required />
                                                    </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                         
                            </fieldset>
                            <fieldset>
                               <legend>Other Fees</legend>
                                <div class="tsf-step-content">
                                    <div class="form-group">
                                        <label for="admin_fee">Admission Fee</label>
                                        <input type="number" class="form-control" id="admin_fee" name="admin_fee" placeholder="Admission Fee" value="0" min="0">
                                    </div>
                                    
                                    <div class="form-group">
                                        <label for="fee_type">Select Fee Type</label>
                                        <select class="form-control" id="fee_type" name="fee_type" style="width:100%;">
                                                <option value="">Select Fee Type</option>
                                                
                                                   <?php    $b_id=$this->user_model->getbranch();
                                                   $this->db->select('id,name');
                                                   $this->db->where('is_delete',0);
                                                   $this->db->where('branch_id',$b_id);
                                                     $com=$this->db->get('fee_def')->result_array();
                                                    foreach ($com as $key => $value) { ?>
                                                       <option value="<?php echo $value['id']; ?>"><?php echo $value['name'];?></option>
                    
                                                        <?php } ?>
                        
                                        </select>
                                    </div>

                                    <div class="form-sidoup">
                                        <label for="fee_other_amount">Amount</label>
                                        <input type="number" class="form-control fee_type_amount" name= "fee_other_amount" id="fee_other_amount" placeholder="Fee Amount" value="0" min="0" readonly >
                                    </div>
                                    <div class="form-sidoup">
                                        <button class="btn btn-success" id="add_other_fee" disabled>ADD</button>
                                    </div>
                                    <table class="table table-hover">
                                    <thead>
                                        <tr>
                                        <th>Select</th>
                                        <th>Type</th>
                                        <th>Amount</th>
                                        <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody id="fee_other_body">
                                        
                                    </tbody>
                                    </table>
                                </div>
                            </fieldset>
                        </div>
                        <!-- END STEP 3-->
                        <!--</form>-->
                    
                    <!-- END CONTENT-->
                    <!-- BEGIN CONTROLS-->
                    <div class="tsf-controls ">
                        <!-- BEGIN PREV BUTTTON-->
                        <button type="button" data-type="prev" class="btn btn-left tsf-wizard-btn">
                            <i class="fa fa-chevron-left"></i> PREV
                        </button>
                        <!-- END PREV BUTTTON-->
                        <!-- BEGIN NEXT BUTTTON-->
                        <button type="button" id="send" data-type="next" class="btn btn-right tsf-wizard-btn">
                            NEXT <i class="fa fa-chevron-right"></i>
                        </button>
                        <!-- BEGIN FINISH BUTTTON-->
                        <input type="submit" value="FINISH" data-type="finish" class="btn btn-right tsf-wizard-btn">

                        <!-- END FINISH BUTTTON--><!-- END NEXT BUTTTON-->
                        <a href="<?php echo base_url();?>student/show"><button type="button" class="btn btn-right btn-lg btn-danger" style="height:52px;float:right;background-color:#ba3030">
                            <small>CANCEL</small>
                        </button></a>
                        
                    </div>
                    <!-- END CONTROLS-->
                </div>
                <!-- END STEP CONTAINER -->
</form>

            </div>





                </div>
              </div>
            </div> 
          </div>
        </div>
        <!-- /page content -->

        <!-- /page content -->

       
      </div>

    </div></div></div>
 <!-- footer content -->
        <footer>
          <div class="pull-right">
            Prudmac
          </div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
    <!-- jQuery -->
    <script src="<?php echo base_url(); ?>assets/vendors/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>assets/webcam/scripts/webcam.js"></script>
    <!-- Select2 -->
    <!--<script src="<?php //echo base_url(); ?>assets/vendors/select2/dist/js/select2.min.js"></script>-->
    <!-- Custom JS -->
    <script src="<?php echo base_url(); ?>assets/js/main.js"></script>
    <!-- Bootstrap -->
    <script src="<?php echo base_url(); ?>assets/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="<?php echo base_url(); ?>assets/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProsidess -->
    <script src="<?php echo base_url(); ?>assets/vendors/nprosidess/nprosidess.js"></script>
    <!-- Chart.js -->
    <script src="<?php echo base_url(); ?>assets/vendors/Chart.js/dist/Chart.min.js"></script>
    <!-- gauge.js -->
    <script src="<?php echo base_url(); ?>assets/vendors/gauge.js/dist/gauge.min.js"></script>
    <!-- bootstrap-prosidessbar -->
    <script src="<?php echo base_url(); ?>assets/vendors/bootstrap-prosidessbar/bootstrap-prosidessbar.min.js"></script>
    <!-- iCheck -->
    <script src="<?php echo base_url(); ?>assets/vendors/iCheck/icheck.min.js"></script>
    <!-- Skycons -->
    <script src="<?php echo base_url(); ?>assets/vendors/skycons/skycons.js"></script>
    <!-- Flot -->
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.pie.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.time.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.stack.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.resize.js"></script>
    <!-- Flot plugins -->
    <script src="<?php echo base_url(); ?>assets/js/flot/jquery.flot.orderBars.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/date.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/jquery.flot.spline.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/curvedLines.js"></script>
    <!-- jVectorMap -->
    <script src="<?php echo base_url(); ?>assets/js/maps/jquery-jvectormap-2.0.3.min.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="<?php echo base_url(); ?>assets/js/moment/moment.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/datepicker/daterangepicker.js"></script>
    <!-- Jquery UI-daterangepicker -->
    <script src="<?php echo base_url(); ?>assets/vendors/datepicker/jquery-ui.min.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="<?php echo base_url(); ?>assets/build/js/custom.min.js"></script>

     <!-- <script src="<?php echo base_url();?>assets/formwizard/js/jquery-1.11.3.min.js"></script> -->
     <script src="<?php echo base_url();?>assets/formwizard/js/demo.js"></script>

     <script src="<?php echo base_url();?>assets/formwizard/plugin/parsley/js/parsley.js"></script>

     <script src="<?php echo base_url();?>assets/formwizard/js/tsf-wizard-plugin.js"></script>
     
<script src="<?php echo base_url()?>assets/select/js/select2.min.js"></script>

<script>
		$(function(){
			//give the php file path
			webcam.set_api_url( "<?= base_url() ?>student/savePicture" );
			webcam.set_swf_url( "<?= base_url() ?>assets/webcam/scripts/webcam.swf" );//flash file (SWF) file path
			webcam.set_quality( 100 ); // Image quality (1 - 100)
			webcam.set_shutter_sound( true , "<?= base_url() ?>assets/webcam/shutter.mp3"); // play shutter click sound
			
			var camera = $('#camera');
			camera.html(webcam.get_html(400, 270)); //generate and put the flash embed code on page
			
			$('#capture_btn').click(function(){
				//take snap
				webcam.snap();
				$('#show_saved_img').html('<h3>Please Wait...</h3>');
			});
			
			$('#cam_reset').click(function(){
				webcam.reset();
			});
			

			//after taking snap call show image
			webcam.set_hook( 'onComplete', function(img){
                $('#webcam_pic').val(img);
				//reset camera for the next shot
				//webcam.reset();
			});
			
		});
</script>
	
<script type="text/javascript">

  $(function(){
      $('#routePermit').submit(function(e){
          
        $("input[type='submit']", this).val("Please Wait...").attr('disabled', 'disabled');
        return true;
      });
});

</script>

<script>
    $('#session').select2();
    $('#class_admited').select2();
    $('#section').select2();
    $('#province').select2();
    $('#district').select2();
    $('#taluka').select2();
     <?php if($this->user_model->is_super()){ ?>
    $('#branch').select2();
    <?php } ?>
    $('#class_id').select2();
    $('#fee_type').select2();
    
</script>
   
<script>
 $(document).ready(function(){
     $("#father_cnic").keyup(function(){
         var cnic=$(this).val();
         //alert(cnic);
         $.ajax({
            url: '<?php echo base_url(); ?>Student/count_siblings/'+cnic,
            data: {},
         success: function (data) {
                if(data)
                            {   
                                //alert(data);
                                //var v = $("#siblings").val();
                                //alert(v)
                                $("#siblings").val(data);
                               //var v1 = $("#siblings").val(data);
                               //alert(v1);
                            }
                             else{
                                 
                             }
          }
     });//end ajax for loading form
     });
 });
</script>
<script>
 $(document).ready(function(){
                 $("#sid").change(function() {
                    var $br=$("#branch").val();
                    var value = $(this).val();
                    //alert($br);
                    //alert(value);
                        $.post("<?php echo base_url(); ?>load/search_sid/"+value+'/'+$br,{},function(data){
                        if(data=="true") {
                        $(".result").html("SID you entered already exists...!!!");
                        $("#sid").val(''); 
                          $("#send").prop('disabled',true)
                          
                        }
                        else
                        {
                              $("#send").prop('disabled',false)
                            $(".result").html("");
                        }
                     });
                });
                $("#branch").change(function() {
                    var $br=$(this).val();
                    var value = $("#sid").val();
                    //alert($br);
                    //alert(value);
                        $.post("<?php echo base_url(); ?>load/search_sid/"+value+'/'+$br,{},function(data){
                        if(data=="true") {
                        $(".result").html("SID you entered alreday exists...!!!");
                        $("#sid").val(''); 
                          $("#send").prop('disabled',true)
                        }
                        else
                        {
                             $("#send").prop('disabled',false)
                            $(".result").html("");
                        }
                     });
                     $.post("<?php echo base_url(); ?>load/search_lastsid/"+$br,{},function(data){
                        if(data) {
                            $(".lastsid").html(data);
                        }
                        
                     });
                }); 
            });
</script>
<script>
    $(document).ready(function(){
                
        //Validation For Alpa Numeric & Additional Operator
        $(document).on("keypress",".sidade", function (event) {

            var englishAlphabetAndWhiteSpace = /[A-Za-z0-9|-]/g;


            var key = String.fromCharCode(event.which);


            if (event.keyCode == 9 || event.keyCode == 32 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 43 || event.keyCode == 46 || englishAlphabetAndWhiteSpace.test(key)) {
                return true;
            }


            return false;
        });
        
    $(document).on("keypress",".abc",function(event){
        
            var englishAlphabetAndWhiteSpace = /[A-Za-z ]/g;


            var key = String.fromCharCode(event.which);


            if (event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 32 || event.keyCode == 95 || event.keyCode == 39 || englishAlphabetAndWhiteSpace.test(key)) {
                return true;
            }
            return false;
        });

    $(document).on("keypress",".abc1",function(event){
    
            var englishAlphabetAndWhiteSpace = /[A-Za-z0-9|-]/g;


            var key = String.fromCharCode(event.which);


            if (event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 32 || event.keyCode == 95 || event.keyCode == 39 || englishAlphabetAndWhiteSpace.test(key)) {
                return true;
            }


            return false;
        });


         //form only numbers
        $(document).on("keypress",".num",function(e){
        
            var evt = (e) ? e : window.event;
            var charCode = (evt.keyCode) ? evt.keyCode : evt.which;
            if (charCode > 31 && (charCode < 48 || charCode > 57)) {
                return false;
            }
            return true;
        });
        

        $(document).on("keyup","#disc_per",function(e){
        
            var evt = (e) ? e : window.event;
            var val = $(this).val();
            var charCode = (evt.keyCode) ? evt.keyCode : evt.which;
            if($(this).val() ) {
                if (val < 0 || val > 100) {
                $(this).val(0);
                $('#d_msg').fadeIn('400');
                setTimeout(function(){
                $('#d_msg').fadeOut('400');
                },2000);

                return false;
                }
            }
        });
        
        $(document).on("keyup","#disc_rs",function(e){
        
            var evt = (e) ? e : window.event;
            var val = $(this).val();
            var fee_pack = $('#fee_pack').val();
            var charCode = (evt.keyCode) ? evt.keyCode : evt.which;
            if($(this).val() ) {
                if (parseInt(val) < 0 || parseInt(val) > parseInt(fee_pack)) {
                $(this).val(0);
                $('#rs_msg').fadeIn('400');
                setTimeout(function(){
                $('#rs_msg').fadeOut('400');
                },2000);
                return false;
                }
            }
        });
        
        
                 //form only numbers & Other Expression
        $(document).on("keypress",".num1",function(e){
          
            var evt = (e) ? e : window.event;
            var charCode = (evt.keyCode) ? evt.keyCode : evt.which;
            if (charCode == 45 || (charCode > 47 && charCode < 58)) {
                return true;
            }
            return false;
        });

        });
       //form PHONE numbers
        $(document).on("keypress",".phone",function(e){
        
            var evt = (e) ? e : window.event;
            var charCode = (evt.keyCode) ? evt.keyCode : evt.which;
            if (charCode == 43 || (charCode > 47 && charCode < 58)) {
                return true;
            }
            return false;
        });


</script>

<script>
  $( function() {
    $( ".datepicker" ).datepicker({dateFormat: 'd-m-yy' }).val();
  } );
  </script>

    <script>
        $(function () {
            pageLoadScript();
        });
    

        function pageLoadScript() {

            _stepEffect = $('#stepEffect').val();
            _style = 'style1';
            _stepTransition = $('#stepTransition').is(':checked');
            _showButtons = $('#showButtons').is(':checked');
            _showStepNum = $('#showStepNum').is(':checked');


          tsf1=  $('.tsf-wizard-1').tsfWizard({
                stepEffect: _stepEffect,
                stepStyle: _style,
                navPosition: 'top',
                validation: true,
                stepTransition: _stepTransition,
                showButtons: _showButtons,
                showStepNum: _showStepNum,
                height: 'auto',
                onNextClick: function (e, from, to, validation) {
                    $('#result').append('<br/>onNextClick from ' + from +
                        ' - to ' + to + ' validation ' + validation)
                },
                onPrevClick: function (e, from, to) {
                    $('#result').append('<br/>onPrevClick from ' + from + ' - to ' + to)
                },
                onFinishClick: function (e, validation) {
                    $('#result').append('<br/>onFinishClick validation ' + validation)
                }
            });         


        }
    </script>

<script>
            
        $(document).ready(function(){
            var country_id = 1;
            if(country_id){
                $('#province').prop('disabled',false);
                $.ajax({
                    url:'<?= base_url() ?>Student/setcountry',
                    type:'POST',
                    data: {'country': country_id },
                    success:function(data){
                        $('#province').html(data);
                        $(".ajaxProsidess").hide(); 
                    },
                    error:function(){
                        alert('Error occur...!!');
                    }
                }); 
            }
            else{
                $('#province').prop('disabled',true); 
            }
        });

      $(document).ready(function(){
        $('#province').on('change',function(){
            var province_id = $(this).val();
            if(province_id){
                $('#district').prop('disabled',false);
                $.ajax({
                    url: '<?= base_url() ?>Student/setprovince',
                    type:'POST',
                    data: {'province': province_id },
                    success:function(data){
                        $('#district').html(data);
                    },
                    error:function(){
                        alert('Error occur...!!');
                    }

                });
            }
            else
            {
                $('#district').prop('disabled',true);
            }
        });

        $('#district').on('change',function(){
            var district_id = $(this).val();
            if(district_id){
                $('#taluka').prop('disabled',false);
                $.ajax({
                    url: '<?= base_url() ?>Student/setdistrict',
                    type:'POST',
                    data: {'district': district_id },
                    success:function(data){
                        $('#taluka').html(data);
                    },
                    error:function(){
                        alert('Error occur...!!');
                    }

                });
            }
            else
            {
                $('#taluka').prop('disabled',true);
            }
        });
     });
</script>

<!--  -->
<script>
        $(document).ready(function(){
        
        $('.DMY').daterangepicker({
      	format: 'DD-MM-YYYY',
        singleDatePicker: true,
        showDropdowns: true
    	});
            
            var i = 1;
            $(document).on("change","#branch",function(){
                
                var value = $("#branch").val();
                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select Class</opiton>';
                    $("#class_id").html(pre+d);
                    $("#class_admited").html(pre+d);
                });
            });
            $(document).ready(function(){
                
                var value = $("#branch").val();
                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select Class</opiton>';
                    $("#class_id").html(pre+d);
                    $("#class_admited").html(pre+d);
                });
            });
            $(document).on("change","#class_admited",function(){
                var value = $(this).val();
                $.get("<?php echo base_url(); ?>load/section/role/"+value,{},function(d){
                    var pre = '<option value="">Select Section</opiton>';
                    $("#section").html(pre+d);
                });
                $.get("<?php echo base_url(); ?>load/package/"+value,{},function(d){
                    $("#fee_pack").val(d);
                    $("#net_fee").val(d);
                });
                $.get("<?php echo base_url(); ?>load/admission_fee/"+value,{},function(d){
                    $("#admin_fee").val(d);
                });
               $.get("<?php echo base_url(); ?>load/fee_type/"+value,{},function(d){
                    var pre = '<option value="">Select Fee Type</option>';
                    $("#fee_type").html(pre+d);
                });
                $("#disc_per").prop('disabled', true);
                $("#disc_rs").prop('disabled', true);
                $("#disc_type").val('');
                $("#disc_rs").val('');
                $("#disc_per").val('');
                $("#fee_other_body").html('');
                $(".fee_type_amount").val(0);
                $("#add_other_fee").attr('disabled',true);
                
            });
            $(document).on("change","#fee_type",function(){
               var value = $(this).val();
               if(value==""){
                   $(".fee_type_amount").val(0);
                   $("#add_other_fee").attr('disabled',true);
               }
               else{
                   $.get("<?php echo base_url(); ?>load/fee_type_amount/"+value,{},function(d){
                        $(".fee_type_amount").val(d);
                        $("#add_other_fee").attr('disabled',false);
                    });
               }
            });
            $(document).on("change","#disc_type",function(){
                var val = $(this).val();
                if(val=="")
                {
                    $("#disc_per").prop('disabled', true);
                    $("#disc_rs").prop('disabled', true);
                       $("#net_fee").val($("#fee_pack").val());
                        $("#disc_rs").val(0);
                        $("#disc_per").val(0);
                }else if (val=="percentage") {
                    $("#disc_per").prop('disabled', false);
                     $("#disc_rs").val(0);
                     $("#net_fee").val($("#fee_pack").val());
                    $("#disc_rs").prop('disabled', true);
                }else if(val=="rupees")
                {
                    $("#disc_per").prop('disabled', true);
                     $("#disc_per").val(0);
                     $("#net_fee").val($("#fee_pack").val());
                    $("#disc_rs").prop('disabled', false);
                }
            });
            $(document).on("keyup","#fathercnic",function(){
                var val = $("#fathercnic").val();
                $.get("<?php echo base_url(); ?>load/sibling/"+val,{},function(d){
                    $("#siblings").val(d);
                });
            });
            
            
            $(document).on("keyup","#disc_per",function(){
                var val = $(this).val();
                var tut = $("#fee_pack").val();
                var type = $("#disc_type").val();
                if(type=="percentage")
                {
                    var ret = (tut * val) / 100;
                    var retur = tut - ret;
                    $("#net_fee").val(retur); 
                }
            });
            $(document).on("keyup","#disc_rs",function(){
                var val = $(this).val();
                var tut = $("#fee_pack").val();
                var type = $("#disc_type").val();
                if(type=="rupees")
                {
                    var retur = tut - val;
                    $("#net_fee").val(retur); 
                }
            });
            $(document).on("click","#add_other_fee",function(e){
                var amount = $("#fee_other_amount").val();
                var type = $("#fee_type").val();
                var text = $("#fee_type option:selected").text();
                $("#fee_other_body").append("<tr class='row"+i+"'><th scope='row'><input type='checkbox' checked name='fee["+type+"]' value='"+amount+"'></th><td>"+text+"</td><td>"+amount+"</td><td><a href='#'><i class='fa fa-undo' onclick='remove_fee("+i+");'></i></a></td></tr>");
                i++;
                e.preventDefault();
            });

        });
         $(document).on("keyup","#fee_other_amount",function(){
             var state = $(this).val();
            if(state >0){
                $("#add_other_fee").attr('disabled',false);
            }
            else{
                $("#add_other_fee").attr('disabled',true);
            }
         });
         
         $(document).on("change","#section",function(){
            // var group_name = $(this).val();
             var class_admited = $("#class_admited").val();
             var section =  $(this).val();
             
               $.get("<?php echo base_url(); ?>Student/student_roll_no/"+class_admited+"/"+section,{},function(d){
                   
                    $("#roll_no").val(++d);
                    console.log(d);
                });
            // if(state >0){
            //     $("#add_other_fee").attr('disabled',false);
            // }
            // else{
            //     $("#add_other_fee").attr('disabled',true);
            // }
         });
        function remove_fee(id)
        {
            $(".row"+id).remove();
        }
    </script>
 <script>
        
        //Validation For Alpa Numeric & Additional Operator
        $(".sidade").on("keypress", function (event) {

            var englishAlphabetAndWhiteSpace = /[A-Za-z0-9|-]/g;


            var key = String.fromCharCode(event.which);


            if (event.keyCode == 9 || event.keyCode == 32 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 43 || event.keyCode == 46 || englishAlphabetAndWhiteSpace.test(key)) {
                return true;
            }

        $(document).bind("contextmenu", function (e) {
            //e.preventDefault();
        });
                   
            });
    </script>
<!--    <script src="<?php echo base_url()?>assets/js/Datejs-master/build/date.js"></script>-->
<!--    <script type="text/javascript" src="<?php echo base_url()?>assets/js/Datejs-master/build/date.js">-->
<!--Date.today().toString('MMMM dS, yyyy');-->
<!--</script>-->
    
  </body>
</html>