items, 0, $num_items); foreach ($items as $item) { $href = $item['link']; $title = $item['title']; if ($len > 0) { if (strlen($title) >= $len) { $title = substr($title, 0, $len) . ' ...'; } //end if } $out .= "» $title
\n"; } //endfor each } //end if else { $out = "An error occured!
"; $out .= "Please contact webmaster"; } echo "$out"; } ////////////////////////////////////////////////// function yTraceMe(){ echo ''; } ///////////////////////////////// function footer(){ echo '
© 2006 nixCraft & Chirag, All rights reserved - Disclaimer - Privacy policy

Powered by blogger
'; } /////////////////////////////// function topNavBar(){ echo ' '; echo '
nixCraft » FreeBSD CookBook
'; } /////////////////////////////// function topAdvt(){ echo '
'; //E7EFE7 } function leftAdvt() { echo '

Sponsored links

'; } ////////////////////////////////// function inLineAdvt(){ echo '
'; //#60834A; google_color_url = "333399"; } //////////////////////// function bottomAdvt(){ echo '
'; } /////////////////////////////////////////////////////////// function getPrevPage($currentPage, $aNAV){ global $$aNAV; $NAV_keys = array_keys($$aNAV); if (! (($i = array_search($currentPage, $NAV_keys)) === FALSE)) { if ($i === 0) { return -1; // $currentPage @ isHome() } else { // success! return array( 'k' => $NAV_keys[$i - 1], 'v' => $NAV[$NAV_keys[$i - 1]] ); } } return -2; // $currentPage does not exist in $NAV (empty, case mismatch, invalid etc) } /////////////////////////////////////////////////////////// function getNextPage($currentPage, $aNAV) { global $$aNAV; $NAV_keys = array_keys($$aNAV); if (! (($i = array_search($currentPage, $NAV_keys)) === FALSE)) { if ($i === (count($NAV_keys) - 1)) { return -1; // $currentPage @ isEnd() } else { // success! return array( 'k' => $NAV_keys[$i + 1], 'v' => $NAV[$NAV_keys[$i + 1]] ); } } return -2; // $currentPage does not exist in $NAV (empty, case mismatch, invalid etc) } /////////////////////////////////////////////////////////// function isHome($currentPage, $aNAV){ global $$aNAV; $NAV_keys = array_keys($$aNAV); if (! (($i = array_search($currentPage, $NAV_keys)) === FALSE)) { if ($i === 0) { return true; // $currentPage is Home } else { return false; // $currentPage is NOT Home } } return -2; // $currentPage does not exist in $NAV (empty, case mismatch, invalid etc) } /////////////////////////////////////////////////////////// function isEnd($currentPage, $aNAV) { global $$aNAV; $NAV_keys = array_keys($$aNAV); if (! (($i = array_search($currentPage, $NAV_keys)) === FALSE)) { if ($i === (count($NAV_keys) - 1)) { return true; // $currentPage is End } else { return false; // $currentPage is NOT End } } return -2; // $currentPage does not exist in $NAV (empty, case mismatch, invalid etc) } //////////////////////////////// function navBar($current,$style=0){ $page = $current; $pagePrev = getPrevPage($page,'NAV'); $pageNext = getNextPage($page,'NAV'); // deal with index.php page $array = split('/',$pagePrev['k']); $indexpage = end($array); if ( $indexpage == "index.php" ){ $pagePrev['k' ]= "../../index.php"; } $nfig= "http://figs.cyberciti.biz/next.png"; $pfig= "http://figs.cyberciti.biz/prev.png"; if ( $style == 0 ) { // top page nav bar $out = '
' . "\n"; $out .= '
' . "\n"; if ( isEnd($page,'NAV') ) { // if it is end then don't display next arrow $out .= ''; $out .= ''; $out .= "
\n"; } else { $out .= ''; $out .= ''; $out .= "\n
\n"; } $out .= '
' . "\n"; $out .= ''; $out .= ''; $out .= "\n
\n\n\n"; echo $out; } else if ( $style == 1 ) { // bottom of page if ( isEnd($page,'NAV') ) { // if it is end then don't display next arrow $out = '
' . "\n"; $out .= '
' . "\n"; $out .= ''; $out .= ''; $out .= "
\n"; } else { $out = '
' . "\n"; $out .= '
' . "\n"; $out .= ''; $out .= ''; $out .= "\n
\n"; } $out .= '
' . "\n"; $out .= ''; $out .= ''; $out .= "\n
\n\n
"; $out .= '
' . "\n"; $out .= '
' .$pageNext['v']. "
\n"; $out .= '
' .$pagePrev['v']. "
\n
\n"; echo $out; } // end if .. else } function workInProgrss(){ echo ' This work is still in progress. It certainly contains errors or approximations. The author declines any responsibility for whatever it is used. Please report errors/suggestions to us. '; } ?> FreeBSD

FreeBSD Cookbook

My notes on the principles and practices of software related issues such as compiler, assembler, graphical user interface, and operating system design. I am currently learning these topics at university and FreeBSD as UNIX operating system for study purpose.