\n"; if($catid != 0) { $catline .= "Home\n"; } if($catid == -1) { $catline .= "> Main Library\n"; $titleline = "Main Library"; } else if($catid == -2) { $catline .= "> Reading Room\n"; $titleline = "Reading Room"; } else if($catnames[0]->parentid == -1) { $catline .= "> Main Library\n"; $titleline = "Main Library"; } else if($catnames[0]->parentid == -2) { $catline .= "> Reading Room\n"; $titleline = "Reading Room"; } for($i = 0; $i < count($catnames); $i++) { if($i < count($catnames) - 1) { $catline .= "> catid . "&lo=$lo&sl=$sl\">" . $catnames[$i]->catname . "\n"; } else { $catline .= "> " . $catnames[$i]->catname . "\n"; } $titleline .= " > " . $catnames[$i]->catname; } printtop($titleline); print "\n"; print "\n"; #print "\n"; print "
\n"; print $catline; print "Search the OBL"\n"; print "
\n"; print "\n"; if($sl <= 0) { $sl = 0; } $query2 = "select * from catchild where catid = '$catid'"; $result2 = mysqli_query($dblink,$query2); if(mysqli_num_rows($result2) > 0 && $catid > 0) { if($sl == 1) { print "Hide Links"; } else { print "Show Links\n"; } $showlinks = $sl; } else if($catid <= 0) { $showlinks = 0; } else { $showlinks = 1; print "

\n"; } print "\n"; if($showlinks == 1) { print "Order links by:\n"; if($lo == "t") { print "Reverse Date Title\n"; } else { $lo = "d"; print "Reverse Date Title\n"; } } if($catid < 0) { #print "Select a category below to start browsing.\n"; print "

\n


\n

\n"; } print "\n"; print "\n\n"; print "
\n"; for($i = 0; $i < count($rows); $i++) { displayCategory($rows[$i]['catid'], $showlinks, 1); # break into two columns if the listing gets large if(count($rows) > 20 && $i == (int) (count($rows) / 2)) { print "\n"; } } print "
\n"; print "\n"; printfoot(); } function displayCatText($startcat) { extract($GLOBALS); if($startcat < 0) { $col = "parentid"; } else { $col = "catid"; } $query = "select * from category where $col = '$startcat' order by catorder, catname"; $result = mysqli_query($dblink,$query); $i = 0; while($row = mysqli_fetch_array($result)) { $rows[$i++] = $row; } for($i = 0; $i < count($rows); $i++) { displayCategoryText($rows[$i]['catid'], 0, 1); } } function displayCategoryText($catid, $showlinks, $level) { global $dblink, $cat, $lo, $sl, $showpage; $query = "select catname, catnotes from category where catid = '$catid'"; $result = mysqli_query($dblink,$query); $row = mysqli_fetch_array($result); $catname = $row['catname']; $catnotes = $row['catnotes']; if($lo == 't') { $linkorder = "link.title"; } else { $lo = "d"; $linkorder = "link.date desc, title"; } print "$catname; "; } function displayCategory($catid, $showlinks, $level) { global $dblink, $cat, $lo, $sl, $showpage; $query = "select catname, catnotes from category where catid = '$catid'"; $result = mysqli_query($dblink,$query); $row = mysqli_fetch_array($result); $catname = $row['catname']; $catnotes = $row['catnotes']; if($lo == 't') { $linkorder = "link.title"; } else { $lo = "d"; $linkorder = "link.date desc, title"; } if($cat <= 0 && $level == 1) { print ""; } if($level > 1 && $catid > 0) { print "

