12) { $month=1; $year++; } $tmpstop=mktime(0,0,0,$month,1,$year); $startdate=date("Y-m-d",$tmpstart); $enddate=date("Y-m-d",$tmpstop); $tmpsql = "select * from ".$tableprefix."_announce where (expiredate>=$acttime or expiredate=0) and (firstdate<=$acttime or firstdate=0) "; $tmpsql.=" and DATE_FORMAT(date,'%Y-%m-%d')>='$startdate' and DATE_FORMAT(date,'%Y-%m-%d')<'$enddate' "; if($separatebylang==1) $tmpsql.="and lang='$act_lang' "; if($category>0) $tmpsql.= "and (category='$category' or category=0)"; else if($category==0) $tmpsql.= "and category=0"; $tmpsql.=" order by date desc"; if($maxannounce>0) $tmpsql.=" limit $maxannounce"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Unable to connect to database.".mysql_error()); if(mysql_num_rows($tmpresult)>0) { $announceavail=true; while($tmprow=mysql_fetch_array($tmpresult)) { echo ""; list($mydate,$mytime)=explode(" ",$tmprow["date"]); list($year, $month, $day) = explode("-", $mydate); list($hour, $min, $sec) = explode(":",$mytime); if($month>0) { $displaytime=mktime($hour,$min,$sec,$month,$day,$year); $displaytime=transposetime($displaytime,$servertimezone,$displaytimezone); $displaydate=strftime($news5dateformat,$displaytime); } else $displaydate=""; echo ""; if($tmprow["category"]==0) echo "\"$l_global_announcement\" "; else echo "\"$l_announcement\" "; echo get_start_tag($layout["timestampstyle"]); echo $displaydate; echo get_end_tag($layout["timestampstyle"]); echo ""; if(strlen($tmprow["heading"])>0) $displaytext=display_encoded($tmprow["heading"]); else { $displaytext = stripslashes($tmprow["text"]); $displaytext = undo_htmlspecialchars($displaytext); $displaytext = strip_tags($displaytext); if(strlen($displaytext)>$news4maxchars) $displaytext = subwords($displaytext,$news4maxchars); } echo ""; echo ""; $linkdest="announce.php?$langvar=$act_lang&announcenr=".$tmprow["entrynr"]."&backurl=$backurl"; echo ""; echo $displaytext; echo ""; } } } function display_announcements2($year,$month,$category,$act_lang,$layout, $disableprint=false, $maxannounce=0) { global $tableprefix, $servertimezone, $displaytimezone, $separatebylang, $db, $langvar; global $timestampbgcolor, $timestampfont, $timestampfontsize, $timestampfontcolor, $timestampstyle; global $news5dateformat, $l_announcement, $l_global_announcement, $gannouncepic, $announcepic; global $backurl, $url_gfx, $l_showentry, $news5linktarget, $news5displayicons, $news5displayposter; global $newsheadingfont, $ev2_newsheadingstyle, $newsheadingfontcolor, $ev2_newsheadingfontsize, $newsheadingbgcolor; global $l_gotop, $printpic_small, $l_print, $pagetoppic, $l_poster; global $contentbgcolor, $contentfont, $contentfontcolor, $contentfontsize; global $posterstyle, $posterfont, $posterfontsize, $posterfontcolor, $posterbgcolor; global $noprinticon, $nogotopicon, $url_icons; $acttime=transposetime(time(),$servertimezone,$displaytimezone); $tmpstart=mktime(0,0,0,$month,1,$year); $month++; if($month>12) { $month=1; $year++; } $tmpstop=mktime(0,0,0,$month,1,$year); $startdate=date("Y-m-d",$tmpstart); $enddate=date("Y-m-d",$tmpstop); $tmpsql = "select * from ".$tableprefix."_announce where (expiredate>=$acttime or expiredate=0) and (firstdate<=$acttime or firstdate=0) "; $tmpsql.=" and DATE_FORMAT(date,'%Y-%m-%d')>='$startdate' and DATE_FORMAT(date,'%Y-%m-%d')<'$enddate' "; if($separatebylang==1) $tmpsql.="and lang='$act_lang' "; if($category>0) $tmpsql.= "and (category='$category' or category=0)"; else if($category==0) $tmpsql.= "and category=0"; $tmpsql.=" order by date desc"; if($maxannounce>0) $tmpsql.=" limit $maxannounce"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Unable to connect to database.".mysql_error()); if(mysql_num_rows($tmpresult)>0) { $announceavail=true; while($tmprow=mysql_fetch_array($tmpresult)) { echo ""; list($mydate,$mytime)=explode(" ",$tmprow["date"]); list($year, $month, $day) = explode("-", $mydate); list($hour, $min, $sec) = explode(":",$mytime); if($month>0) { $displaytime=mktime($hour,$min,$sec,$month,$day,$year); $displaytime=transposetime($displaytime,$servertimezone,$displaytimezone); $displaydate=strftime($news5dateformat,$displaytime); } else $displaydate=""; echo ""; if($tmprow["category"]==0) echo "\"$l_global_announcement\" "; else echo "\"$l_announcement\" "; echo get_start_tag($timestampstyle); echo $displaydate; echo get_end_tag($timestampstyle); echo ""; if($news5displayicons==1) { echo ""; if($tmprow["headingicon"]) echo " "; else echo " "; echo ""; } echo ""; if(strlen($tmprow["heading"])>0) { echo ""; } echo ""; if($news5displayposter && (strlen($tmprow["poster"])>0)) { echo ""; } if(!$disableprint) { echo ""; echo ""; } echo "
"; echo ""; echo get_start_tag($ev2_newsheadingstyle); echo display_encoded($tmprow["heading"]); echo get_end_tag($ev2_newsheadingstyle); echo "
"; echo ""; $displaytext=stripslashes($tmprow["text"]); $displaytext = undo_htmlspecialchars($displaytext); echo $displaytext."
"; echo ""; echo get_start_tag($posterstyle); echo "$l_poster: ".do_htmlentities($tmprow["poster"]); echo get_end_tag($posterstyle); echo "
"; echo " "; echo ""; echo ""; if($noprinticon==0) { echo ""; if($printpic_small) echo "\"$l_print\""; else echo "[$l_print]"; echo "  "; } if($nogotopicon==0) echo "\"$l_gotop\""; echo "
"; } } } function display_announcements2b($year,$month,$category,$act_lang,$layout,$disableprint,$maxannounce,$entrynr) { global $tableprefix, $servertimezone, $displaytimezone, $separatebylang, $db, $langvar; global $timestampbgcolor, $timestampfont, $timestampfontsize, $timestampfontcolor, $timestampstyle; global $news5dateformat, $l_announcement, $l_global_announcement, $gannouncepic, $announcepic; global $backurl, $url_gfx, $l_showentry, $news5linktarget, $news5displayicons, $news5displayposter; global $newsheadingfont, $ev2_newsheadingstyle, $newsheadingfontcolor, $ev2_newsheadingfontsize, $newsheadingbgcolor; global $l_gotop, $printpic_small, $l_print, $pagetoppic, $l_poster; global $contentbgcolor, $contentfont, $contentfontcolor, $contentfontsize; global $posterstyle, $posterfont, $posterfontsize, $posterfontcolor, $posterbgcolor; global $noprinticon, $nogotopicon, $url_icons, $l_expand, $expandpic; $acttime=transposetime(time(),$servertimezone,$displaytimezone); $tmpstart=mktime(0,0,0,$month,1,$year); $month++; if($month>12) { $month=1; $year++; } $tmpstop=mktime(0,0,0,$month,1,$year); $startdate=date("Y-m-d",$tmpstart); $enddate=date("Y-m-d",$tmpstop); $tmpsql = "select * from ".$tableprefix."_announce where (expiredate>=$acttime or expiredate=0) and (firstdate<=$acttime or firstdate=0) "; $tmpsql.=" and DATE_FORMAT(date,'%Y-%m-%d')>='$startdate' and DATE_FORMAT(date,'%Y-%m-%d')<'$enddate' "; if($separatebylang==1) $tmpsql.="and lang='$act_lang' "; if($category>0) $tmpsql.= "and (category='$category' or category=0)"; else if($category==0) $tmpsql.= "and category=0"; $tmpsql.=" order by date desc"; if($maxannounce>0) $tmpsql.=" limit $maxannounce"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Unable to connect to database.".mysql_error()); if(mysql_num_rows($tmpresult)>0) { $announceavail=true; while($tmprow=mysql_fetch_array($tmpresult)) { echo ""; $entrynr++; list($mydate,$mytime)=explode(" ",$tmprow["date"]); list($year, $month, $day) = explode("-", $mydate); list($hour, $min, $sec) = explode(":",$mytime); if($month>0) { $displaytime=mktime($hour,$min,$sec,$month,$day,$year); $displaytime=transposetime($displaytime,$servertimezone,$displaytimezone); $displaydate=strftime($news5dateformat,$displaytime); } else $displaydate=""; echo ""; if($tmprow["category"]==0) echo "\"$l_global_announcement\" "; else echo "\"$l_announcement\" "; echo get_start_tag($timestampstyle); echo $displaydate; echo get_end_tag($timestampstyle); echo ""; if($news5displayicons==1) { echo ""; if($tmprow["headingicon"]) echo " "; else echo " "; echo ""; } echo ""; echo ""; echo "
"; echo ""; echo ""; echo " "; echo ""; echo get_start_tag($ev2_newsheadingstyle); echo display_encoded($tmprow["heading"]); echo get_end_tag($ev2_newsheadingstyle); echo "
"; echo ""; echo ""; if($news5displayposter && (strlen($tmprow["poster"])>0)) { echo ""; } if(!$disableprint) { echo ""; echo ""; } echo "
"; echo ""; $displaytext=stripslashes($tmprow["text"]); $displaytext = undo_htmlspecialchars($displaytext); echo $displaytext."
"; echo ""; echo get_start_tag($posterstyle); echo "$l_poster: ".do_htmlentities($tmprow["poster"]); echo get_end_tag($posterstyle); echo "
"; echo " "; echo ""; echo ""; if($noprinticon==0) { echo ""; if($printpic_small) echo "\"$l_print\""; else echo "[$l_print]"; echo "  "; } if($nogotopicon==0) echo "\"$l_gotop\""; echo "
"; } } return $entrynr; } function display_announcements2c($year,$month,$category,$act_lang,$layout,$disableprint,$maxannounce,$exptype,$expanded, $baseurl) { global $tableprefix, $servertimezone, $displaytimezone, $separatebylang, $db, $langvar; global $timestampbgcolor, $timestampfont, $timestampfontsize, $timestampfontcolor, $timestampstyle; global $news5dateformat, $l_announcement, $l_global_announcement, $gannouncepic, $announcepic; global $backurl, $url_gfx, $l_showentry, $news5linktarget, $news5displayicons, $news5displayposter; global $newsheadingfont, $ev2_newsheadingstyle, $newsheadingfontcolor, $ev2_newsheadingfontsize, $newsheadingbgcolor; global $l_gotop, $printpic_small, $l_print, $pagetoppic, $l_poster; global $contentbgcolor, $contentfont, $contentfontcolor, $contentfontsize; global $posterstyle, $posterfont, $posterfontsize, $posterfontcolor, $posterbgcolor; global $noprinticon, $nogotopicon, $url_icons, $l_expand, $expandpic; $acttime=transposetime(time(),$servertimezone,$displaytimezone); $tmpstart=mktime(0,0,0,$month,1,$year); $month++; if($month>12) { $month=1; $year++; } $tmpstop=mktime(0,0,0,$month,1,$year); $startdate=date("Y-m-d",$tmpstart); $enddate=date("Y-m-d",$tmpstop); $tmpsql = "select * from ".$tableprefix."_announce where (expiredate>=$acttime or expiredate=0) and (firstdate<=$acttime or firstdate=0) "; $tmpsql.=" and DATE_FORMAT(date,'%Y-%m-%d')>='$startdate' and DATE_FORMAT(date,'%Y-%m-%d')<'$enddate' "; if($separatebylang==1) $tmpsql.="and lang='$act_lang' "; if($category>0) $tmpsql.= "and (category='$category' or category=0)"; else if($category==0) $tmpsql.= "and category=0"; $tmpsql.=" order by date desc"; if($maxannounce>0) $tmpsql.=" limit $maxannounce"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Unable to connect to database.".mysql_error()); if(mysql_num_rows($tmpresult)>0) { $announceavail=true; while($tmprow=mysql_fetch_array($tmpresult)) { echo ""; list($mydate,$mytime)=explode(" ",$tmprow["date"]); list($year, $month, $day) = explode("-", $mydate); list($hour, $min, $sec) = explode(":",$mytime); if($month>0) { $displaytime=mktime($hour,$min,$sec,$month,$day,$year); $displaytime=transposetime($displaytime,$servertimezone,$displaytimezone); $displaydate=strftime($news5dateformat,$displaytime); } else $displaydate=""; echo ""; if($tmprow["category"]==0) echo "\"$l_global_announcement\" "; else echo "\"$l_announcement\" "; echo get_start_tag($timestampstyle); echo $displaydate; echo get_end_tag($timestampstyle); echo ""; if($news5displayicons==1) { echo ""; if($tmprow["headingicon"]) echo " "; else echo " "; echo ""; } echo ""; echo ""; if(($exptype=="an") && ($expanded==$tmprow["entrynr"])) { echo ""; } echo "
"; if(($exptype!="an") || ($expanded!=$tmprow["entrynr"])) { echo ""; echo ""; echo " "; } echo ""; echo get_start_tag($ev2_newsheadingstyle); echo display_encoded($tmprow["heading"]); echo get_end_tag($ev2_newsheadingstyle); echo "
"; echo ""; echo ""; if($news5displayposter && (strlen($tmprow["poster"])>0)) { echo ""; } if(!$disableprint) { echo ""; echo ""; } echo "
"; echo ""; $displaytext=stripslashes($tmprow["text"]); $displaytext = undo_htmlspecialchars($displaytext); echo $displaytext."
"; echo ""; echo get_start_tag($posterstyle); echo "$l_poster: ".do_htmlentities($tmprow["poster"]); echo get_end_tag($posterstyle); echo "
"; echo " "; echo ""; echo ""; if($noprinticon==0) { echo ""; if($printpic_small) echo "\"$l_print\""; else echo "[$l_print]"; echo "  "; } if($nogotopicon==0) echo "\"$l_gotop\""; echo "
"; } } } function get_announcements2($year,$month,$category,$act_lang,$layout,$maxannounce=0) { global $tableprefix, $servertimezone, $displaytimezone, $separatebylang, $db, $langvar; global $l_poster, $crlf, $news5dateformat, $news5displayposter, $l_announcement, $l_global_announcement; $tmpdata=""; $acttime=transposetime(time(),$servertimezone,$displaytimezone); $tmpstart=mktime(0,0,0,$month,1,$year); $month++; if($month>12) { $month=1; $year++; } $tmpstop=mktime(0,0,0,$month,1,$year); $startdate=date("Y-m-d",$tmpstart); $enddate=date("Y-m-d",$tmpstop); $tmpsql = "select * from ".$tableprefix."_announce where (expiredate>=$acttime or expiredate=0) and (firstdate<=$acttime or firstdate=0) "; $tmpsql.=" and DATE_FORMAT(date,'%Y-%m-%d')>='$startdate' and DATE_FORMAT(date,'%Y-%m-%d')<'$enddate' "; if($separatebylang==1) $tmpsql.="and lang='$act_lang' "; if($category>0) $tmpsql.= "and (category='$category' or category=0)"; else if($category==0) $tmpsql.= "and category=0"; $tmpsql.=" order by date desc"; if($maxannounce>0) $tmpsql.=" limit $maxannounce"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Unable to connect to database.".mysql_error()); if(mysql_num_rows($tmpresult)>0) { while($tmprow=mysql_fetch_array($tmpresult)) { list($mydate,$mytime)=explode(" ",$tmprow["date"]); list($year, $month, $day) = explode("-", $mydate); list($hour, $min, $sec) = explode(":",$mytime); if($month>0) { $displaytime=mktime($hour,$min,$sec,$month,$day,$year); $displaytime=transposetime($displaytime,$servertimezone,$displaytimezone); $displaydate=strftime($news5dateformat,$displaytime); } else $displaydate=""; $tmpdata.=$displaydate."\t"; if($tmprow["category"]==0) $tmpdata.=undo_htmlentities($l_global_announcement); else $tmpdata.=undo_htmlentities($l_announcement); if(strlen($tmprow["heading"])>0) { $displayheading=undo_htmlentities(stripslashes($tmprow["heading"])); $displayheading=strip_tags($displayheading); $tmpdata.=": ".$displayheading."\t"; } else $tmpdata.=" \t"; $displaytext=undo_htmlentities(stripslashes($tmprow["text"])); $displaytext=strip_tags($displaytext); $tmpdata.=$displaytext."\t"; if($news5displayposter && (strlen($tmprow["poster"])>0)) { $displayposter=undo_htmlentities(stripslashes($tmprow["poster"])); $displayposter=strip_tags($displayposter); $tmpdata.=undo_htmlentities($l_poster).": ".$displayposter; } $tmpdata.=$crlf; } } return $tmpdata; } function display_announcements3($year,$month,$category,$act_lang,$layout,$maxannounce=0) { global $tableprefix, $servertimezone, $displaytimezone, $separatebylang, $db, $langvar; global $timestampbgcolor, $timestampfont, $timestampfontsize, $timestampfontcolor, $timestampstyle; global $news5dateformat, $l_announcement, $l_global_announcement, $gannouncepic, $announcepic; global $backurl, $url_gfx, $l_showentry, $news5linktarget, $maxage; global $newsheadingfont, $newsheadingstyle, $newsheadingfontcolor, $newsheadingfontsize, $newsheadingbgcolor; global $hotnewsicons, $hotnewsmaxchars, $hotnewsdisplayposter, $hotnewsnohtmlformatting, $hn_newsheadingfontsize; global $contentbgcolor, $contentfont, $contentfontcolor, $contentfontsize; global $posterstyle, $posterfont, $posterfontsize, $posterfontcolor, $posterbgcolor; $acttime=transposetime(time(),$servertimezone,$displaytimezone); $tmpstart=mktime(0,0,0,$month,1,$year); $month++; if($month>12) { $month=1; $year++; } $tmpstop=mktime(0,0,0,$month,1,$year); $startdate=date("Y-m-d",$tmpstart); $enddate=date("Y-m-d",$tmpstop); $tmpsql = "select * from ".$tableprefix."_announce where (expiredate>=$acttime or expiredate=0) and (firstdate<=$acttime or firstdate=0) "; $tmpsql.=" and DATE_FORMAT(date,'%Y-%m-%d')>='$startdate' and DATE_FORMAT(date,'%Y-%m-%d')<'$enddate' "; if($separatebylang==1) $tmpsql.="and lang='$act_lang' "; if($maxage>0) { $actdate = date("Y-m-d H:i:s"); $tmpsql.= "and date >= date_sub('$actdate', INTERVAL $maxage DAY) "; } if($category>0) $tmpsql.= "and (category='$category' or category=0)"; else if($category==0) $tmpsql.= "and category=0"; $tmpsql.=" order by date desc"; if($maxannounce>0) $tmpsql.=" limit $maxannounce"; if(!$tmpresult = mysql_query($tmpsql, $db)) die("Unable to connect to database.".mysql_error()); if(mysql_num_rows($tmpresult)>0) { $announceavail=true; while($tmprow=mysql_fetch_array($tmpresult)) { echo ""; list($mydate,$mytime)=explode(" ",$tmprow["date"]); list($year, $month, $day) = explode("-", $mydate); list($hour, $min, $sec) = explode(":",$mytime); if($month>0) { $displaytime=mktime($hour,$min,$sec,$month,$day,$year); $displaytime=transposetime($displaytime,$servertimezone,$displaytimezone); $displaydate=strftime($news5dateformat,$displaytime); } else $displaydate=""; if($hotnewsicons==1) { echo ""; if($tmprow["headingicon"]) echo " "; echo ""; } echo ""; echo ""; if(strlen($tmprow["heading"])>0) { echo ""; } if($hotnewsmaxchars!=0) { echo ""; } if($hotnewsdisplayposter && (strlen($tmprow["poster"])>0)) { echo ""; } echo "
"; echo ""; if($tmprow["category"]==0) echo "\"$l_global_announcement\" "; else echo "\"$l_announcement\" "; echo get_start_tag($timestampstyle); echo $displaydate; echo get_end_tag($timestampstyle); echo "
"; echo ""; if($hotnewsmaxchars<1) { echo " "; } $displayheading=undo_html_ampersand($tmprow["heading"]); if($hotnewsnohtmlformatting==1) $displayheading=strip_tags($displayheading); $displayheading=do_htmlentities($displayheading); $displayheading=undo_htmlspecialchars($displayheading); if($hotnewsnohtmlformatting==0) echo get_start_tag($newsheadingstyle); echo $displayheading; if($hotnewsnohtmlformatting==0) echo get_end_tag($newsheadingstyle); if($hotnewsmaxchars<1) echo ""; echo "
"; echo ""; $displaytext=stripslashes($tmprow["text"]); $displaytext = undo_htmlspecialchars($displaytext); if(($hotnewsmaxchars>0) && strlen($displaytext)>$hotnewsmaxchars) { $displaytext=undo_htmlentities($displaytext); $displaytext=strip_tags($displaytext); $displaytext=substr($displaytext,0,$hotnewsmaxchars); $displaytext=do_htmlentities($displaytext); $displaytext.="
"; echo ""; if($hotnewsnohtmlformatting==0) echo get_start_tag($posterstyle); echo "$l_poster: ".do_htmlentities($tmprow["poster"]); if($hotnewsnohtmlformatting==0) echo get_end_tag($posterstyle); echo "
"; } } } ?>