We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | // Send vote announcement to members of the player's council (war votes) |
| 40 | 40 | // or both races' councils (peace votes). |
| 41 | 41 | $councilMembers = Council::getRaceCouncil($player->getGameID(), |
| 42 | - $player->getRaceID()); |
|
| 42 | + $player->getRaceID()); |
|
| 43 | 43 | if ($type == 'PEACE') { |
| 44 | 44 | $otherCouncil = Council::getRaceCouncil($player->getGameID(), $race_id); |
| 45 | 45 | $councilMembers = array_merge($councilMembers, $otherCouncil); |
@@ -49,16 +49,16 @@ discard block |
||
| 49 | 49 | $color = ($type == 'PEACE' ? 'dgreen' : 'red'); |
| 50 | 50 | $type_fancy = "<span class=\"$color\">$type</span>"; |
| 51 | 51 | $message = $player->getLevelName() . " " . $player->getBBLink() |
| 52 | - . " has initiated a vote for $type_fancy with the " |
|
| 53 | - . Globals::getRaceName($race_id) |
|
| 54 | - . "! You have " . format_time(TIME_FOR_COUNCIL_VOTE) |
|
| 55 | - . " to cast your vote."; |
|
| 52 | + . " has initiated a vote for $type_fancy with the " |
|
| 53 | + . Globals::getRaceName($race_id) |
|
| 54 | + . "! You have " . format_time(TIME_FOR_COUNCIL_VOTE) |
|
| 55 | + . " to cast your vote."; |
|
| 56 | 56 | |
| 57 | 57 | foreach ($councilMembers as $accountID) { |
| 58 | 58 | // don't send to the player who started the vote |
| 59 | 59 | if ($player->getAccountID() != $accountID) { |
| 60 | 60 | SmrPlayer::sendMessageFromRace($player->getRaceID(), $player->getGameID(), |
| 61 | - $accountID, $message, $time); |
|
| 61 | + $accountID, $message, $time); |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -20,13 +20,13 @@ |
||
| 20 | 20 | const USER_SCORE_NAME = 'User Score'; |
| 21 | 21 | $hofTypes = array(DONATION_NAME=>true, USER_SCORE_NAME=>true); |
| 22 | 22 | while ($db->nextRecord()) { |
| 23 | - $hof =& $hofTypes; |
|
| 23 | + $hof = & $hofTypes; |
|
| 24 | 24 | $typeList = explode(':', $db->getField('type')); |
| 25 | 25 | foreach ($typeList as $type) { |
| 26 | 26 | if (!isset($hof[$type])) { |
| 27 | 27 | $hof[$type] = array(); |
| 28 | 28 | } |
| 29 | - $hof =& $hof[$type]; |
|
| 29 | + $hof = & $hof[$type]; |
|
| 30 | 30 | } |
| 31 | 31 | $hof = true; |
| 32 | 32 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | // Don't lose more exp than you have |
| 48 | 48 | $lost_xp = min($player->getExperience(), |
| 49 | - IRound(SmrPort::getBaseExperience($amount, $good_distance))); |
|
| 49 | + IRound(SmrPort::getBaseExperience($amount, $good_distance))); |
|
| 50 | 50 | $player->decreaseExperience($lost_xp); |
| 51 | 51 | $player->increaseHOF($lost_xp, array('Trade', 'Experience', 'Jettisoned'), HOF_PUBLIC); |
| 52 | 52 | |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | //heres the AIs cards |
| 97 | 97 | $i = 1; |
| 98 | 98 | if ($dealerHand->hasBlackjack() || |
| 99 | - ($playerHand->getValue() > 21 && $dealerHand->getValue() <= 21)) { |
|
| 99 | + ($playerHand->getValue() > 21 && $dealerHand->getValue() <= 21)) { |
|
| 100 | 100 | $message .= ('<h1 class="red center">Bank Wins</h1>'); |
| 101 | 101 | } |
| 102 | 102 | $message .= ('<div class="center">Bank\'s Cards are</div><br /><table class="center"><tr>'); |
@@ -19,8 +19,8 @@ discard block |
||
| 19 | 19 | $shareFrom[$fromAccountId] = array( |
| 20 | 20 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
| 21 | 21 | 'Player Name' => $otherPlayer == null ? |
| 22 | - '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : |
|
| 23 | - $otherPlayer->getDisplayName(), |
|
| 22 | + '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : |
|
| 23 | + $otherPlayer->getDisplayName(), |
|
| 24 | 24 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
| 25 | 25 | 'Game ID' => $gameId, |
| 26 | 26 | ); |
@@ -40,8 +40,8 @@ discard block |
||
| 40 | 40 | $shareTo[$toAccountId] = array( |
| 41 | 41 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
| 42 | 42 | 'Player Name' => $otherPlayer == null ? |
| 43 | - '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : |
|
| 44 | - $otherPlayer->getDisplayName(), |
|
| 43 | + '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : |
|
| 44 | + $otherPlayer->getDisplayName(), |
|
| 45 | 45 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
| 46 | 46 | 'Game ID' => $gameId, |
| 47 | 47 | ); |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | $shareFrom[$fromAccountId] = array( |
| 20 | 20 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
| 21 | 21 | 'Player Name' => $otherPlayer == null ? |
| 22 | - '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : |
|
| 23 | - $otherPlayer->getDisplayName(), |
|
| 22 | + '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : $otherPlayer->getDisplayName(), |
|
| 24 | 23 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
| 25 | 24 | 'Game ID' => $gameId, |
| 26 | 25 | ); |
@@ -40,8 +39,7 @@ discard block |
||
| 40 | 39 | $shareTo[$toAccountId] = array( |
| 41 | 40 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
| 42 | 41 | 'Player Name' => $otherPlayer == null ? |
| 43 | - '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : |
|
| 44 | - $otherPlayer->getDisplayName(), |
|
| 42 | + '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : $otherPlayer->getDisplayName(), |
|
| 45 | 43 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
| 46 | 44 | 'Game ID' => $gameId, |
| 47 | 45 | ); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | $db3 = MySqlDatabase::getInstance(); |
| 8 | 8 | |
| 9 | 9 | // get current entry |
| 10 | - $db->query('SELECT * FROM manual WHERE topic_id = '.$db->escapeNumber($topic_id)); |
|
| 10 | + $db->query('SELECT * FROM manual WHERE topic_id = ' . $db->escapeNumber($topic_id)); |
|
| 11 | 11 | if ($db->nextRecord()) { |
| 12 | 12 | $parent_topic_id = $db->getInt('parent_topic_id'); |
| 13 | 13 | $order_id = $db->getInt('order_id'); |
@@ -19,17 +19,17 @@ discard block |
||
| 19 | 19 | // ************************** |
| 20 | 20 | // ** PREVIOUS |
| 21 | 21 | // ************************** |
| 22 | - $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id - 1)); |
|
| 22 | + $db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id - 1)); |
|
| 23 | 23 | |
| 24 | 24 | // no result? |
| 25 | 25 | if (!$db2->getNumRows()) |
| 26 | - $db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id)); |
|
| 26 | + $db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id)); |
|
| 27 | 27 | |
| 28 | 28 | echo ('<th width="32">'); |
| 29 | 29 | if ($db2->nextRecord()) { |
| 30 | 30 | $previous_topic_id = $db2->getInt('topic_id'); |
| 31 | 31 | $previous_topic = stripslashes($db2->getField('topic')); |
| 32 | - echo ('<a href="/manual.php?'.$previous_topic_id.'"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>'); |
|
| 32 | + echo ('<a href="/manual.php?' . $previous_topic_id . '"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>'); |
|
| 33 | 33 | } else |
| 34 | 34 | echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
| 35 | 35 | echo ('</th>'); |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | // ************************** |
| 38 | 38 | // ** UP |
| 39 | 39 | // ************************** |
| 40 | - $db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id)); |
|
| 40 | + $db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id)); |
|
| 41 | 41 | echo ('<th width="32">'); |
| 42 | 42 | if ($db2->nextRecord()) { |
| 43 | 43 | $up_topic_id = $db2->getInt('topic_id'); |
| 44 | 44 | $up_topic = stripslashes($db2->getField('topic')); |
| 45 | - echo ('<a href="/manual.php?'.$up_topic_id.'"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>'); |
|
| 45 | + echo ('<a href="/manual.php?' . $up_topic_id . '"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>'); |
|
| 46 | 46 | } else |
| 47 | 47 | echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
| 48 | 48 | echo ('</th>'); |
@@ -50,35 +50,35 @@ discard block |
||
| 50 | 50 | // ************************** |
| 51 | 51 | // ** NEXT |
| 52 | 52 | // ************************** |
| 53 | - $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($topic_id).' AND order_id = 1'); |
|
| 53 | + $db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($topic_id) . ' AND order_id = 1'); |
|
| 54 | 54 | |
| 55 | 55 | if (!$db2->getNumRows()) |
| 56 | - $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1)); |
|
| 56 | + $db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id + 1)); |
|
| 57 | 57 | |
| 58 | 58 | $seenParentIDs = array(0); |
| 59 | 59 | $curr_parent_topic_id = $parent_topic_id; |
| 60 | 60 | while (!$db2->getNumRows() && !in_array($curr_parent_topic_id, $seenParentIDs)) { |
| 61 | 61 | $seenParentIDs[] = $curr_parent_topic_id; |
| 62 | - $db3->query('SELECT * FROM manual WHERE topic_id = '.$db3->escapeNumber($parent_topic_id)); |
|
| 62 | + $db3->query('SELECT * FROM manual WHERE topic_id = ' . $db3->escapeNumber($parent_topic_id)); |
|
| 63 | 63 | $db3->nextRecord(); |
| 64 | 64 | $curr_order_id = $db3->getInt('order_id'); |
| 65 | 65 | $curr_parent_topic_id = $db3->getInt('parent_topic_id'); |
| 66 | 66 | |
| 67 | - $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($curr_order_id + 1)); |
|
| 67 | + $db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($curr_order_id + 1)); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | echo ('<th width="32">'); |
| 71 | 71 | if ($db2->nextRecord()) { |
| 72 | 72 | $next_topic_id = $db2->getInt('topic_id'); |
| 73 | 73 | $next_topic = stripslashes($db2->getField('topic')); |
| 74 | - echo ('<a href="/manual.php?'.$next_topic_id.'"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>'); |
|
| 74 | + echo ('<a href="/manual.php?' . $next_topic_id . '"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>'); |
|
| 75 | 75 | } |
| 76 | 76 | else { |
| 77 | 77 | echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
| 78 | 78 | } |
| 79 | 79 | echo ('</th>'); |
| 80 | 80 | |
| 81 | - echo ('<th width="100%" class="center" validn="middle" style="font-size:18pt;font-weight:bold;">' . get_numbering($topic_id) . $topic.'</th>'); |
|
| 81 | + echo ('<th width="100%" class="center" validn="middle" style="font-size:18pt;font-weight:bold;">' . get_numbering($topic_id) . $topic . '</th>'); |
|
| 82 | 82 | echo ('<th width="32"><a href="/manual_toc.php"><img src="/images/help/contents.jpg" width="32" height="32" border="0"></a></th>'); |
| 83 | 83 | |
| 84 | 84 | echo ('</tr>'); |
@@ -86,11 +86,11 @@ discard block |
||
| 86 | 86 | echo ('<tr>'); |
| 87 | 87 | echo ('<td colspan="5">'); |
| 88 | 88 | if (isset($previous_topic_id) && $previous_topic_id > 0) |
| 89 | - echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a> '); |
|
| 89 | + echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a> '); |
|
| 90 | 90 | if (isset($up_topic_id) && $up_topic_id > 0) |
| 91 | - echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a> '); |
|
| 91 | + echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a> '); |
|
| 92 | 92 | if (isset($next_topic_id) && $next_topic_id > 0) |
| 93 | - echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>'); |
|
| 93 | + echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>'); |
|
| 94 | 94 | echo ('</tr>'); |
| 95 | 95 | |
| 96 | 96 | echo ('</table>'); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $db = MySqlDatabase::getInstance(); |
| 104 | 104 | |
| 105 | 105 | // get current entry |
| 106 | - $db->query('SELECT * FROM manual WHERE topic_id = '.$topic_id); |
|
| 106 | + $db->query('SELECT * FROM manual WHERE topic_id = ' . $topic_id); |
|
| 107 | 107 | if ($db->nextRecord()) { |
| 108 | 108 | $parent_topic_id = $db->getInt('parent_topic_id'); |
| 109 | 109 | $order_id = $db->getInt('order_id'); |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | $text = stripslashes($db->getField('text')); |
| 112 | 112 | |
| 113 | 113 | echo ('<div id="help_content">'); |
| 114 | - echo ('<h1>' . get_numbering($topic_id) . $topic.'</h1>'); |
|
| 115 | - echo ('<p>'.$text.'<p>'); |
|
| 114 | + echo ('<h1>' . get_numbering($topic_id) . $topic . '</h1>'); |
|
| 115 | + echo ('<p>' . $text . '<p>'); |
|
| 116 | 116 | echo ('</div>'); |
| 117 | 117 | } else |
| 118 | 118 | echo ('Invalid Topic!'); |
@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | function echo_subsection($topic_id) { |
| 122 | 122 | // database object |
| 123 | 123 | $db = MySqlDatabase::getInstance(); |
| 124 | - $return=''; |
|
| 124 | + $return = ''; |
|
| 125 | 125 | // check if there are subsections |
| 126 | - $db->query('SELECT * FROM manual WHERE parent_topic_id = '.$db->escapeNumber($topic_id).' ORDER BY order_id'); |
|
| 126 | + $db->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db->escapeNumber($topic_id) . ' ORDER BY order_id'); |
|
| 127 | 127 | if ($db->getNumRows()) { |
| 128 | 128 | echo ('<hr noshade width="75%" size="1" class="center"/>'); |
| 129 | 129 | echo ('<div id="help_menu">'); |
@@ -137,19 +137,19 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | function echo_menu($topic_id) { |
| 140 | - $return=''; |
|
| 140 | + $return = ''; |
|
| 141 | 141 | // database object |
| 142 | 142 | $db = MySqlDatabase::getInstance(); |
| 143 | 143 | |
| 144 | - $db->query('SELECT * FROM manual WHERE parent_topic_id = '.$db->escapeNumber($topic_id).' ORDER BY order_id'); |
|
| 144 | + $db->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db->escapeNumber($topic_id) . ' ORDER BY order_id'); |
|
| 145 | 145 | if ($db->getNumRows()) { |
| 146 | 146 | echo ('<ul type="disc">'); |
| 147 | - while($db->nextRecord()) { |
|
| 147 | + while ($db->nextRecord()) { |
|
| 148 | 148 | $sub_topic_id = $db->getInt('topic_id'); |
| 149 | 149 | $order_id = $db->getInt('order_id'); |
| 150 | 150 | $sub_topic = stripslashes($db->getField('topic')); |
| 151 | 151 | |
| 152 | - echo ('<li><a href="/manual.php?'.$sub_topic_id.'">' . get_numbering($sub_topic_id) . $sub_topic.'</a></li>'); |
|
| 152 | + echo ('<li><a href="/manual.php?' . $sub_topic_id . '">' . get_numbering($sub_topic_id) . $sub_topic . '</a></li>'); |
|
| 153 | 153 | echo_menu($sub_topic_id); |
| 154 | 154 | } |
| 155 | 155 | echo ('</ul>'); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | function get_numbering($topic_id) { |
| 161 | 161 | $db = MySqlDatabase::getInstance(); |
| 162 | 162 | |
| 163 | - $db->query('SELECT * FROM manual WHERE topic_id = '.$db->escapeNumber($topic_id)); |
|
| 163 | + $db->query('SELECT * FROM manual WHERE topic_id = ' . $db->escapeNumber($topic_id)); |
|
| 164 | 164 | if ($db->nextRecord()) { |
| 165 | 165 | $up_topic_id = $db->getInt('parent_topic_id'); |
| 166 | 166 | $order_id = $db->getInt('order_id'); |
@@ -22,16 +22,18 @@ discard block |
||
| 22 | 22 | $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id - 1)); |
| 23 | 23 | |
| 24 | 24 | // no result? |
| 25 | - if (!$db2->getNumRows()) |
|
| 26 | - $db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id)); |
|
| 25 | + if (!$db2->getNumRows()) { |
|
| 26 | + $db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id)); |
|
| 27 | + } |
|
| 27 | 28 | |
| 28 | 29 | echo ('<th width="32">'); |
| 29 | 30 | if ($db2->nextRecord()) { |
| 30 | 31 | $previous_topic_id = $db2->getInt('topic_id'); |
| 31 | 32 | $previous_topic = stripslashes($db2->getField('topic')); |
| 32 | 33 | echo ('<a href="/manual.php?'.$previous_topic_id.'"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>'); |
| 33 | - } else |
|
| 34 | - echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
|
| 34 | + } else { |
|
| 35 | + echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
|
| 36 | + } |
|
| 35 | 37 | echo ('</th>'); |
| 36 | 38 | |
| 37 | 39 | // ************************** |
@@ -43,8 +45,9 @@ discard block |
||
| 43 | 45 | $up_topic_id = $db2->getInt('topic_id'); |
| 44 | 46 | $up_topic = stripslashes($db2->getField('topic')); |
| 45 | 47 | echo ('<a href="/manual.php?'.$up_topic_id.'"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>'); |
| 46 | - } else |
|
| 47 | - echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
|
| 48 | + } else { |
|
| 49 | + echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
|
| 50 | + } |
|
| 48 | 51 | echo ('</th>'); |
| 49 | 52 | |
| 50 | 53 | // ************************** |
@@ -52,8 +55,9 @@ discard block |
||
| 52 | 55 | // ************************** |
| 53 | 56 | $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($topic_id).' AND order_id = 1'); |
| 54 | 57 | |
| 55 | - if (!$db2->getNumRows()) |
|
| 56 | - $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1)); |
|
| 58 | + if (!$db2->getNumRows()) { |
|
| 59 | + $db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1)); |
|
| 60 | + } |
|
| 57 | 61 | |
| 58 | 62 | $seenParentIDs = array(0); |
| 59 | 63 | $curr_parent_topic_id = $parent_topic_id; |
@@ -72,8 +76,7 @@ discard block |
||
| 72 | 76 | $next_topic_id = $db2->getInt('topic_id'); |
| 73 | 77 | $next_topic = stripslashes($db2->getField('topic')); |
| 74 | 78 | echo ('<a href="/manual.php?'.$next_topic_id.'"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>'); |
| 75 | - } |
|
| 76 | - else { |
|
| 79 | + } else { |
|
| 77 | 80 | echo ('<img src="/images/help/empty.jpg" width="32" height="32">'); |
| 78 | 81 | } |
| 79 | 82 | echo ('</th>'); |
@@ -85,18 +88,22 @@ discard block |
||
| 85 | 88 | |
| 86 | 89 | echo ('<tr>'); |
| 87 | 90 | echo ('<td colspan="5">'); |
| 88 | - if (isset($previous_topic_id) && $previous_topic_id > 0) |
|
| 89 | - echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a> '); |
|
| 90 | - if (isset($up_topic_id) && $up_topic_id > 0) |
|
| 91 | - echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a> '); |
|
| 92 | - if (isset($next_topic_id) && $next_topic_id > 0) |
|
| 93 | - echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>'); |
|
| 91 | + if (isset($previous_topic_id) && $previous_topic_id > 0) { |
|
| 92 | + echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a> '); |
|
| 93 | + } |
|
| 94 | + if (isset($up_topic_id) && $up_topic_id > 0) { |
|
| 95 | + echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a> '); |
|
| 96 | + } |
|
| 97 | + if (isset($next_topic_id) && $next_topic_id > 0) { |
|
| 98 | + echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>'); |
|
| 99 | + } |
|
| 94 | 100 | echo ('</tr>'); |
| 95 | 101 | |
| 96 | 102 | echo ('</table>'); |
| 97 | - } else |
|
| 98 | - echo ('Invalid Topic!'); |
|
| 99 | -} |
|
| 103 | + } else { |
|
| 104 | + echo ('Invalid Topic!'); |
|
| 105 | + } |
|
| 106 | + } |
|
| 100 | 107 | |
| 101 | 108 | function echo_content($topic_id) { |
| 102 | 109 | // database object |
@@ -114,9 +121,10 @@ discard block |
||
| 114 | 121 | echo ('<h1>' . get_numbering($topic_id) . $topic.'</h1>'); |
| 115 | 122 | echo ('<p>'.$text.'<p>'); |
| 116 | 123 | echo ('</div>'); |
| 117 | - } else |
|
| 118 | - echo ('Invalid Topic!'); |
|
| 119 | -} |
|
| 124 | + } else { |
|
| 125 | + echo ('Invalid Topic!'); |
|
| 126 | + } |
|
| 127 | + } |
|
| 120 | 128 | |
| 121 | 129 | function echo_subsection($topic_id) { |
| 122 | 130 | // database object |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | $announcements = []; |
| 17 | 17 | while ($db->nextRecord()) { |
| 18 | 18 | $announcements[] = ['Time' => $db->getInt('time'), |
| 19 | - 'Msg' => htmlentities($db->getField('msg'))]; |
|
| 19 | + 'Msg' => htmlentities($db->getField('msg'))]; |
|
| 20 | 20 | } |
| 21 | 21 | $template->assign('Announcements', $announcements); |
| 22 | 22 | |
@@ -72,18 +72,18 @@ |
||
| 72 | 72 | |
| 73 | 73 | // If mines are bumped, the forces shoot first. Otherwise player shoots first. |
| 74 | 74 | if ($bump) { |
| 75 | - $results['Forces'] =& $forces->shootPlayers($attackers, $bump); |
|
| 75 | + $results['Forces'] = & $forces->shootPlayers($attackers, $bump); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $results['Attackers'] = array('TotalDamage' => 0); |
| 79 | 79 | foreach ($attackers as $attacker) { |
| 80 | - $playerResults =& $attacker->shootForces($forces); |
|
| 81 | - $results['Attackers']['Traders'][$attacker->getAccountID()] =& $playerResults; |
|
| 80 | + $playerResults = & $attacker->shootForces($forces); |
|
| 81 | + $results['Attackers']['Traders'][$attacker->getAccountID()] = & $playerResults; |
|
| 82 | 82 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | if (!$bump) { |
| 86 | - $results['Forces'] =& $forces->shootPlayers($attackers, $bump); |
|
| 86 | + $results['Forces'] = & $forces->shootPlayers($attackers, $bump); |
|
| 87 | 87 | $forces->updateExpire(); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | |
| 42 | 42 | function teamAttack(&$results, $fightingPlayers, $attack, $defend) { |
| 43 | 43 | foreach ($fightingPlayers[$attack] as $accountID => $teamPlayer) { |
| 44 | - $playerResults =& $teamPlayer->shootPlayers($fightingPlayers[$defend]); |
|
| 45 | - $results[$attack]['Traders'][$teamPlayer->getAccountID()] =& $playerResults; |
|
| 44 | + $playerResults = & $teamPlayer->shootPlayers($fightingPlayers[$defend]); |
|
| 45 | + $results[$attack]['Traders'][$teamPlayer->getAccountID()] = & $playerResults; |
|
| 46 | 46 | $results[$attack]['TotalDamage'] += $playerResults['TotalDamage']; |
| 47 | 47 | |
| 48 | 48 | // Award assists (if there are multiple attackers) |