\n"; } } function displayLink($linkid, $level) { global $dblink; $query = "select * from link where linkid = '$linkid'"; $result = mysqli_query($dblink,$query); $row = mysqli_fetch_object($result); #print "
  • \n"; print formatLink($row, 0, 0); #print "
  • \n"; } function displayNew($num) { global $dblink, $indexpage; $query = "select * from link where dispnew = 1 order by dateofentry desc limit $num"; $result = mysqli_query($dblink,$query); $newlinks = array(); while($row = mysqli_fetch_object($result)) { array_push($newlinks, $row); } printtop("What's New"); print "\n"; print "Home > What's New\n"; print "

    \n


    \n

    \n"; #print "

    \n"; print "\n"; printfoot(); } function displayNoticeBoard($num) { global $dblink, $indexpage; $output = ''; $query = "select * from link where notice = 1 order by dateofentry desc"; if($num > 0) { $query .= " limit $num"; } $result = mysqli_query($dblink,$query); $noticelinks = array(); while($row = mysqli_fetch_object($result)) { array_push($noticelinks, $row); } if($num == 0) { printtop("Notice Board"); print "\n"; print "Home > Notice Board\n"; print "

    \n


    \n

    \n"; } else { $output .= "\n"; } #$output .= "\n"; if($num == 0) { print $output; print "\n"; printfoot(); } else { return $output; } } function printfoot() { print "
    \n"; } #$output .= "
      \n"; foreach($noticelinks as $row) { $title = $row->title; #if(strlen($title)>100) #{ #$title = substr($title, 0, 100); #$output .= "url\">$title ..."; #} #else #{ #$output .= "url\">$title"; #} #$output .= "
    • \n"; $output .= "url\">$title"; $output .= "\n($row->source)\n"; #$output .= "
    • \n"; $output .= "\n
      \n"; } if($num != 0) { $output .= "\n"; } else { $output .= "
    \n \n"; } # arguments: object link row, 1 if search results, 1 if compact function formatLink($row, $issearch, $iscompact) { global $showpage, $mdcolwidth, $lo, $sl, $o; $url = getURL($row->url); $output = ""; $output .= "\n\n"; if($url != "" && $issearch) { $output .= ""; } else if($url != "") { $output .= "\n"; } else { $output .= "\n"; } $output .= "\n"; if(!$iscompact) { $rdate = redoDate($row->date); if($rdate != "") $output .= "\n"; if($row->description != "") $output .= "\n"; if($row->author != "") $output .= "\n"; if($row->language != "") $output .= "\n"; if($row->source != "") $output .= "\n"; if($row->subscribe != "") $output .= "\n"; if($row->notes != "") $output .= "\n"; if($row->alturls != "") $output .= "\n"; $rdateofentry = redoDate($row->dateofentry); if($rdateofentry != "") $output .= "\n"; if($issearch) { $categories = getCats($row->linkid); if(!empty($categories)) { $output .= "\n"; } } } $output .= "
    Title: $row->title\nTitle: $row->titleTitle: $row->title\n
    Date of publication: $rdate
    Description/subject: " . stripslashes($row->description) . "
    Author/creator: " . stripslashes($row->author) . "
    Language: " . stripslashes($row->language) . "
    Source/publisher: " . stripslashes($row->source) . "
    Subscribe: " . stripslashes($row->subscribe) . "
    Format/size: " . linkURLs($row->notes) . "
    Alternate URLs: " . linkURLs($row->alturls) . "
    Date of entry/update: $rdateofentry
    "; if($categories[0][0]->parentid == -1) { $output .= "ML > "; } else if($categories[0][0]->parentid == -2) { $output .= "RR > "; } for($j = 0; $j < count($categories); $j++) { for($i = 0; $i < count($categories[$j]); $i++) { $output .= "catid . "&lo=$o&sl=1\">"; $output .= $categories[$j][$i]->catname . "\n"; if($i < count($categories[$j]) - 1) { $output .= ">\n"; } } $output .= "
    \n"; } $output .= "


    \n"; return $output; } ?> "January", "02"=>"February", "03"=>"March", "04"=>"April", "05"=>"May", "06"=>"June", "07"=>"July", "08"=>"August", "09"=>"September", "10"=>"October", "11"=>"November", "12"=>"December"); if($date != 0) { $day = substr($date, 8, 2); $mon = substr($date, 5, 2); $year = substr($date, 0, 4); # if $day is 0, mktime will go with the end of the previous # month instead of the beginning of the specified month, so # make the $day for mktime 1 if($day == 0) { $mday = 1; } else { $mday = $day; } $date = mktime(0, 0, 0, $mon, $mday, $year); #print "$mon.$mday.$year\n
    $date
    \n"; if($day == 0 && $mon == 0 && $year > 0) { $dformat = "%Y"; $mydate = $year; } else if($day == 0 && $mon > 0 && $year > 0) { $dformat = "%B %Y"; $mydate = "$months[$mon] $year"; } else if($day > 0 && $mon == 0 && $year > 0) { $dformat = "%d %Y"; $mydate = "$day $year"; } else if($day > 0 && $mon > 0 && $year > 0) { $dformat = "%d %B %Y"; $mydate = "$day $months[$mon] $year"; } $date = strftime($dformat, $date); #if($year < 1970) { return $mydate; } #else { return stripslashes($date); } return $mydate; } return ""; } # sets up URL-ish strings as real links function linkURLs($string) { $string = preg_replace("/\n/", "
    ", $string); preg_match_all("/((http|https|ftp|gopher):\/\/[^\s]+)/", $string, $matches); for($i = 0; $i < count($matches[0]); $i++) { $url = $matches[0][$i]; if(strlen($url) > 100) { $newurl = substr($url, 0, 99); $newurl .= "..."; } else { $newurl = $url; } $url = preg_replace("/
    /", "", $url); $url2 = $url; $url2 = preg_replace("/\?/", "\\?", $url2); $url2 = preg_replace("/\./", "\\.", $url2); $url2 = preg_replace("/\&/", "\\&", $url2); $url2 = preg_replace("/\+/", "\\+", $url2); $url2 = preg_replace("/\#/", "\\\#", $url2); /** There will never be any matches 'cause the $string has only urls but no ahref tags if(!preg_match("/\$newurl/", $string)) { $string = preg_replace("'$url2'", "$newurl", $string); #$string = preg_replace("/$url/", "$newurl", $string); } #$string = "$newurl<\/a>"; */ $string = preg_replace("#$url2#", "$newurl", $string); } return $string; } # extract the URL out of the text function getURL($url) { if(preg_match("/((http|ftp|gopher):\/\/[^\s]+)/", $url, $matches)) { return $matches[1]; } return $url; } function getTopCat($linkid, $parent) { global $dblink; $query = "select catid from linkparent where linkid = '$linkid'"; $result = mysqli_query($dblink, $query); if(mysqli_num_rows($result) < 1) { return 0; } $dbrow = mysqli_fetch_array($result); $catid = $dbrow['catid']; while($catid > 0) { $query = "select parentid from category where catid = '$catid'"; $result = mysqli_query($dblink, $query); $dbrow = mysqli_fetch_array($result); $previd = $catid; $catid = $dbrow['parentid']; } if($parent == 0) { return $previd; } else { return $catid; } } function getTopID($linkid) { global $dblink; } function getCats($linkid) { global $dblink; $rows = array(); $cats = array(); $query = "select category.catname, category.catid, category.parentid from category, linkparent where linkparent.linkid = '$linkid' and category.catid = linkparent.catid"; $result = mysqli_query($dblink, $query); if(mysqli_num_rows($result) > 0) { while($dbrow = mysqli_fetch_object($result)) { array_push($rows, $dbrow); } for($i = 0; $i < count($rows); $i++) { $cats[$i] = parentCats($rows[$i]->catid); /* $cats[$i] = array($rows[$i]); $catid = $rows[$i]->parentid; while($catid > 0) { $query = "select catname, catid, parentid from category where catid = '$catid'"; $result = mysqli_query($dblink, $query); $dbrow = mysqli_fetch_object($result); array_push($cats[$i], $dbrow); $catid = $dbrow->parentid; } $cats[$i] = array_reverse($cats[$i]); */ } } return $cats; } function parentCats($catid) { global $dblink; $query = "select * from category where catid = '$catid'"; $result = mysqli_query($dblink, $query); if(mysqli_num_rows($result) < 1) { return array(); } $cats = array(mysqli_fetch_object($result)); $catid = $cats[0]->parentid; while($catid > 0) { $query = "select catname, catid, parentid from category where catid = '$catid'"; $result = mysqli_query($dblink, $query); $dbrow = mysqli_fetch_object($result); array_push($cats, $dbrow); $catid = $dbrow->parentid; } $cats = array_reverse($cats); return $cats; } function catCompare($a, $b) { if ($a['catorder'] == $b['catorder']) { return strcmp($a['catname'], $b['catname']); } return ($a['catorder'] > $b['catorder']) ? 1 : -1; } function requote($string) { return preg_replace("/\"/", """, $string); } function hlKeywords($string, $keywords) { /* highlighting keywords in search results - yet to be done */ } ?> Online Burma Library
    VL.png The World-Wide Web Virtual Library
    [WWW VL database || WWW VL search]
    donations.gif asia-wwwvl.gif

    Online Burma/Myanmar Library
    Classified and annotated links 
    to more than 40,000 full text documents on Burma/Myanmar



    Introduction
    | Structural Overview | What's New | Full-Text Search | Database Search | Contact

    This searches all the documents on the OBL server
    This searches the database fields -- title, date, description, source etc. but not the documents themselves

    Main Library (by subject): 

    Reading Room (by source): 

    Alphabetical list of subjects: Complete list of categories and sub-categories.

    reg.burma archive (1993-2001): This is the 220MB archive of the IGC online conference which was the main vehicle for online Burma communications for most of the '90s. The archive, which is fully searchable from the reg.burma search, contains all the issues of the BurmaNet News from 1993-2001 and its predecessors, early numbers of "Burma Issues" and about 30,000 pages of other material, including some long documents. This is the conference that was searchable from the "Burmanet Gopher" which disappeared a couple of years ago. Now, thanks to IGC, ibiblio and OBL, it is back for searching (not for posting).

    Burma Press Summary: Complete Text Archive (i.e. minus graphics)  of Hugh MacDougall's abstracts of "The Working People's Daily" and "The New Light of Myanmar" April 1987 to December 1996. Many full texts of speeches, laws etc. An important resource for Burma researchers. Warning: some big files.

    Notice Board
    (especially important or timely documents)

    hosted by ibiblio.org