Exemple #1
0
    header("Content-Type: text/html; charset=UTF-8");
    $folderid = set_get_folderid();
    if ($browser == "netscape" || $browser == "IE") {
        echo "<!DOCTYPE NETSCAPE-Bookmark-file-1>\n";
        echo "<TITLE>Bookmarks</TITLE>\n";
        echo "<H1>Bookmarks</H1>\n";
        echo "<DL><p>\n";
        $export = new export();
        $export->make_tree($folderid);
        echo "</DL><p>\n";
    } else {
        if ($browser == "opera") {
            echo "Opera Hotlist version 2.0\n";
            echo "Options: encoding = utf8, version=3\n\n";
            $export = new export();
            $export->make_tree($folderid);
        }
    }
}
class export
{
    function export()
    {
        global $settings, $browser;
        # collect the folder data
        require_once ABSOLUTE_PATH . "folders.php";
        $this->tree = new folder();
        $this->tree->folders[0] = array('id' => 0, 'childof' => null, 'name' => $settings['root_folder_name']);
        global $username, $mysql;
        $this->browser = $browser;
        $this->counter = 0;