Odyssey
docs.prg
1 <?php
2 
3  /*
4  * File: docs
5  *
6  * Purpose: The purpose of the script is to be the driver in the HomeCU Documentation
7  * docs is the script that runs and any extra directory after this will
8  * determine the help document to show
9  *
10  */
11 
12  // ** Global Values **
13 
14  /**
15  * docsDir - This is the tree trunk for all the document source scripts
16  */
17  $docsDir = '/home/httpd/hcuadm/docSource/';
18 
19 
20  $docsScriptPath = $_SERVER['SCRIPT_NAME'];
21 
22 
23  /**
24  * docsLoadScriptPath - This is the path to search for in the docs directory structure
25  */
26  $docsLoadScriptPath = str_replace($docsScriptPath . "/", "", $_SERVER['PHP_SELF']);
27 
28  /**
29  * docsNavScriptPath - This is the value used in the navigateExpand function in the docPreMain script
30  */
31  $docsNavScriptPath = str_replace($docsScriptPath . "/", "", $_SERVER['PHP_SELF']) . '.html';
32 
33  /**
34  * docsToLoad - This will be the document to look for in a fully qualified path
35  */
36  $docsToLoad = $docsDir . $docsLoadScriptPath;
37 
38  /**
39  * Get the document TRUNK ie admin-setup from the URL
40  * This will be the segment immediately after the current script
41  * TRUNK for /hcuadm/docs/admin-setup/introduction would be admin-setup
42  */
43 
44  require ('docSource/docPreMain');
45  readfile($docsToLoad);
46  require ('docSource/docPostMain');