
   
<html>
<head>
<script language='JavaScript' src='script/functions.js'></script>

<script language='JavaScript' src='script/treeview.js'></script>
<link rel='stylesheet' href='css/calendar.css' type='text/css'>
<link rel='stylesheet' href='css/calender.css' type='text/css'>
  
<link rel='stylesheet' href='css/treeview.css' type='text/css'>
</head>
<body  style="margin: 0px 0px 0px 0px;">
<style type="text/css">
        <!--
        #DivLeftMenu {	
                width:100%;
                height:100%;	
              /*  overflow: scroll; */
        }
        -->
        </style>
        <div id='DivLeftMenu' style="overflow:scroll">

                <table cellpadding="0" cellspacing="0" width=100% bgcolor="#2E53A2">
                <tr>
                        <td   >
     <?php
         
    include "class/class.treeview.php"                                ;
    mysql_connect("localhost", "root", "");
    mysql_select_db("isdmi");
    $rs=mysql_query("select * from
                    (
                    select *,
                    case when ftmenu_category = 'penjualan'
                    then '02'
                    when ftmenu_category = 'inventory'
                    then '01'
                    when ftmenu_category = 'keuangan'
                    then '04'
                    when ftmenu_category = 'preproduksi'
                    then '03'                    
                    end as sort1, 
                    case when ftmenu_type = 'master'                      
                    then '01'
                    when ftmenu_type = 'transaksi'
                    then '02'
                    when ftmenu_type = 'laporan'
                    then '03'
                    end as sort2
                    from tlmenu
                    ) d order by sort1,sort2,ftmenu_code"
                    );
                    
    $objTreeview = new CLASS_Treeview();  
    $flag=array();
    
     while($r=mysql_fetch_assoc($rs)) {  
         $b=0;

         if($r["ftmenu_category"]!= $flag[1]) {
              $b=1;
             $flag[1]=$r["ftmenu_category"];
             eval("\$iKey{$r['ftmenu_category']} = \$objTreeview->addFolder('<a href=\"".strtolower($r['ftmenu_category']).".php\" target=\"frame_content\">{$r['ftmenu_category']}</a>','');"); 
         }
         if($r["ftmenu_type"]!= $flag[2]||($b)) {

             $flag[2]=$r["ftmenu_type"];
            eval("\$iKey{$r['ftmenu_category']}{$r['ftmenu_type']} = \$objTreeview->getObjFolder(\$iKey{$r['ftmenu_category']})->addFolder (\"{$r['ftmenu_type']}\");");
         }
       
         eval("\$objTreeview->getObjFolder(\$iKey{$r['ftmenu_category']})->getObjFolder(\$iKey{$r['ftmenu_category']}{$r['ftmenu_type']})->addDocument('<a href=\"{$r['a_href']}\" target=\"frame_content\">{$r['ftmenu_name']}</a>','','{$r['img_src']}');");
            
     }
  
        
    echo $objTreeview->render('100px', '100px'); 
    
                                   
                                   
                                   
                                   
                               ?>
                        </td>
                </tr>

                </table>
                       </div>
                       </body>
</html>