            <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"></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();
                      $i=0;
                        while($dbarr= mysql_fetch_array($rs)){ 
                  $id= $dbarr[programe_id];
                 $rp = $db->findByPK('tb_tour','tour_programe',$id)->executeRow();
                $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='center'>";
                    if ($rp[tour_programe] == $dbarr[programe_id]){
                    echo "<a class='btn btn-danger' href='?url=tour_edit&id=$dbarr[programe_id]'>
                       <i class='halflings-icon white edit'></i> แก้ไขรายละเรียด 
                      </a>";
                    }else{
                    echo "<a class='btn btn-info' href='?url=tour_a&id=$dbarr[programe_id]'>
                       <i class='halflings-icon white edit'></i> เพิ่มรายละเรียด
                      </a>";
                    } 
                    // echo "</td>";
                    //         echo "<td class='text-center'><a class='btn btn-info' href='?url=tour_a&id=$dbarr[programe_id]'>
                    //                 <i class='fa fa-edit'></i>เพิ่มรายละเรียด
                    //               </a></td>";

                            echo "</tr>";
                
                
                }//mysql_close($link);
       
                    ?> 
                  </tbody>
                </table>
              </div>
            </section>

