game_day/arrow.php0000664000076400007640000000242610411127057014741 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: arrow.php,v 1.2 2005/07/20 03:17:00 ganzhorn Exp $ */ header("Content-type: image/png"); include("./graphics.php"); function def($var,$def) { if( null== $var ) { return $def; } else { return $var; } } $y = def($_GET['h'],16); $x = def($_GET['w'],$y/1.2); $color = def($_GET['color'],"000000"); $r = def($_GET['r'],0); $g = def($_GET['g'],0); $b = def($_GET['b'],0); $dir = def($_GET['d'],"l"); $img = d_arrow($x,$y,$dir,$r,$g,$b); imagepng($img); imagedestroy($img); ?> game_day/chat_definition.php0000664000076400007640000000225010411127057016731 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: chat_definition.php,v 1.3 2005/07/20 03:29:06 ganzhorn Exp $ */ require('../chat/chat.php'); class GameDayChat extends Chat { function MChat($channel="default") { parent::Chat($channel); } // reimplimented db login function user() { return USER; } function password() { return PASSWD; } function database() { return CHAT_DATABASE; } }; ?> game_day/chat_message.php0000664000076400007640000000256110411127057016232 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: chat_message.php,v 1.4 2005/07/20 03:29:06 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); require("./chat_definition.php"); if( !$user_api->is_active() ) { error_text("Cannot post without being logged in!"); } else if( null == $_POST['channel'] ) { error_text("Internal error."); } else { $channel = $_POST['channel']; $chat = new GameDayChat($channel); $chat->message($user_api->name(),$_POST['message']); if( null == $_POST['load_uri'] ) { $uri = HOME_URI; } else { $uri = $_POST['load_uri']; } header("Location: $uri"); } ?>game_day/config.template.php0000664000076400007640000000221110275016330016655 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: config.template.php,v 1.1 2005/08/06 02:13:44 ganzhorn Exp $ */ // Database access variables define(USER,"sql user name"); define(PASSWD,"sql password"); define(GAME_DATABASE,"sql database"); // Chat configuration define(CHAT_DATABASE,"chat database"); // Change this to the root url directory of your project define(HOME_URI,"home uri"); ?> game_day/corner.php0000664000076400007640000000234410411127057015076 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: corner.php,v 1.4 2005/07/20 03:17:00 ganzhorn Exp $ */ header("Content-type: image/png"); include("./graphics.php"); include("./util.php"); $y = def($_GET['h'],16); $x = def($_GET['w'],16); $color = def($_GET['color'],"000000"); $r = def($_GET['r'],0); $g = def($_GET['g'],0); $b = def($_GET['b'],0); $f = def($_GET['f'],1); $dir = def($_GET['d'],"ul"); $img = d_corner($x,$y,$dir,$r,$g,$b,$f); imagepng($img); imagedestroy($img); ?> game_day/db.php0000664000076400007640000002224210411127057014172 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: db.php,v 1.19 2005/08/06 02:09:55 ganzhorn Exp $ */ require_once("./config.php"); require("./session.php"); require("./util.php"); // // "norf" -> noon or five // if( $db_loaded ) { return; } $db_loaded=1; $gd_connection=0; $user_api = new UserAPI(); // User API class UserAPI { function name() { if( UserAPI::is_active() ) { return $_SESSION['ActiveUser']; } else { return null; } } function email() { if( UserAPI::is_active() ) { return get_user_email($this->name()); } else { return null; } } function is_active() { return (null != $_SESSION['ActiveUser'] ); } function is_admin() { if( !UserAPI::is_active() ) { return 0; } gd_db_open(); $user = $_SESSION['ActiveUser']; $query=sprintf("SELECT is_admin FROM users WHERE name='%s'", mysql_real_escape_string($user)); $result = mysql_query($query); if( $result && mysql_numrows($result) ) { return mysql_result($result,0,"is_admin"); } return 0; } function logout() { unset($_SESSION['ActiveUser']); } function login($email,$pass) { gd_db_open(); $email=trim($email); $pass=trim($pass); $query=sprintf("SELECT name FROM users WHERE email='%s' && password='%s'", mysql_real_escape_string($email), mysql_real_escape_string($pass)); $result = mysql_query($query); if( $result && mysql_numrows($result) ) { $_SESSION['ActiveUser'] = mysql_result($result,0,"name"); return 1; } else { return 0; } } }; function field_exists($table,$field,$value) { gd_db_open(); $field = mysql_real_escape_string($field); $table = mysql_real_escape_string($table); $value = mysql_real_escape_string($value); $query = "SELECT COUNT($field) FROM $table WHERE $field='$value'"; $result = mysql_query($query); if( NULL == $result ) { $num = 0; } else { $num = mysql_result($result,0); } return $num; } function get_user_email($user) { global $user_api; if( !$user_api->is_active() ) { die("Must be logged in to call this fn."); } gd_db_open(); $query = "SELECT email FROM users WHERE name='$user'"; $result = mysql_query($query); if( $result ) { return mysql_result($result,0,"email"); } return null; } function get_all_email_addrs() { global $user_api; if( !$user_api->is_active() ) { die("Must be logged in to call this fn."); } $email_pattern = '/^[A-Z0-9._-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i'; gd_db_open(); $query = "SELECT email FROM users"; $result = mysql_query($query); while( $row = mysql_fetch_object($result) ) { if( preg_match($email_pattern,$row->email) ) { $addrs[] = $row->email; } } return $addrs; } function get_locations() { gd_db_open(); $query = "SELECT * FROM locations"; $result = mysql_query($query); $stop = mysql_numrows($result); $i = 0; $return; while( $i < $stop ) { $name = mysql_result($result,$i,"name"); $return[$name] = array("street"=>mysql_result($result,$i,"street"), "zip"=>mysql_result($result,$i,"zip")); ++$i; } return $return; } function add_user($user,$email,$password) { gd_db_open(); $user=mysql_real_escape_string(trim($user)); $email=mysql_real_escape_string(trim($email)); $password=mysql_real_escape_string(trim($password)); $query = "INSERT INTO users (name,email,password) VALUES " . "('$user','$email','$password')"; $result = mysql_query($query); $error = 0; if( !$result ) { error_text(mysql_error()); $error = 1; } return !$error; } function gd_db_open() { $gd_connection = mysql_connect(localhost,USER,PASSWD); mysql_select_db(GAME_DATABASE) or die( "Unable to select database" ); } function game_exists($court,$day,$norf="noon") { $court_id = location_to_id($court); $day = mysql_real_escape_string($day); $norf = mysql_real_escape_string($norf); $court = mysql_real_escape_string($court); $query = "SELECT name FROM games_$norf WHERE day='$day' AND location='$court'"; $result = mysql_result($query); if( !$result ) { db_error(); } return mysql_numrows($result); } function opt_in($time,$user,$norf="noon") { $user_id = user_to_id($user); $day_id = time_to_day($time); $query = "DELETE FROM game_off_$norf WHERE date='$day_id' AND user='$user_id'"; $result = mysql_query($query); if( !$result ) { db_error(); } } function opt_out($time,$user,$norf="noon") { remove_player($time,$user,$norf); $user_id = user_to_id($user); $day_id = time_to_day($time); $query = "SELECT COUNT(user) FROM game_off_$norf WHERE user='$user_id' AND date='$day_id'"; $result = mysql_query($query); $num = mysql_result($result,0); if( !$num ) { $query = "INSERT INTO game_off_$norf (date,user) VALUES ('$day_id','$user_id')"; $result = mysql_query($query); if( !$result ) { db_error(); } } } function remove_player($day,$user,$norf="noon") { $user_id = user_to_id($user); $day_id = time_to_day($day); $query = "DELETE FROM games_$norf WHERE name='$user_id' AND day='$day_id'"; $result = mysql_query($query); if( !$result ) { db_error(); } } function play($user,$court,$day,$norf="noon") { opt_in($day,$user,$norf); $user_id = user_to_id($user); $loc_id = location_to_id($court); $day_id = time_to_day($day); // remove player from other courts remove_player($day,$user,$norf); // add player to new court $query = "INSERT INTO games_$norf (day,location,name) VALUES " . "('$day_id','$loc_id','$user_id')"; $result = mysql_query($query); if( !$result ) { db_error(); } } function time_to_day($day) { return date("Y-m-d",$day); } function get_players($court,$day,$norf="noon") { gd_db_open(); $day = time_to_day($day); if( "out" == $court ) { $query="SELECT user FROM game_off_$norf WHERE date='$day'"; $field = "user"; } else { $loc_id = location_to_id($court); $query="SELECT name FROM games_$norf WHERE day='$day' AND location='$loc_id'"; $field = "name"; } $result = mysql_query($query); if( !$result ) { db_error($query); } $return; $stop = mysql_numrows($result); $i = 0; while( $i < $stop ) { $return[] = id_to_user(mysql_result($result,$i,$field)); ++$i; } return $return; } function string_to_id($table,$name) { gd_db_open(); $table = mysql_real_escape_string($table); $name = mysql_real_escape_string($name); $query = "SELECT id FROM $table WHERE name='$name'"; $result = mysql_query($query); if( !$result ) { die(mysql_error()); } if( !mysql_numrows($result) ) { error_text("No id for '$name' in '$table'"); die(); } return mysql_result($result,0); } function id_to_string($table,$id) { gd_db_open(); $query = "SELECT name FROM $table WHERE id='$id'"; $result = mysql_query($query); if( !$result ) { die(mysql_error()); } return mysql_result($result,0,"name"); } function location_to_id($loc_name) { return string_to_id("locations",$loc_name); } function id_to_location($id) { return id_to_string("location",$id); } function user_to_id($user) { return string_to_id("users",$user); } function id_to_user($id) { return id_to_string("users",$id); } function db_error($msg) { die("Database error: " . mysql_error()."\n".$msg); } function email_password($email) { gd_db_open(); $query=sprintf("SELECT password FROM users WHERE email='%s'", mysql_escape_string($email)); $result = mysql_query($query); if( !$result ) { db_error(); } $password = mysql_result($result,0); $subject = "Game Day - Password"; $body = "Password: " . $password; $body .= "\nhttp://rtphoops.com\n"; mail($email,$subject,$body,'From: eyekode@yahoo.com'); } function delete_user($email) { $email = mysql_real_escape_string($email); $query = "SELECT id FROM users WHERE email='$email'"; $result = mysql_query($query); $id = mysql_result($result,0); $query = "DELETE FROM games_noon WHERE name='$id'"; mysql_query($query); $query = "DELETE FROM games_five WHERE name='$id'"; mysql_query($query); $query = "DELETE FROM game_off_noon WHERE user='$id'"; mysql_query($query); $query = "DELETE FROM game_off_five WHERE user='$id'"; mysql_query($query); $query = "DELETE FROM users WHERE id='$id'"; mysql_query($query); } if( 0 ) { if( $_GET['adders'] == "secret" ) { echo ''; $all_emails = get_all_email_addrs(); $i = 0; foreach($all_emails as $email) { echo "$i\t$email
"; ++$i; } echo ''; } } ?> game_day/delete_user.php0000664000076400007640000000224610411127057016107 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: delete_user.php,v 1.4 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); if( $user_api->login($_POST['email'],$_POST['password']) ) { delete_user($_POST['email']); $user_api->logout(); header("Location: ".HOME_URI); } else { require("./header.php"); error_text("Email or Password incorrect"); require("./footer.php"); } ?> game_day/display.php0000664000076400007640000000377210411127057015261 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: display.php,v 1.3 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require_once("./db.php"); function display_login($uri) { global $user_api; $uri=urlencode($uri); echo '

'; if( $user_api->is_active() ) { echo 'User: '.$user_api->name().'

'. '
'. ''. ''. '
'; } else { echo 'Login

'. '
'. 'Email:

'. 'Password:

'. ''. ''. '
'; } } function display_email($action,$method="get") { echo '
'. '

Subject:

'. ''. '
'. ''; } function play_url($loc,$time,$norf="noon") { return HOME_URI."/play?location=$loc&time=$time&norf=$norf"; } ?>game_day/email.php0000664000076400007640000000707010411127057014676 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: email.php,v 1.8 2005/09/23 02:27:32 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); function display_roster() { echo '
'; echo '

Roster

'; echo '
'. ''. '
'. '
'. ''. '
'; echo '
'; } if( !$user_api->is_active() ) { require("./display.php"); require("./header.php"); echo '
'; display_login($_SERVER['REQUEST_URI']); echo "
"; require("./footer.php"); } else { if( $_POST['send'] ) { if( !$_POST['subject'] ) { error_text("Could not send email.
Missing subject."); } else if( !$_POST['message'] ) { error_text("Could not send email.
Missing body."); } else { $addrs = get_all_email_addrs(); $i = 0; $to = ""; $stop = count($addrs); while( $i < $stop ) { $to .= $addrs[$i]; ++$i; if( $i < $stop ) { $to .= ","; } } $message = stripslashes($_POST['message']); $from = 'From: '.$user_api->name().' <'.$user_api->email().'>'; mail($to,$_POST['subject'],$message,$from); header("Location: ".HOME_URI); } } else { require("./display.php"); require("./header.php"); require("./graphics.php"); display_roster(); echo '
'; $frame = new RoundedFrame(8,"#aaaaaa","#ffffff"); echo '
'; $frame->top(); $norf = def($_GET['norf'],"noon"); echo '
'. '
'. ''. '
Subject:
Message:'. '
'. ''. '
'; $frame->bottom(); echo '
'; $frame->top(); echo '
'; echo '

Emails sent through this interface are broadcast to all users.

'; echo '
'; $frame->bottom(); echo '
'; echo '
'; require("./footer.php"); } } ?>game_day/footer.php0000664000076400007640000000201210411127057015074 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: footer.php,v 1.5 2005/07/20 03:17:00 ganzhorn Exp $ */ ?>
game_day/forgot_password.php0000664000076400007640000000232510411127057017027 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: forgot_password.php,v 1.4 2005/07/20 03:17:00 ganzhorn Exp $ */ require("./db.php"); require("./header.php"); $to = $_POST['email']; if( NULL == $to ) { error_text("Please specify email!"); } else if( !field_exists("users","email",$to) ) { error_text("'$to' is not a registered email address."); } else { email_password($to); echo "Your password has been sent to '$to'"; } ?> game_day/game_off.php0000664000076400007640000000214410411127057015347 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: game_off.php,v 1.5 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); $user = $_SESSION['ActiveUser']; $time = $_GET['time']; $norf = $_GET['norf']; if(NULL!=$user) { opt_out($time,$user,$norf); remove_player($time,$user,$norf); } header("Location: ".HOME_URI); ?> game_day/graphics.php0000664000076400007640000001526610411127057015415 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: graphics.php,v 1.7 2005/07/20 03:17:00 ganzhorn Exp $ */ class Color { var $m_r; var $m_g; var $m_b; var $m_name; function Color($name="#000000") { // echo "constructor name: $name"; if( '#' == $name[0] && 7 == strlen($name) ) { $this->m_r = hexdec($name[1].$name[2]); $this->m_g = hexdec($name[3].$name[4]); $this->m_b = hexdec($name[5].$name[6]); $this->m_name = $name; } else { die("could not convert color: $name to rgb"); } } function r() { return $this->m_r; } function g() { return $this->m_g; } function b() { return $this->m_b; } function name() { // die("name: ".$this->r()." l $m_name"); return $this->m_name; } }; class RoundedFrame { var $m_bg; var $m_fg; var $m_rgb_string; var $m_size; var $m_fill_arc=1; function RoundedFrame($size=5,$fg="#000000",$bg="#ffffff") { $this->m_bg = new Color($bg); $this->m_fg = new Color($fg); $this->m_size=$size; $this->m_rgb_string = "r=".$this->m_fg->r(). "&g=".$this->m_fg->g(). "&b=".$this->m_fg->b(); } function top() { echo '' . ''. $this->_corner_td() . $this->_img_src("ul").'' . ''. $this->_corner_td() . $this->_img_src("ur").'' . ''. ''. ''. $this->_corner_td().$this->_img_src("ll").''. ''. $this->_corner_td().$this->_img_src("lr").''. ''. '
'; } function bottom() { echo '
'; } function fill_arc($state) { $this->m_fill_arc=$state; } function _corner_td() { return ''; } function _img_src($dir) { return ''; } }; class DivFrame extends RoundedFrame { var $m_bg; var $m_fg; var $m_rgb_string; var $m_size; var $m_fill_arc=1; function DivFrame($size=5,$fg="#000000",$bg="#ffffff") { RoundedFrame::RoundedFrame($size,$fg,$bg); } function top() { // row 0 $this->_corner("ul"); $this->_div_width($this->m_fg,"100%"); echo ''; $this->_corner("ur"); echo '
'; // row 1 $this->_div($this->m_fg); echo ''; $this->_div_width($this->m_fg,"100%"); } function bottom() { // end of row 1 echo ''; $this->_div($this->m_fg); echo ''; // row 2 $this->_corner("ll"); $this->_div_width($this->m_fg,"100%"); echo ''; $this->_corner("lr"); } function _div($c) { echo '
'; } function _div_width($c,$width) { echo '
name().';">'; } function _corner($dir) { $this->_div($this->m_bg); echo $this->_img_src($dir); echo '
'; } }; // bg must be 0 0 0 function set_alpha_by_color($img,$bg,$width,$height,$r,$g,$b) { for( $x = 0; $x < $width; ++$x ) { for( $y = 0; $y < $height; ++$y ) { $rgb = imagecolorat($img,$x,$y); $or = ($rgb >> 16) & 0xff; $og = ($rgb >> 8) & 0xff; $ob = $rgb & 0xff; $ar = 127 - (int)((float)($r - $or)/$r); $ag = 127 - (int)((float)($g - $og)/$g); $ab = 127 - (int)((float)($b - $ob)/$b); imagesetpixel($img,$x,$y,imagecolorallocatealpha($img,$or,$og,$ob,$ar)); } } } function d_corner($width,$height,$direction,$r,$g,$b) { $img = d_corner_na($width*2,$height*2,$direction,$r,$g,$b); $final = imagecreatetruecolor($width,$height); $tp = imagecolorallocate($img,255,255,255); imagecolortransparent($final,$tp); imagecopyresampled($final,$img,0,0,0,0,$width,$height,$width*2,$height*2); imagedestroy($img); // set_alpha_by_color($final,$tp,$width,$height,$r,$g,$b); return $final; } function d_corner_na($width,$height,$direction,$r,$g,$b,$fill_arc=1) { $img = imagecreatetruecolor($width,$height); $tp = imagecolorallocate($img,255,255,255); imagecolortransparent($img,$tp); imagefill($img,0,0,$tp); $fg = imagecolorallocate($img,$r,$g,$b); $width--; $height--; if( "ul" == $direction ) { $cx = $width; $cy = $height; $s = 180; $e = 270; } elseif( "ur" == $direction ) { $cx = 0; $cy = $height; $s = 270; $e = 360; } elseif( "ll" == $direction ) { $cx = $width; $cy = 0; $s = 90; $e = 180; } elseif( "lr" == $direction ) { $cx = 0; $cy = 0; $s = 0; $e = 90; } // imagearc($img,$cx,$cy,$width*2,$height*2,$s,$e,$fg); if( $fill_arc ) { imagefilledarc($img,$cx,$cy,$width*2,$height*2,$s,$e,$fg,IMG_ARC_PIE); } else { imagearc($img,$cx,$cy,$width*2,$height*2,$s,$e,$fg); } //imagefilledarc($img,150,150,10,10,90,180,$fg,IMG_ARC_PIE); // echo "$cx $cy $width $height $s $e"; return $img; } function d_arrow($width,$height,$direction,$r,$g,$b) { $img = imagecreate($width,$height); $transparent = imagecolorallocate($img,255,255,255); imagecolortransparent($img,$transparent); $fg = imagecolorallocate($img,$r,$g,$b); if( "r" == $direction ) { $polygon = array( 0,0, 0,$height, $width,$height/2, 0,0); } elseif( "l" == $direction ) { $polygon = array( $width,0, $width,$height, 0,$height/2, $width,0); } elseif( "u" == $direction ) { $polygon = array( 0,$height, $width,$height, $width/2,0, 0,$height ); } else { $polygon = array( 0,0, $width,0, $width/2,$height, 0,0 ); } imagefilledpolygon($img,$polygon,4,$fg); return $img; } ?>game_day/header.php0000664000076400007640000000344510411127057015041 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: header.php,v 1.15 2005/09/23 02:27:32 ganzhorn Exp $ */ require_once("./config.php"); require("./session.php"); ?> Game Day
game_day/index.php0000664000076400007640000001374710411127057014726 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: index.php,v 1.20 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require('./db.php'); require('./header.php'); require('./map.php'); require('./chat_definition.php'); require('./graphics.php'); require('./display.php'); echo ''; echo "\n"; echo ''; echo "\n"; $top=$right=1; $locations = get_locations(); if( NULL != $_GET['norf'] ) { $_SESSION['norf'] = $norf = $_GET['norf']; } else { $norf = def($_SESSION['norf'],"noon"); } function move_court_button($loc,$time,$user,$dir) { global $norf; echo '
' . ''. ''. ''. ''. '
'; } function play_button($loc,$time) { global $norf; echo '
' . '' . '' . ''. '
'; } function dont_play_button($time) { global $norf; echo '
'. '' . ''. '
'; } function display_day($d) { global $locations; global $user_api; global $norf; $time = time()+$d*24*3600; $day = date("D",$time); if( "Sat" != $day && "Sun" != $day ) { if( 0 == $d ) { $color = "lightblue"; } else { $color = "#aaffaa"; } $text = $day . " - " . date("m/d",$time) . " ($norf)"; echo "
" . $text; echo ""; $column = 0; $others = array( "Synopsys" => "McAdams", "McAdams" => "Synopsys" ); $admin = $user_api->is_admin(); foreach( array_keys($locations) as $key ) { $other_loc = $others[$key]; $players = get_players($key,$time,$norf); $n_players = count($players); if( $n_players ) { $loc_title = "$key ($n_players)"; } else { $loc_title = $key; } echo ""; } // opt out column echo "

$loc_title

"; if( $players ) { echo ''; foreach( $players as $player ) { echo ""; if( $admin && $column == 1 ) { echo ''; } echo ""; if( $admin && $column == 0 ) { echo ''; } echo ""; } echo '
'; move_court_button($other_loc,$time,$player,"l"); echo '$player'; move_court_button($other_loc,$time,$player,"r"); echo '
'; } ++$column; if( $user_api->is_active() ) { play_button($key,$time); } echo "

Can't Play

"; $players = get_players("out",$time,$norf); if( $players ) { echo ''; foreach( $players as $player) { echo ""; } echo '
$player
'; } if( $user_api->is_active() ) { dont_play_button($time); } echo '
'; // end of single row 3 column table for locations echo '
'; // end of day div } } function users() { foreach(array(one,two) as $value) { echo "$value
"; } return; } ?>
top(); echo "Chat Log (".date("m/d")."-$norf):"; echo '
'; chat_display_html($chat,0); echo '
'; if( $user_api->is_active() ) { echo '
'; echo '
'. ''. ''. ''. ''. ''. '
'; echo '
'; } $bgf->bottom(); display_day(0); display_day(1); display_day(2); display_day(3); display_day(4); display_day(5); display_day(6); ?>

Locations

$key

"; } ?>
game_day/insert_user.php0000664000076400007640000000366510411127057016157 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: insert_user.php,v 1.4 2005/07/20 03:17:00 ganzhorn Exp $ */ require("./db.php"); require("./header.php"); require("./util.php"); function validate_user($user) { if( NULL == $user ) { error_text("User Name required."); return 0; } if( field_exists("users","name",$user) ) { error_text("user name \"$user\" already exists!"); return 0; } return 1; } function validate_email($email) { if( NULL == $email ) { error_text("Email field required"); return 0; } if( field_exists("users","email",$email) ) { error_text("Email \"$email\" is in use by another user."); return 0; } return 1; } function validate_password_pair($p1,$p2) { if( NULL == $p1 || NULL == $p2 ) { error_text("Password cannot be empty"); return 0; } if( $p1 != $p2 ) { error_text("Passwords do not match"); return 0; } return 1; } if( validate_user($_POST['user']) && validate_email($_POST['email']) && validate_password_pair($_POST['password'],$_POST['confirm_password']) ) { add_user($_POST['user'],$_POST['email'],$_POST['password']); echo 'Player added!'; } ?> game_day/install.php0000664000076400007640000000343410314664024015257 0ustar ganzhornganzhorn"; } // create game_day db if needed if( !mysql_select_db(GAME_DATABASE) ) { echo "Creating game database..."; echo "\tdone.
"; } // create tables $tables['game_off_five'] = "CREATE TABLE IF NOT EXISTS `%s` ( `date` date NOT NULL default '0000-00-00', `user` int(11) NOT NULL default '0', KEY `date` (`date`) ) TYPE=MyISAM;"; $tables['game_off_noon'] = $tables['game_off_five']; $tables['games_five'] = "CREATE TABLE IF NOT EXISTS `%s` ( `day` date NOT NULL default '0000-00-00', `location` int(11) NOT NULL default '0', `name` int(11) NOT NULL default '0' ) TYPE=MyISAM;"; $tables['games_noon'] = $tables['games_five']; $tables['locations'] = "CREATE TABLE IF NOT EXISTS `%s` ( `name` varchar(80) NOT NULL default '', `street` varchar(80) NOT NULL default '', `zip` varchar(5) NOT NULL default '0', `id` int(11) NOT NULL auto_increment, KEY `id` (`id`) ) TYPE=MyISAM AUTO_INCREMENT=27714 ;"; $tables['users'] = "CREATE TABLE IF NOT EXISTS `%s` ( `name` varchar(80) NOT NULL default '', `email` varchar(80) NOT NULL default '', `password` varchar(64) NOT NULL default '', `id` int(11) NOT NULL auto_increment, `is_admin` tinyint(4) NOT NULL default '0', KEY `id` (`id`) ) TYPE=MyISAM AUTO_INCREMENT=68 ;"; foreach( array_keys($tables) as $table ) { echo "Creating table $table..."; mysql_query(sprintf($tables[$table],$table)) or die("Failed to create $table!:".mysql_error()); echo "\tdone.
"; } echo "
Database install complete."; ?> game_day/login_form.php0000664000076400007640000000176210411127057015744 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: login_form.php,v 1.3 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require("./header.php"); require("./display.php"); display_login(HOME_URI); require("./footer.php"); ?> game_day/login.php0000664000076400007640000000225210411127057014714 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: login.php,v 1.10 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); require("./util.php"); if( $user_api->login($_POST['email'],$_POST['password']) ) { header("Location: ".urldecode(def($_POST['uri'],HOME_URI))); } else { require("./util.php"); require("./header.php"); error_text("Login Failed."); require("./footer.php"); } ?> game_day/logout.php0000664000076400007640000000200110411127057015105 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: logout.php,v 1.7 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); // session must be loaded for "logout" to work. $user_api->logout(); header("Location: ".HOME_URI); ?>game_day/map.php0000664000076400007640000000173210411127057014363 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: map.php,v 1.3 2005/07/20 03:17:00 ganzhorn Exp $ */ function map_uri($street,$zip) { return "http://maps.google.com/maps?q=".urlencode($street).",".$zip."&hl=en"; } ?>game_day/players.php0000664000076400007640000000446710411127057015275 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: players.php,v 1.8 2005/07/20 03:17:00 ganzhorn Exp $ */ require("./header.php"); ?>

Sign up


Name shown to other users

User Name:
Email:
Password:
Confirm:

Forgotten Password?


Email:

quit sending me email!

Delete User

Email:
Password:
game_day/play.php0000664000076400007640000000414710411127057014556 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: play.php,v 1.6 2005/07/20 03:17:00 ganzhorn Exp $ */ require_once("./config.php"); require("./db.php"); function validate_time($time) { // cannot be before today and cannot be more than 8 days in advance $c_time = time(); if( $time < $c_time ) { if( ($c_time - $time) > (24*3600) ) { error_text("Cannot play in passed games."); return 0; } } else if( $time > $c_time+(8*24*3600) ) { error_text("Cannot play in a game more than a week in advance!"); return 0; } return 1; } function validate_location($loc) { if( !field_exists("locations","name",$loc) ) { error_text("Location \"$loc\" does not exist."); return 0; } return 1; } function validate_norf($norf) { if( "noon" != $norf && "five" != $norf ) { error_text('Bad game time, should be "noon" or "five": '.$norf); return 0; } return 1; } if( !$user_api->is_active() ) { error_text("Cannot play without logging in!\n"); } else { $court=$_GET['location']; $time =$_GET['time']; $norf =$_GET['norf']; $user = $user_api->name(); if( $user_api->is_admin() && null != $_GET['user'] ) { $user = $_GET['user']; } if( validate_location($court) && validate_time($time) && validate_norf($norf) ) { play($user,$court,$time,$norf); header("Location: ".HOME_URI); } }game_day/session.php0000664000076400007640000000164610411127057015275 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: session.php,v 1.7 2005/07/20 03:17:00 ganzhorn Exp $ */ session_set_cookie_params(60*60*24*100); session_start(); ?> game_day/util.php0000664000076400007640000000224310411127057014561 0ustar ganzhornganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: util.php,v 1.6 2005/07/20 03:17:00 ganzhorn Exp $ */ if( !$util_php ) { $util_php=1; function error_text($text) { echo '

' . "Error: $text

"; } function def($var,$def) { if( null == $var ) { return $def; } return $var; } } // CANNOT have empty lines after this // otherwise headers get sent prematurely ?> chat/chat.php0000664000076400007640000000530010242512262013667 0ustar ganzhornganzhornjoin($channel); } function join( $channel ) { $this->channel = $channel; } function get_lines() { $this->select_db(); $table = $this->channel_to_table($this->channel); $query = "SELECT * FROM $table"; $result = mysql_query($query); if( $result ) { $stop = mysql_numrows($result); $i = 0; while( $i < $stop ) { $return[] = array("time"=>mysql_result($result,$i,"time"), "user"=>mysql_result($result,$i,"user"), "message"=>mysql_result($result,$i,"message")); ++$i; } return $return; } else { return null; } } function message($user_name,$msg) { $this->select_db(); $table = $this->channel_to_table($this->channel); $this->make_channel_exist($this->channel); $time = time(); $user_name = mysql_real_escape_string($user_name); $msg = mysql_real_escape_string($msg); $query = "INSERT INTO $table (user,time,message) VALUES ('$user_name','$time','$msg')"; if( !mysql_query($query) ) { $this->error_db(); } } // utilities function make_channel_exist($channel) { $table = $this->channel_to_table($channel); $query = "CREATE TABLE IF NOT EXISTS $table ( time INT UNSIGNED, user VARCHAR(30), message TEXT )"; if( !mysql_query($query) ) { $this->error_db("Failed to create table:$table"); } } function error_db($msg="") { die("Database error: " . mysql_error() . "
" . $msg); } function select_db() { $this->connect(); mysql_select_db($this->database()) or die("Unable to select database"); } function connect() { mysql_connect($this->host(),$this->user(),$this->password()) or die("Unable to connect to database"); } function channel_to_table($channel) { return $this->table_prefix() . "_r_" . $channel; } // reimpliment the following for inherited classes function table_prefix() { return "c"; } function database() { return "chat"; } function host() { return "localhost"; } function user() { return "chat"; } function password() { return "chat_pass"; } }; function chat_display_html($chat) { $lines = $chat->get_lines(); $stop = count($lines); $i = 0; echo ''; while($i < $stop) { $time = date("h:i:s",$lines[$i]['time']); echo '' . '". '". '". ""; ++$i; } echo "
'.$time."('.$lines[$i]['user'].")'.stripslashes($lines[$i]['message'])."
"; } ?>chat/index.php0000664000076400007640000000110110242512262014052 0ustar ganzhornganzhornmessage("poop","hi there!"); } }; ?> message("poop","hi there!"); chat_display_html($chat); ?> chat/chat.css0000664000076400007640000000030410242512262013667 0ustar ganzhornganzhorn /* $Id: chat.css,v 1.1.1.1 2005/05/18 01:04:50 ganzhorn Exp $ */ table.chat { color:green; } tr.chat { } td.chat_time { color:blue; } td.chat_user { } td.chat_message { color:black; }game_day/game_day.css0000664000076400007640000000456510411127057015364 0ustar ganzhornganzhorn/* * Copyright 2005 Salem Ganzhorn * * This file is part of Game Day. * * Game Day is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Game Day is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Game Day; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * $Id: game_day.css,v 1.13 2005/07/20 03:29:06 ganzhorn Exp $ */ div.wrapper { width:90%; margin-left:5%; } td.left { width:100%; } td.right { width:20%; } table.menu { background:#555555; color:lightgray; width:100%; } table.menu h3 { padding:0px; margin:0px; } table.menu a { text-align:left; color:#fffff3; text-decoration:none; } table.menu a:visited { color:#ffff99 } table.menu a:hover { color:#ffff99; background:#999999; border:slate 1px solid; } table.menu a:active { color:#ffff77 } /*table.menu h3 { color:green; }*/ div.top { text-align:left; background-color:gray; color:white; padding:2px; width:100%; } div.top h3 { display:inline; } a.right { float:right; } div.top a { color:lightblue; /* clear:right;*/ } p.title { font-size:120%; color:white; background:darkgray; padding:0px; margin:0px; } div.day { border: 1px solid gray; width:100%; margin-top:5px; margin-bottom:5px; margin-left:0px; margin-right:0px; padding:0px; } div.inset { padding:4px; } div.right { border: 1px solid gray; background:lightgrey; text-align:left; width:200; padding:0px; valign:"top"; margin:5px; } div.location { border: 1px solid white; margin: 5px; width: 90%; height: 95%; } p.comment { color:green; font-style: italic; font-size: 9pt; } input { margin:4px; } p.para:first-letter { font-size:200%; } div.outline { border:1px solid lightgray; padding:5px; } div.email { background:lightgray; }