Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Branch master (287493)
by Dan
06:08
created
engine/Default/galactic_post_view_applications.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Viewing Applications');
3
+$template->assign('PageTopic', 'Viewing Applications');
4 4
 Menu::galactic_post();
5 5
 
6 6
 $db->query('SELECT * FROM galactic_post_applications WHERE game_id = ' . $db->escapeNumber($player->getGameID()));
7 7
 if ($db->getNumRows()) {
8
-	$PHP_OUTPUT.=('You have received an application from the following players (click name to view description)<br />');
9
-	$PHP_OUTPUT.=('Becareful when choosing your writters.  Make sure it is someone who will actually help you.<br /><br />');
8
+	$PHP_OUTPUT .= ('You have received an application from the following players (click name to view description)<br />');
9
+	$PHP_OUTPUT .= ('Becareful when choosing your writters.  Make sure it is someone who will actually help you.<br /><br />');
10 10
 }
11 11
 else
12
-	$PHP_OUTPUT.=('You have no applications to view at the current time.');
12
+	$PHP_OUTPUT .= ('You have no applications to view at the current time.');
13 13
 while ($db->nextRecord()) {
14
-	$appliee =& SmrPlayer::getPlayer($db->getField('account_id'), $player->getGameID());
14
+	$appliee = & SmrPlayer::getPlayer($db->getField('account_id'), $player->getGameID());
15 15
 
16 16
 	$container = array();
17 17
 	$container['url'] = 'skeleton.php';
18 18
 	$container['body'] = 'galactic_post_view_applications.php';
19 19
 	$container['id'] = $appliee->getAccountID();
20
-	$PHP_OUTPUT.=create_link($container, '<span class="yellow">'.$appliee->getPlayerName().'</span>');
21
-	$PHP_OUTPUT.=(' who has ');
20
+	$PHP_OUTPUT .= create_link($container, '<span class="yellow">' . $appliee->getPlayerName() . '</span>');
21
+	$PHP_OUTPUT .= (' who has ');
22 22
 	if ($db->getField('written_before') == 'YES')
23
-		$PHP_OUTPUT.=('written for some kind of a newspaper before.');
23
+		$PHP_OUTPUT .= ('written for some kind of a newspaper before.');
24 24
 	else
25
-		$PHP_OUTPUT.=('not written for a newspaper before.');
26
-	$PHP_OUTPUT.=('<br />');
25
+		$PHP_OUTPUT .= ('not written for a newspaper before.');
26
+	$PHP_OUTPUT .= ('<br />');
27 27
 }
28
-$PHP_OUTPUT.=('<br /><br />');
28
+$PHP_OUTPUT .= ('<br /><br />');
29 29
 if (isset($var['id'])) {
30
-	$db->query('SELECT * FROM galactic_post_applications WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND account_id = '.$db->escapeNumber($var['id']));
30
+	$db->query('SELECT * FROM galactic_post_applications WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND account_id = ' . $db->escapeNumber($var['id']));
31 31
 	$db->nextRecord();
32 32
 	$desc = stripslashes($db->getField('description'));
33
-	$applie =& SmrPlayer::getPlayer($var['id'], $player->getGameID());
34
-	$PHP_OUTPUT.=('Name : '.$applie->getPlayerName().'<br />');
35
-	$PHP_OUTPUT.=('Have you written for some kind of newspaper before? ' . $db->getField('written_before'));
36
-	$PHP_OUTPUT.=('<br />');
37
-	$PHP_OUTPUT.=('How many articles are you willing to write per week? ' . $db->getField('articles_per_day'));
38
-	$PHP_OUTPUT.=('<br />');
39
-	$PHP_OUTPUT.=('What do you want to tell the editor?<br /><br />'.$desc);
33
+	$applie = & SmrPlayer::getPlayer($var['id'], $player->getGameID());
34
+	$PHP_OUTPUT .= ('Name : ' . $applie->getPlayerName() . '<br />');
35
+	$PHP_OUTPUT .= ('Have you written for some kind of newspaper before? ' . $db->getField('written_before'));
36
+	$PHP_OUTPUT .= ('<br />');
37
+	$PHP_OUTPUT .= ('How many articles are you willing to write per week? ' . $db->getField('articles_per_day'));
38
+	$PHP_OUTPUT .= ('<br />');
39
+	$PHP_OUTPUT .= ('What do you want to tell the editor?<br /><br />' . $desc);
40 40
 	$container = array();
41 41
 	$container['url'] = 'galactic_post_application_answer.php';
42 42
 	transfer('id');
43
-	$PHP_OUTPUT.=create_echo_form($container);
44
-	$PHP_OUTPUT.=('<br /><br />');
45
-	$PHP_OUTPUT.=create_submit('Accept');
46
-	$PHP_OUTPUT.=create_submit('Reject');
47
-	$PHP_OUTPUT.=('</form>');
43
+	$PHP_OUTPUT .= create_echo_form($container);
44
+	$PHP_OUTPUT .= ('<br /><br />');
45
+	$PHP_OUTPUT .= create_submit('Accept');
46
+	$PHP_OUTPUT .= create_submit('Reject');
47
+	$PHP_OUTPUT .= ('</form>');
48 48
 }
