<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">Change Rate for task #<?php echo $taskId;  ?></div>
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.php?page=home">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="index.php?page=view_task&id=<?php echo $taskId; ?>">View Task</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">Add Credit</li>
                            </ol>
                        </div>
                    </div>
<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header></header>                                    
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($error) && $error!='') { ?> 
                                	<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } else if(isset($success) && $success!=''){ ?>                                		
                                		<div class="alert alert-success"><?php echo $success; ?></div>
                                	<?php } else if(isset($_REQUEST['success'])){ ?>                                		
                                		<div class="alert alert-success"><?php echo $_REQUEST['success']; ?></div>
                                	<?php } ?>
                                	            
                                	            
                                <?php if($fixedRate>0){ ?>                    	
                                    <form action="" id="form_staff_add" class="form-horizontal" method="post" enctype="multipart/form-data">
                                        <div class="form-body">                                           
                                            <?php       
                                            if(mysqli_num_rows($chkExtraRs)>0){    
                                            $cc = 0;                                 
	                                            while($extraTechAddedRec = mysqli_fetch_array($chkExtraRs)){ 
	                                            	$cc+= $extraTechAddedRec['commission_percent']; ?>	    		
													<div class="form-group row">
		                                                <label class="control-label col-md-3">Rate for <?php echo getTechnicianName($extraTechAddedRec['technician_id']); ?>(%)</label>
		                                                <div class="col-md-4">     
		                                                	<input type="text" name="commission_extra-<?php echo $extraTechAddedRec['technician_id']; ?>" value="<?php echo $extraTechAddedRec['commission_percent']; ?>">   
		                                                </div>
		                                            </div>							
												<?php } ?> 										
											<div class="form-group row">
                                                <label class="control-label col-md-3">Rate for main technician(%)</label>
                                                <div class="col-md-4">     
                                                	<input type="text" name="commission_main" id="commission_main" value="<?php echo 100-$cc; ?>">   
                                                </div>
                                            </div>
                                            <?php } else { ?>
                                            <input type="hidden" name="commission_main" id="commission_main" value="100">   
                                            <?php } ?>                                            
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Enter Admin Commission(%)</label>
                                                <div class="col-md-4">     
                                                	<input type="text" name="admin_commission" id="admin_commission" value="<?php if(isset($adminCommission)){ echo $adminCommission; } ?>">   
                                                </div>
                                            </div>  
                                        </div>                                           
                                      	<div class="form-group">
                                            <div class="offset-md-3 col-md-9">
                                            	<button type="submit" name="submit" class="btn btn-info">Update</button>   
                                            </div>
                                        </div>
                                    </form>
                                <?php } else { ?>
                                    <form action="" id="form_staff_add2" class="form-horizontal" method="post">
                                        <div class="form-body">                         
                                            <div class="form-group row">
                                                <label class="control-label col-md-3">Enter Admin Commission(%)</label>
                                                <div class="col-md-4">     
                                                	<input type="text" name="admin_commission" id="admin_commission" value="<?php if(isset($adminCommission)){ echo $adminCommission; } ?>">
                                                	  
                                                </div>
                                            </div>  
                                        </div>                                           
                                      	<div class="form-group">
                                            <div class="offset-md-3 col-md-9">
                                            	<button type="submit" name="submit_hourly" class="btn btn-info">Update</button>   
                                            </div>
                                        </div>
                                    </form>                                    
                                <?php } ?>     
                                </div>
                            </div>
                        </div>
                    </div>
	</div>
</div>
