<div id="productCom" style="<?=$typle;?>">
                                                    

                      <div class="clearfix"></div>
                        <?php

                        // echo "select * from product_commission where product_id='".$fetch['product_id']."' ORDER BY `product_commission`.`level_name` ASC";

                              $select_plan_level = $this->db->query("select * from trader")->getResult();
                                      $count_level = $select_plan_level[0];
                                      if($count_level > 0)
                                      {
                                        $i=1;
                                        $newout.='<input type="hidden" value="'.$count_level.'" id="noid" name="noid">
                                                     <input type="hidden" id="the" value="bouns">';
                                       ?>
                                          <div class="table-wrap">
                                <div class="table-responsive">
                                          <?php
                                            while($margin_column_limit = mysqli_fetch_array($select_plan_level))
                                              {
                                                $level_amt=$margin_column_limit['level_commission'];
                                                $level_amt=number_format($level_amt,$site_info['number_format']);
                                                $planinnerarray=explode('-',$items);
                                                if($i == 1)
                                                {
                                                  $newout.='
                                                   <table id="support_table" class="table display product-overview border-none dataTable no-footer" style="width:70%;border:none !important;border-bottom:none !important;">
                                                    <thead>
                                                    <tr>
                                                      <th style="border-left:1px solid #ddd ! important;">Level</th>
                                                      <th style="padding-left:60px;">Amount</th>
                                                      <th style="padding-left:40px;border-right:1px solid #ddd ! important;;">Action</th>
                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                
                                                  <tr>
                                                           <td style="border-left:1px solid #ddd ! important;border-bottom:1px solid #ddd ! important;" align="left" width="31%" >Level '.$margin_column_limit['level_name'].'  </td>
                                                             <td align="left" style="border-bottom:1px solid #ddd ! important;" >
                                                            <div class="txt9" id="my1Divv"> 
                                                              <input type="text" id="bonuslevel" class="form-control"  value="'.$level_amt.'" style="width:150px;" onkeypress="return isNumber(event)"; name="bonuslevel[]"></td>
                                                               <td style="border-bottom:1px solid #ddd ! important;border-right:1px solid #ddd ! important;"><a href="javascript:;" onclick="addEvent();" class="btn btn-primary" style="padding-left:37px;padding-right:37px;">Add</a>
                                                            </div>
                                                             </td>
                                                           </tr>
                                                       </tbody>
                                                    </table>';
                                     }
                                     else
                                     {

                                      $newout.='<div id="olddiv'.$i.'">
                                                      <table id="support_table" class="table display product-overview border-none dataTable no-footer" style="width:70%;border:none !important;border-bottom:none !important;">
                                        <tr >
                                          <td align="left" width="31%" style="border-left:1px solid #ddd ! important;border-bottom:1px solid #ddd ! important;" >Level '.$margin_column_limit['level_name'].'  </label></td>
                                        <td align="left" style="border-bottom:1px solid #ddd ! important;"   >
                                        <div class="txt9" id="my1Div"> 
                                          <input type="text" id="bonuslevel" class="form-control"  value="'.$level_amt.'"  style="width:150px;" onkeypress="return isNumber(event)"; name="bonuslevel[]"></td>
                                        <td style="border-bottom:1px solid #ddd ! important;border-right:1px solid #ddd ! important;"><a class="btn btn-primary" href="javascript:;" onclick="removeEvent1(\'olddiv'.$i.'\')">Remove</a>
                                        </div></td></tr>
                                        </table></div>';
                                                  } 
                                                  $i++;
                                                }?>                                               
                                              </div>
                                                </div>
                                      
                                      <div class="table-wrap">
                                        <div class="table-responsive" style="width:98%;">
                                        <div id="myDivv"> 
                                         <?php 
                                          echo $newout;
                                          ?>
                                          <tr>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                          </tr>
                                        </div>
                                    </div>
                                    </div>
                                                <?php
                                }
                                else
                                {
                                ?>

                        <div class="table-wrap">
                        <div class="table-responsive">
                          <table id="support_table" class="table display product-overview border-none dataTable no-footer" style="width:70%;border:none !important;border-bottom:none !important;">
                            <thead>
                              <tr>
                                <th style="border-left:1px solid #ddd !important;"><?=$_lang['en_level'];?></th>
                                <th style="padding-left:60px;"><?=$_lang['en_amount'];?></th>
                                <th style="padding-left:40px;border-right:1px solid #ddd !important;"><?=$_lang['en_action'];?></th>
                              </tr>
                            </thead>
                            <tbody>
                              <tr style="border:none;">
                                <td width="31%" style="border-left:1px solid #ddd !important;border-bottom:1px solid #ddd !important;"><?=$_lang['en_level'];?> 1</td>
                                <td style="border-bottom:1px solid #ddd ! important;"> <input type="text" style="width:150px;" id="bonuslevel" class="form-control"   onkeypress="return isNumber(event);" name="bonuslevel[]"> 
                                  <input type="hidden" id="the" value="bouns">
                                  <input type="hidden" value="1" id="noid" name="noid">
                                </td>
                                <td style="border-right:1px solid #ddd !important;border-bottom:1px solid #ddd !important;"><a href="javascript:;" onclick="addEvent();" class="btn btn-primary" style="padding-left:37px;padding-right:37px;"><?php echo lang('language_lang.en_add');?></a></td>
                              </tr>
                            </tbody>
                          </table>
                          <div id="myDivv"></div>
                        </div>
                      </div>
                              <?php
                              }?>
                      </div> 