Please login to merge, or discard this patch.
engine/Default/sector_scan.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!$sector->isLinked($var['target_sector']) && $sector->getSectorID() != $var['target_sector']) {
3
+if (!$sector->isLinked($var['target_sector']) && $sector->getSectorID() != $var['target_sector']) {
4 4
 	create_error('You cannot scan a sector you are not linked to.');
5 5
 }
6 6
 
7 7
 // initialize vars
8 8
 $scanSector = SmrSector::getSector($player->getGameID(), $var['target_sector']);
9 9
 
10
-$template->assign('PageTopic','Sector Scan of #'.$scanSector->getSectorID().' ('.$scanSector->getGalaxyName().')');
10
+$template->assign('PageTopic', 'Sector Scan of #' . $scanSector->getSectorID() . ' (' . $scanSector->getGalaxyName() . ')');
11 11
 
12 12
 $friendly_forces = 0;
13 13
 $enemy_forces = 0;
Please login to merge, or discard this patch.
engine/Default/alliance_exempt_authorize.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 $template->assign('PageTopic', $alliance->getAllianceName(false, true));
4 4
 Menu::alliance($alliance->getAllianceID(), $alliance->getLeaderID());
5 5
 
6
-$PHP_OUTPUT.= '<h2>Exemption Requests</h2><br />';
7
-$PHP_OUTPUT.=('Selecting a box will authorize it, leaving a box unselected will make it unauthorized after you submit.<br />');
6
+$PHP_OUTPUT .= '<h2>Exemption Requests</h2><br />';
7
+$PHP_OUTPUT .= ('Selecting a box will authorize it, leaving a box unselected will make it unauthorized after you submit.<br />');
8 8
 //get rid of already approved entries
9 9
 $db->query('UPDATE alliance_bank_transactions SET request_exempt = 0 WHERE exempt = 1');
10 10
 //build player array
@@ -15,22 +15,22 @@  discard block
 block discarded – undo
15 15
 $db->query('SELECT * FROM alliance_bank_transactions WHERE request_exempt = 1 ' . 
16 16
 			'AND alliance_id = ' . $db->escapeNumber($alliance->getAllianceID()) . ' AND game_id = ' . $db->escapeNumber($alliance->getGameID()) . ' AND exempt = 0');
17 17
 if ($db->getNumRows()) {
18
-	$container=create_container('bank_alliance_exempt_processing.php');
19
-	$form = create_form($container,'Make Exempt');
20
-	$PHP_OUTPUT.= $form['form'];
21
-	$PHP_OUTPUT.=create_table();
22
-	$PHP_OUTPUT.=('<tr><th>Player Name</th><th>Type</th><th>Reason</th><th>Amount</th><th>Approve</th></tr>');
18
+	$container = create_container('bank_alliance_exempt_processing.php');
19
+	$form = create_form($container, 'Make Exempt');
20
+	$PHP_OUTPUT .= $form['form'];
21
+	$PHP_OUTPUT .= create_table();
22
+	$PHP_OUTPUT .= ('<tr><th>Player Name</th><th>Type</th><th>Reason</th><th>Amount</th><th>Approve</th></tr>');
23 23
 	while ($db->nextRecord()) {
24 24
 		$trans = $db->getField('transaction') == 'Payment' ? 'Withdraw' : 'Deposit';
25
-		$PHP_OUTPUT.=('<tr><td>' . $players[$db->getInt('payee_id')] . '</td><td>' . $trans . '</td><td>' . $db->getField('reason') . '</td><td>' . number_format($db->getInt('amount')) . '</td>');
26
-		$PHP_OUTPUT.=('<td><input type="checkbox" name="exempt[' . $db->getField('transaction_id') . ']"></td>');
27
-		$PHP_OUTPUT.=('</tr>');
25
+		$PHP_OUTPUT .= ('<tr><td>' . $players[$db->getInt('payee_id')] . '</td><td>' . $trans . '</td><td>' . $db->getField('reason') . '</td><td>' . number_format($db->getInt('amount')) . '</td>');
26
+		$PHP_OUTPUT .= ('<td><input type="checkbox" name="exempt[' . $db->getField('transaction_id') . ']"></td>');
27
+		$PHP_OUTPUT .= ('</tr>');
28 28
 	}
29
-	$PHP_OUTPUT.=('</table>');
30
-	$PHP_OUTPUT.=('<div align="center">');
31
-	$PHP_OUTPUT.= $form['submit'];
32
-	$PHP_OUTPUT.=('</div></form>');
29
+	$PHP_OUTPUT .= ('</table>');
30
+	$PHP_OUTPUT .= ('<div align="center">');
31
+	$PHP_OUTPUT .= $form['submit'];
32
+	$PHP_OUTPUT .= ('</div></form>');
33 33
 }
34 34
 else {
35
-	$PHP_OUTPUT.=('<div align="center">Nothing to authorize.</div>');
35
+	$PHP_OUTPUT .= ('<div align="center">Nothing to authorize.</div>');
36 36
 }
Please login to merge, or discard this patch.
engine/Default/rankings_sector_kill.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Sector Death Rankings');
3
+$template->assign('PageTopic', 'Sector Death Rankings');
4 4
 
5
-Menu::rankings(3,0);
5
+Menu::rankings(3, 0);
6 6
 
7 7
 $db->query('SELECT * FROM sector WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY battles DESC, sector_id LIMIT 10');
8 8
 
Please login to merge, or discard this patch.
engine/Default/album_edit_processing.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	// check if we have comments for this album already
109 109
 	$db->lockTable('album_has_comments');
110 110
 
111
-	$db->query('SELECT MAX(comment_id) FROM album_has_comments WHERE album_id = '.$db->escapeNumber($account->getAccountID()));
111
+	$db->query('SELECT MAX(comment_id) FROM album_has_comments WHERE album_id = ' . $db->escapeNumber($account->getAccountID()));
112 112
 	if ($db->nextRecord()) {
113 113
 		$comment_id = $db->getField('MAX(comment_id)') + 1;
114 114
 	}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	*/
148 148
 	$url = trim($url);
149 149
 	if (!preg_match('=://=', $url)) {
150
-		$url = 'http://'.$url;
150
+		$url = 'http://' . $url;
151 151
 	}
152 152
 	$url = parse_url($url);
153 153
 	if (strtolower($url['scheme']) != 'http') {
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
 	}
173 173
 	else {
174 174
 		$head = '';
175
-		$httpRequest = 'HEAD '. $url['path'] .' HTTP/1.1'.EOL
176
-								.'Host: '. $url['host'].EOL
177
-								.'Connection: close'.EOL.EOL;
175
+		$httpRequest = 'HEAD ' . $url['path'] . ' HTTP/1.1' . EOL
176
+								.'Host: ' . $url['host'] . EOL
177
+								.'Connection: close' . EOL . EOL;
178 178
 		fputs($fp, $httpRequest);
179
-		while(!feof($fp)) {
179
+		while (!feof($fp)) {
180 180
 			$head .= fgets($fp, 1024);
181 181
 		}
182 182
 		fclose($fp);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		$http['Response-Class'] = $rclass[$http['Status-Code'][0] - 1];
196 196
 
197 197
 		preg_match_all('=^(.+): ([^\r\n]*)=m', $head, $matches, PREG_SET_ORDER);
198
-		foreach($matches as $line) {
198
+		foreach ($matches as $line) {
199 199
 			$http[$line[1]] = $line[2];
200 200
 		}
201 201
 
Please login to merge, or discard this patch.
engine/Default/bank_alliance_processing.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if (!isset($var['alliance_id'])) {
3
-	SmrSession::updateVar('alliance_id',$player->getAllianceID());
3
+	SmrSession::updateVar('alliance_id', $player->getAllianceID());
4 4
 }
5 5
 $alliance_id = $var['alliance_id'];
6 6
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	}
42 42
 	$alliance->setAccount($allianceCredits);
43 43
 	// log action
44
-	$account->log(LOG_TYPE_BANK, 'Deposits '.$amount.' credits in alliance account of '.$alliance->getAllianceName(), $player->getSectorID());
44
+	$account->log(LOG_TYPE_BANK, 'Deposits ' . $amount . ' credits in alliance account of ' . $alliance->getAllianceName(), $player->getSectorID());
45 45
 }
46 46
 else {
47 47
 	$action = 'Payment';
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			WHERE alliance_id = ' . $db->escapeNumber($alliance->getAllianceID()) . ' AND game_id = ' . $db->escapeNumber($alliance->getGameID()) . ' AND payee_id = ' . $db->escapeNumber($player->getAccountID()) . '
65 65
 			GROUP BY transaction');
66 66
 		$playerTrans = array('Deposit' => 0, 'Payment' => 0);
67
-		while($db->nextRecord()) {
67
+		while ($db->nextRecord()) {
68 68
 			$playerTrans[$db->getField('transaction')] = $db->getInt('total');
69 69
 		}
70 70
 		$allowedWithdrawal = $withdrawalPerDay + $playerTrans['Deposit'] - $playerTrans['Payment'];
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	$alliance->setAccount($allianceCredits);
104 104
 
105 105
 	// log action
106
-	$account->log(LOG_TYPE_BANK, 'Takes '.$amount.' credits from alliance account of '.$alliance->getAllianceName(), $player->getSectorID());
106
+	$account->log(LOG_TYPE_BANK, 'Takes ' . $amount . ' credits from alliance account of ' . $alliance->getAllianceName(), $player->getSectorID());
107 107
 }
108 108
 
109 109
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 }
125 125
 $db->query('INSERT INTO alliance_bank_transactions
126 126
 			(alliance_id, game_id, transaction_id, time, payee_id, reason, transaction, amount, request_exempt)
127
-			VALUES(' . $db->escapeNumber($alliance_id) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($next_id) . ', ' . $db->escapeNumber(TIME) . ', ' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeString($message) . ', '.$db->escapeString($action) . ', ' . $db->escapeNumber($amount) . ', ' . $db->escapeNumber($requestExempt) . ')');
127
+			VALUES(' . $db->escapeNumber($alliance_id) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeNumber($next_id) . ', ' . $db->escapeNumber(TIME) . ', ' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeString($message) . ', ' . $db->escapeString($action) . ', ' . $db->escapeNumber($amount) . ', ' . $db->escapeNumber($requestExempt) . ')');
128 128
 
129 129
 // update player credits
130 130
 $player->update();
Please login to merge, or discard this patch.
engine/Default/planet.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 
20 20
 $planet = $player->getSectorPlanet();
21 21
 $template->assign('ThisPlanet', $planet);
22
-$template->assign('PageTopic', 'Planet : '.$planet->getName().' [Sector #'.$player->getSectorID().']');
22
+$template->assign('PageTopic', 'Planet : ' . $planet->getName() . ' [Sector #' . $player->getSectorID() . ']');
23 23
 
24 24
 Menu::planet($planet);
Please login to merge, or discard this patch.
engine/Default/configure_hardware_processing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 if ($var['action'] == 'Enable') {
3
-	if($player->getTurns() < TURNS_TO_CLOAK) {
3
+	if ($player->getTurns() < TURNS_TO_CLOAK) {
4 4
 		create_error('You do not have enough turns to cloak.');
5 5
 	}
6 6
 	$player->takeTurns(TURNS_TO_CLOAK);
7
-	$player->increaseHOF(TURNS_TO_CLOAK,array('Movement','Cloaking','Turns Used'), HOF_ALLIANCE);
8
-	$player->increaseHOF(1,array('Movement','Cloaking','Times'), HOF_ALLIANCE);
7
+	$player->increaseHOF(TURNS_TO_CLOAK, array('Movement', 'Cloaking', 'Turns Used'), HOF_ALLIANCE);
8
+	$player->increaseHOF(1, array('Movement', 'Cloaking', 'Times'), HOF_ALLIANCE);
9 9
 	$ship->enableCloak();
10 10
 }
11 11
 elseif ($var['action'] == 'Disable') {
Please login to merge, or discard this patch.
engine/Default/bar_gambling_processing.php 1 patch
Spacing   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // blackjack
4
-$message='';
4
+$message = '';
5 5
 //num of decks and cards
6 6
 $decks = 1;
7 7
 $max_cards = 52 * $decks;
8 8
 
9 9
 //commonly used functions for bj
10
-function draw_card($decks,$curr_cards) {
10
+function draw_card($decks, $curr_cards) {
11 11
 	//get a card to give this person
12 12
 	//get real values of $curr_cards (1-52)
13 13
 	$real_cards = array();
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 	$max = 52 * $decks;
48 48
 	//1=ace of H, 13=king of H, 14=ace of C, 26=king of C
49 49
 	//27=ace of D, 39=king of D, 40=ace of S, 52=king of S
50
-	$result = mt_rand(1,$max);
50
+	$result = mt_rand(1, $max);
51 51
 	//no cards twice
52
-	while (in_array($result, $real_cards)) $result = mt_rand(1,$max);
52
+	while (in_array($result, $real_cards)) $result = mt_rand(1, $max);
53 53
 	$down = 1;
54 54
 	while ($result > 52) {
55 55
 		$result -= 52;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	elseif ($result == 13) {
84 84
 		$result = 'K';
85 85
 	}
86
-	$result = $result.'-'.$suit.'-'.$down;
86
+	$result = $result . '-' . $suit . '-' . $down;
87 87
 	return $result;
88 88
 }
89 89
 
@@ -124,23 +124,23 @@  discard block
 block discarded – undo
124 124
 	$card_height = 100;
125 125
 	$card_width = 125;
126 126
 	list($first, $second) = explode('-', $card);
127
-	$return=('<td>');
127
+	$return = ('<td>');
128 128
 	//lets try and echo cards
129
-	$return.=('<table style="border:1px solid green"><tr><td><table><tr><td valign=top align=left height='.$card_height.' width='.$card_width.'>');
129
+	$return .= ('<table style="border:1px solid green"><tr><td><table><tr><td valign=top align=left height=' . $card_height . ' width=' . $card_width . '>');
130 130
 	if ($show) {
131
-		$return.=('<h1>'.$first.'<img src="images/'.$second.'.gif"></h1></td></tr>');
131
+		$return .= ('<h1>' . $first . '<img src="images/' . $second . '.gif"></h1></td></tr>');
132 132
 	}
133 133
 	else {
134
-		$return.=('</td></tr>');
134
+		$return .= ('</td></tr>');
135 135
 	}
136
-	$return.=('<tr><td valign=bottom align=right height='.$card_height.' width='.$card_width.'>');
136
+	$return .= ('<tr><td valign=bottom align=right height=' . $card_height . ' width=' . $card_width . '>');
137 137
 	if ($show) {
138
-		$return.=('<h1><img src="images/'.$second.'.gif">'.$first.'</h1></td></tr></table>');
138
+		$return .= ('<h1><img src="images/' . $second . '.gif">' . $first . '</h1></td></tr></table>');
139 139
 	}
140 140
 	else {
141
-		$return.=('</td></tr></table>');
141
+		$return .= ('</td></tr></table>');
142 142
 	}
143
-	$return.=('</td></tr></table></td>');
143
+	$return .= ('</td></tr></table></td>');
144 144
 	return $return;
145 145
 }
146 146
 
@@ -209,25 +209,25 @@  discard block
 block discarded – undo
209 209
 	if (empty($cards)) {
210 210
 		$cards = array();
211 211
 	}
212
-	$player_curr_card = draw_card($decks,$cards);
212
+	$player_curr_card = draw_card($decks, $cards);
213 213
 	$player_card[] = $player_curr_card;
214 214
 	$cards[] = $player_curr_card;
215 215
 	if (sizeof($cards) >= $max_cards) {
216 216
 		$cards = array();
217 217
 	}
218
-	$ai_curr_card = draw_card($decks,$cards);
218
+	$ai_curr_card = draw_card($decks, $cards);
219 219
 	$ai_card[] = $ai_curr_card;
220 220
 	$cards[] = $ai_curr_card;
221 221
 	if (sizeof($cards) >= $max_cards) {
222 222
 		$cards = array();
223 223
 	}
224
-	$player_curr_card = draw_card($decks,$cards);
224
+	$player_curr_card = draw_card($decks, $cards);
225 225
 	$player_card[] = $player_curr_card;
226 226
 	$cards[] = $player_curr_card;
227 227
 	if (sizeof($cards) >= $max_cards) {
228 228
 		$cards = array();
229 229
 	}
230
-	$ai_curr_card = draw_card($decks,$cards);
230
+	$ai_curr_card = draw_card($decks, $cards);
231 231
 	$ai_card[] = $ai_curr_card;
232 232
 	$cards[] = $ai_curr_card;
233 233
 	if (sizeof($cards) >= $max_cards) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	$play_val = $var['player_val'];
249 249
 }
250 250
 if ($do == 'HIT') {
251
-	$player_curr_card = draw_card($decks,$cards);
251
+	$player_curr_card = draw_card($decks, $cards);
252 252
 	$player_card[] = $player_curr_card;
253 253
 	$cards[] = $player_curr_card;
254 254
 	if (sizeof($cards) >= $max_cards) {
@@ -262,16 +262,16 @@  discard block
 block discarded – undo
262 262
 	//heres the AIs cards
263 263
 	$i = 1;
264 264
 	if (get_value($ai_card) == 21 && sizeof($ai_card) == 2) {
265
-		$message.=('<div align="center"><h1><span class="red">Bank Wins</span></h1></div>');
265
+		$message .= ('<div align="center"><h1><span class="red">Bank Wins</span></h1></div>');
266 266
 	}
267
-	$message.=('<div align="center">Bank\'s Cards are</div><br /><table align="center"><tr>');
267
+	$message .= ('<div align="center">Bank\'s Cards are</div><br /><table align="center"><tr>');
268 268
 	foreach ($ai_card as $key => $value) {
269 269
 		if ($key == 0) {
270 270
 			//do we need a new row?
271 271
 			if ($i == 4 || $i == 7 || $i == 10) {
272
-				$message.=('</tr><tr>');
272
+				$message .= ('</tr><tr>');
273 273
 			}
274
-			$message.=create_card($value, TRUE);
274
+			$message .= create_card($value, TRUE);
275 275
 			$curr_ai_card = array();
276 276
 			$curr_ai_card[] = $value;
277 277
 			//get curr val of this card...for the at least part
@@ -281,23 +281,23 @@  discard block
 block discarded – undo
281 281
 		else {
282 282
 			//lets try and echo cards
283 283
 			//new row?
284
-			if ($i == 4 || $i == 7 || $i == 10) $message.=('</tr><tr>');
285
-			if (get_value($ai_card) == 21 || get_value($player_card) >= 21) $message.=create_card($value, TRUE);
286
-			else $message.=create_card($value, FALSE);
284
+			if ($i == 4 || $i == 7 || $i == 10) $message .= ('</tr><tr>');
285
+			if (get_value($ai_card) == 21 || get_value($player_card) >= 21) $message .= create_card($value, TRUE);
286
+			else $message .= create_card($value, FALSE);
287 287
 			$i++;
288 288
 		}
289 289
 	}
290 290
 
291
-	$message.=('</td></tr></table>');
291
+	$message .= ('</td></tr></table>');
292 292
 	if (get_value($ai_card) == 21 && sizeof($ai_card) == 2) {
293
-		$message.=('<div align=center>Bank has BLACKJACK!</div><br />');
293
+		$message .= ('<div align=center>Bank has BLACKJACK!</div><br />');
294 294
 		$win = 'no';
295 295
 	}
296 296
 	elseif (get_value($player_card) >= 21) {
297
-		$message.=('<div align=center>Bank has ' . get_value($ai_card) . '</div><br /><br />');
297
+		$message .= ('<div align=center>Bank has ' . get_value($ai_card) . '</div><br /><br />');
298 298
 	}
299 299
 	else {
300
-		$message.=('<div align=center>Bank has at least '.$ai_val.'</div><br />');
300
+		$message .= ('<div align=center>Bank has at least ' . $ai_val . '</div><br />');
301 301
 	}
302 302
 }
303 303
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
 	if (!(sizeof($player_card) == 2 && get_value($player_card) == 21)) {
319 319
 		while (get_value($ai_card) < 17) {
320
-			$ai_curr_card = draw_card($decks,$cards);
320
+			$ai_curr_card = draw_card($decks, $cards);
321 321
 			$ai_card[] = $ai_curr_card;
322 322
 			$cards[] = $ai_curr_card;
323 323
 			if (sizeof($cards) >= $max_cards) {
@@ -327,48 +327,48 @@  discard block
 block discarded – undo
327 327
 	}
328 328
 	$win = check_for_win($ai_card, $player_card);
329 329
 	if ($win == 'yes' || $win == 'bj') {
330
-		$message.=('<div align=center><h1><span class="red">You Win</span></h1></div>');
330
+		$message .= ('<div align=center><h1><span class="red">You Win</span></h1></div>');
331 331
 	}
332 332
 	elseif ($win == 'tie') {
333
-		$message.=('<div align=center><h1><span class="red">TIE Game</span></h1></div>');
333
+		$message .= ('<div align=center><h1><span class="red">TIE Game</span></h1></div>');
334 334
 	}
335 335
 	else {
336
-		$message.=('<div align=center><h1><span class="red">Bank Wins</span></h1></div>');
336
+		$message .= ('<div align=center><h1><span class="red">Bank Wins</span></h1></div>');
337 337
 	}
338
-	$message.=('<div align=center>Bank\'s Cards are</div><br /><table align=center><tr>');
338
+	$message .= ('<div align=center>Bank\'s Cards are</div><br /><table align=center><tr>');
339 339
 	foreach ($ai_card as $key => $value) {
340 340
 		//now row?
341 341
 		if ($i == 4 || $i == 7 || $i == 10) {
342
-			$message.=('</tr><tr>');
342
+			$message .= ('</tr><tr>');
343 343
 		}
344
-		$message.=create_card($value, TRUE);
344
+		$message .= create_card($value, TRUE);
345 345
 		$i++;
346 346
 	}
347
-	$message.=('</td></tr></table><div align=center>');
347
+	$message .= ('</td></tr></table><div align=center>');
348 348
 	if (get_value($ai_card) > 21) {
349
-		$message.=('Bank <span class="red"><b>BUSTED</b></span><br /><br />');
349
+		$message .= ('Bank <span class="red"><b>BUSTED</b></span><br /><br />');
350 350
 	}
351 351
 	else {
352
-		$message.=('Bank has ' . get_value($ai_card) . '<br /><br />');
352
+		$message .= ('Bank has ' . get_value($ai_card) . '<br /><br />');
353 353
 	}
354
-	$message.=('</div>');
354
+	$message .= ('</div>');
355 355
 }
356
-$message.=('<hr style="border:1px solid green;width:50%" noshade>');
356
+$message .= ('<hr style="border:1px solid green;width:50%" noshade>');
357 357
 $i = 1;
358 358
 
359 359
 $val1 = get_value($player_card);
360 360
 
361
-$message.=('<div align=center>Your Cards are</div><br /><table align=center><tr>');
361
+$message .= ('<div align=center>Your Cards are</div><br /><table align=center><tr>');
362 362
 foreach ($player_card as $key => $value) {
363 363
 	if ($i == 4 || $i == 7 || $i == 10) {
364
-		$message.=('</tr><tr>');
364
+		$message .= ('</tr><tr>');
365 365
 	}
366
-	$message.=create_card($value, TRUE);
366
+	$message .= create_card($value, TRUE);
367 367
 	$i++;
368 368
 }
369
-$message.=('</td></tr></table>');
369
+$message .= ('</td></tr></table>');
370 370
 
371
-$message.=('<div align=center>You have a total of ' . get_value($player_card) . ' </div><br />');
371
+$message .= ('<div align=center>You have a total of ' . get_value($player_card) . ' </div><br />');
372 372
 //check for win
373 373
 if ($do == 'STAY') {
374 374
 	$win = check_for_win($ai_card, $player_card);
@@ -379,61 +379,61 @@  discard block
 block discarded – undo
379 379
 $container['cards'] = $cards;
380 380
 $container['bet'] = $bet;
381 381
 
382
-$message.=('<div align=center>');
382
+$message .= ('<div align=center>');
383 383
 if (get_value($player_card) > 21) {
384
-	$message.=('You have <span class="red"><b>BUSTED</b></span>');
385
-	$player->increaseHOF($bet,array('Blackjack','Money','Lost'), HOF_PUBLIC);
386
-	$player->increaseHOF(1,array('Blackjack','Results','Lost'), HOF_PUBLIC);
387
-	$message.=create_echo_form($container);
388
-	$message.=create_submit('Play Some More ($'.$bet.')');
389
-	$message.=('</form>');
390
-	$message.=('</div>');
384
+	$message .= ('You have <span class="red"><b>BUSTED</b></span>');
385
+	$player->increaseHOF($bet, array('Blackjack', 'Money', 'Lost'), HOF_PUBLIC);
386
+	$player->increaseHOF(1, array('Blackjack', 'Results', 'Lost'), HOF_PUBLIC);
387
+	$message .= create_echo_form($container);
388
+	$message .= create_submit('Play Some More ($' . $bet . ')');
389
+	$message .= ('</form>');
390
+	$message .= ('</div>');
391 391
 }
392
-else if(!isset($win) && get_value($player_card) < 21) {
392
+else if (!isset($win) && get_value($player_card) < 21) {
393 393
 	$container['player_card'] = $player_card;
394 394
 	$container['player_does'] = 'HIT';
395 395
 	$container['ai_card'] = $ai_card;
396 396
 	$container['player_val'] = $val1;
397
-	$message.=create_echo_form($container);
398
-	$message.=create_submit('HIT');
399
-	$message.=('<br /><small><br /></small></form>');
397
+	$message .= create_echo_form($container);
398
+	$message .= create_submit('HIT');
399
+	$message .= ('<br /><small><br /></small></form>');
400 400
 	$container['player_does'] = 'STAY';
401
-	$message.=create_echo_form($container);
402
-	$message.=create_submit('STAY');
403
-	$message.=('</form></div>');
401
+	$message .= create_echo_form($container);
402
+	$message .= create_submit('STAY');
403
+	$message .= ('</form></div>');
404 404
 }
405
-else if(isset($win)) {
405
+else if (isset($win)) {
406 406
 	//we have a winner...but who!
407 407
 	if ($win == 'bj') {
408 408
 		$player->increaseCredits($bet * 2.5);
409 409
 		$stat = ($bet * 2.5) - $bet;
410 410
 		$player->update();
411
-		$player->increaseHOF($stat, array('Blackjack','Money','Won'), HOF_PUBLIC);
412
-		$player->increaseHOF(1, array('Blackjack','Results','Won'), HOF_PUBLIC);
413
-		$message.=('You have won $' . number_format($bet * 2.5) . ' credits!');
411
+		$player->increaseHOF($stat, array('Blackjack', 'Money', 'Won'), HOF_PUBLIC);
412
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Won'), HOF_PUBLIC);
413
+		$message .= ('You have won $' . number_format($bet * 2.5) . ' credits!');
414 414
 	}
415 415
 	elseif ($win == 'yes') {
416 416
 		$player->increaseCredits($bet * 2);
417 417
 		$stat = ($bet * 2) - $bet;
418 418
 		$player->update();
419
-		$player->increaseHOF($stat,array('Blackjack','Money','Won'), HOF_PUBLIC);
420
-		$player->increaseHOF(1, array('Blackjack','Results','Won'), HOF_PUBLIC);
421
-		$message.=('You have won $' . number_format($bet * 2) . ' credits!');
419
+		$player->increaseHOF($stat, array('Blackjack', 'Money', 'Won'), HOF_PUBLIC);
420
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Won'), HOF_PUBLIC);
421
+		$message .= ('You have won $' . number_format($bet * 2) . ' credits!');
422 422
 	}
423 423
 	elseif ($win == 'tie') {
424 424
 		$player->increaseCredits($bet);
425 425
 		$player->update();
426
-		$player->increaseHOF(1, array('Blackjack','Results','Draw'), HOF_PUBLIC);
427
-		$message.=('You have won back your $' . number_format($bet) . ' credits.');
426
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Draw'), HOF_PUBLIC);
427
+		$message .= ('You have won back your $' . number_format($bet) . ' credits.');
428 428
 	}
429 429
 	else {
430
-		$player->increaseHOF($bet,array('Blackjack','Money','Lost'), HOF_PUBLIC);
431
-		$player->increaseHOF(1,array('Blackjack','Results','Lost'), HOF_PUBLIC);
430
+		$player->increaseHOF($bet, array('Blackjack', 'Money', 'Lost'), HOF_PUBLIC);
431
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Lost'), HOF_PUBLIC);
432 432
 	}
433
-	$message.=create_echo_form($container);
434
-	$message.=create_submit('Play Some More ($'.$bet.')');
435
-	$message.=('</form>');
436
-	$message.=('</div>');
433
+	$message .= create_echo_form($container);
434
+	$message .= create_submit('Play Some More ($' . $bet . ')');
435
+	$message .= ('</form>');
436
+	$message .= ('</div>');
437 437
 }
438 438
 elseif ($val1 == 21) {
439 439
 	if (get_value($ai_card) != 21) {
@@ -446,31 +446,31 @@  discard block
 block discarded – undo
446 446
 		$player->increaseCredits($bet * $winnings);
447 447
 		$stat = ($bet * $winnings) - $bet;
448 448
 		$player->update();
449
-		$player->increaseHOF($stat,array('Blackjack','Money','Win'), HOF_PUBLIC);
450
-		$player->increaseHOF(1,array('Blackjack','Results','Win'), HOF_PUBLIC);
451
-		$message.=('You have won $' . number_format($bet * $winnings) . ' credits!');
449
+		$player->increaseHOF($stat, array('Blackjack', 'Money', 'Win'), HOF_PUBLIC);
450
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Win'), HOF_PUBLIC);
451
+		$message .= ('You have won $' . number_format($bet * $winnings) . ' credits!');
452 452
 	}
453
-	else if(sizeof($ai_card) > 2) {
453
+	else if (sizeof($ai_card) > 2) {
454 454
 		$winnings = 1;
455 455
 		$player->increaseCredits($bet * $winnings);
456 456
 		$stat = ($bet * $winnings) - $bet;
457 457
 		$player->update();
458
-		$player->increaseHOF($stat,array('Blackjack','Money','Win'), HOF_PUBLIC);
459
-		$player->increaseHOF(1,array('Blackjack','Results','Win'), HOF_PUBLIC);
460
-		$message.=('You have won back your $' . number_format($bet * $winnings) . ' credits!');
458
+		$player->increaseHOF($stat, array('Blackjack', 'Money', 'Win'), HOF_PUBLIC);
459
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Win'), HOF_PUBLIC);
460
+		$message .= ('You have won back your $' . number_format($bet * $winnings) . ' credits!');
461 461
 	}
462 462
 	else {
463 463
 		//AI has BJ already...sorry
464
-		$player->increaseHOF($bet,array('Blackjack','Money','Lost'), HOF_PUBLIC);
465
-		$player->increaseHOF(1,array('Blackjack','Results','Lost'), HOF_PUBLIC);
464
+		$player->increaseHOF($bet, array('Blackjack', 'Money', 'Lost'), HOF_PUBLIC);
465
+		$player->increaseHOF(1, array('Blackjack', 'Results', 'Lost'), HOF_PUBLIC);
466 466
 	}
467
-	$message.=create_echo_form($container);
468
-	$message.=create_submit('Play Some More ($'.$bet.')');
469
-	$message.=('</form>');
470
-	$message.=('</div>');
467
+	$message .= create_echo_form($container);
468
+	$message .= create_submit('Play Some More ($' . $bet . ')');
469
+	$message .= ('</form>');
470
+	$message .= ('</div>');
471 471
 }
472 472
 
473
-$container=create_container('skeleton.php','bar_gambling_bet.php');
473
+$container = create_container('skeleton.php', 'bar_gambling_bet.php');
474 474
 transfer('LocationID');
475 475
 $container['message'] = $message;
476 476
 $container['AllowAjax'] = false;
Please login to merge, or discard this patch.