Hallo Flink,
danke für die Infos.
Aber es geht leider immer noch nicht. Ich bekomme folgende Fehlermeldung:
Parse error: parse error in /typo3_src-3.8.0/typo3/ext/user_bivmetal/pi1/class.user_bivmetal_pi1.php on line 68
Warning: Cannot modify header information - headers already sent by (output started at /typo3_src-3.8.0/typo3/ext/user_bivmetal/pi1/class.user_bivmetal_pi1.php:68-) in /typo3_src-3.8.0/typo3/sysext/cms/tslib/class.tslib_fe.php on line 2612
Der Code sieht jetzt so aus:
<?php
/***************************************************************
* Copyright notice
*
* (c) 2005 Andrea (a.herzog@kienastdv.de)
* 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 'plugin.bivmetal' for the 'user_bivmetal' extension.
*
* @author Andrea <a.herzog@kienastdv.de>
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
class user_bivmetal_pi1 extends tslib_pibase {
var $prefixId = 'user_bivmetal_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.user_bivmetal_pi1.php'; // Path to this script relative to the extension dir.
var $extKey = 'user_bivmetal'; // The extension key.
var $pi_checkCHash = TRUE;
/**
* [Put your description here]
*/
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$content='
<strong>Sie suchen einen Metallbildner-Betrieb in Ihrer Nähe?</strong><br />
<p>Hier können Sie ein Unternehmen in Ihrer Nähe finden.</p>
<p>Tragen Sie einfach die gewünschte Postleitzahl, oder auch nur die erste Zahlen oder die </p>
<p>ersten beiden Zahlen ein und betätigen den Submit - Button. Schon erhalten Sie die gewünschte Information.</p>
<h3>This is a form:</h3>
<form action="'.$this-">pi_getPageLink($GLOBALS['TSFE']->id).'" method="POST">
<input type="hidden" name="no_cache" value="1" />
<input type="text" name="'.$this-" />prefixId.'[plz]" value="'.htmlspecialchars($this->piVars['$_POST["plz"]']).'">
<input type="submit" name="'.$this-" />prefixId.'[submit_button]" value="'.htmlspecialchars($this->pi_getLL('submit_button_label')).'">
</form>
<br />
<p>You can click here to '.$this->pi_linkToPage('get to this page again',$GLOBALS['TSFE']->id).'</p>
';
//Die ausgelesenen Daten
$content = '<h3>Ergebnis:</h3>';
$content2 .= '<table>';
$plz = intval (t3lib_div::_GP($this->prefixId.'[plz]'));
$where = 'plz="'.$plz.'"';
$res = $GLOBALS['usr_p11417_1']->exec_SELECTquery('*', 'tx_bivmetal_adress', $where .' AND pid IN ('$this->pid_list.')'.$this->cObj->enableFields('tx_bivmetal_adress'));
while ($row = $GLOBALS['usr_p11417_1']->sql_fetch_assoc($res)) {
$content2 .='<tr><td>'.$row['name'].'</td></tr><tr><td>'. $row['plz'].'</td></tr><tr><td>' . $row ['ort'].'</td></tr>';
}
$content2 .= '</table>';
$content = $content . $content2;
return $this->pi_wrapInBaseClass($content);
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/user_bivmetal/pi1/class.user_bivmetal_pi1.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/user_bivmetal/pi1/class.user_bivmetal_pi1.php']);
}
?>
Wo habe ich etwas falsch gemacht?
Gruß
Andrea
PS: Gibt es zu dem ganzen Extension und Datenbankabfragezeug ein brauchbares Tutorial?