Hallo,
danke für deine Unterstützung.
Hier ist die Fehlermeldung
Parse error: parse error in /typo3_src-3.8.0/typo3/ext/user_bivmetal/pi1/class.user_bivmetal_pi1.php on line 104
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:104) in /typo3_src-3.8.0/typo3/sysext/cms/tslib/class.tslib_fe.php on line 2612
Hier ist nochmal der Code:
<?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;
var $conf;
/**
* [Put your description here]
*/
function main($content,$conf) {
$this->conf=$conf;
$GLOBALS['TYPO3_DB']->debugOutput = true;
//$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>
';
$rows=$this->getItems();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
//Die ausgelesenen Daten
$content = '<h3>Ergebnis:</h3>';
$content2 .= '<table>';
$content2 .='<tr><td>'.$row['firma_1'].'</td></tr><tr><td>'. $row['plz'].'</td></tr><tr><td>' . $row ['ort'].'</td></tr>';
$content2 .= '</table>';
$plz = intval (t3lib_div::_GP($this->prefixId.'[plz]'));
$content = $content . $content2;
return $this->pi_wrapInBaseClass($content);
}
function getItems() {
// pid_list is the pid/list of pids from where to fetch the guest items.
$config["pid_list"] = trim($this->cObj->stdWrap($this->conf["pid_list"],$this->conf["pid_list."]));
$config["pid_list"] = $config["pid_list"] ? implode(t3lib_div::intExplode(",",$config["pid_list"]),",") : $GLOBALS["TSFE"]->id;
list($pid) = explode(",",$config["pid_list"]);
$query = "SELECT * FROM user_bivmetal_bivmetal WHERE plz LIKE '42657' ORDER BY sorting";
$res = mysql(TYPO3_db,$query);
$out=array();
while($row = mysql_fetch_assoc($res)) {
$out[]=$row;
}
return $out;
}
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']);
}
?>
Hier die Tabellenstrukur
Tabelle: user_bivmetal_bivmetal
Struktur Anzeigen SQL Suche Einfügen Exportieren Operationen Leeren Löschen
Feld Typ Attribute Null Standard Extra Aktion
uid int(11) Nein auto_increment
pid int(11) Nein 0
tstamp int(11) Nein 0
crdate int(11) Nein 0
cruser_id int(11) Nein 0
deleted tinyint(4) Nein 0
hidden tinyint(4) Nein 0
starttime int(11) Nein 0
endtime int(11) Nein 0
firma_1 tinytext Nein
plz tinytext Nein
ort tinytext Nein
Alle auswählen / Auswahl entfernen markierte:
Ich versteh es einfach nicht.
Ich bin für die Hilfe unendlich dankbar.
Viele Grüße
Andrea