'padding-bottom: 5ex;', // ); // // Smarty stuff require_once('/www/dirac/lib/smarty/Smarty.class.php'); $smarty = new Smarty; $smarty->template_dir = '/home/p/www/linux/_includes/smarty/templates'; $smarty->compile_dir = '/home/p/www/linux/_includes/smarty/templates_c'; $smarty->cache_dir = '/home/p/www/linux/_includes/smarty/cache_dir'; $smarty->config_dir = '/home/p/www/linux/_includes/smarty/config_dir'; function myHeader($title='') { global $css, $descrip, $keywords, $smarty; $printable = ( isset($_REQUEST['printable']) ) ? "true" : "false"; $keywords = ( isset($keywords) ) ? $keywords : ''; $descrip = ( isset($descrip) ) ? $descrip : ''; $css = ( isset($css) ) ? $css : array(); $title = ( $title == '' ) ? ucfirst(basename(`pwd`)) : $title; // If there's no argument, get the page name from the current directory. // if ( $title == '' ) $title = ucfirst(basename(`pwd`)); // Create the $css string from the $css array. $output = ''; foreach ( $css as $rule => $value ) $output .= $rule . ' { '. $value . " }\n"; $css = $output; $smarty->assign('printable', $printable); $smarty->assign('title', $title); $smarty->assign('descrip', $descrip); $smarty->assign('keywords', $keywords); $smarty->assign('css', $css); $smarty->display('header.tpl'); } function myFooter() { if ( ! isset($_REQUEST['printable']) ) $printable = false; else $printable = true; if ( $printable == false ) { echo '

'; myNavbar(); } echo ' '; echo ''; echo ''; } function email($email,$text='') { if ( empty($text) ) $text = $email; print("$text"); } function a($link,$text='') { if ( empty($text) ) $text = $link; echo "$text"; } function arel($link,$text='') { if ( empty($text) ) $text = $link; echo "$text"; } function ali($link,$text) { if ( empty($text) ) $text = $link; echo "
  • $text
  • "; } function s($link,$text='') { if ( empty($text) ) $text = $link; echo "$text"; } function f($link,$text='') { if ( empty($text) ) $text = $link; echo "$text"; } /// /// These are services and need to be explicitly invoked as necessary. /// function build_directory_listing( $array=array() ) { $dirs = glob("*", GLOB_ONLYDIR); echo ''; } // Requires a global array $a[$link] = $url // function SeeAlso( $arg ) { echo '

    See also:

    '; } function myNavbar() { global $up_url, $up_txt, $smarty, $this_desc; $icon_up = 'http://www.dirac.org/linux/_includes/icons/up.png'; $icon_email = 'http://www.dirac.org/linux/_includes/icons/email.png'; $icon_print = 'http://www.dirac.org/linux/_includes/icons/print.png'; $this_url = sprintf("%s%s%s",'http://', $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']); if (! isset($up_txt) ) $up_txt = "Up"; if (! isset($up_url) || empty($up_url) ) $up_url = dirname($this_url); $smarty->assign('up_txt', $up_txt); $smarty->assign('up_url', $up_url); $smarty->assign('icon_up', $icon_up); $smarty->assign('icon_email', $icon_email); $smarty->assign('icon_print', $icon_print); $smarty->assign('make_print', "$this_desc?printable=true"); $smarty->display('navbar.tpl'); } //////////////////////////// ////// ////// ////// Sectioning ////// ////// ////// //////////////////////////// function chapter( $txt, $num ) { echo "

    Chapter $num: $txt

    "; } function section( $txt ) { echo "

    $txt

    "; } function subsection( $txt ) { echo "

    $txt

    "; } function subsubsection( $txt ) { echo "

    $txt

    "; } function clss( $txt ) { echo "$txt"; } ?>