function imap_folder() { $imap = new IMAP(); if ($imap->open('david.touzeau', '180872', '127.0.0.1', '143')) { if (!isset($_GET["folder_path"])) { $_GET["folder_path"] = 'INBOX'; } $tpl = new templates(); $array = $imap->HashListFolders($_GET["folder_path"]); $html = "\t\n<div style='padding-top:30px'>\n\n\n\n\t<div id='inbox' style='width:250px'></div>\n<img src='img/spacer.gif' width=250px height=1px>\t\n</div>\n<script type=\"text/javascript\">\nvar struct = [\n{\n'id':'INBOX',\n'txt':'{$tpl->_ENGINE_parse_body('{Inbox}')}',\n'img':'home_small.png', \n'imgopen':'home_small.png', \n'imgclose':'home_small.png',\n'onclick':ImapLoadMessages,\n'items':[\n\t" . buildItems($array) . "]}\n];\nvar tree = new TafelTree('inbox', struct, 'img/', '180px', 'auto');\ntree.generate();\n</script>"; echo $html; } }