0 ) $localdate = $localdate." (GMT+".$GTP_GMT.")"; elseif ($GTP_GMT<0) $localdate = $localdate." (GMT".$GTP_GMT.")"; else $localdate = $localdate." (GMT)"; } set_locals(); function gmtfromdb($timestamp,$hours = 0) { return gmmktime ( substr($timestamp,8,2), substr($timestamp,10,2), substr($timestamp,12,2), substr($timestamp,4,2), substr($timestamp,6,2), substr($timestamp,0,4)) +3600*$hours; } function timefromdb($timestamp,$hours= 0,$res=0) { $fmt = "%d.%m.%y %H:%M:%S"; $gmt= gmtfromdb($timestamp,$hours); return gmstrftime(substr($fmt,0,8+3*$res),$gmt); } mysql_connect("217.13.199.12" ,"saager.org","bicc774"); mysql_select_db("DB4378"); ?> "; echo "Von ".$message[3]." am ".$message[2].":"; if ($delete) echo"Löschen"; echo "

".$message[1]."

"; } function delete_messages($GMS_ID) { $deleted = 0; $failed = 0; for (reset($GMS_ID); current($GMS_ID); next($GMS_ID) ) { if (current($GMS_ID)!="d") continue; mysql_query("delete from golf_message where gms_id=".key($GMS_ID)); if (mysql_affected_rows() >0 ) $deleted++; else $failed++; } return $deleted." Nachricht(en) gelöscht. (".$failed." Fehler)
"; } function post_message($from, $to, $text) { mysql_query("insert into golf_message (gtp_id,gms_text,gms_gtp_id) " ."values(".$from.",'".addslashes ($text)."',".$to.")"); return (mysql_affected_rows() >0 ); } function warn_score($from, $score) { $refers =mysql_fetch_row(mysql_query("select grd_nr,gev_name,golf_tour.gtp_id, gen.gtp_id, usr.gtp_name from golf_tipper usr, golf_entered gen natural join golf_result natural join golf_round natural join golf_event natural join golf_tour where usr.gtp_id = gen.gtp_id and grs_id=".$score)); post_message($refers[2], $refers[3],"Deine Scorecard der ".$refers[0].". Runde bei ".$refers[1]." wurde angefochten! Evtl. ist sie noch korrigierbar und es muss kein Penalty vergeben werden."); if ( post_message($from, $refers[2],"ANFECHTUNG: ".$refers[0].". / ".$refers[1]." @ ".$refers[4]."!") ) mysql_query("update golf_score set gsc_warn=1 where grs_id=".$score); } ?> "; } ?> Tippomat® - Generation Golf <? if ($page) { echo " - ".$page;} // ?>