function check_for_lastpost_popup() {
#----------------->Einstellungen<---------------#
$tage = 3; // nach wievielen Tagen ohne Post soll das Popup erscheinen?
$recht = -1; // ab welchem Recht? Mögliche Werte: 0 (Gast) bis -9 (Admin)
$txt = 'BLA BLA BLA'; // Popup Nachricht
#-----------------------------------------------#
$erg = db_query("SELECT `time` FROM prefix_posts WHERE erstid = '".$_SESSION['authid']."' ORDER BY `time` DESC LIMIT 0,1");
$lastpost = @db_result($erg,0);
$dif = time() - $lastpost;
$sek = $tage * 24 * 3600;
if ( $dif > $sek AND $_SESSION['authright'] <= $recht AND !isset($_SESSION['seen_lastpost_popup']) ) {
$x = <<< html
<script language="JavaScript" type="text/javascript"><!--
function closeLastPostdivID () { document.getElementById("LastPostdivID").style.display = "none"; }
//--></script>
<div id="LastPostdivID" style="position:absolute; top:200px; left:550px; display:inline; width:200px;">
<table width="100%" class="border" border="0" cellspacing="1" cellpadding="4">
<tr>
<td class="Cdark" align="left">
<a href="javascript:closeLastPostdivID()"><img style="float:right; border: 0" src="include/images/icons/del.gif" alt="schliessen" title="schliessen"></a>
$txt
</td>
</tr>
</table>
</div>
html;
$_SESSION['seen_lastpost_popup'] = 1;
return($x);
}
}