dev.stuconnolly.com / svn / serve

  1. <?php
  2.  
  3. /*
  4.  *  $Id: index.php 16 2008-09-04 21:45:49Z stuart $
  5.  *  
  6.  *  Serve
  7.  *  http://stuconnolly.com/projects/serve/
  8.  *
  9.  *  Copyright (c) 2007 Stuart Connolly. All rights reserved.
  10.  *
  11.  *  This program is free software: you can redistribute it and/or modify
  12.  *  it under the terms of the GNU General Public License as published by
  13.  *  the Free Software Foundation, either version 3 of the License, or
  14.  *  (at your option) any later version.
  15.  *
  16.  *  This program is distributed in the hope that it will be useful,
  17.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  *  GNU General Public License for more details.
  20.  *
  21.  *  You should have received a copy of the GNU General Public License
  22.  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  23.  */
  24.  
  25. require_once('serve-includes/index-functions.php');
  26.  
  27. // Determine what type of page is being requested.
  28. if (isset($_GET['p']))
  29. {
  30.     fetch_page($_GET['p']);
  31. }
  32. else if (isset($_GET['s']))
  33. {
  34.     search($_GET['s']);
  35. }
  36. else
  37. {
  38.     fetch_page('index', true);
  39. }
  40.  
  41. ?>