* All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * Plugin 'Partner-Modul' for the 'partner' extension. * * @author Christoph Stubhann */ require_once(PATH_tslib.'class.tslib_pibase.php'); class tx_partner_pi1 extends tslib_pibase { var $prefixId = 'tx_partner_pi1'; // Same as class name var $scriptRelPath = 'pi1/class.tx_partner_pi1.php'; // Path to this script relative to the extension dir. var $extKey = 'partner'; // The extension key. var $pi_checkCHash = TRUE; # MY VARIABLES: var $page = array( 'entries' => 3, 'number' => 1, ); /** * The main method of the PlugIn * * @param string $content: The PlugIn content * @param array $conf: The PlugIn configuration * @return The content that is displayed on the website */ function main($content,$conf) { $this->conf=$conf; $this->pi_setPiVarDefaults(); $this->pi_loadLL(); # Don't use cache in Typo3 $GLOBALS["TSFE"]->set_no_cache(); # turn on output buffer ob_start(); $this->page['number'] = (isset($_GET['page']) && $_GET['page'] > 0) ? $_GET['page'] : 1; # getting the branche details $branche_count = 0; $branche_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_partnerbranche_daten', 'pid = 23'); $branche_out = array(); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($branche_result)) { $branche_out[] = $row; $branche_count += 1; } # getting the partner details $partner_count = 0; $partner_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_partner_daten', 'pid = 23', '', '', '5'); $partner_out = array(); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($partner_result)) { $partner_out[] = $row; $partner_count += 1; } # creating the branche select box print <<Partner

Branche auswählen: