Could not connect to the database."); if($attachrow=mysql_fetch_array($attachresult)) { if($attachpos==1) echo ""; echo ""; do{ echo ""; }while($attachrow=mysql_fetch_array($attachresult)); echo "
"; echo ""; $fileinfo=$attachrow["filename"]." (".format_bytes($attachrow["filesize"]).")"; if($attachrow["description"]) $fileinfo.=" ".$attachrow["description"]; echo " "; $mimesql="select * from ".$tableprefix."_mimetypes where mimetype='".$attachrow["mimetype"]."'"; if(!$mimeresult = mysql_query($mimesql, $db)) die("
Could not connect to the database."); if($mimerow=mysql_fetch_array($mimeresult)) { $fdsql="select * from ".$tableprefix."_filetypedescription where language='$act_lang' and mimetype=".$mimerow["entrynr"]; if(!$fdresult = mysql_query($fdsql, $db)) die("
Could not connect to the database."); if($fdrow=mysql_fetch_array($fdresult)) $dfileinfo=$fdrow["description"].": ".$fileinfo; else $dfileinfo=$fileinfo; if($mimerow["icon"]) echo "\"$dfileinfo\" "; else echo "\"$dfileinfo\""; } else echo "\"$fileinfo\""; echo " $l_attachement "; if($nofileinfo==0) echo " [".$fileinfo."]"; echo "
"; if($attachpos==1) echo ""; } else if($attachpos==0) echo " "; if($attachpos==0) echo ""; } function displayattachs_news($newsnr, $attachpos, $nofileinfo) { global $db, $tableprefix, $act_lang, $l_attachement, $url_gfx, $attachpic; global $contentfont, $contentfontsize, $contentfontcolor, $contentbgcolor; global $url_simpnews; $attachsql="select f.filename, f.filesize, f.mimetype, f.description, na.* from ".$tableprefix."_news_attachs na, ".$tableprefix."_files f where f.entrynr=na.attachnr and na.newsnr=".$newsnr; if(!$attachresult = mysql_query($attachsql, $db)) die("Could not connect to the database."); if($attachrow=mysql_fetch_array($attachresult)) { if($attachpos==1) echo ""; echo ""; do{ echo ""; }while($attachrow=mysql_fetch_array($attachresult)); echo "
"; echo ""; $fileinfo=$attachrow["filename"]." (".format_bytes($attachrow["filesize"]).")"; if($attachrow["description"]) $fileinfo.=" ".$attachrow["description"]; echo " "; $mimesql="select * from ".$tableprefix."_mimetypes where mimetype='".$attachrow["mimetype"]."'"; if(!$mimeresult = mysql_query($mimesql, $db)) die("
Could not connect to the database."); if($mimerow=mysql_fetch_array($mimeresult)) { $fdsql="select * from ".$tableprefix."_filetypedescription where language='$act_lang' and mimetype=".$mimerow["entrynr"]; if(!$fdresult = mysql_query($fdsql, $db)) die("
Could not connect to the database."); if($fdrow=mysql_fetch_array($fdresult)) $dfileinfo=$fdrow["description"].": ".$fileinfo; else $dfileinfo=$fileinfo; if($mimerow["icon"]) echo "\"$dfileinfo\" "; else echo "\"$dfileinfo\""; } else echo "\"$fileinfo\""; echo " $l_attachement "; if($nofileinfo==0) echo " [".$fileinfo."]"; echo "
"; if($attachpos==1) echo ""; } else if($attachpos==0) echo " "; if($attachpos==0) echo ""; } function displayattachs_events($eventnr, $attachpos, $nofileinfo) { global $db, $tableprefix, $act_lang, $l_attachement, $url_gfx, $attachpic; global $contentfont, $contentfontsize, $contentfontcolor; global $url_simpnews; $attachsql="select f.filename, f.filesize, f.mimetype, f.description, eva.* from ".$tableprefix."_events_attachs eva, ".$tableprefix."_files f where f.entrynr=eva.attachnr and eva.eventnr=".$eventnr; if(!$attachresult = mysql_query($attachsql, $db)) die("Could not connect to the database."); if($attachrow=mysql_fetch_array($attachresult)) { if($attachpos==1) echo ""; echo ""; do{ echo ""; }while($attachrow=mysql_fetch_array($attachresult)); echo "
"; echo ""; $fileinfo=$attachrow["filename"]." (".format_bytes($attachrow["filesize"]).")"; if($attachrow["description"]) $fileinfo.=" ".$attachrow["description"]; echo " "; $mimesql="select * from ".$tableprefix."_mimetypes where mimetype='".$attachrow["mimetype"]."'"; if(!$mimeresult = mysql_query($mimesql, $db)) die("
Could not connect to the database."); if($mimerow=mysql_fetch_array($mimeresult)) { $fdsql="select * from ".$tableprefix."_filetypedescription where language='$act_lang' and mimetype=".$mimerow["entrynr"]; if(!$fdresult = mysql_query($fdsql, $db)) die("
Could not connect to the database."); if($fdrow=mysql_fetch_array($fdresult)) $dfileinfo=$fdrow["description"].": ".$fileinfo; else $dfileinfo=$fileinfo; if($mimerow["icon"]) echo "\"$dfileinfo\" "; else echo "\"$dfileinfo\""; } else echo "\"$fileinfo\""; echo " $l_attachement "; if($nofileinfo==0) echo " [".$fileinfo."]"; echo "
"; if($attachpos==1) echo ""; } else if($attachpos==0) echo " "; if($attachpos==0) echo ""; } function posterline2($posterid, $postername, $linkposter, $exposter=0) { if($linkposter) posterline($posterid,$postername,1, $exposter); else posterline($posterid,$postername,0, $exposter); } function posterline($posterid, $postername, $linkposter, $exposter=0) { global $db, $tableprefix, $l_poster; global $posterfont, $posterfontsize, $posterfontcolor, $posterstyle, $posterbgcolor; echo ""; if($exposter>0) { $sql="select * from ".$tableprefix."_poster where entrynr=".$exposter; if(!$result = mysql_query($sql, $db)) die("Unable to connect to database.".mysql_error()); if($myrow=mysql_fetch_array($result)) { $posterlinked=false; if($linkposter==1) { $email=emailencode(stripslashes($myrow["email"])); echo ""; $posterlinked=true; } echo ""; echo get_start_tag($posterstyle); echo "$l_poster: ".do_htmlentities($myrow["name"]); echo get_end_tag($posterstyle); echo ""; if($posterlinked) echo ""; echo ""; return; } } $posterlinked=false; if($linkposter==1) { $postersql="select * from ".$tableprefix."_users where usernr=".$posterid; if(!$posterresult = mysql_query($postersql, $db)) die("Unable to connect to database.".mysql_error()); if($posterrow=mysql_fetch_array($posterresult)) { $email=emailencode(stripslashes($posterrow["email"])); echo ""; $posterlinked=true; } } echo ""; echo get_start_tag($posterstyle); echo "$l_poster: ".display_encoded($postername); echo get_end_tag($posterstyle); echo ""; if($posterlinked) echo ""; echo ""; } ?>