assign('linkliste',$list); $smarty->display('kopf.tpl.html'); if(!isset($_GET['textid'])){ $sql = "SELECT * FROM tabtexte WHERE startseitentext='on'"; } if(isset($_GET['textid'])){ $sql = "SELECT * FROM tabtexte WHERE textid='".$_GET['textid']."'"; } $result = mysql_query($sql); $num = mysql_num_rows($result); for ($i=0; $i<$num; $i++) { $textid = mysql_result($result, $i, "textid"); $texthead = mysql_result($result, $i, "texthead"); $textdate = mysql_result($result, $i, "textdate"); $text = mysql_result($result, $i, "text"); $textrev = mysql_result($result, $i, "textrev"); $textlinktext = mysql_result($result, $i, "textlinktext"); $textpos = mysql_result($result, $i, "textpos"); $textdate = date("d.m.Y, H:i:s", $textdate); $textrev = date("d.m.Y, H:i:s", $textrev); $smarty->assign("textid",$textid); $smarty->assign("texthead",$texthead); $smarty->assign("textdate",$textdate); $smarty->assign("text",$text); $smarty->assign("textrev",$textrev); $smarty->assign("textlinktext",$textlinktext); $smarty->assign("textpos",$textpos); } $smarty->display('page.tpl.html'); $sqls = "SELECT * FROM tabspon ORDER BY kdpos ASC"; $results = mysql_query($sqls); $nums = mysql_num_rows($results); $lists = array(); // leeres Arrayelement erzeugen while($row = mysql_fetch_assoc($results)) { $lists[] = $row; } $smarty->assign('linkliste',$lists); $smarty->display('footer.tpl.html'); ?>