// location of netscape bookmarks
if (! $bookmarks) {
// Bookmarks nicht mitgegeben
$bookmarks = 'bookmarks.html';
$bookmarks = 'bookahn.htm';
}
$delim = '#';
$title = "Bookmarks";
$kopf = "Bookmarks";
if ($bookmarks == 'bookahn.htm') {
$title = "Bookmarks / Links der Ahnenforschung";
$kopf = "Bookmarks / Links der Ahnenforschung";
}
if ($bookmarks == 'bookstd.htm') {
$title = "Bookmarks / Links von Klaus Bartels";
$kopf = "Bookmarks / Links von Klaus Bartels";
}
$formact= $PHP_SELF;
$phpself= "bookscape.php";
$httpself= $PHP_SELF;
$httpmain= "bookscape.php";
// $authent = TRUE;
// $authreq = 0;
$keyword= " ";
$counterId = "4363303$2607421";
$counterId1 ="A".$counterId."$";
$counterId2 ="B".$counterId;
$paramlog = $bookmarks;
if ($target) { $paramlog = $paramlog."::".$target; }
include("incquell.php3");
// names of bookmark folders to skip
$bookmarks_skip = 'Personal Toolbar Folder,';
$bookmarks_skip = $bookmarks_skip.'private Bookmarks,';
$bookmarks_skip = $bookmarks_skip.'Ordner "Persönliche Symbolleiste"';
if ($bookskip) {
$bookmarks_skip = $bookmarks_skip.",".$bookskip;
}
// set to '1' to ignore unsorted bookmarks at start
$bookmarks_sort = 0;
// set to '1' to ignore bookmark seperators
$horizontal_skip = 0;
// change color settings to your liking
$set = (array(
bgcolor => '#001020', /*background*/
txcolor => '#e0e0e0', /*text */
lncolor => '#f0f0f0',/*link */
tbcolor => '#103040'/*table */
));
$set = (array(
bgcolor => '#ffffaf', /*background*/
txcolor => '#ff0000', /*text */
lncolor => '#0000ff',/*link */
tbcolor => '#000000'/*table */
));
//////////////////////////////////////////////////////
// End of configuration, may the source be with you //
//////////////////////////////////////////////////////
// version number
$bookmarks_vs="0.1.1";
// function for reading through bookmark folders
function ReadBookmarkFolder($buffer, $query_array0, $query_array1, $query_array2, $bookmarks_skip) {
global $PHP_SELF, $bookmarks;
$target_num = strpos($buffer, '">', 5)+2;
$target_len = strpos($buffer, '', 5) - $target_num;
$query_array0 = substr($buffer, $target_num, $target_len);
// echo unless instructed to ignore through $bookmarks_skip
if ($query_array0) {
$skip_it = 0;
$tok = strtok($bookmarks_skip,',');
while($tok) {
$needle_probe = strcmp($query_array0, $tok);
if (!$needle_probe) {
$skip_it = 1;
}
$tok = strtok(',');
}
if (!$skip_it) {
// echo "$query_array0/
";
$zwi = urlencode($query_array0."||".$query_array1."||".$query_array2);
echo "$query_array0/
\n";
}
}
}
// function for reading through bookmark links
function ReadBookmarkLink($buffer,$query_array1) {
echo substr($buffer, $query_array1+4);
echo '
';
}
// html: this performs the initiatization of and
// tokenize any available query string
// $query_array = explode('||', (substr(urldecode($QUERY_STRING),7)));
$query_array = explode('||', (urldecode($target)));
// work with any available query string
// if ($QUERY_STRING) {
if ($target) {
$target_num = $query_array[1] + 36;
$target_all = "";
$target_now_tmp = "";
$books=fopen("$bookmarks", 'r');
// watch nesting level and apply compass to Bookmarks title
if (($query_array[0]) && (!strstr($query_array[2], $query_array[0]))) {
$query_array[2] = $query_array[2] . $query_array[0] . $delim;
$target_now = strtok($query_array[2],$delim);
while(($target_now) && ($target_now != $query_array[0])) {
$target_int += 4;
$target_now_tmp = $target_now_tmp . $target_now . $delim;
$target_zwi = urlencode($target_now);
$target_zwit= urlencode($target_now_tmp);
$target_all = $target_all . $delim ."$target_now";
$target_now = strtok($delim);
}
} elseif (($query_array[0]) && (strstr($query_array[2], $query_array[0]))) {
$target_now = strtok($query_array[2],$delim);
while(($target_now) && ($target_now != $query_array[0])) {
$target_int += 4;
$target_now_tmp = $target_now_tmp . $target_now . $delim;
$target_zwi = urlencode($target_now);
$target_zwit= urlencode($target_now_tmp);
$target_all = $target_all . $delim ."$target_now";
$target_now = strtok($delim);
}
}
$query_array[1] += 4;
// html: this outputs the neat navigation menu
?>
">Bookmarks |
// nested inside string
while (($buffer = fgets($books, 4096)) && (!$halted)) {
// what a messy bugfix! things like (folder = 'webbies') and (folder = 'web') were getting confused at the same nesting depth,
// also navigator exchibited nasty 'FOLDED ' state that required "-7" to compensate...
// let me get everything working and I'll come back to this for optimisation.
if ((!$start_folder) &&
((substr($buffer, ($target_num + strlen($query_array[0])), 1) == '<') || (substr($buffer, ($target_num + strlen($query_array[0]) -7), 1) == '<') )&&
((substr($buffer, $target_num, strlen($query_array[0])) == $query_array[0]) || (substr($buffer, $target_num -7, strlen($query_array[0])) == $query_array[0])))
{
$start_folder = 1;
}
if ((substr($buffer, $query_array[1]-4, 5) == '
') && ($engage) && (!$halted)) { echo ' '; } } fclose($books); } // without a query string, we can only work with bookmarks.html at start else { $query_array[1] = 4; $books = fopen("$bookmarks", 'r'); // html: not being nested leaves us with a simple navigation task ?> ">Bookmarks |
// outside string
while ($buffer = fgets($books, 4096)) {
// read folder all the time
if (substr($buffer, $query_array[1], 5) == ' ')) { echo ' '; } } fclose($books); } // html: tidy up everything ?> |
|