File:  [mozdev] / books / www / chapters / head.txt
Revision 1.29: download - view: text, annotated - select for diffs - revision graph
Fri Oct 21 16:43:53 2011 UTC (8 years, 1 month ago) by ccaygill
Branches: MAIN
CVS tags: HEAD
ereg->preg_match, add delimiters

    1: <?php include PROJECT_PATH . '/' . basename(__FILE__) ?>
    2: <!-- Main -->
    3: <link rel="contents" href="http://books.mozdev.org/html/index.html">
    4: <link rel="glossary" title="Mozilla Jargon" href="http://www.mozilla.org/docs/jargon.html">
    5: <link rel="index" href="http://books.mozdev.org/index.html">
    6: <link rel="start" href="http://books.mozdev.org/index.html">
    7: <link rel="up" href="http://books.mozdev.org/index.html">
    8: <link rel="first" href="http://books.mozdev.org/html/index.html">
    9: <?php // http://books.mozdev.org/docbook/html/mozilla-pref.html ?>
   10: <link rel="last" href="http://books.mozdev.org/html/mozilla-chp-12.html">
   11: <link rel="Corrections" href="http://books.mozdev.org/corrections.html">
   12: <link rel="Author" href="http://books.mozdev.org/bios.html">
   13: <link rel="Authors" title="Dave" href="http://books.mozdev.org/bios.html#dave">
   14: <link rel="Authors" title="Brian" href="http://books.mozdev.org/bios.html#brian">
   15: <link rel="Authors" title="Ian" href="http://books.mozdev.org/bios.html#ian">
   16: <link rel="Authors" title="Eric" href="http://books.mozdev.org/bios.html#eric">
   17: <link rel="Authors" title="Pete" href="http://books.mozdev.org/bios.html#pete">
   18: <link rel="help" href="http://books.mozdev.org/list.html">
   19: <link rel="copyright" href="http://www.opencontent.org/openpub/">
   20: <link rel="alternate" title="Mozilla News" href="http://basic.mozillanews.org/mozilla_book/toc.html">
   21: <link rel="Resources" title="Resources" href="http://books.mozdev.org/resources.html">
   22: <link rel="bugs" title="Main Bug Page" href="http://books.mozdev.org/bugs.html">
   23: <link rel="examples" title="Main Example Page" href="http://books.mozdev.org/examples/index.html">
   24: <link rel="figures" title="Main Figure Page" href="http://books.mozdev.org/screenshots/index.html">
   25: <link rel="archive" title="Mailing List Acrhive" href="http://mozdev.org/pipermail/reviewers/index.html">
   26: <!-- Main -->
   27: 
   28: <!-- Chapters -->
   29: <link rel="chapter" title="1: Mozilla as Platform" href="http://books.mozdev.org/html/mozilla-chp-1.html">
   30: <link rel="chapter" title="2: Getting Started" href="http://books.mozdev.org/html/mozilla-chp-2.html">
   31: <link rel="chapter" title="3: XUL Elements and Features" href="http://books.mozdev.org/html/mozilla-chp-3.html">
   32: <link rel="chapter" title="4: CSS in Mozilla Applications" href="http://books.mozdev.org/html/mozilla-chp-4.html">
   33: <link rel="chapter" title="5: Scripting Mozilla" href="http://books.mozdev.org/html/mozilla-chp-5.html">
   34: <link rel="chapter" title="6: Packaging and Installing Applications" href="http://books.mozdev.org/html/mozilla-chp-6.html">
   35: <link rel="chapter" title="7: Extending the UI with XBL" href="http://books.mozdev.org/html/mozilla-chp-7.html">
   36: <link rel="chapter" title="8: XPCOM" href="http://books.mozdev.org/html/mozilla-chp-8.html">
   37: <link rel="chapter" title="9: XUL Templates" href="http://books.mozdev.org/html/mozilla-chp-9.html">
   38: <link rel="chapter" title="10: RDF, RDF Tools and the Content Model" href="http://books.mozdev.org/html/mozilla-chp-10.html">
   39: <link rel="chapter" title="11: Localization" href="http://books.mozdev.org/html/mozilla-chp-11.html">
   40: <link rel="chapter" title="12: Remote Applications" href="http://books.mozdev.org/html/mozilla-chp-12.html">
   41: <!-- Chapters -->
   42: 
   43: <!-- Appendices -->
   44: <link rel="appendix" title="Appendix A: Getting and Building the Mozilla Source"href="http://books.mozdev.org/html/mozilla-app-a.html">
   45: <link rel="appendix" title="Appendix B: Development Tools" href="http://books.mozdev.org/html/mozilla-app-b.html">
   46: <link rel="appendix" title="Appendix C: Programmer's Reference" href="http://books.mozdev.org/html/mozilla-app-c.html">
   47: <!-- Appendices -->
   48: 
   49: <?php
   50: 
   51: $prev_next_prefix = 'http://' . $project . '.' . HOST . '/' . dirname($page) . '/';
   52: 
   53: switch ( basename($page) ) {
   54: 
   55:   case 'index.html': 
   56:   case 'index2.html': $prev = ''; $next = '/html/index.html';
   57:                       $style = "p.c28 {font-style: italic}\n  p.c27 {font-weight: bold}"; break;
   58: 
   59:   case 'ch00.html' : $prev = ''; $next = 'ch01.html'; $style = 'div.c5 {font-weight: bold; text-align: center}'; break;
   60: 
   61:   case 'ch01.html' : $prev = 'ch00.html'; $next = 'ch02.html'; $style = 'div.c6 {text-align: center}'; break;
   62: 
   63:   case 'ch02.html' : $prev = 'ch01.html'; $next = 'ch03.html'; $style = "div.c9 {margin-left: 2em}\n  ";
   64:                      $style .= "div.c8 {font-weight: bold; text-align: center}\n  div.c7 {text-align: center}"; break;
   65: 
   66:   case 'ch03.html' : $prev = 'ch02.html'; $next = 'ch04.html';
   67:                      $style = "div.c11 {font-weight: bold; text-align: center}\n  div.c10 {text-align: center}"; break;
   68: 
   69:   case 'ch04.html' : $prev = 'ch03.html'; $next = 'ch05.html';
   70:                      $style = "div.c13 {font-weight: bold; text-align: center}\n  div.c12 {text-align: center}"; break;
   71: 
   72:   case 'ch05.html' : $prev = 'ch04.html'; $next = 'ch06.html';
   73:                      $style = "div.c15 {font-weight: bold; text-align: center}\n  div.c14 {text-align: center}"; break;
   74: 
   75:   case 'ch06.html' : $prev = 'ch05.html'; $next = 'ch07.html';
   76:                      $style = "div.c17 {font-weight: bold; text-align: center}\n  div.c16 {text-align: center}"; break;
   77: 
   78:   case 'ch07.html' : $prev = 'ch06.html'; $next = 'ch08.html';
   79:                      $style = "div.c19 {font-weight: bold; text-align: center}\n  div.c18 {text-align: center}"; break;
   80: 
   81:   case 'ch08.html' : $prev = 'ch07.html'; $next = 'ch09.html'; $style = ""; break;
   82: 
   83:   case 'ch09.html' : $prev = 'ch08.html'; $next = 'ch10.html';
   84:                      $style = "div.c20 {text-align: center}"; break;
   85: 
   86:   case 'ch10.html' : $prev = 'ch09.html'; $next = 'ch11.html';
   87:                      $style = "div.c22 {text-align: center}\n  div.c21 {font-weight: bold; text-align: center}"; break;
   88: 
   89:   case 'ch11.html' : $prev = 'ch10.html'; $next = 'ch12.html';
   90:                      $style = "div.c24 {font-weight: bold; text-align: center}\n  div.c23 {text-align: center}"; break;
   91: 
   92:   case 'ch12.html' : $prev = 'ch11.html'; $next = 'appa.html';
   93:                      $style = "div.c26 {font-weight: bold; text-align: center}\n  div.c25 {text-align: center}"; break;
   94: 
   95:   case 'appa.html' : $prev = 'ch12.html'; $next = 'appb.html';
   96:                      $style = "div.c2 {font-weight: bold; text-align: center}\n  div.c1 {text-align: center}"; break;
   97: 
   98:   case 'appb.html' : $prev = 'appa.html'; $next = 'appc.html';
   99:                      $style = "div.c4 {text-align: center}\n  div.c3 {font-weight: bold; text-align: center}"; break;
  100: 
  101:   case 'appc.html' : $prev = 'appb.html'; $next = ''; $style = ''; break;
  102: 
  103: }
  104: 
  105: if ( !empty($prev) )
  106:   echo '<link rel="prev" href="' . $prev_next_prefix . $prev . '">' . "\n";
  107: 
  108: if ( preg_match('#^/#', $next) )
  109:   unset($prev_next_prefix);
  110: 
  111: if ( !empty($next) )
  112:   echo '<link rel="next" href="' . $prev_next_prefix . $next . '">' . "\n";
  113: 
  114: if ( !empty($style) )
  115:   echo '<style type="text/css">' . "\n" . '  ' . $style . "\n</style>\n";
  116: 
  117: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>