00001 <?php 00002 00003 /******************************************************************************* 00004 * Aliro - the modern, accessible content management system 00005 * 00006 * Aliro is open source software, free to use, and licensed under GPL. 00007 * You can find the full licence at http://www.gnu.org/copyleft/gpl.html GNU/GPL 00008 * 00009 * The author freely draws attention to the fact that Aliro derives from Mambo, 00010 * software that is controlled by the Mambo Foundation. However, this section 00011 * of code is totally new. If it should contain any fragments that are similar 00012 * to Mambo, please bear in mind (1) there are only so many ways to do things 00013 * and (2) the author of Aliro is also the author and copyright owner for large 00014 * parts of Mambo 4.6. 00015 * 00016 * Tribute should be paid to all the developers who took Mambo to the stage 00017 * it had reached at the time Aliro was created. It is a feature rich system 00018 * that contains a good deal of innovation. 00019 * 00020 * Your attention is also drawn to the fact that Aliro relies on other items of 00021 * open source software, which is very much in the spirit of open source. Aliro 00022 * wishes to give credit to those items of code. Please refer to 00023 * http://aliro.org/credits for details. The credits are not included within 00024 * the Aliro package simply to avoid providing a marker that allows hackers to 00025 * identify the system. 00026 * 00027 * Copyright in this code is strictly reserved by its author, Martin Brampton. 00028 * If it seems appropriate, the copyright will be vested in the Aliro Organisation 00029 * at a suitable time. 00030 * 00031 * Copyright (c) 2007 Martin Brampton 00032 * 00033 * http://aliro.org 00034 * 00035 * counterpoint@aliro.org 00036 * 00037 * Everything here is to do with database management. 00038 * 00039 * aliroTabs is the class that supports easy creation of tabbed displays using 00040 * Erik Arvidsson's Tab Pane JavaScript based tabbing utility 00041 * 00042 * mosTabs is for backwards compatibility 00043 * 00044 */ 00045 00046 class aliroTabs { 00047 private $useCookies = 0; 00048 00049 function __construct($useCookies) { 00050 $request = aliroRequest::getInstance(); 00051 $tab_headers = <<<TAB_TAGS 00052 00053 <link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="{$request->getCfg('live_site')}/includes/js/tabs/tab.css" /> 00054 <script type="text/javascript" src="{$request->getCfg('live_site')}/includes/js/tabs/tabpane.js"></script> 00055 00056 TAB_TAGS; 00057 00058 $request->addCustomHeadTag($tab_headers); 00059 $this->useCookies = $useCookies; 00060 } 00061 00062 function startPane($id){ 00063 echo <<<START_PANE 00064 00065 <div class="tab-page" id="$id"> 00066 <script type="text/javascript"> 00067 var tabPane1 = new WebFXTabPane( document.getElementById( "$id" ), $this->useCookies ) 00068 </script> 00069 00070 START_PANE; 00071 00072 } 00073 00074 function endPane() { 00075 echo "</div>"; 00076 } 00077 00078 static function startTab( $tabText, $paneid ) { 00079 echo <<<START_TAB 00080 00081 <div class="tab-page" id="$paneid"> 00082 <h2 class="tab">$tabText</h2> 00083 <script type="text/javascript"> 00084 tabPane1.addTabPage( document.getElementById( "$paneid" ) ); 00085 </script> 00086 00087 START_TAB; 00088 00089 } 00090 00091 static function endTab() { 00092 echo "</div>"; 00093 } 00094 } 00095 00096 class mosTabs extends aliroTabs { 00097 00098 function mosTabs ($useCookies) { 00099 parent::__construct($useCookies); 00100 } 00101 00102 }
1.5.5