            <section class="panel" style="color:red;">
              <header class="panel-heading">
                  <!-- <a href="#" class="fa fa-caret-down"></a>
                  <a href="#" class="fa fa-times"></a -->
             <!--    <a href="?url=programe_form" data-link="?url=program" class="btn btn-success with-shadow-success" style="position: absolute;right: 16px;top: 10px;">เพิ่มรายการทัวร์</a> -->
            
                <h1 class="panel-title">Period</h1>
              </header>
              <div class="panel-body">
                <table class="table table-bordered table-striped mb-none" id="datatable-tabletools">
                  <thead>
                    <tr>
                      <th>Program Tour</th>
                      <th>Status</th>
                      <th>Period</th>
                    </tr>
                  </thead>
                  <tbody>
                <?php
                 $rs = $db->findorder('tb_programe,tbcountry,tbairline','
    tb_programe.programe_country = tbcountry.country_id && tb_programe.programe_airline = tbairline.airline_id','programe_country asc,programe_code')->execute();
  $rsth = $db->findorder('tbprograme_TH,tbairline','
    tbprograme_TH.programe_bus = tbairline.airline_id','programe_id asc,programe_code')->execute();
                      $i=0;
                        while($dbarr= mysql_fetch_array($rs)){ 
                $file = $dbarr[programe_file];
                    echo "<tr>";  $i++ ;
                    // echo "    <td class='center'>$i</td>";
                    echo "    <td><span class='label label-table' style='width:120px;'>$dbarr[programe_code]</span> : $dbarr[programe_name]&nbsp;$dbarr[programe_time]</td>";
                    echo "<td class='center'>";
                       if($dbarr[programe_status] == '1'){
                        echo "<span class='label label-success'>เปิดการขาย</span>";
                       } else {
                        echo "<span class='label label-table'>ปิดการขาย</span>";
                       }
                    echo "</td>";
                            echo "<td class='text-center'><a class='btn btn-info' href='?url=period_a&id=$dbarr[programe_id]'>
                                    <i class='fa fa-edit'></i> 
                                  </a></td>";
                      while($dbarr2= mysql_fetch_array($rsth)){
                            echo "<tr class='gradeX'>"; 
                            echo "    <td><span class='label label-table' style='width:120px;'>$dbarr2[programe_code]</span> : $dbarr2[programe_name]&nbsp;$dbarr2[programe_time]</td>";
                           echo "<td class='center'>";
                       if($dbarr2[programe_status] == '1'){
                        echo "<span class='label label-success'>เปิดการขาย</span>";
                       } else {
                        echo "<span class='label label-table'>ปิดการขาย</span>";
                       }
                    echo "</td>";
                            echo "<td class='text-center'><a class='btn btn-info' href='?url=periodth_a&id=$dbarr2[programe_id]'>
                                    <i class='fa fa-edit'></i> 
                                  </a></td>";
                            }
                            echo "</tr>";
                
                
                }//mysql_close($link);
       
                    ?> 

 
                  </tbody>
                </table>
              </div>
            </section>

