Andislack
17-04-2003, 08:58
hi!
merkwürdiges problem:
aus einer db werden mehrere datensätze geholt und mittels fasttemplates zu einer html-seite geparst.
das funktioniert auch sehr gut!
das problem ist, dass diese geparste seite nicht komplett angezeigt wird!
im quelltext steht alles richtig und komplett drin, aber irgendwann wird die seite nicht mehr angezeigt und es fehlen mehrere daten bzw. der footer.
es ist so, als würde der inhalt der seite hinter einem frame verschwinden.
die seite ist aber ohne frames und nur mit tabellen aufgebaut.
hat da jemand schonmal ein ähnliches problem gehabt?
es kann gut sein, dass ich irgendetwas falsch gecodet habe...bin noch fasttemplates anfänger ;)
wenn ich das ganze ohne templates mache, funktioniert es einwandfrei.
danke schonmal gruss andi
hier mal meine angebots.php:
<?php
include("../../conf/dbconnect.php");
include "../../template/class.FastTemplate.php3";
global $tpl;
$tpl = new FastTemplate(".");
$tpl->define(array(logo => "../tpl/logo.tpl",
menue => "../tpl/menu.tpl",
main => "../tpl/main.tpl",
css => "../tpl/mbmcss.tpl",
link => "../angebote/link.tpl",
footer => "../angebote/footer.tpl",
linkslayout => "../angebote/linkslayout.tpl",
rechtslayout => "../angebote/rechtslayout.tpl",
titel => "../tpl/titel.tpl",
angebot => "../angebote/angebot.tpl"));
$abfrage = "SELECT * FROM t_angebot";
$ausgeben = ibase_query($abfrage);
while($row = ibase_fetch_object($ausgeben))
{
$tpl->assign(BEZEICHNUNG, "$row->BEZEICHNUNG");
$tpl->parse(LINK, ".link");
if($row->LAYOUT == "Bild links")
{
$tpl->assign(array( "BILDNAME" => "$row->BILDNAME",
"BEZEICHNUNG" => "$row->BEZEICHNUNG",
"PREIS" => "$row->PREIS",
"ZUSTAND" => "$row->ZUSTAND",
"BESCHREIBUNG" => "$row->BESCHREIBUNG"));
$tpl->parse(LAYOUT, ".linkslayout");
}
elseif($row->LAYOUT == "Bild rechts")
{
$tpl->assign(array("BILDNAME" => "$row->BILDNAME",
"BEZEICHNUNG" => "$row->BEZEICHNUNG",
"PREIS" => "$row->PREIS",
"ZUSTAND" => "$row->ZUSTAND",
"BESCHREIBUNG" => "$row->BESCHREIBUNG"));
$tpl->parse(LAYOUT, ".rechtslayout");
}
}
ibase_close($dbh);
$tpl->parse("{TITEL}", "titel");
$tpl->parse("{FOOTER}", "footer");
$tpl->parse("{MAINLOGO}", "angebot");
$tpl->parse("{CSS}", "css");
$tpl->parse("{LOGO}", "logo");
$tpl->parse("{MENUE}", "menue");
$tpl->parse("{MAIN}", "main");
$tpl->FastPrint(MAIN);
?>
merkwürdiges problem:
aus einer db werden mehrere datensätze geholt und mittels fasttemplates zu einer html-seite geparst.
das funktioniert auch sehr gut!
das problem ist, dass diese geparste seite nicht komplett angezeigt wird!
im quelltext steht alles richtig und komplett drin, aber irgendwann wird die seite nicht mehr angezeigt und es fehlen mehrere daten bzw. der footer.
es ist so, als würde der inhalt der seite hinter einem frame verschwinden.
die seite ist aber ohne frames und nur mit tabellen aufgebaut.
hat da jemand schonmal ein ähnliches problem gehabt?
es kann gut sein, dass ich irgendetwas falsch gecodet habe...bin noch fasttemplates anfänger ;)
wenn ich das ganze ohne templates mache, funktioniert es einwandfrei.
danke schonmal gruss andi
hier mal meine angebots.php:
<?php
include("../../conf/dbconnect.php");
include "../../template/class.FastTemplate.php3";
global $tpl;
$tpl = new FastTemplate(".");
$tpl->define(array(logo => "../tpl/logo.tpl",
menue => "../tpl/menu.tpl",
main => "../tpl/main.tpl",
css => "../tpl/mbmcss.tpl",
link => "../angebote/link.tpl",
footer => "../angebote/footer.tpl",
linkslayout => "../angebote/linkslayout.tpl",
rechtslayout => "../angebote/rechtslayout.tpl",
titel => "../tpl/titel.tpl",
angebot => "../angebote/angebot.tpl"));
$abfrage = "SELECT * FROM t_angebot";
$ausgeben = ibase_query($abfrage);
while($row = ibase_fetch_object($ausgeben))
{
$tpl->assign(BEZEICHNUNG, "$row->BEZEICHNUNG");
$tpl->parse(LINK, ".link");
if($row->LAYOUT == "Bild links")
{
$tpl->assign(array( "BILDNAME" => "$row->BILDNAME",
"BEZEICHNUNG" => "$row->BEZEICHNUNG",
"PREIS" => "$row->PREIS",
"ZUSTAND" => "$row->ZUSTAND",
"BESCHREIBUNG" => "$row->BESCHREIBUNG"));
$tpl->parse(LAYOUT, ".linkslayout");
}
elseif($row->LAYOUT == "Bild rechts")
{
$tpl->assign(array("BILDNAME" => "$row->BILDNAME",
"BEZEICHNUNG" => "$row->BEZEICHNUNG",
"PREIS" => "$row->PREIS",
"ZUSTAND" => "$row->ZUSTAND",
"BESCHREIBUNG" => "$row->BESCHREIBUNG"));
$tpl->parse(LAYOUT, ".rechtslayout");
}
}
ibase_close($dbh);
$tpl->parse("{TITEL}", "titel");
$tpl->parse("{FOOTER}", "footer");
$tpl->parse("{MAINLOGO}", "angebot");
$tpl->parse("{CSS}", "css");
$tpl->parse("{LOGO}", "logo");
$tpl->parse("{MENUE}", "menue");
$tpl->parse("{MAIN}", "main");
$tpl->FastPrint(MAIN);
?>