|
34 | 34 | if (!$auth->allowedToViewAccount) {
|
35 | 35 | $this->deny();
|
36 | 36 | }
|
37 |
| - |
| 37 | + |
38 | 38 | $sql = "SELECT login.*, {$creditColumns}, {$createColumns} FROM {$server->loginDatabase}.login ";
|
39 | 39 | $sql .= "LEFT OUTER JOIN {$server->loginDatabase}.{$creditsTable} AS credits ON login.account_id = credits.account_id ";
|
40 | 40 | $sql .= "LEFT OUTER JOIN {$server->loginDatabase}.{$createTable} AS created ON login.account_id = created.account_id ";
|
41 | 41 | $sql .= "WHERE login.sex != 'S' AND login.group_id >= 0 AND login.account_id = ? LIMIT 1";
|
42 | 42 | $sth = $server->connection->getStatement($sql);
|
43 | 43 | $sth->execute(array($accountID));
|
44 |
| - |
| 44 | + |
45 | 45 | // Account object.
|
46 | 46 | $account = $sth->fetch();
|
47 |
| - |
| 47 | + |
48 | 48 | if ($account) {
|
49 | 49 | $title = sprintf(Flux::message('AccountViewTitle2'), $account->userid);
|
50 | 50 | }
|
|
70 | 70 | $vipexpires = 'Expires '.$dt->format('Y-m-d');
|
71 | 71 | } elseif ($account->vip_time == '0'){
|
72 | 72 | $vipexpires = 'Standard Account';
|
73 |
| -} else {$vipexpires = 'Unknown';} |
| 73 | +} else {$vipexpires = 'Unknown';} |
74 | 74 |
|
75 | 75 | if (count($_POST) && $account) {
|
76 | 76 | $reason = (string)$params->get('reason');
|
77 |
| - |
| 77 | + |
78 | 78 | if ($params->get('tempban') && ($tempBanDate=$params->get('tempban_date'))) {
|
79 | 79 | if ($canTempBan) {
|
80 | 80 | if ($server->loginServer->temporarilyBan($session->account->account_id, $reason, $account->account_id, $tempBanDate)) {
|
|
108 | 108 | $tbl = Flux::config('FluxTables.AccountCreateTable');
|
109 | 109 | $sql = "SELECT account_id FROM {$server->loginDatabase}.$tbl WHERE confirmed = 0 AND account_id = ?";
|
110 | 110 | $sth = $server->connection->getStatement($sql);
|
111 |
| - |
| 111 | + |
112 | 112 | $sth->execute(array($account->account_id));
|
113 | 113 | $confirm = $sth->fetch();
|
114 |
| - |
| 114 | + |
115 | 115 | $sql = "UPDATE {$server->loginDatabase}.$tbl SET confirmed = 1, confirm_expire = NULL WHERE account_id = ?";
|
116 | 116 | $sth = $server->connection->getStatement($sql);
|
117 |
| - |
| 117 | + |
118 | 118 | if ($tempBanned && $auth->allowedToTempUnbanAccount &&
|
119 | 119 | $server->loginServer->unban($session->account->account_id, $reason, $account->account_id)) {
|
120 |
| - |
| 120 | + |
121 | 121 | if ($confirm) {
|
122 | 122 | $sth->execute(array($account->account_id));
|
123 | 123 | }
|
124 |
| - |
| 124 | + |
125 | 125 | $session->setMessageData(Flux::message('AccountLiftTempBan'));
|
126 | 126 | $this->redirect($this->url('account', 'view', array('id' => $account->account_id)));
|
127 | 127 | }
|
128 | 128 | elseif ($permBanned && $auth->allowedToPermUnbanAccount &&
|
129 | 129 | $server->loginServer->unban($session->account->account_id, $reason, $account->account_id)) {
|
130 |
| - |
| 130 | + |
131 | 131 | if ($confirm) {
|
132 | 132 | $sth->execute(array($account->account_id));
|
133 | 133 | }
|
134 |
| - |
| 134 | + |
135 | 135 | $session->setMessageData(Flux::message('AccountLiftPermBan'));
|
136 | 136 | $this->redirect($this->url('account', 'view', array('id' => $account->account_id)));
|
137 | 137 | }
|
|
149 | 149 | $characters = array();
|
150 | 150 | foreach ($session->getAthenaServerNames() as $serverName) {
|
151 | 151 | $athena = $session->getAthenaServer($serverName);
|
152 |
| - |
153 |
| - $sql = "SELECT ch.*, guild.name AS guild_name, "; |
| 152 | + |
| 153 | + $sql = "SELECT ch.*, guild.name AS guild_name "; |
154 | 154 | $sql .= "FROM {$athena->charMapDatabase}.`char` AS ch ";
|
155 | 155 | $sql .= "LEFT OUTER JOIN {$athena->charMapDatabase}.guild ON guild.guild_id = ch.guild_id ";
|
156 | 156 | $sql .= "WHERE ch.account_id = ? ORDER BY ch.char_num ASC";
|
|
190 | 190 |
|
191 | 191 | foreach ($items as $item) {
|
192 | 192 | $item->cardsOver = -$item->slots;
|
193 |
| - |
| 193 | + |
194 | 194 | if ($item->card0) {
|
195 | 195 | $cardIDs[] = $item->card0;
|
196 | 196 | $item->cardsOver++;
|
|
207 | 207 | $cardIDs[] = $item->card3;
|
208 | 208 | $item->cardsOver++;
|
209 | 209 | }
|
210 |
| - |
| 210 | + |
211 | 211 | if ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) {
|
212 | 212 | $item->cardsOver = 0;
|
213 | 213 | }
|
|
237 | 237 | }
|
238 | 238 | }
|
239 | 239 | }
|
240 |
| - |
| 240 | + |
241 | 241 | $itemAttributes = Flux::config('Attributes')->toArray();
|
242 | 242 | $type_list = Flux::config('ItemTypes')->toArray();
|
243 | 243 | }
|
|
0 commit comments