<!--DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js sidebar-large lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js sidebar-large lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js sidebar-large lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-- <html class="no-js sidebar-large"> <!--<![endif]-->
<html>
<head>
<?php
//include 'session.php';

?>
<!--//
// These are required files we must include these libraries 
untuk tabel dinamis dengan paging
//-->

        <!-- BEGIN MAIN CONTENT -->
        <!--<div id="main-content">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>Dictionary <small>Tabel Feeder</small></h1>
      <ol class="breadcrumb">
        <li><a href="?module=dictionary"><i class="fa fa-th"></i> Dictionary</a></li>
        <li class="active">Tabel Feeder</li>
      </ol>
    </section>
    <!-- end Content Header -->
            <br />
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
 </head>                   
                        <body id="onan">
                        <div class="container">
                        <br>
                        <!--<h1> Dictionary Table Feeder </h1>-->
                                <?php
                                $result=$proxy->ListTable($gettoken);
								$tabel=$result['result'];
								//print_r($tabel);
								?>
                                    <!--<table class="table table-striped table-hover dataTable" id="table-editable">-->
                                    <table id="myTable" class="display table" width="100%" border="0" >
                                        <thead>
                                            <tr>
                                                <th bgcolor="#FFA6D2">No</th>
                                                <th bgcolor="#FFA6D2">Nama Tabel</th>
                                                <th bgcolor="#FFA6D2">Jenis</th>
                                                <th bgcolor="#FFA6D2">Record Data Tabel</th>
                                                <th class="text-center" bgcolor="#FFA6D2">Aksi</th>
                                            </tr>
                                        </thead>
                                        
                                        <tbody>
										<?php
										$n=0;
                                        for($i=0;$i<count($tabel);$i++){
											$n=$n+1;
											$natabel = $tabel[$i]['table'];
											$jenis=$tabel[$i]['jenis'];
							
											@$result1=$proxy->GetCountRecordset($token,$natabel);
											@$record=$result1['result'];
											//echo $token."-".$natabel."-".$record."<br>";
											
											
											//Print_r($record);
											
											if ($n%2==1)
												$warna="success";
											else
												$warna="danger";	 
											?>
										
                                            <tr <?php echo $warna;?>>
                                                <td class=<?php echo $warna;?>><?php echo $n;?></td>
                                                <td class=<?php echo $warna;?>><?php echo $natabel;?></td>
                                                <td class=<?php echo $warna;?>><?php echo $jenis;?></td>
                                                <td class=<?php echo $warna;?>><?php echo $record;?></td>
                                                <td class=<?php echo $warna;?>><a class="btn btn-info" href="<?php echo "?module=struktur&act=data&tabel=$natabel&jenis=$jenis";?>"><i class="glyphicon glyphicon-search"></i>Data Tabel</a>
                                                
                                                <a class="btn btn-danger" href="<?php echo "?module=struktur&act=lihat&tabel=$natabel&jenis=$jenis";?>"><i class="glyphicon glyphicon-search"></i>Struktur Data</a>
                                                </td>
                                                
                                            </tr>
                                            <?php
										}
										?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    <!--</div>
                <!--</div>
            </div>
        </div>
        <!-- END MAIN CONTENT -->
    
    <!-- BEGIN MANDATORY SCRIPTS -->
    <!--<script src="assets/plugins/jquery-1.11.js"></script>
    <script src="assets/plugins/jquery-migrate-1.2.1.js"></script>
    <script src="assets/plugins/jquery-ui/jquery-ui-1.10.4.min.js"></script>
    <script src="assets/plugins/jquery-mobile/jquery.mobile-1.4.2.js"></script>
    <script src="assets/plugins/bootstrap/bootstrap.min.js"></script>
    <script src="assets/plugins/bootstrap-dropdown/bootstrap-hover-dropdown.min.js"></script>
    <script src="assets/plugins/bootstrap-select/bootstrap-select.js"></script>
    <script src="assets/plugins/mcustom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="assets/plugins/mmenu/js/jquery.mmenu.min.all.js"></script>
    <script src="assets/plugins/nprogress/nprogress.js"></script>
    <script src="assets/plugins/charts-sparkline/sparkline.min.js"></script>
    <script src="assets/plugins/breakpoints/breakpoints.js"></script>
    <script src="assets/plugins/numerator/jquery-numerator.js"></script>
    <script src="assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
    <!-- END MANDATORY SCRIPTS -->
    <!-- BEGIN PAGE LEVEL SCRIPTS -->
    <!--<script src="assets/plugins/datatables/dynamic/jquery.dataTables.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.bootstrap.js"></script>
    <script src="assets/plugins/datatables/dataTables.tableTools.js"></script>
    <script src="assets/js/table_editable.js"></script>
    <!-- END  PAGE LEVEL SCRIPTS -->
    <!--<script src="assets/js/application.js"></script>-->
    
</body>

</html>
<script>
$(document).ready(function(){
    $('#myTable').dataTable();
});
</script>