Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: benjamw/pharaoh
base: ccb0ca2dd0
...
head fork: benjamw/pharaoh
compare: 7b66f8e5db
Checking mergeability… Don't worry, you can still create the pull request.
  • 10 commits
  • 12 files changed
  • 0 commit comments
  • 1 contributor
View
15 classes/email.class.php
@@ -143,17 +143,24 @@ protected function _send($type, $to, $data = array( ))
// replace the meta vars
$replace = array(
'/\[\[\[GAME_NAME\]\]\]/' => GAME_NAME,
- '/\[\[\[game_name\]\]\]/' => @$data['name'],
'/\[\[\[site_name\]\]\]/' => $site_name,
- '/\[\[\[extra_text\]\]\]/' => $this->_strip(@$_POST['extra_text']),
- '/\[\[\[sender\]\]\]/' => @$data['player'],
- '/\[\[\[winner\]\]\]/' => @$data['winner'],
+
+ '/\[\[\[opponent\]\]\]/' => @$data['opponent'],
+
'/\[\[\[export_data\]\]\]/' => var_export($data, true),
);
$message = preg_replace(array_keys($replace), $replace, $message);
$subject = GAME_NAME.' - '.$subject;
+
+ if ( ! empty($data['game_id'])) {
+ $message .= "\n\n".'Game Link: '.$GLOBALS['_ROOT_URI'].'game.php?id='.(int) $data['game_id'];
+ }
+ elseif ( ! empty($data['page'])) {
+ $message .= "\n\n".'Direct Link: '.$GLOBALS['_ROOT_URI'].$data['page'];
+ }
+
$message .= '
=============================================
View
36 classes/game.class.php
@@ -521,7 +521,7 @@ static public function invite( )
// send the email
if ($_DATA['black_id']) {
- Email::send('invite', $_DATA['black_id'], array('name' => $GLOBALS['_PLAYERS'][$_DATA['white_id']]));
+ Email::send('invite', $_DATA['black_id'], array('opponent' => $GLOBALS['_PLAYERS'][$_DATA['white_id']], 'page' => 'invite.php'));
}
return $insert_id;
@@ -572,7 +572,7 @@ static public function resend_invite($game_id)
// if we get here, all is good...
- $sent = Email::send('invite', $invite['black_id'], array('name' => $GLOBALS['_PLAYERS'][$invite['white_id']]));
+ $sent = Email::send('invite', $invite['black_id'], array('opponent' => $GLOBALS['_PLAYERS'][$invite['white_id']], 'page' => 'invite.php'));
if ($sent) {
// update the modify_date to prevent invite resend flooding
@@ -672,7 +672,7 @@ static public function accept_invite($game_id)
Setup::add_used($game['setup_id']);
// send the email
- Email::send('start', $invitor_id, array('name' => $GLOBALS['_PLAYERS'][$_SESSION['player_id']]));
+ Email::send('start', $invitor_id, array('opponent' => $GLOBALS['_PLAYERS'][$_SESSION['player_id']], 'game_id' => $game_id));
return $game_id;
}
@@ -783,7 +783,7 @@ public function do_move($move)
$this->_players['red']['object']->add_draw( );
// send the email
- Email::send('draw', $this->_players['opponent']['player_id'], array('player' => $this->_players['player']['object']->username));
+ Email::send('draw', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username));
}
else {
$this->state = 'Finished';
@@ -792,12 +792,12 @@ public function do_move($move)
// send the email
$type = (($this->_players[$winner]['player_id'] == $_SESSION['player_id']) ? 'defeated' : 'won');
- Email::send($type, $this->_players['opponent']['player_id'], array('player' => $this->_players['player']['object']->username));
+ Email::send($type, $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username));
}
}
else {
// send the email
- Email::send('turn', $this->_players['opponent']['player_id'], array('name' => $this->_players['player']['object']->username));
+ Email::send('turn', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
}
return $hits;
@@ -836,7 +836,7 @@ public function resign($player_id)
$this->_players['player']['object']->add_loss( );
$this->state = 'Finished';
$this->_pharaoh->winner = 'opponent';
- Email::send('resigned', $this->_players['opponent']['player_id'], array('name' => $this->_players['player']['object']->username));
+ Email::send('resigned', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
}
@@ -870,7 +870,7 @@ public function offer_draw($player_id)
$this->_extra_info['draw_offered'] = $player_id;
- Email::send('draw_offered', $this->_players['opponent']['player_id'], array('name' => $this->_players['player']['object']->username));
+ Email::send('draw_offered', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
}
@@ -929,7 +929,7 @@ public function accept_draw($player_id)
$this->state = 'Draw';
$this->_extra_info['draw_offered'] = false;
- Email::send('draw', $this->_players['opponent']['player_id'], array('player' => $this->_players['player']['object']->username));
+ Email::send('draw', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
}
@@ -995,7 +995,7 @@ public function request_undo($player_id)
$this->_extra_info['undo_requested'] = $player_id;
- Email::send('undo_requested', $this->_players['opponent']['player_id'], array('player' => $this->_players['player']['object']->username));
+ Email::send('undo_requested', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
}
@@ -1061,7 +1061,7 @@ public function accept_undo($player_id)
$this->_pull( );
$this->_extra_info['undo_requested'] = false;
- Email::send('undo_accepted', $this->_players['opponent']['player_id'], array('name' => $this->_players['player']['object']->username));
+ Email::send('undo_accepted', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
}
@@ -1607,10 +1607,8 @@ public function nudge( )
throw new MyException(__METHOD__.': Trying to perform an action on a paused game');
}
- $nudger = $this->_players['player']['object']->username;
-
if ($this->test_nudge( )) {
- Email::send('nudge', $this->_players['opponent']['player_id'], array('id' => $this->id, 'name' => $this->name, 'player' => $nudger));
+ Email::send('nudge', $this->_players['opponent']['player_id'], array('opponent' => $this->_players['player']['object']->username, 'game_id' => $this->id));
$this->_mysql->delete(self::GAME_NUDGE_TABLE, " WHERE game_id = '{$this->id}' ");
$this->_mysql->insert(self::GAME_NUDGE_TABLE, array('game_id' => $this->id, 'player_id' => $this->_players['opponent']['player_id']));
return true;
@@ -2232,8 +2230,12 @@ protected function _add_stats( )
}
$count = count($this->_history) - 1;
- $start = $this->_history[1]['move_date'];
- $end = $this->_history[$count]['move_date'];
+
+ $start = $end = $this->_history[0]['move_date'];
+ if ($count) {
+ $start = $this->_history[1]['move_date'];
+ $end = $this->_history[$count]['move_date'];
+ }
$start_unix = strtotime($start);
$end_unix = strtotime($end);
@@ -2369,7 +2371,7 @@ static public function get_list($player_id = 0, $all = true)
{$WHERE}
GROUP BY G.game_id
ORDER BY G.state ASC
- , last_move ASC
+ , last_move DESC
";
$list = $Mysql->fetch_array($query);
View
6 classes/gameplayer.class.php
@@ -216,7 +216,11 @@ public function register( )
}
if ($this->id) {
+ // add the user to the table
$this->_mysql->insert(self::EXTEND_TABLE, array('player_id' => $this->id));
+
+ // update the last_online time so we don't break things later
+ $this->_mysql->insert(self::EXTEND_TABLE, array('last_online' => NULL), " WHERE player_id = '{$this->id}' ");
}
}
@@ -684,7 +688,7 @@ static public function delete_inactive($age)
`is_admin` tinyint(1) unsigned NOT NULL DEFAULT '0',
`allow_email` tinyint(1) unsigned NOT NULL DEFAULT '1',
`max_games` tinyint(2) unsigned NOT NULL DEFAULT '0',
- `color` varchar(25) NOT NULL DEFAULT 'blue_white',
+ `color` varchar(25) NULL DEFAULT NULL,
`wins` smallint(5) unsigned NOT NULL DEFAULT '0',
`draws` smallint(5) unsigned NOT NULL DEFAULT '0',
`losses` smallint(5) unsigned NOT NULL DEFAULT '0',
View
6 classes/player.class.php
@@ -385,9 +385,7 @@ public function register( )
// fill the ident with a random string
$_DATA['ident'] = md5(uniqid(mt_rand( ), true));
- if ('0' == Settings::read('approve_users')) {
- $_DATA['is_approved'] = 1;
- }
+ $_DATA['is_approved'] = (int) ! (bool) (int) Settings::read('approve_users');
// now check the password
if (empty($_POST['password'])) {
@@ -397,7 +395,7 @@ public function register( )
$this->id = $this->_mysql->insert(self::PLAYER_TABLE, $_DATA);
if ($this->id) {
- if ('1' == Settings::read('approve_users')) {
+ if ((bool) (int) Settings::read('approve_users')) {
Email::send('register', explode(',', Settings::read('to_email')), array_merge(array('id' => $this->id), $_DATA));
}
View
2  css/c_blue_black.css
@@ -1 +1 @@
-html,body{background-color:#27282b;color:#fff}a{color:#fff}a.help{border:1px solid #777777}a.help:hover{border:1px solid #999999}abbr,acronym{border-bottom:1px dashed #777777}hr.fancy{background-color:#999;border:1px solid #777777}fieldset{border:1px solid #777777}.warning,.warning *{color:#b00}.notice,.notice *{color:#dd0}.highlight,.highlight *{color:#3380d7}.instruction,.instruction *{color:#aaa}header{border-bottom:1px solid #2473e3;background-color:#282828;background:-o-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:-ms-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:-moz-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:-webkit-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:radial-gradient(50% 100%, ellipse cover, #165aa6 30%,#282828 80%) #282828}h1{height:45px}h1 a{background-image:url(../images/Pharaoh.png)}nav.site a{color:#ddd;text-shadow:black 0 1px 1px}nav.site a:hover{color:#fff;background:-o-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-ms-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-moz-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-webkit-radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%,rgba(255,255,255,0.01) 70%) transparent}*.box{background-color:black;background:-o-linear-gradient(#232323, black) #000;background:-ms-linear-gradient(#232323, #000) #000;background:-moz-linear-gradient(#232323, #000) #000;background:-webkit-linear-gradient(#232323, #000) #000;background:linear-gradient(#232323,#000000) #000}*.box > *{background-color:#2e2f34;background:-o-linear-gradient(#2e2f34, #212225) #2e2f34;background:-ms-linear-gradient(#2e2f34, #212225) #2e2f34;background:-moz-linear-gradient(#2e2f34, #212225) #2e2f34;background:-webkit-linear-gradient(#2e2f34, #212225) #2e2f34;background:linear-gradient(#2e2f34,#212225) #2e2f34;-o-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;-ms-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;-moz-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;-webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset}nav#menu a,nav#mygames a{color:#ddd;background-color:transparent;border-bottom:1px solid #333333}nav#menu a:hover,nav#mygames a:hover{color:#fff;background-color:rgba(12,14,40,0.5)}nav#menu li.active a,nav#mygames li.active a{color:inherit;background-color:rgba(255,255,255,0.1)}nav#menu li span.sep,nav#mygames li span.sep{color:#666}nav#mygames .finished a{color:#999}nav#mygames .playing a{color:#3380d7}nav#mygames .my_turn a{color:#3380d7}nav#mygames .none a{color:#fff}aside#info #chatbox{background-color:#eee;border:1px solid #777777}h2{border-bottom:1px solid #777777}#index_page #chatbox{border:1px solid #777777}#index_page #chats{border-top:1px solid #777777}#index_page #chats dt{border-bottom:1px solid #777777;background:transparent}#index_page #chats dd{border-bottom:1px solid #777777}footer{color:#ddd;background-color:#0b2d53;-o-box-shadow:0px 3px 16px #000 inset;-ms-box-shadow:0px 3px 16px #000 inset;-moz-box-shadow:0px 3px 16px #000 inset;-webkit-box-shadow:0px 3px 16px #000 inset;box-shadow:0px 3px 16px #000 inset}#buttons a{border:1px solid #333333}#history table td.active,#history table td:hover{background-color:#444;color:#fff}#history div div span{border:1px solid #555555}#history div div span:hover{border-color:#aaa}#history div div span.disabled{color:#aaa;border-color:#333}
+html,body{background-color:#27282b;color:#fff}a{color:#fff}a.help{border:1px solid #777777}a.help:hover{border:1px solid #999999}abbr,acronym{border-bottom:1px dashed #777777}hr.fancy{background-color:#999;border:1px solid #777777}fieldset{border:1px solid #777777}.warning,.warning *{color:#b00}.notice,.notice *{color:#dd0}.highlight,.highlight *{color:#3380d7}.instruction,.instruction *{color:#aaa}header{border-bottom:1px solid #2473e3;background-color:#282828;background:-o-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:-ms-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:-moz-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:-webkit-radial-gradient(50% 100%, ellipse cover, #165aa6 30%, #282828 80%) #282828;background:radial-gradient(50% 100%, ellipse cover, #165aa6 30%,#282828 80%) #282828}h1{height:45px}h1 a{background-image:url(../images/Pharaoh.png)}nav.site a{color:#ddd;text-shadow:black 0 1px 1px}nav.site a:hover{color:#fff;background:-o-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-ms-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-moz-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-webkit-radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%,rgba(255,255,255,0.01) 70%) transparent}*.box{background-color:black;background:-o-linear-gradient(#232323, black) #000;background:-ms-linear-gradient(#232323, #000) #000;background:-moz-linear-gradient(#232323, #000) #000;background:-webkit-linear-gradient(#232323, #000) #000;background:linear-gradient(#232323,#000000) #000}*.box > *{background-color:#2e2f34;background:-o-linear-gradient(#2e2f34, #212225) #2e2f34;background:-ms-linear-gradient(#2e2f34, #212225) #2e2f34;background:-moz-linear-gradient(#2e2f34, #212225) #2e2f34;background:-webkit-linear-gradient(#2e2f34, #212225) #2e2f34;background:linear-gradient(#2e2f34,#212225) #2e2f34;-o-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;-ms-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;-moz-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;-webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset}nav#menu a,nav#mygames a{color:#ddd;background-color:transparent;border-bottom:1px solid #333333}nav#menu a:hover,nav#mygames a:hover{color:#fff;background-color:rgba(12,14,40,0.5)}nav#menu li.active a,nav#mygames li.active a{color:inherit;background-color:rgba(255,255,255,0.1)}nav#menu li span.sep,nav#mygames li span.sep{color:#666}nav#mygames .finished a{color:#999}nav#mygames .playing a{color:#3380d7}nav#mygames .my_turn a{color:#3380d7}nav#mygames .none a{color:#fff}aside#info #chatbox{background-color:#eee;border:1px solid #777777}h2{border-bottom:1px solid #777777}#index_page #chatbox{border:1px solid #777777}#index_page #chats{border-top:1px solid #777777}#index_page #chats dt{border-bottom:1px solid #777777;background:transparent}#index_page #chats dd{border-bottom:1px solid #777777}footer{color:#ddd;background-color:#0b2d53;-o-box-shadow:0px 3px 16px #000 inset;-ms-box-shadow:0px 3px 16px #000 inset;-moz-box-shadow:0px 3px 16px #000 inset;-webkit-box-shadow:0px 3px 16px #000 inset;box-shadow:0px 3px 16px #000 inset}#buttons a{border:1px solid #333333;border-width:0 1px}#history table td.active,#history table td:hover{background-color:#444;color:#fff}#history div div span{border:1px solid #555555}#history div div span:hover{border-color:#aaa}#history div div span.disabled{color:#aaa;border-color:#333}
View
2  css/c_red_black.css
@@ -1 +1 @@
-html,body{background-color:#27282b;color:#fff}a{color:#fff}a.help{border:1px solid #777777}a.help:hover{border:1px solid #999999}abbr,acronym{border-bottom:1px dashed #777777}hr.fancy{background-color:#999;border:1px solid #777777}fieldset{border:1px solid #777777}.warning,.warning *{color:#b00}.notice,.notice *{color:#dd0}.highlight,.highlight *{color:#b00}.instruction,.instruction *{color:#aaa}header{border-bottom:1px solid #ce3e47;background-color:#670b0c;background:-o-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:-ms-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:-moz-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:-webkit-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:radial-gradient(50% 100%, ellipse cover, #a72819 30%,#670b0c 80%) #670b0c}h1{height:45px}h1 a{background-image:url(../images/Pharaoh.png)}nav.site a{color:#ddd;text-shadow:black 0 1px 1px}nav.site a:hover{color:#fff;background:-o-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-ms-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-moz-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-webkit-radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%,rgba(255,255,255,0.01) 70%) transparent}*.box{background-color:black;background:-o-linear-gradient(#232323, black) #000;background:-ms-linear-gradient(#232323, #000) #000;background:-moz-linear-gradient(#232323, #000) #000;background:-webkit-linear-gradient(#232323, #000) #000;background:linear-gradient(#232323,#000000) #000}*.box > *{background-color:#2e2f34;background:-o-linear-gradient(#2e2f34, #212225) #2e2f34;background:-ms-linear-gradient(#2e2f34, #212225) #2e2f34;background:-moz-linear-gradient(#2e2f34, #212225) #2e2f34;background:-webkit-linear-gradient(#2e2f34, #212225) #2e2f34;background:linear-gradient(#2e2f34,#212225) #2e2f34;-o-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;-ms-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;-moz-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;-webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset;box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(255,255,255,0.2) inset}nav#menu a,nav#mygames a{color:#ddd;background-color:transparent;border-bottom:1px solid #333333}nav#menu a:hover,nav#mygames a:hover{color:#fff;background-color:rgba(40,14,12,0.5)}nav#menu li.active a,nav#mygames li.active a{color:inherit;background-color:rgba(255,255,255,0.1)}nav#menu li span.sep,nav#mygames li span.sep{color:#666}nav#mygames .finished a{color:#999}nav#mygames .playing a{color:#b00}nav#mygames .my_turn a{color:#b00}nav#mygames .none a{color:#fff}aside#info #chatbox{background-color:#eee;border:1px solid #777777}h2{border-bottom:1px solid #777777}#index_page #chatbox{border:1px solid #777777}#index_page #chats{border-top:1px solid #777777}#index_page #chats dt{border-bottom:1px solid #777777;background:transparent}#index_page #chats dd{border-bottom:1px solid #777777}footer{color:#ddd;background-color:#670b0c;-o-box-shadow:0px 3px 16px #000 inset;-ms-box-shadow:0px 3px 16px #000 inset;-moz-box-shadow:0px 3px 16px #000 inset;-webkit-box-shadow:0px 3px 16px #000 inset;box-shadow:0px 3px 16px #000 inset}#buttons a{border:1px solid #333333}#history table td.active,#history table td:hover{background-color:#444;color:#fff}#history div div span{border:1px solid #555555}#history div div span:hover{border-color:#aaa}#history div div span.disabled{color:#aaa;border-color:#333}
+html,body{background-color:#27282b;color:#fff}a{color:#fff}a.help{border:1px solid #777777}a.help:hover{border:1px solid #999999}abbr,acronym{border-bottom:1px dashed #777777}hr.fancy{background-color:#999;border:1px solid #777777}fieldset{border:1px solid #777777}.warning,.warning *{color:#b00}.notice,.notice *{color:#dd0}.highlight,.highlight *{color:#b00}.instruction,.instruction *{color:#aaa}header{border-bottom:1px solid #ce3e47;background-color:#670b0c;background:-o-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:-ms-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:-moz-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:-webkit-radial-gradient(50% 100%, ellipse cover, #a72819 30%, #670b0c 80%) #670b0c;background:radial-gradient(50% 100%, ellipse cover, #a72819 30%,#670b0c 80%) #670b0c}h1{height:45px}h1 a{background-image:url(../images/Pharaoh.png)}nav.site a{color:#ddd;text-shadow:black 0 1px 1px}nav.site a:hover{color:#fff;background:-o-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-ms-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-moz-radial-gradient(50% 90%, ellipse closest-corner, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:-webkit-radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%, rgba(255,255,255,0.01) 70%) transparent;background:radial-gradient(50% 100%, 80% 20%, rgba(255,255,255,0.35) 30%,rgba(255,255,255,0.01) 70%) transparent}*.box{background-color:black;background:-o-linear-gradient(#232323, black) #000;background:-ms-linear-gradient(#232323, #000) #000;background:-moz-linear-gradient(#232323, #000) #000;background:-webkit-linear-gradient(#232323, #000) #000;background:linear-gradient(#232323,#000000) #000}*.box > *{background-color:#2e2f34;background:-o-linear-gradient(#2e2f34, #212225) #2e2f34;background:-ms-linear-gradient(#2e2f34, #212225) #2e2f34;background:-moz-linear-gradient(#2e2f34, #212225) #2e2f34;background:-webkit-linear-gradient(#2e2f34, #212225) #2e2f34;background:linear-gradient(#2e2f34,#212225) #2e2f34;-o-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;-ms-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;-moz-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;-webkit-box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset;box-shadow:0px 1px 0px rgba(255,255,255,0.1) inset,0px -2px 1px rgba(0,0,0,0.2) inset}nav#menu a,nav#mygames a{color:#ddd;background-color:transparent;border-bottom:1px solid #333333}nav#menu a:hover,nav#mygames a:hover{color:#fff;background-color:rgba(40,14,12,0.5)}nav#menu li.active a,nav#mygames li.active a{color:inherit;background-color:rgba(255,255,255,0.1)}nav#menu li span.sep,nav#mygames li span.sep{color:#666}nav#mygames .finished a{color:#999}nav#mygames .playing a{color:#b00}nav#mygames .my_turn a{color:#b00}nav#mygames .none a{color:#fff}aside#info #chatbox{background-color:#eee;border:1px solid #777777}h2{border-bottom:1px solid #777777}#index_page #chatbox{border:1px solid #777777}#index_page #chats{border-top:1px solid #777777}#index_page #chats dt{border-bottom:1px solid #777777;background:transparent}#index_page #chats dd{border-bottom:1px solid #777777}footer{color:#ddd;background-color:#670b0c;-o-box-shadow:0px 3px 16px #000 inset;-ms-box-shadow:0px 3px 16px #000 inset;-moz-box-shadow:0px 3px 16px #000 inset;-webkit-box-shadow:0px 3px 16px #000 inset;box-shadow:0px 3px 16px #000 inset}#buttons a{border:1px solid #333333;border-width:0 1px}#history table td.active,#history table td:hover{background-color:#444;color:#fff}#history div div span{border:1px solid #555555}#history div div span:hover{border-color:#aaa}#history div div span.disabled{color:#aaa;border-color:#333}
View
15 css/scss/_c_template.scss
@@ -54,8 +54,8 @@ $box_border_gradient_background_color: $main_shadow_color !default;
$box_border_gradient_highlight_color: #232323 !default;
$box_gradient_background_color: #2E2F34 !default;
$box_gradient_highlight_color: #212225 !default;
-$box_highlight_dark_color: rgba(255, 255, 255, 0.1) !default;
-$box_highlight_light_color: rgba(255, 255, 255, 0.2) !default;
+$box_highlight_top_color: rgba(255, 255, 255, 0.1) !default;
+$box_highlight_bottom_color: rgba(0, 0, 0, 0.2) !default;
$nav_link_color: $main_link_color !default;
$nav_background_color: transparent !default;
@@ -200,11 +200,11 @@ nav.site {
background: -webkit-linear-gradient($box_gradient_background_color, $box_gradient_highlight_color) $box_gradient_background_color;
background: linear-gradient($box_gradient_background_color, $box_gradient_highlight_color) $box_gradient_background_color;
- -o-box-shadow: 0px 1px 0px $box_highlight_dark_color inset, 0px -2px 1px $box_highlight_light_color inset;
- -ms-box-shadow: 0px 1px 0px $box_highlight_dark_color inset, 0px -2px 1px $box_highlight_light_color inset;
- -moz-box-shadow: 0px 1px 0px $box_highlight_dark_color inset, 0px -2px 1px $box_highlight_light_color inset;
- -webkit-box-shadow: 0px 1px 0px $box_highlight_dark_color inset, 0px -2px 1px $box_highlight_light_color inset;
- box-shadow: 0px 1px 0px $box_highlight_dark_color inset, 0px -2px 1px $box_highlight_light_color inset;
+ -o-box-shadow: 0px 1px 0px $box_highlight_top_color inset, 0px -2px 1px $box_highlight_bottom_color inset;
+ -ms-box-shadow: 0px 1px 0px $box_highlight_top_color inset, 0px -2px 1px $box_highlight_bottom_color inset;
+ -moz-box-shadow: 0px 1px 0px $box_highlight_top_color inset, 0px -2px 1px $box_highlight_bottom_color inset;
+ -webkit-box-shadow: 0px 1px 0px $box_highlight_top_color inset, 0px -2px 1px $box_highlight_bottom_color inset;
+ box-shadow: 0px 1px 0px $box_highlight_top_color inset, 0px -2px 1px $box_highlight_bottom_color inset;
}
}
@@ -293,6 +293,7 @@ footer {
#buttons {
a {
border: $nav_separator;
+ border-width: 0 1px; /* because we override this with the above property */
}
}
View
52 game.php
@@ -202,52 +202,52 @@
<a href="javascript:;" id="fire_laser">Fire Laser</a> |
<a href="javascript:;" id="clear_laser">Clear Laser</a>
</div> <!-- .buttons -->
- </div> <!-- #board_wrapper -->
- <?php echo $chat_html; ?>
+ <form id="game" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"><div class="formdiv">
+ <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>" />
+ <input type="hidden" name="game_id" value="<?php echo $_SESSION['game_id']; ?>" />
+ <input type="hidden" name="player_id" value="<?php echo $_SESSION['player_id']; ?>" />
+ <input type="hidden" name="from" id="from" value="" />
+ <input type="hidden" name="to" id="to" value="" />
- <form id="game" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>"><div class="formdiv">
- <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>" />
- <input type="hidden" name="game_id" value="<?php echo $_SESSION['game_id']; ?>" />
- <input type="hidden" name="player_id" value="<?php echo $_SESSION['player_id']; ?>" />
- <input type="hidden" name="from" id="from" value="" />
- <input type="hidden" name="to" id="to" value="" />
+ <?php if (('Playing' == $Game->state) && $Game->is_player($_SESSION['player_id'])) { ?>
- <?php if (('Playing' == $Game->state) && $Game->is_player($_SESSION['player_id'])) { ?>
+ <?php if ( ! $Game->draw_offered( )) { ?>
- <?php if ( ! $Game->draw_offered( )) { ?>
+ <input type="button" name="offer_draw" id="offer_draw" value="Offer Draw" />
- <input type="button" name="offer_draw" id="offer_draw" value="Offer Draw" />
+ <?php } elseif ($Game->draw_offered($_SESSION['player_id'])) { ?>
- <?php } elseif ($Game->draw_offered($_SESSION['player_id'])) { ?>
+ <input type="button" name="accept_draw" id="accept_draw" value="Accept Draw Offer" />
+ <input type="button" name="reject_draw" id="reject_draw" value="Reject Draw Offer" />
- <input type="button" name="accept_draw" id="accept_draw" value="Accept Draw Offer" />
- <input type="button" name="reject_draw" id="reject_draw" value="Reject Draw Offer" />
+ <?php } ?>
- <?php } ?>
+ <?php if ( ! $Game->undo_requested( ) && ! $Game->is_turn( ) && ! empty($moves)) { ?>
- <?php if ( ! $Game->undo_requested( ) && ! $Game->is_turn( ) && ! empty($moves)) { ?>
+ <input type="button" name="request_undo" id="request_undo" value="Request Undo" />
- <input type="button" name="request_undo" id="request_undo" value="Request Undo" />
+ <?php } elseif ($Game->undo_requested($_SESSION['player_id'])) { ?>
- <?php } elseif ($Game->undo_requested($_SESSION['player_id'])) { ?>
+ <input type="button" name="accept_undo" id="accept_undo" value="Accept Undo Request" />
+ <input type="button" name="reject_undo" id="reject_undo" value="Reject Undo Request" />
- <input type="button" name="accept_undo" id="accept_undo" value="Accept Undo Request" />
- <input type="button" name="reject_undo" id="reject_undo" value="Reject Undo Request" />
+ <?php } ?>
- <?php } ?>
+ <input type="button" name="resign" id="resign" value="Resign" />
- <input type="button" name="resign" id="resign" value="Resign" />
+ <?php if ($Game->test_nudge( )) { ?>
- <?php if ($Game->test_nudge( )) { ?>
+ <input type="button" name="nudge" id="nudge" value="Nudge" />
- <input type="button" name="nudge" id="nudge" value="Nudge" />
+ <?php } ?>
<?php } ?>
- <?php } ?>
+ </div></form>
+ </div> <!-- #board_wrapper -->
- </div></form>
+ <?php echo $chat_html; ?>
</div> <!-- #contents -->
View
33 includes/inc.email.php
@@ -4,16 +4,16 @@
'invite' => array(
'subject' => 'Game Invitation',
'message' => '
-You have been invited by [[[game_name]]] to play a game of [[[GAME_NAME]]] at [[[site_name]]].
+[[[opponent]]] thinks you are a worthy opponent and wishes to play a game of [[[GAME_NAME]]] at [[[site_name]]].
-If you wish to join this game, please log in and do so.'),
+If you wish to play this game, please log in and do so.'),
'start' => array(
'subject' => 'Game Started',
'message' => '
-The [[[GAME_NAME]]] game you are playing against [[[game_name]]] at [[[site_name]]] has begun.
+The [[[GAME_NAME]]] game you are playing against [[[opponent]]] at [[[site_name]]] has begun.
Please log in and start the battle. Good Luck!'),
@@ -22,25 +22,25 @@
'turn' => array(
'subject' => 'Your Turn',
'message' => '
-It is now your turn in the [[[GAME_NAME]]] game against [[[game_name]]] you are playing at [[[site_name]]].
+Holy Cow!! It is now your turn in the [[[GAME_NAME]]] game against [[[opponent]]] you are playing at [[[site_name]]]!
-Please log in and take your turn. Good Luck!'),
+Aren\'t you excited!?! Log in and take your turn already... What are you waiting for?!'),
'nudge' => array(
- 'subject' => 'Your Turn',
+ 'subject' => 'Nudge',
'message' => '
-[[[sender]]] sent you a nudge to remind you of your turn in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
+HEY!! [[[opponent]]] thinks you\'re taking to long to take your turn in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
-Please log in and take your turn. Good Luck!'),
+Log in and take your turn... Quit dawdling! DO IT!'),
'won' => array(
'subject' => 'You Won!',
'message' => '
-Apparently [[[sender]]] did something dumb and blasted their own Pharaoh in the game you were playing at [[[site_name]]].
+Apparently [[[opponent]]] did something dumb and blasted their own Pharaoh in the game you were playing at [[[site_name]]].
Log on and invite someone to a new game if you still wish to play.'),
@@ -49,7 +49,7 @@
'draw_offered' => array(
'subject' => 'Draw Offered',
'message' => '
-[[[sender]]] has offered you a draw in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
+[[[opponent]]] has kindly offered you a draw in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
Log on and view the game to make your decision.'),
@@ -58,7 +58,7 @@
'undo_requested' => array(
'subject' => 'Undo Requested',
'message' => '
-[[[sender]]] has requested an undo in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
+[[[opponent]]] messed up and has requested an undo in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
Log on and view the game to make your decision.'),
@@ -67,7 +67,7 @@
'undo_accepted' => array(
'subject' => 'Undo Accepted',
'message' => '
-[[[sender]]] has accepted your undo request in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
+[[[opponent]]] has graciously accepted your undo request in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
It is now your turn again.
Please log in and take your turn. Good Luck!'),
@@ -77,7 +77,8 @@
'draw' => array(
'subject' => 'Draw',
'message' => '
-The [[[GAME_NAME]]] game you are playing against [[[sender]]] at [[[site_name]]] has ended in a draw.
+The [[[GAME_NAME]]] game you are playing against [[[opponent]]] at [[[site_name]]] has ended in a draw.
+I didn\'t even think that was possible. Wow... I\'m dumbfounded.
Log on and invite someone to a new game if you still wish to play.'),
@@ -86,7 +87,7 @@
'defeated' => array(
'subject' => 'Defeated',
'message' => '
-You have been pwninated by [[[sender]]] in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
+You have been pwninated by [[[opponent]]] in the [[[GAME_NAME]]] game you are playing at [[[site_name]]].
Better luck next time, log on and invite someone to a new game if you still wish to play.'),
@@ -95,9 +96,9 @@
'resigned' => array(
'subject' => 'Opponent Resigned',
'message' => '
-Your opponent, [[[game_name]]], while trying to unleash the forgotten fury of the Gods, attempted to trigger the Almighty Deathbeam of Luxor.
+Your opponent, [[[opponent]]], while trying to unleash the forgotten fury of the Gods, attempted to trigger the Almighty Deathbeam of Luxor.
-Unfortunately, [[[game_name]]] was not learned in the ways of optical physics and failed to notice the smudge on their lens and eradicated their entire dynasty.
+Unfortunately, [[[opponent]]] was not learned in the ways of optical physics and failed to notice the smudge on their lens and eradicated their entire dynasty.
The dust has settled and you can now claim your prize... a broken obelisk in the sand with some weird pictures on it. Yay.'),
View
2  includes/inc.global.php
@@ -84,7 +84,7 @@ function stripslashes_deep($value) {
}
if ('' == $GLOBALS['_DEFAULT_COLOR']) {
- if (in_array('blue_white', $GLOBALS['_COLORS'])) {
+ if (in_array('red_black', $GLOBALS['_COLORS'])) {
$GLOBALS['_DEFAULT_COLOR'] = 'red_black';
}
elseif ($GLOBALS['_COLORS']) {
View
2  register.php
@@ -16,7 +16,7 @@
$not_admin = empty($GLOBALS['Player']) || ! $GLOBALS['Player']->is_admin;
if ($not_admin && ($no_new_users || ($max_users_set && $max_users_reached))) {
- Flash::store('Sorry, but we are not accepting new applications at this time.');
+ Flash::store('Sorry, but we are not accepting new registrations at this time.');
}
if ($not_admin && isset($_SESSION['player_id'])) {
View
30 todo.txt
@@ -1,31 +1,8 @@
-CURRENTLY WORKING ON:
-------------------------------------------------
-
- making the Khet 2.0 stuff work...
-
- done:
- laser works as expected in pharaoh class
- setup creator has new pieces and all works
- game mechanics work for both anubises and sphynxes
- laser cannot point directly into wall
-
- setup table has new fields
-
- invite page has options
-
- invites are processed properly
- setup code is stored in invite
-
- need:
- add ability to hit self from side... if requested (some of it is kinda built)
-
- other invite options ???
-
-_______________________________________________________________________________
-
- make hover tooltips better
+- add ability to hit own laser from side as option
+
- for revisions for setups, allow the same name for the setup and when
a user creates a revision or edits their setup, it creates a new setup
and inactivates the previous setup, and then either sort by create
@@ -34,6 +11,7 @@ _______________________________________________________________________________
use the most recent.
- add more stats:
+ player's most played setup
player's favorite setup
player's worst setup
player's favorite opponent
@@ -51,6 +29,8 @@ _______________________________________________________________________________
- don't show success messages if email is not sent for things like
nudge, that are only emails possibly for other things like invite,
etc. that are largely email dependent
+ - make accept invite and withdraw invite pages ajax powered and
+ just remove the item from the table (and other places as well)
- fully convert times to UTC in MySQL and back to user's timezone everywhere
dates are output

No commit comments for this range

Something went wrong with that request. Please try again.