connect('netchess','apple2','netchess_net_chess_com'); ?> Net-Chess.Com
Net-Chess.Com
Developed and administered by Greg Miller
Check the Forum for the latest news.
"; $e=""; print "
"; print ""; print "
Remember Password:$e
"; print "
"; print ""; print "
Username:"; print "
Password:"; print "$e"; print "
Register
"; print ""; print <<
Welcome to Net-Chess. This site allows people from all over the world to find an opponent and play chess through a rich web based interface. All of the games here are correspondence chess games, and have strict user selectable time controls. This way you can find an opponent who will play at the same speed you like to play at. Everything on the site is free, if you'd like to play, click the "Join" link in the upper left corner of this page. OEF; print "\n\n"; //$a->{username}="Not Logged In"; } function ShowUserGreating(){ global $db; global $username; $q=$db->query("select * from users where username='$username'"); $user=$db->fetch_row_hash($q); print "Welcome back $username"; print "(".$user['rating']; if($user['gamesplayed']<20){ print " provisional)"; } else { print " established)"; } print ".
"; print "Your record is ".$user['gameswon']."/".$user['gameslost']."/".$user['gamesdrawn']." (w/l/d)."; print "

"; $q=$db->query("select * from tdmessages where username='$username'"); while($message=$db->fetch_row_hash($q)){ print "
"; print "A message from the Site Administrator:
"; print $message{message}; print "
Acknowledge Message
"; print "

"; } print "It's your move in the following games:"; $sql="select id,board,white,black,whitetimeremaining-(".time()."-lastmovedate) as timeleft,whitenotepad as notepad from games where (white='$username' and toplay='white') and gameover=''"; $sql.=" union "; $sql.="select id,board,white,black,blacktimeremaining-(".time()."-lastmovedate) as timeleft,blacknotepad as notepad from games where (black='$username' and toplay='black') and gameover=''"; $sql.=" order by timeleft limit 10;"; $q=$db->query($sql); $totalgames=0; print "

\n"; if($db->num_rows($q)>0){ print ""; print ""; print ""; print ""; print ""; print ""; print ""; } while($g=$db->fetch_row_hash($q)){ $totalgames++; if($totalgames==10){ print ""; last; } else { $mygames[]=$g['id']; print ""; print ""; print ""; print ""; print ""; print "\n"; } } print "
Game IDWhiteBlackTime RemainingNotes
MORE...
".$g['id']."".$g['white']."".$g['black'].""; print Games::parsetime($g['timeleft']); print "".$g['notepad']."
\n"; if($db->num_rows($q)<=0){ print "It's not your move in any games
"; print "Click HERE to get some games started!
"; } else { print "
"; print ""; print "
\n"; } ?>

Games you're following. Show games as a Diagram query("select * from followedgames where username='$username'"); if($db->num_rows($q)>0){ ?>

"; } else { print "You're not following any games. Click here for more information."; } $q=$db->query("select * from recentgames where user='$username' order by enddate desc limit 20;"); if($db->num_rows($q)>0){ ?> (click here to find some random high rated games):

Your recently completed games: (dismiss all)

Del Game ID White Black # Last Move Comment Result
fetch_row_hash($q)){ $temp=$row['score']; if($temp==2){$temp="1/2-1/2";} print ""; print ""; print ""; print ""; print ""; $time=localtime($row['enddate'],1); $time['tm_year']+=1900; $time['tm_mon']++; print ""; print ""; print "\n"; print "\n"; } if($db->num_rows($q)){print "
Del Game ID White Black End Date Result Score
X".$row['id']."".$row['white']."".$row['black']."".sprintf("%02d/%02d",$time['tm_mon'],$time['tm_mday'])."".$row['gameover']."".$temp."

";} } function ShowAnnouncements(){ $db=new db; $db->connect_default(); print "
"; print "
\n"; $query="select * from phpbb_topics where forum_id=2 order by topic_time desc limit 5;"; $q=$db->query($query); while($row=$db->fetch_row_hash($q)){ print ""; print "\n"; } $q=$db->query("select post_time,username from phpbb_posts a,phpbb_users b where b.user_id=a.poster_id order by post_time desc limit 1;"); $row=$db->fetch_row_hash($q); print "\n"; print "
Announcements
".$row["topic_title"]."".date("m/d/Y",$row["topic_time"])."
Last Forum Post: "; print date("m/d/Y h:ia",$row["post_time"])." by ".$row['username']."
"; } function ShowFollowedGames($query){ global $db; $q=$db->query($query); $count=0; $FollowedGamesData=""; while($row=$db->fetch_row_hash($q)){ $time=localtime($row['lastmovedate'],1); $time['tm_year']+=1900; $time['tm_mon']++; print ""; print "X"; print "".$row['id'].""; $whitedays=$row['whitetimeremaining']; $blackdays=$row['blacktimeremaining']; if($row['toplay']=='white'){ $whitedays-=time()-$row['lastmovedate']; } else { $blackdays-=time()-$row['lastmovedate']; } $whitedays=floor($whitedays/(60*60*24)); $blackdays=floor($blackdays/(60*60*24)); if($row['toplay']=='white'){ print "".$row['white']." ($whitedays)"; } else { print "".$row['white']." ($whitedays)"; } if($row['toplay']=='black'){ print "".$row['black']." ($blackdays)"; } else { print "".$row['black']." ($blackdays)"; } print "".$row['movenumber'].""; print "".sprintf("%02d/%02d",$time['tm_mon'],$time['tm_mday']).""; print " ".$row['comment'].""; if($row['gameover'] != ""){ print " ".$row['gameover'].""; } else { print "In Play"; } print "\n"; $count++; $FollowedGamesData.="\n"; } print "

$FollowedGamesData"; return $count; } function ShowTopLadderStats(){ global $db; print "
"; print "

Standard Ladder:


"; $q=$db->query("select * from ladder order by rank"); while($row=$db->fetch_row_hash($q)){ print $row['rank'].". ".$row['username']."
"; } print "

"; print "

Pyramid Ladder:


"; $q=$db->query("select * from pyrladder order by rank"); while($row=$db->fetch_row_hash($q)){ print $row['rank'].". ".$row['username']."
"; } print "
"; } function ShowTopFollowedGames(){ global $db; print "
"; print "

Top Followed

:
"; $q=$db->query("select gameid,board,count(*) as c from followedgames a, games b where a.gameid=b.id group by gameid,b.board order by c desc limit 20;"); while($row=$db->fetch_row_hash($q)){ print $row['c'].". "; print "".$row['gameid']."
"; } print "
"; } function ShowTournamentList(){ print "
"; print "

Tournament

:
"; print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "
2020idontcastle
2019rosenmud
2018dfourandwin
2017rosenmud
2016cnita
2015ramawolf
2014tkletov
2013alt
2012davidswhite
munbehend
2011davidswhite
2010davidswhite
2009davidswhite
2008davidswhite
2007dfourandwin
2006davidswhite
2004sumdeus
2003sumdeus
2000fbraun
"; } ?>