<style>

.container-tb {
    height: 500px;
    width: 100%;
    overflow: auto;
    border: 2px solid #999;
}
* {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
table {
    border-collapse: collapse;
    table-layout: fixed;
    width: auto;
    min-width: 100%;
}
td, th {
    border: 1px solid #ccc;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}
thead td, thead th {
    border-top: none;
    border-bottom: none;
}
tfoot td, thead th {
    border-top: none;
    border-bottom: none;
}
td.fth-header, th.fth-header, td.fth-footer, th.fth-footer {
    border-top: none !important;
    border-bottom: none !important;
}
td.fth-header, th.fth-header {
        padding: 3px;
    background-color: #444;
    border-bottom: rgba(0,0,0,0.2);
    color: white;
}
td.fth-footer, th.fth-footer {
    background-color:  #444;
    border-top:  rgba(0,0,0,0.2);
    color: white;
}
</style>
<div class="content-wrapper">
<?php /*?>    <section class="content-header">
      <h1><small>Add WorkPackage</small></h1>
      <ol class="breadcrumb">
        <li><?php echo anchor('dashboard','<i class="fa fa-dashboard"></i> Dashboard')?></li>
        <li><?php echo anchor('master/Activity','Activity')?></li>
        <li class="active">Add WorkPackage</li>
      </ol>
    </section> <?php */?>
        <section class="content">
          <div class="row">
            <div class="col-xs-12">
              <div class="box">
                <div class="box-header">
                  <!--<h3 class="box-title">Add Products</h3>-->
                  <?php echo form_open('admin/student_master/Studentpayments/create',['name'=>'activity_form_add','id'=>'activity_form_add']);?>
          		  <?php echo form_hidden('my_array',['name'=>'doaction','id'=>'doaction']);?>
                  <?php echo $message;?>
                  <?php echo form_submit(['name'=>'save','value'=>'Save','class'=>'btn btn-default pull-right',
				  'style'=>'margin-left:5px;background-color: #ffffff;']); ?>
                  
				  <?php echo anchor('admin/master/Attendee','<i class="fa fa-fw fa-arrows"></i> Attendee List',['class'=>'btn btn-default pull-right','style'=>'background-color: #ffffff;']); ?>    
                </div><!-- /.box-header -->
                <div class="box-body">
                <hr />
        		<div class="row">
        			<div class="col-md-12">
        				<div class="col-md-3">
            				<div class="form-group">
    							<?php echo form_label('Category *','category',['for'=>'category']);?><?php echo form_error('category'); ?>
              					 <select id='sel_category' class="form-control" name="category">
                                <option value="" >Select Category</option>
                                <?php
                                foreach($category as $category1){
                                    echo "<option value='".$category1['id']."'>".strtoupper($category1['category_code'])." | ".strtoupper($category1['category'])."</option>";
                                }
                                ?>
                             </select>
                            </div>
                        </div>
                        <div class="col-md-3">
            				<div class="form-group">
    							<?php echo form_label('Class *','class',['for'=>'class']);?><?php echo form_error('class'); ?>
                                 <select id='sel_class' class="form-control" name="class" >
                                    <option value=""  >Select class</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
    							<?php echo form_label('Subject *','subject',['for'=>'subject']);?><?php echo form_error('subject'); ?>
                                 <select id='sel_subject' class="form-control" name="subject" >
                                    <option value="" >Select subject</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
    							<?php echo form_label('Courses List *','course list',['for'=>'sel_course_list']);?><?php echo form_error('course_id'); ?>
                                 <select id='sel_course_list' class="form-control select-courseinfo" name="course_id" onchange="$('#sel_course_info').empty();">
                                    <option value="" >Select Course List</option>
                                </select>
                            </div>
                        </div>
                         <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('per class Amount','per_class_amount',['for'=>'per_class_amount']);?><?php echo form_error('per_class_amount'); ?>
              					<div class="input-group">
                    				 <div class="input-group-addon"><i class="fa fa-fw fa-rupee"></i></div>
              					<?php echo form_input(['name'=>'per_class_amount','class'=>'form-control','id'=>'per_class_amount','placeholder'=>'per_class_amount',
              					    'value'=>set_value('per_class_amount'),'oninput'=>"calculate();",'style'=>'color:red;']);?>
              					    </div>
                            </div>
                         </div>	 
                          <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('Toatl Classes','total_classes',['for'=>'total_classes']);?><?php echo form_error('total_classes'); ?>
              					<?php echo form_input(['name'=>'total_classes','class'=>'form-control','id'=>'total_classes','placeholder'=>'Total Classes',
              					    'value'=>set_value('total_classes'),'style'=>'color:red;']);?>
                            </div>
                         </div>
                        <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('Full Course Amount','Full Course Amount',['for'=>'Full Course Amount']);?><?php echo form_error('full_course_amount'); ?>
              					<div class="input-group">
                    				 <div class="input-group-addon"><i class="fa fa-fw fa-rupee"></i></div>
              					<?php echo form_input(['name'=>'full_course_amount','class'=>'form-control','id'=>'full_course_amount','placeholder'=>'Full Course Amount',
              					    'value'=>set_value('full_course_amount'), 'style'=>'color:red;']);?>
              					    </div>
                            </div>
                        </div>
                        <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('class select','class select',['for'=>'Full Course Amount']);?><?php echo form_error('class_select'); ?>
              					<div class="input-group">
                    				 <div class="input-group-addon"><input class="btn btn-sm btn-primary" id="select_all" name="select_all" value="Select All classes"></div>
              					<?php echo form_input(['name'=>'class_select','class'=>'form-control','id'=>'class_select','placeholder'=>'Class Select',
              					    'value'=>set_value('class_select'),'style'=>'color:red;']);?>
              					    </div>
              					    
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
    							<?php echo form_label('Class List *','course list',['for'=>'sel_course_list']);?><?php echo form_error('class_id_list'); ?>
                                 <select id='sel_classid_list' class="form-control select2 select2-hidden-accessible" name="class_id_list[]" multiple  data-placeholder="Select a CLass"  style="width: 100%;" tabindex="-1"  aria-hidden=true>
                                    <!-- <option value="" >Select Class List</option> -->
                                </select>
                                
                                <?php //echo form_dropdown('student[]',$payment_st_class,set_value(),['class'=>'form-control select2 select2-hidden-accessible','multiple'=>'','data-placeholder'=>"Select a State",'style'=>"width: 100%;",'tabindex'=>"-1", 'aria-hidden'=>"true"]);?>         					
                         
                            </div>
                        </div>
                        <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('Toatl Upcoming Classes','total_classes_remain',['for'=>'total_classes_remain']);?><?php echo form_error('total_classes_remain'); ?>
              					<?php echo form_input(['name'=>'total_classes_remain','class'=>'form-control','id'=>'total_classes_remain','placeholder'=>'Total Classes Remaining',
              					    'value'=>set_value('total_classes_remain'),'style'=>'color:red;','disabled'=>'disabled']);?>
                            </div>
                         </div>
                        <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('Course Amount Now','current_course_amount',['for'=>'Full Course Amount']);?><?php echo form_error('current_course_amount'); ?>
              					<div class="input-group">
                    				 <div class="input-group-addon"><i class="fa fa-fw fa-rupee"></i></div>
              					<?php echo form_input(['name'=>'current_course_amount','class'=>'form-control','id'=>'current_course_amount','placeholder'=>'Course Amount Now',
              					    'value'=>set_value('current_course_amount'),'style'=>'color:red;','disabled'=>'disabled'	]);?>
              					    </div>
                            </div>
                        </div>
                        </div>
                        <div class="col-md-12">
        				<div class="col-md-3">
                            <div class="form-group">
    							<?php echo form_label('Student','student',['for'=>'student']);?><?php echo form_error('student'); ?>
                				<?php echo form_dropdown('student',$student,set_value('student',''),['class'=>'form-control']);?>
                            </div>
                         </div>
                         <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('No of Class alot','no_of_class_alot',['for'=>'no_of_class_alot']);?><?php echo form_error('no_of_class_alot'); ?>
              					<?php echo form_input(['name'=>'no_of_class_alot','class'=>'form-control','id'=>'no_of_class_alot','placeholder'=>'Enter no of class alot',
              					    'value'=>set_value('no_of_class_alot'),'oninput'=>"calculate();" ,'style'=>'color:red;']);?>
                            </div>
                         </div>	 
                        
                         <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('Amount to be payed','amount_to_be_payed',['for'=>'amount_to_be_payed']);?><?php echo form_error('amount_to_be_payed'); ?>
              					<div class="input-group">
                    				 <div class="input-group-addon"><i class="fa fa-fw fa-rupee"></i></div>
                        				<?php echo form_input(['name'=>'amount_to_be_payed','class'=>'form-control','id'=>'amount_to_be_payed','placeholder'=>'Amount to be payed',
              					    'value'=>set_value('amount_to_be_payed'),'style'=>'color:red;']);?>
                                </div>
                            </div>
                         </div>	
                         <div class="col-md-3">
                            <div class="form-group">
    							<?php echo form_label('Student Fee Submit Amount','student_amount',['for'=>'student_amount']);?><?php echo form_error('student_amount'); ?>
                				<div class="input-group">
                    				 <div class="input-group-addon"><i class="fa fa-fw fa-rupee"></i></div>
                				<?php echo form_input(['name'=>'amount_recieved_from_st','class'=>'form-control','id'=>'amount_recieved_from_st','placeholder'=>'Enter Student Given Amount here',
    							'value'=>set_value('amount_recieved_from_st')]);?>
    							</div>
                            </div>	
                         </div>
                         <div class="col-md-3">
                            <div class="form-group">
    							<?php echo form_label('Coupon Code','coupon_code',['for'=>'coupon_code']);?><?php echo form_error('coupon_code'); ?>
                				<?php echo form_dropdown('coupon_code',$coupon,set_value('coupon_code',''),['class'=>'form-control']);?>
                            </div>	
                         </div>
                         <div class="col-md-3">
                            <div class="form-group">
    							<?php echo form_label('FEE Recive Date','student_amount',['for'=>'student_amount']);?><?php echo form_error('student_amount'); ?>
                				<?php echo form_input(['name'=>'payment_recive_date','class'=>'form-control','id'=>'datepicker','placeholder'=>'Enter Payment Recived Date here',
    							'value'=>set_value('payment_recive_date')]);?>
                            </div>	
                         </div>
                         <div class="col-md-3">   
                            <div class="form-group">
    							<?php echo form_label('Mode of Payment','mode_of_payment',['for'=>'mode_of_payment']);?><?php echo form_error('mode_of_payment'); ?>
                				<?php $options   =  array(''=>'Select Mode of Payment','paytm'=>'PAYTM','upi'=>'UPI','net-banking'=>'NET BANKING',
                				    'demand-draft'=>'DEMAND DRAFT','by-cash'=>'By Cash','free_coupon'=>'Free Coupon Code');?>
              					<?php echo form_dropdown('mode_of_payment',$options,set_value('mode_of_payment',''),['class'=>'form-control']);?>
                            </div>
                         </div>	
                         <div class="col-md-3">
                            <div class="form-group">
								<?php echo form_label('Payment Status','Payment Status',['for'=>'Payment Status']);?><?php echo form_error('payment_status'); ?>
            				 	<?php $options   =  array(''=>'Select Payment status','partial'=>'Partial','Quater'=>'Quater','half'=>'HALF',
            				    'Full'=>'Full');?>
            				 	<?php echo form_dropdown('payment_status',$options,set_value('payment_status',''),['class'=>'form-control']);?>
                            </div>
                        </div> 	
        				
                            
                          
                          
                      
                    </div>
                </div>
            </div>
            <hr />
<?php echo form_submit(['name'=>'save','value'=>'Save','class'=>'btn btn-default pull-right','style'=>'margin-left:5px;background-color: #ffffff;']); ?>
<?php echo  form_close();?>
</div>
</div>
</div>
</section>
</div>

 <div class="modal fade" id="myModals" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <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">Modal title</h4>
      </div>
      <div class="modal-body">
        <!-- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem omnis aliquid voluptatibus, distinctio soluta eligendi officiis voluptatem necessitatibus magnam illum.</p>
       -->
       <div id="tableContainer2" class="container-tb">
        <table>
          <thead>
            <tr>
              <th>#</th>
              <th>Course ID</th>
              <th>Course Start Date</th>
              <th>Course End Date</th>
              <th>Subject Code</th>
              <th>Faculty Code</th>
              <th>Total Classes</th>
              <th>Class Basic Amount</th>
              <th>Class ID</th>
              <th>Class strength</th>
              <th>Class Date</th>
              <th>Class Start @</th>
              <th>CLass End @</th>
              <th>CLass duration</th>
              <th>CLass extend time</th>
              <th>Status</th>
              
            </tr>
          </thead>
          <tbody id="sel_course_info"></tbody>
        </table>
        </div>
       </div>
      <!--<div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save</button>
      </div>-->
    </div>
  </div>
</div>
<script>
    function calculate() {
        var myBox1 = document.getElementById('no_of_class_alot').value; 
        var myBox2 = document.getElementById('per_class_amount').value;
        
        var result = document.getElementById('amount_to_be_payed'); 
        
        var myResult = myBox1 * myBox2;
          document.getElementById('amount_to_be_payed').value = myResult;

         
    }
	

/*   function calculate2() {
        var myBox4 = document.getElementById('per_class_amount').value;
        var myBox5 = document.getElementById('total_classes').value;
        
        //var result2 = document.getElementById('full_course_amount'); 

          var myResult2 = myBox5 * myBox4;
          document.getElementById('full_course_amount').value = myResult2;
    }
	
	function calculate2() {
        var myBox4 = document.getElementById('per_class_amount').value;
        var myBox5 = document.getElementById('total_classes').value;
        
        //var result2 = document.getElementById('full_course_amount'); 

          var myResult2 = myBox5 * myBox4;
          document.getElementById('full_course_amount').value = myResult2;
    }*/

    
</script>

   <!-- <div class="col-sm-12">
                            	<INPUT type="button" value="Add Row" onclick="addRow('dataTable')" />
                            	<INPUT type="button" value="Delete Row" onclick="deleteRow('dataTable')" />
                            	<TABLE id="dataTable" width="350px" border="1">
                            		<TR>
                            			<TD><INPUT type="checkbox" name="chk[]"/></TD>
                            			<TD><INPUT type="text" name="txt[]"/></TD>
                            			<TD>
                            				<SELECT name="country[]">
                            					<OPTION value="in">India</OPTION>
                            					<OPTION value="de">Germany</OPTION>
                            					<OPTION value="fr">France</OPTION>
                            					<OPTION value="us">United States</OPTION>
                            					<OPTION value="ch">Switzerland</OPTION>
                            				</SELECT>
                            			</TD>
                            		</TR>
                            	</TABLE>                		
                         </div>  -->   
