xref.php

Go to the documentation of this file.
00001 <?php
00002   /*
00003    This file is part of DocBookWiki.  DocBookWiki is a web application
00004    that displays and edits DocBook documents.
00005 
00006    Copyright (C) 2004, 2005, 2006, 2007
00007    Dashamir Hoxha, dashohoxha@users.sourceforge.net
00008 
00009    DocBookWiki is free software; you can redistribute it and/or modify
00010    it under the  terms of the GNU General  Public License as published
00011    by the Free  Software Foundation; either version 2  of the License,
00012    or (at your option) any later version.
00013 
00014    DocBookWiki is distributed in the  hope that it will be useful, but
00015    WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
00016    MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
00017    General Public License for more details.
00018 
00019    You should have  received a copy of the  GNU General Public License
00020    along  with  DocBookWiki;  if  not,  write  to  the  Free  Software
00021    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00022    USA
00023   */
00024 
00048 $_ARR_QPARAMS = explode("/", $_SERVER["QUERY_STRING"]);
00049 $mode = $_ARR_QPARAMS[0];
00050 if ($mode=='')  $mode = 'view';
00051 
00052 if ($mode!='view')
00053   {
00054     include_once 'authenticate.php';
00055     define('EDIT', 'true');
00056   }
00057 
00058 //construct the page as usually
00059 include_once "index.php";
00060 
00061 //get the parameters of QUERY_STRING
00062 $mode = $_ARR_QPARAMS[0];
00063 if ($mode=='')  $mode = 'view';
00064 
00065 $book_id = $_ARR_QPARAMS[1];
00066 if ($book_id=='')  $book_id = 'docbookwiki_guide';
00067 
00068 $node_id = (isset($_ARR_QPARAMS[2]) ? $_ARR_QPARAMS[2] : $book_id);
00069 if ($mode=='admin') $node_id = $book_id;
00070 
00071 $lng = (isset($_ARR_QPARAMS[3]) ? $_ARR_QPARAMS[3] : '');
00072 
00073 
00074 //build the event string
00075 $event_args = "book_id=$book_id;node_id=$node_id;lng=$lng;mode=$mode";
00076 $strEvent = "event=main.xref($event_args)";
00077 
00078 //redirect to the specified book, node, language and mode
00079 $action = ($mode=='view' ? 'index' : 'edit.php');
00080 print "<script language='javascript'>
00081  GoTo('main/main.html?$strEvent', '$action');
00082 </script>";
00083 ?>

Generated on Wed Jan 9 08:27:32 2008 for DokBookWiki by  doxygen 1.5.2