1<?php 2/******************************** 3OSBib: 4A collection of PHP classes to create and manage bibliographic formatting for OS bibliography software 5using the OSBib standard. 6 7Released through http://bibliophile.sourceforge.net under the GPL licence. 8Do whatever you like with this -- some credit to the author(s) would be appreciated. 9 10If you make improvements, please consider contacting the administrators at bibliophile.sourceforge.net 11so that your improvements can be added to the release package. 12 13Adapted from WIKINDX: http://wikindx.sourceforge.net 14 15Mark Grimshaw 2005 16http://bibliophile.sourceforge.net 17********************************/ 18 19/***** 20* index.php 21* @author Mark Grimshaw 22* 23* $Header: /cvsroot/bibliophile/OSBib/create/index.php,v 1.2 2005/06/25 02:57:34 sirfragalot Exp $ 24* 25*****/ 26 27// Path to where the XML style files are kept. 28define("OSBIB_STYLE_DIR", "../styles/bibliography"); // CB 29 30 31/** 32* Initialise 33*/ 34 include_once("ERRORS.php"); 35 $errors = new ERRORS(); 36 include_once("INIT.php"); 37 $init = new INIT(); 38// Get user input in whatever form 39 $vars = $init->getVars(); 40// start the session 41 $init->startSession(); 42 43 if(!$vars) 44 { 45 include_once("ADMINSTYLE.php"); 46 $admin = new ADMINSTYLE($vars); 47 $pString = $admin->gateKeep('display'); 48 } 49 else if($vars["action"] == 'adminStyleAddInit') 50 { 51 include_once("ADMINSTYLE.php"); 52 $admin = new ADMINSTYLE($vars); 53 $pString = $admin->gateKeep('addInit'); 54 } 55 else if($vars["action"] == 'adminStyleAdd') 56 { 57 include_once("ADMINSTYLE.php"); 58 $admin = new ADMINSTYLE($vars); 59 $pString = $admin->gateKeep('add'); 60 } 61 else if($vars["action"] == 'adminStyleEditInit') 62 { 63 include_once("ADMINSTYLE.php"); 64 $admin = new ADMINSTYLE($vars); 65 $pString = $admin->gateKeep('editInit'); 66 } 67 else if($vars["action"] == 'adminStyleEditDisplay') 68 { 69 include_once("ADMINSTYLE.php"); 70 $admin = new ADMINSTYLE($vars); 71 $pString = $admin->gateKeep('editDisplay'); 72 } 73 else if($vars["action"] == 'adminStyleEdit') 74 { 75 include_once("ADMINSTYLE.php"); 76 $admin = new ADMINSTYLE($vars); 77 $pString = $admin->gateKeep('edit'); 78 } 79 else if($vars["action"] == 'adminStyleCopyInit') 80 { 81 include_once("ADMINSTYLE.php"); 82 $admin = new ADMINSTYLE($vars); 83 $pString = $admin->gateKeep('copyInit'); 84 } 85 else if($vars["action"] == 'adminStyleCopyDisplay') 86 { 87 include_once("ADMINSTYLE.php"); 88 $admin = new ADMINSTYLE($vars); 89 $pString = $admin->gateKeep('copyDisplay'); 90 } 91 92 else if($vars["action"] == 'previewStyle') 93 { 94 //$pString = print_r($vars); 95 include_once("PREVIEWSTYLE.php"); 96 $preview = new PREVIEWSTYLE($vars); 97 $pString = $preview->display(); 98 include_once("CLOSEPOPUP.php"); 99 new CLOSEPOPUP($pString); 100 } 101 102 else if($vars["action"] == 'help') 103 { 104 include_once("HELPSTYLE.php"); 105 $help = new HELPSTYLE(); 106 $pString = $help->display(); 107 include_once("CLOSE.php"); 108 new CLOSE($pString, FALSE); 109 } 110 else 111 $pString = $errors->text("inputError", "invalid"); 112/***** 113* Close the HTML code by calling the constructor of CLOSE which also 114* prints the HTTP header, body and flushes the print buffer. 115*****/ 116 include_once("CLOSE.php"); 117 new CLOSE($pString); 118 119 120?> 121