ich habe unten stehende Fehlermeldung. Das Modul hat ein Freund geschrieben. Leider ist dieser verstorben. Ich selbst kenne mich damit nicht wirklich aus. Daher bitte ich Euch um Hilfe.
Fatal error: Call to a member function setQuery() on a non-object in /www/htdocs/xxxx/die_webseite/redaxo/include/classes/class.rex_article.inc.php(250) : eval()'d code on line 53
Hier die Zeilen 53 - 59
Code: Alles auswählen
$this->setCLang($clang);
else
$this->setClang($REX['CUR_CLANG']);
if ($article_id !== null)
$this->setArticleId($article_id);
}
Code: Alles auswählen
<?php
if (!rex_request("540_terminid", "int"))
// Select Auswahlliste
$sql = new rex_sql;
$query = 'SELECT * FROM '.$REX['TABLE_PREFIX'].'540_termin WHERE state = 1 ORDER BY termin ASC';
$sql->setQuery($query);
// Auswahlliste Schulen erstellen
echo '<p>Bitte wählen Sie Ihre Schule mit entsprechender Klassenstufe und Praktikumszeitraum:
</p>';
// Quicklink initiakisieren
$output_quicklink ='';
echo '<form method="get" action="'.rex_getUrl($this->article_id,$this->clang).'">';
echo '<select id="540_terminid" name="540_terminid" onchange="this.form.submit();">';
echo '<option value="0">Bitte Schule/Zeitraum wählen</option>';
for ($i=0;$i<$sql->getRows();$i++)
{ if ($key==$sql->getValue('terminid'))
{ $sel=' selected="selected"';
}
else
{ $sel='';
}
echo '<option value="'.$sql->getValue('terminid').'"'.$sel.'>'.$sql->getValue('termin').'</option>';
$quicklink_zeitraum = explode(' - ', $sql->getValue('termin'));
$output_quicklink .= '<a href="'.rex_getUrl($this->article_id,$this->clang).'?540_terminid='.$sql->getValue('terminid').'">'.$quicklink_zeitraum[0].' - '.$quicklink_zeitraum[1].'</a> ';
echo $sql->next();
}
echo '</select></form><br />';
// Select Praktikumsbörse
$psql = new rex_sql;
$psql->debugsql = 0;
$pquery = 'SELECT * FROM rex_540_training
LEFT JOIN rex_540_location ON rex_540_location.locationid = rex_540_training.locationid
LEFT JOIN rex_540_company ON rex_540_company.companyid = rex_540_training.companyid
WHERE state = 1 ';
if (rex_request('540_locationid', 'int') !='')
{
$pquery .= 'AND rex_540_training.locationid = '.rex_request("540_locationid", "int").' ';
}
if (rex_request('540_terminid', 'int') !='')
{
$pquery .= 'AND (rex_540_training.terminid LIKE "%||'.rex_request("540_terminid", "int").'||%" ';
$pquery .= 'OR rex_540_training.terminid ="") ';
}
$pquery .= 'ORDER BY title ASC';
$psql->setQuery($pquery);
// Gewählter Praktikumszeitraum
if (rex_request("540_terminid", "int") != '')
{
$zsql = new rex_sql;
$zsql->debugsql = 0;
$zquery = 'SELECT * FROM '.$REX['TABLE_PREFIX'].'540_termin
WHERE '.rex_request("540_terminid", "int").' = terminid
ORDER BY termin ASC
LIMIT 1';
$zsql->setQuery($zquery);
$pzeitraum = explode(' - ', $zsql->getValue('termin'));
echo '<p class = "gelb">Sie haben folgenden Praktikumszeitraum gewählt:</p>';
echo '<p>Schule: '.$pzeitraum[0].'<br />';
echo 'Klassenstufe: '.$pzeitraum[1].'<br />';
echo 'Zeitraum: '.$pzeitraum[2].'</p>';
} // end if Praktikumszeitraum gewählt
// Praktikumsbörse Detail
if (rex_request("540_detailid", "int") !='')
{
$dsql = new rex_sql;
$dquery = 'SELECT * FROM '.$REX['TABLE_PREFIX'].'540_training
LEFT JOIN '.$REX['TABLE_PREFIX'].'540_industry ON '.$REX['TABLE_PREFIX'].'540_industry.industryid = '.$REX['TABLE_PREFIX'].'540_training.industryid
LEFT JOIN '.$REX['TABLE_PREFIX'].'540_company ON '.$REX['TABLE_PREFIX'].'540_company.companyid = '.$REX['TABLE_PREFIX'].'540_training.companyid
LEFT JOIN rex_540_location ON rex_540_location.locationid = rex_540_training.locationid
WHERE '.rex_request("540_detailid", "int").' = trainingid
LIMIT 1';
$dsql->setQuery($dquery);
// Count
$countsql = new rex_sql;
$countquery = 'UPDATE '.$REX['TABLE_PREFIX'].'540_training SET count = count+1
WHERE '.rex_request("540_detailid", "int").' = trainingid';
$countsql->setQuery($countquery);
$detail_output = '<table style="width:100%;">';
$detail_output .= '<tr><th colspan="2">'.$dsql->getValue('title').'</th></tr>';
$detail_output .= '<tr><td valign="top">Beschreibung:</td><td>'.nl2br($dsql->getValue('description')).'</td></tr>';
$detail_output .= '<tr><td>Branche:</td><td>'.$dsql->getValue('industry').'</td></tr>';
$detail_output .= '<tr><td>Plätze:</td><td>';
if ($dsql->getValue('number') == 0) $detail_output .= 'auf Anfrage';
if ($dsql->getValue('number') != 0) $detail_output .= $dsql->getValue('number');
$detail_output .= '</td></tr>';
$detail_output .= '<tr><td valign="top">Firma:</td><td>'.$dsql->getValue('company').'<br />';
$detail_output .= $dsql->getValue('firstname').' ';
$detail_output .= $dsql->getValue('name').'<br />';
$detail_output .= $dsql->getValue('street').'<br />';
$detail_output .= $dsql->getValue('zip').' ';
$detail_output .= $dsql->getValue('city').'</td></tr>';
$detail_output .= '<tr><td>Telefon:</td><td>'.$dsql->getValue('phone').'</td></tr>';
$detail_output .= '<tr><td>Telefax:</td><td>'.$dsql->getValue('fax').'</td></tr>';
$detail_output .= '<tr><td>E-Mail:</td><td>';
if ($dsql->getValue('email') != '') { $detail_output .= '<a href="mailto:'.$dsql->getValue('email').'">'.$dsql->getValue('email').'</a>'; }
$detail_output .= '</td></tr>';
if ($dsql->getValue('internet') != '') {
if (preg_match("|http://|",$dsql->getValue('internet')))
{
$p50_internet = str_replace("http://", "", $dsql->getValue('internet'));
}
else
{
$p50_internet = $dsql->getValue('internet');
} // end if preg_match
} // end if empty
$detail_output .= '<tr><td>Internet:</td><td>';
if ($dsql->getValue('internet') != '') { $detail_output .= '<a href="http://'.$p50_internet.'" target="_blank">'.$p50_internet.'</a>'; }
$detail_output .= '</td></tr><tr><td colspan="2">';
echo $detail_output;
// Google Map
?>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAgp72cYYHIKDHEEZT3wQtRxRoBoa2g8v_uTmxQxAnD4kK2dcQQhTXNbNs3IiRMBhxAzNCoRGnJ9yjqA"></script>
<div style="display: block; width: 320px; height: 320px; visibility: hidden;" id="map"></div>
<script type="text/javascript">
function showAddress(address, text, zoom)
{
var div = document.getElementById("map");
var geocoder = new GClientGeocoder();
var map = new GMap2(div);
map.addControl(new GSmallMapControl());
geocoder.getLatLng(address,
function(point)
{
if (!point)
{
div.style.visibility = 'hidden';
}
else
{
map.setCenter(point, zoom);
var marker = new GMarker(point);
GEvent.addListener(marker, "mouseover", function()
{
marker.openInfoWindowHtml(text);
});
GEvent.addListener(marker, "mouseout", function()
{
map.disableInfoWindow();
map.enableInfoWindow();
});
map.addOverlay(marker);
marker.openInfoWindowHtml(text);
window.setTimeout(function()
{
map.disableInfoWindow();
map.enableInfoWindow();
}, 14000);
}
}
);
div.style.visibility = 'visible';
}
<?php
$mapPoint = $dsql->getValue('company');
$mapAdress = $dsql->getValue('street').', '.$dsql->getValue('zip').' '.$dsql->getValue('location').', DE';
echo 'showAddress(\''.$mapAdress.'\', \''.html_entity_decode($mapPoint).'\', 15);';
?>
</script>
<br /><br />
<?php
echo '</td></tr></table>';
} // end Detail
// Select für Gemeinde erstellen
if ($psql->getRows() > 0 && rex_request("540_terminid", "int") !='')
{
echo '<p>Hier können Sie die angezeigten Praktika nach Gemeinde filtern.</p>';
$location_sql = new rex_sql;
$location_sql->debugsql = 0;
$location_query = 'SELECT * FROM rex_540_training
LEFT JOIN rex_540_location ON rex_540_training.locationid = rex_540_location.locationid
WHERE state = "1" ';
if (rex_request('540_terminid', 'int') !='')
{
$location_query .= 'AND rex_540_training.terminid LIKE "%||'.rex_request("540_terminid", "int").'||%" ';
$location_query .= 'OR rex_540_training.terminid ="" ';
}
$location_query .= 'GROUP BY rex_540_training.locationid ';
$location_query .= 'ORDER BY location ASC';
$location_sql->setQuery($location_query);
// Auswahlliste Gemeinden erstellen
echo '<form method="get" action="'.rex_getUrl($this->article_id,$this->clang).'">';
echo '<input type="hidden" name="540_terminid" value="'.rex_request('540_terminid', 'int').'">';
echo '<select id="540_locationid" name="540_locationid" onchange="this.form.submit();">';
echo '<option value="">Bitte Gemeinde wählen</option>';
echo '<option value="">alle Gemeinden</option>';
for ($i=0;$i<$location_sql->getRows();$i++)
{ if ($key==$location_sql->getValue('rex_540_training.locationid'))
{ $sel=' selected="selected"';
}
else
{ $sel='';
}
echo '<option value="'.$location_sql->getValue('rex_540_location.locationid').'"'.$sel.'>'.$location_sql->getValue('location').'</option>';
echo $location_sql->next();
}
echo '</select></form><br />';
} // end Select Gemeinde
// Praktikumsbörse Liste
if ($psql->getRows() > 0 && rex_request("540_terminid", "int") !='')
{
echo '<p><strong>Verfügbare Praktika:</strong></p>';
echo '<table style="width:100%;">';
echo '<tr><th>Praktikum</th><th>Firma</th><th>Gemeinde</th></tr>';
for ($i=0;$i<$psql->getRows();$i++)
{
if ($i % 2 != 0)
{
$tr_class_bg = 'hellgrau';
}
else
{
$tr_class_bg = 'hellgelb';
}
echo '<tr class="'.$tr_class_bg.'"><td><a href="'.rex_getUrl($this->article_id,$this->clang).'?540_terminid='.rex_request("540_terminid", "int").'&540_detailid='.$psql->getValue('trainingid').'" title="Detail anzeigen">'.$psql->getValue('title').'</a></td><td>'.$psql->getValue('company').'</td><td>'.$psql->getValue('location').'</td></tr>';
echo $psql->next();
}
echo '</table>';
} // end $psql->getRows() > 0
// Quicklinks
echo '<p>Quicklinks</p>';
echo '<p class="small">';
echo $output_quicklink;
echo '</p>';
?>