setTitle(gT('TitleBlog')); if ($_REQUEST['submit'] && hasRight('blog')){ $Datum=strftime("%Y%m%d"); $Zeit=strftime("%H%M"); $SQL=mysql_query("insert into Blog (User,Eintrag,Datum,Zeit,FK_Projekt) VALUES ('".$_SESSION['USERNAME']."','".$_REQUEST['Eintrag']."','$Datum','$Zeit',".__PROJECT_ID__.")"); } $template->replace('***TITLE***',gT('TitleBlog')); $result=mysql_query("select * from Blog where FK_Projekt = ".__PROJECT_ID__." order by Datum DESC, Zeit DESC"); $template_replacer=$template->getPart(''); while ($row=mysql_fetch_assoc($result)){ $template_tmp=$template_replacer; $template_tmp=str_replace("***DATUM***",substr($row['Datum'],6,2).'.'.substr($row['Datum'],4,2).'.'.substr($row['Datum'],0,4),$template_tmp); $template_tmp=str_replace("***EINTRAG***",$row['Eintrag'],$template_tmp); $template_tmp=str_replace("***ZEIT***",substr($row['Zeit'],0,2).':'.substr($row['Zeit'],2,2),$template_tmp); $template_final.=$template_tmp; } $template->replacePart('',$template_final); if (hasRight('blog')){ $output.='
=== ADMIN ===

'; } $template->replace("***OUTPUT***",$output); common(); $template->Output('print'); ?>