@@ -1,52 +1,52 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -function dump($value,$varname = "",$level=0,$dumper = "") |
|
| 3 | +function dump($value, $varname = "", $level = 0, $dumper = "") |
|
| 4 | 4 | { |
| 5 | 5 | if ($varname) $varname .= " = "; |
| 6 | 6 | |
| 7 | - if ($level==-1) |
|
| 7 | + if ($level == -1) |
|
| 8 | 8 | { |
| 9 | - $trans[' ']='∴'; |
|
| 10 | - $trans["\t"]='⇒'; |
|
| 11 | - $trans["\n"]='¶;'; |
|
| 12 | - $trans["\r"]='⇐'; |
|
| 13 | - $trans["\0"]='⊕'; |
|
| 14 | - return strtr(htmlspecialchars($value),$trans); |
|
| 9 | + $trans[' '] = '∴'; |
|
| 10 | + $trans["\t"] = '⇒'; |
|
| 11 | + $trans["\n"] = '¶;'; |
|
| 12 | + $trans["\r"] = '⇐'; |
|
| 13 | + $trans["\0"] = '⊕'; |
|
| 14 | + return strtr(htmlspecialchars($value), $trans); |
|
| 15 | 15 | } |
| 16 | - if ($level==0) $dumper = '<pre>' . $varname; |
|
| 16 | + if ($level == 0) $dumper = '<pre>' . $varname; |
|
| 17 | 17 | |
| 18 | 18 | $type = gettype($value); |
| 19 | 19 | $dumper .= $type; |
| 20 | 20 | |
| 21 | - if ($type=='string') |
|
| 21 | + if ($type == 'string') |
|
| 22 | 22 | { |
| 23 | - $dumper .= '('.strlen($value).')'; |
|
| 24 | - $value = dump($value,"",-1); |
|
| 23 | + $dumper .= '(' . strlen($value) . ')'; |
|
| 24 | + $value = dump($value, "", -1); |
|
| 25 | 25 | } |
| 26 | - elseif ($type=='boolean') $value= ($value?'true':'false'); |
|
| 27 | - elseif ($type=='object') |
|
| 26 | + elseif ($type == 'boolean') $value = ($value ? 'true' : 'false'); |
|
| 27 | + elseif ($type == 'object') |
|
| 28 | 28 | { |
| 29 | - $props= get_class_vars(get_class($value)); |
|
| 30 | - $dumper .= '('.count($props).') <u>'.get_class($value).'</u>'; |
|
| 31 | - foreach($props as $key=>$val) |
|
| 29 | + $props = get_class_vars(get_class($value)); |
|
| 30 | + $dumper .= '(' . count($props) . ') <u>' . get_class($value) . '</u>'; |
|
| 31 | + foreach ($props as $key=>$val) |
|
| 32 | 32 | { |
| 33 | - $dumper .= "\n".str_repeat("\t",$level+1).$key.' => '; |
|
| 34 | - $dumper .= dump($value->$key,"",$level+1); |
|
| 33 | + $dumper .= "\n" . str_repeat("\t", $level + 1) . $key . ' => '; |
|
| 34 | + $dumper .= dump($value->$key, "", $level + 1); |
|
| 35 | 35 | } |
| 36 | - $value= ''; |
|
| 36 | + $value = ''; |
|
| 37 | 37 | } |
| 38 | - elseif ($type=='array') |
|
| 38 | + elseif ($type == 'array') |
|
| 39 | 39 | { |
| 40 | - $dumper .= '('.count($value).')'; |
|
| 41 | - foreach($value as $key=>$val) |
|
| 40 | + $dumper .= '(' . count($value) . ')'; |
|
| 41 | + foreach ($value as $key=>$val) |
|
| 42 | 42 | { |
| 43 | - $dumper .= "\n".str_repeat("\t",$level+1).dump($key,"",-1).' => '; |
|
| 44 | - $dumper .= dump($val,"",$level+1); |
|
| 43 | + $dumper .= "\n" . str_repeat("\t", $level + 1) . dump($key, "", -1) . ' => '; |
|
| 44 | + $dumper .= dump($val, "", $level + 1); |
|
| 45 | 45 | } |
| 46 | - $value= ''; |
|
| 46 | + $value = ''; |
|
| 47 | 47 | } |
| 48 | 48 | $dumper .= " <b>$value</b>"; |
| 49 | - if ($level==0) $dumper .= '</pre>'; |
|
| 49 | + if ($level == 0) $dumper .= '</pre>'; |
|
| 50 | 50 | return $dumper; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $output_buffer .= $string; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | -if(substr(getcwd(), -4) != 'docs') |
|
| 70 | +if (substr(getcwd(), -4) != 'docs') |
|
| 71 | 71 | { |
| 72 | 72 | $path_prefix = 'docs/'; |
| 73 | 73 | } |
@@ -80,22 +80,22 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $filename = 'changelog'; |
| 82 | 82 | |
| 83 | -$input = file_get_contents($path_prefix . $filename . '.txt'); |
|
| 83 | +$input = file_get_contents($path_prefix . $filename . '.txt'); |
|
| 84 | 84 | //$input = iconv('CP1251', 'UTF-8', $input); |
| 85 | 85 | |
| 86 | 86 | $input = preg_replace("/\r\n\d\d\d\d\-\d\d\-\d\d\ \d\d\:\d\d/", "[D] $0", $input); |
| 87 | 87 | |
| 88 | -while(strpos($input, "\r\n\r\n") !== false) |
|
| 88 | +while (strpos($input, "\r\n\r\n") !== false) |
|
| 89 | 89 | { |
| 90 | 90 | $input = str_replace("\r\n\r\n", "\r\n", $input); |
| 91 | 91 | } |
| 92 | -while(strpos($input, "~~~") !== false) |
|
| 92 | +while (strpos($input, "~~~") !== false) |
|
| 93 | 93 | { |
| 94 | 94 | $input = str_replace("~~~", "~~", $input); |
| 95 | 95 | } |
| 96 | 96 | $input = str_replace("\r\n~~", "~~", $input); |
| 97 | 97 | |
| 98 | -while(strpos($input, "===") !== false) |
|
| 98 | +while (strpos($input, "===") !== false) |
|
| 99 | 99 | { |
| 100 | 100 | $input = str_replace("===", "==", $input); |
| 101 | 101 | } |
@@ -106,13 +106,13 @@ discard block |
||
| 106 | 106 | $prev_chapter_is_header = false; |
| 107 | 107 | $output = array(); |
| 108 | 108 | $buffer = array(); |
| 109 | -foreach($input as &$chapter) |
|
| 109 | +foreach ($input as &$chapter) |
|
| 110 | 110 | { |
| 111 | 111 | $chapter = preg_split("/(\r\n[\[])/", $chapter, -1, PREG_SPLIT_NO_EMPTY); // , PREG_SPLIT_DELIM_CAPTURE |
| 112 | 112 | |
| 113 | - if(count($chapter) == 1 && !$prev_chapter_is_header) |
|
| 113 | + if (count($chapter) == 1 && !$prev_chapter_is_header) |
|
| 114 | 114 | { |
| 115 | - if(!empty($chapter)) |
|
| 115 | + if (!empty($chapter)) |
|
| 116 | 116 | { |
| 117 | 117 | $output[] = $buffer; |
| 118 | 118 | $buffer = array(); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | else |
| 124 | 124 | { |
| 125 | 125 | $prev_chapter_is_header = false; |
| 126 | - foreach($chapter as &$note) |
|
| 126 | + foreach ($chapter as &$note) |
|
| 127 | 127 | { |
| 128 | 128 | $note = explode("\r\n", $note); |
| 129 | 129 | $new_note = true; |
@@ -131,13 +131,13 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | $note_out = array(); |
| 133 | 133 | |
| 134 | - foreach($note as &$line) |
|
| 134 | + foreach ($note as &$line) |
|
| 135 | 135 | { |
| 136 | - if(!$line) |
|
| 136 | + if (!$line) |
|
| 137 | 137 | { |
| 138 | 138 | continue; |
| 139 | 139 | } |
| 140 | - if($new_note) |
|
| 140 | + if ($new_note) |
|
| 141 | 141 | { |
| 142 | 142 | // 78 - 3 = 75 |
| 143 | 143 | $note_out['style'] = $line[0]; |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | $buf_str .= $line; |
| 148 | - if(mb_strlen($line, 'utf-8') < ($new_note ? 75 : 79)) |
|
| 148 | + if (mb_strlen($line, 'utf-8') < ($new_note ? 75 : 79)) |
|
| 149 | 149 | { |
| 150 | - if(!isset($note_out['name'])) |
|
| 150 | + if (!isset($note_out['name'])) |
|
| 151 | 151 | { |
| 152 | 152 | $note_out['name'] = $buf_str; |
| 153 | 153 | } |
@@ -201,31 +201,31 @@ discard block |
||
| 201 | 201 | 'D' => 'date', |
| 202 | 202 | ); |
| 203 | 203 | |
| 204 | -foreach($output as $chapter) |
|
| 204 | +foreach ($output as $chapter) |
|
| 205 | 205 | { |
| 206 | - if(!$chapter) |
|
| 206 | + if (!$chapter) |
|
| 207 | 207 | { |
| 208 | 208 | continue; |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | buf_print("<h1>{$chapter['name']}</h1>\r\n"); |
| 212 | - foreach($chapter['content'] as $block) |
|
| 212 | + foreach ($chapter['content'] as $block) |
|
| 213 | 213 | { |
| 214 | 214 | buf_print("<div class=\"{$styles[$block['style']]}\">" . ($block['style'] != 'D' ? "[{$block['style']}] " : '')); |
| 215 | 215 | buf_print(preg_replace("/\s{2,10}/", " ", $block['name']) . '<br />'); |
| 216 | - if(isset($block['lines'])) |
|
| 216 | + if (isset($block['lines'])) |
|
| 217 | 217 | { |
| 218 | 218 | $last_spaces = ''; |
| 219 | 219 | $depth = array(); |
| 220 | - foreach($block['lines'] as $line) |
|
| 220 | + foreach ($block['lines'] as $line) |
|
| 221 | 221 | { |
| 222 | - if(preg_match("/^(\s+)(\d*|\s)\.*\s*(.*)/", $line, $matches)) |
|
| 222 | + if (preg_match("/^(\s+)(\d*|\s)\.*\s*(.*)/", $line, $matches)) |
|
| 223 | 223 | { |
| 224 | 224 | //$line = strlen($matches[1]) . '/' . $matches[2] . '/' . $matches[3]; |
| 225 | 225 | $line = $matches[3]; |
| 226 | - if(strlen($matches[1]) > strlen($last_spaces)) |
|
| 226 | + if (strlen($matches[1]) > strlen($last_spaces)) |
|
| 227 | 227 | { |
| 228 | - if($matches[2]) |
|
| 228 | + if ($matches[2]) |
|
| 229 | 229 | { |
| 230 | 230 | buf_print("<ol>\r\n"); |
| 231 | 231 | } |
@@ -237,9 +237,9 @@ discard block |
||
| 237 | 237 | $last_spaces = $matches[1]; |
| 238 | 238 | $depth[] = $matches[2]; |
| 239 | 239 | } |
| 240 | - elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth)) |
|
| 240 | + elseif (strlen($matches[1]) < strlen($last_spaces) && count($depth)) |
|
| 241 | 241 | { |
| 242 | - if(array_pop($depth)) |
|
| 242 | + if (array_pop($depth)) |
|
| 243 | 243 | { |
| 244 | 244 | buf_print("</ol>\r\n"); |
| 245 | 245 | } |
@@ -250,14 +250,14 @@ discard block |
||
| 250 | 250 | $last_spaces = $matches[1]; |
| 251 | 251 | buf_print('<li>'); |
| 252 | 252 | } |
| 253 | - elseif(strlen($last_spaces) == strlen($matches[1])) |
|
| 253 | + elseif (strlen($last_spaces) == strlen($matches[1])) |
|
| 254 | 254 | { |
| 255 | - if($matches[2] == '' && $depth[count($depth) - 1] != '') |
|
| 255 | + if ($matches[2] == '' && $depth[count($depth) - 1] != '') |
|
| 256 | 256 | { |
| 257 | 257 | buf_print("</ol>\r\n"); |
| 258 | 258 | buf_print("<ul>\r\n"); |
| 259 | 259 | } |
| 260 | - elseif($matches[2] != '' && $depth[count($depth) - 1] == '') |
|
| 260 | + elseif ($matches[2] != '' && $depth[count($depth) - 1] == '') |
|
| 261 | 261 | { |
| 262 | 262 | buf_print("</ul>\r\n"); |
| 263 | 263 | buf_print("<ol>\r\n"); |
@@ -269,9 +269,9 @@ discard block |
||
| 269 | 269 | $line = preg_replace("/\s{2,10}/", " ", $line); |
| 270 | 270 | buf_print($line . "<br />\r\n"); |
| 271 | 271 | } |
| 272 | - while(count($depth)) |
|
| 272 | + while (count($depth)) |
|
| 273 | 273 | { |
| 274 | - if(array_pop($depth)) |
|
| 274 | + if (array_pop($depth)) |
|
| 275 | 275 | { |
| 276 | 276 | buf_print("</ol>\r\n"); |
| 277 | 277 | } |
@@ -287,10 +287,10 @@ discard block |
||
| 287 | 287 | buf_print("</body>\r\n</html>\r\n"); |
| 288 | 288 | |
| 289 | 289 | $html = file_get_contents($path_prefix . 'html/' . $filename . '.html'); |
| 290 | -if($html != $output_buffer) |
|
| 290 | +if ($html != $output_buffer) |
|
| 291 | 291 | { |
| 292 | 292 | file_put_contents($path_prefix . 'html/' . $filename . '.html', $output_buffer); |
| 293 | - if(!$path_prefix) |
|
| 293 | + if (!$path_prefix) |
|
| 294 | 294 | { |
| 295 | 295 | print($output_buffer); |
| 296 | 296 | } |
@@ -2,7 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | function dump($value,$varname = "",$level=0,$dumper = "") |
| 4 | 4 | { |
| 5 | - if ($varname) $varname .= " = "; |
|
| 5 | + if ($varname) { |
|
| 6 | + $varname .= " = "; |
|
| 7 | + } |
|
| 6 | 8 | |
| 7 | 9 | if ($level==-1) |
| 8 | 10 | { |
@@ -13,7 +15,9 @@ discard block |
||
| 13 | 15 | $trans["\0"]='⊕'; |
| 14 | 16 | return strtr(htmlspecialchars($value),$trans); |
| 15 | 17 | } |
| 16 | - if ($level==0) $dumper = '<pre>' . $varname; |
|
| 18 | + if ($level==0) { |
|
| 19 | + $dumper = '<pre>' . $varname; |
|
| 20 | + } |
|
| 17 | 21 | |
| 18 | 22 | $type = gettype($value); |
| 19 | 23 | $dumper .= $type; |
@@ -22,9 +26,9 @@ discard block |
||
| 22 | 26 | { |
| 23 | 27 | $dumper .= '('.strlen($value).')'; |
| 24 | 28 | $value = dump($value,"",-1); |
| 25 | - } |
|
| 26 | - elseif ($type=='boolean') $value= ($value?'true':'false'); |
|
| 27 | - elseif ($type=='object') |
|
| 29 | + } elseif ($type=='boolean') { |
|
| 30 | + $value= ($value?'true':'false'); |
|
| 31 | + } elseif ($type=='object') |
|
| 28 | 32 | { |
| 29 | 33 | $props= get_class_vars(get_class($value)); |
| 30 | 34 | $dumper .= '('.count($props).') <u>'.get_class($value).'</u>'; |
@@ -34,8 +38,7 @@ discard block |
||
| 34 | 38 | $dumper .= dump($value->$key,"",$level+1); |
| 35 | 39 | } |
| 36 | 40 | $value= ''; |
| 37 | - } |
|
| 38 | - elseif ($type=='array') |
|
| 41 | + } elseif ($type=='array') |
|
| 39 | 42 | { |
| 40 | 43 | $dumper .= '('.count($value).')'; |
| 41 | 44 | foreach($value as $key=>$val) |
@@ -46,7 +49,9 @@ discard block |
||
| 46 | 49 | $value= ''; |
| 47 | 50 | } |
| 48 | 51 | $dumper .= " <b>$value</b>"; |
| 49 | - if ($level==0) $dumper .= '</pre>'; |
|
| 52 | + if ($level==0) { |
|
| 53 | + $dumper .= '</pre>'; |
|
| 54 | + } |
|
| 50 | 55 | return $dumper; |
| 51 | 56 | } |
| 52 | 57 | |
@@ -70,8 +75,7 @@ discard block |
||
| 70 | 75 | if(substr(getcwd(), -4) != 'docs') |
| 71 | 76 | { |
| 72 | 77 | $path_prefix = 'docs/'; |
| 73 | -} |
|
| 74 | -else |
|
| 78 | +} else |
|
| 75 | 79 | { |
| 76 | 80 | $path_prefix = ''; |
| 77 | 81 | } |
@@ -119,8 +123,7 @@ discard block |
||
| 119 | 123 | $buffer['name'] = $chapter[0]; |
| 120 | 124 | } |
| 121 | 125 | $prev_chapter_is_header = true; |
| 122 | - } |
|
| 123 | - else |
|
| 126 | + } else |
|
| 124 | 127 | { |
| 125 | 128 | $prev_chapter_is_header = false; |
| 126 | 129 | foreach($chapter as &$note) |
@@ -150,8 +153,7 @@ discard block |
||
| 150 | 153 | if(!isset($note_out['name'])) |
| 151 | 154 | { |
| 152 | 155 | $note_out['name'] = $buf_str; |
| 153 | - } |
|
| 154 | - else |
|
| 156 | + } else |
|
| 155 | 157 | { |
| 156 | 158 | $note_out['lines'][] = $buf_str; |
| 157 | 159 | } |
@@ -228,36 +230,31 @@ discard block |
||
| 228 | 230 | if($matches[2]) |
| 229 | 231 | { |
| 230 | 232 | buf_print("<ol>\r\n"); |
| 231 | - } |
|
| 232 | - else |
|
| 233 | + } else |
|
| 233 | 234 | { |
| 234 | 235 | buf_print("<ul>\r\n"); |
| 235 | 236 | } |
| 236 | 237 | buf_print('<li>'); |
| 237 | 238 | $last_spaces = $matches[1]; |
| 238 | 239 | $depth[] = $matches[2]; |
| 239 | - } |
|
| 240 | - elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth)) |
|
| 240 | + } elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth)) |
|
| 241 | 241 | { |
| 242 | 242 | if(array_pop($depth)) |
| 243 | 243 | { |
| 244 | 244 | buf_print("</ol>\r\n"); |
| 245 | - } |
|
| 246 | - else |
|
| 245 | + } else |
|
| 247 | 246 | { |
| 248 | 247 | buf_print("</ul>\r\n"); |
| 249 | 248 | } |
| 250 | 249 | $last_spaces = $matches[1]; |
| 251 | 250 | buf_print('<li>'); |
| 252 | - } |
|
| 253 | - elseif(strlen($last_spaces) == strlen($matches[1])) |
|
| 251 | + } elseif(strlen($last_spaces) == strlen($matches[1])) |
|
| 254 | 252 | { |
| 255 | 253 | if($matches[2] == '' && $depth[count($depth) - 1] != '') |
| 256 | 254 | { |
| 257 | 255 | buf_print("</ol>\r\n"); |
| 258 | 256 | buf_print("<ul>\r\n"); |
| 259 | - } |
|
| 260 | - elseif($matches[2] != '' && $depth[count($depth) - 1] == '') |
|
| 257 | + } elseif($matches[2] != '' && $depth[count($depth) - 1] == '') |
|
| 261 | 258 | { |
| 262 | 259 | buf_print("</ul>\r\n"); |
| 263 | 260 | buf_print("<ol>\r\n"); |
@@ -274,8 +271,7 @@ discard block |
||
| 274 | 271 | if(array_pop($depth)) |
| 275 | 272 | { |
| 276 | 273 | buf_print("</ol>\r\n"); |
| 277 | - } |
|
| 278 | - else |
|
| 274 | + } else |
|
| 279 | 275 | { |
| 280 | 276 | buf_print("</ul>\r\n"); |
| 281 | 277 | } |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if(isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
| 3 | +if (isset($sn_page_name) || ($sn_page_name = isset($_GET['page']) ? trim(strip_tags($_GET['page'])) : '')) { |
|
| 4 | 4 | require_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
| 5 | 5 | // pdump($sn_mvc); |
| 6 | - if($sn_page_name) { |
|
| 6 | + if ($sn_page_name) { |
|
| 7 | 7 | // Loading page-specific language files |
| 8 | 8 | global $template; |
| 9 | 9 | isset($sn_mvc['model'][$sn_page_name]) and execute_hooks($sn_mvc['model'][$sn_page_name], $template); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | */ |
| 28 | - if(!empty($template_result) && is_object($template)) { |
|
| 28 | + if (!empty($template_result) && is_object($template)) { |
|
| 29 | 29 | $template->assign_recursive($template_result); |
| 30 | 30 | } |
| 31 | 31 | display($template); |
@@ -50,52 +50,52 @@ |
||
| 50 | 50 | stat_tpl_assign($template, $who, 'subject', $subject_list, $sn_group_stat_common); |
| 51 | 51 | |
| 52 | 52 | $stat_types = array( |
| 53 | - STAT_TOTAL => array( |
|
| 54 | - 'type' => 'total', |
|
| 55 | - ), |
|
| 53 | + STAT_TOTAL => array( |
|
| 54 | + 'type' => 'total', |
|
| 55 | + ), |
|
| 56 | 56 | |
| 57 | - STAT_FLEET => array( |
|
| 58 | - 'type' => 'fleet', |
|
| 59 | - ), |
|
| 57 | + STAT_FLEET => array( |
|
| 58 | + 'type' => 'fleet', |
|
| 59 | + ), |
|
| 60 | 60 | |
| 61 | - STAT_TECH => array( |
|
| 62 | - 'type' => 'tech', |
|
| 63 | - ), |
|
| 61 | + STAT_TECH => array( |
|
| 62 | + 'type' => 'tech', |
|
| 63 | + ), |
|
| 64 | 64 | |
| 65 | - STAT_BUILDING => array( |
|
| 66 | - 'type' => 'build', |
|
| 67 | - ), |
|
| 65 | + STAT_BUILDING => array( |
|
| 66 | + 'type' => 'build', |
|
| 67 | + ), |
|
| 68 | 68 | |
| 69 | - STAT_DEFENSE => array( |
|
| 70 | - 'type' => 'defs', |
|
| 71 | - ), |
|
| 69 | + STAT_DEFENSE => array( |
|
| 70 | + 'type' => 'defs', |
|
| 71 | + ), |
|
| 72 | 72 | |
| 73 | - STAT_RESOURCE => array( |
|
| 74 | - 'type' => 'res', |
|
| 75 | - ), |
|
| 73 | + STAT_RESOURCE => array( |
|
| 74 | + 'type' => 'res', |
|
| 75 | + ), |
|
| 76 | 76 | |
| 77 | - STAT_RAID_TOTAL => array( |
|
| 78 | - 'type' => 'raids', |
|
| 79 | - ), |
|
| 77 | + STAT_RAID_TOTAL => array( |
|
| 78 | + 'type' => 'raids', |
|
| 79 | + ), |
|
| 80 | 80 | |
| 81 | - STAT_RAID_WON => array( |
|
| 82 | - 'type' => 'raidswin', |
|
| 83 | - ), |
|
| 81 | + STAT_RAID_WON => array( |
|
| 82 | + 'type' => 'raidswin', |
|
| 83 | + ), |
|
| 84 | 84 | |
| 85 | - STAT_RAID_LOST => array( |
|
| 86 | - 'type' => 'raidsloose', |
|
| 87 | - ), |
|
| 85 | + STAT_RAID_LOST => array( |
|
| 86 | + 'type' => 'raidsloose', |
|
| 87 | + ), |
|
| 88 | 88 | |
| 89 | 89 | STAT_LVL_BUILDING => array( |
| 90 | - 'type' => 'lvl_minier', |
|
| 90 | + 'type' => 'lvl_minier', |
|
| 91 | 91 | ), |
| 92 | 92 | |
| 93 | 93 | STAT_LVL_TECH => array( |
| 94 | - 'type' => 'player_rpg_tech_level', |
|
| 94 | + 'type' => 'player_rpg_tech_level', |
|
| 95 | 95 | ), |
| 96 | 96 | |
| 97 | 97 | STAT_LVL_RAID => array( |
| 98 | - 'type' => 'lvl_raid', |
|
| 98 | + 'type' => 'lvl_raid', |
|
| 99 | 99 | ), |
| 100 | 100 | ); |
| 101 | 101 | stat_tpl_assign($template, $type, 'type', $stat_types, $sn_group_stat_common); |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | global $who, $lang; |
| 12 | 12 | |
| 13 | 13 | // $sn_group_stat_common = sn_get_groups('STAT_COMMON'); |
| 14 | - foreach($array as $key => $value) { |
|
| 15 | - if($array_name == 'type' && $who == 2 && !in_array($key, $sn_group_stat_common)) { |
|
| 14 | + foreach ($array as $key => $value) { |
|
| 15 | + if ($array_name == 'type' && $who == 2 && !in_array($key, $sn_group_stat_common)) { |
|
| 16 | 16 | continue; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $subject_list = array( |
| 45 | 45 | 1 => array('header' => $lang['stat_player']), |
| 46 | 46 | ); |
| 47 | -if(!$source) { |
|
| 47 | +if (!$source) { |
|
| 48 | 48 | $subject_list[2] = array('header' => $lang['stat_allys']); |
| 49 | 49 | } |
| 50 | 50 | stat_tpl_assign($template, $who, 'subject', $subject_list, $sn_group_stat_common); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | $page_count = floor($record_count / 100); |
| 115 | 115 | $pages = array(); |
| 116 | -for($i = 0; $i <= $page_count; $i++) { |
|
| 116 | +for ($i = 0; $i <= $page_count; $i++) { |
|
| 117 | 117 | $first_element = $i * 100 + 1; |
| 118 | 118 | $last_element = $first_element + 99; |
| 119 | 119 | $pages[$first_element] = array( |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | ); |
| 134 | 134 | //pdump($row); |
| 135 | 135 | |
| 136 | - if($who == 1) { |
|
| 136 | + if ($who == 1) { |
|
| 137 | 137 | $row_stat['ALLY_NAME'] = $row['ally_name']; |
| 138 | 138 | $row_stat['ALLY_ID'] = $row['ally_id']; |
| 139 | 139 | empty($row['username']) ? $row['username'] = $row['name'] : false; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
| 13 | 13 | |
| 14 | -if(HIDE_BUILDING_RECORDS) |
|
| 14 | +if (HIDE_BUILDING_RECORDS) |
|
| 15 | 15 | { |
| 16 | 16 | return; |
| 17 | 17 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $user_name_cache = array(); |
| 36 | 36 | |
| 37 | -foreach($show_groups as $unit_group_id => $mode) |
|
| 37 | +foreach ($show_groups as $unit_group_id => $mode) |
|
| 38 | 38 | { |
| 39 | 39 | $template->assign_block_vars('records', array( |
| 40 | 40 | 'UNIT' => $lang['tech'][$unit_group_id], |
@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | )); |
| 44 | 44 | $unit_group = get_unit_param('techtree', $unit_group_id); // TODO - REWRITE!!!! |
| 45 | 45 | |
| 46 | - foreach($unit_group as $unit_id) |
|
| 46 | + foreach ($unit_group as $unit_id) |
|
| 47 | 47 | { |
| 48 | 48 | $unit_name = &$lang['tech'][$unit_id]; |
| 49 | - if($unit_name) |
|
| 49 | + if ($unit_name) |
|
| 50 | 50 | { |
| 51 | 51 | // TODO - ISUNITSTACKABLE! |
| 52 | 52 | $data_row = $unit_group_id == UNIT_SHIPS || $unit_group_id == UNIT_DEFENCE ? db_unit_records_sum($unit_id, $user_skip_list_unit) : db_unit_records_plain($unit_id, $user_skip_list_unit); |
| 53 | 53 | |
| 54 | - if($data_row) |
|
| 54 | + if ($data_row) |
|
| 55 | 55 | { |
| 56 | 56 | $template->assign_block_vars('records', array( |
| 57 | 57 | 'UNIT' => $unit_name, |
@@ -689,15 +689,15 @@ discard block |
||
| 689 | 689 | ), |
| 690 | 690 | |
| 691 | 691 | 'months' => array( |
| 692 | - 1 =>'января', |
|
| 693 | - 2 =>'февраля', |
|
| 694 | - 3 =>'марта', |
|
| 695 | - 4 =>'апреля', |
|
| 696 | - 5 =>'мая', |
|
| 697 | - 6 =>'июня', |
|
| 698 | - 7 =>'июля', |
|
| 699 | - 8 =>'августа', |
|
| 700 | - 9 =>'сентября', |
|
| 692 | + 1 =>'января', |
|
| 693 | + 2 =>'февраля', |
|
| 694 | + 3 =>'марта', |
|
| 695 | + 4 =>'апреля', |
|
| 696 | + 5 =>'мая', |
|
| 697 | + 6 =>'июня', |
|
| 698 | + 7 =>'июля', |
|
| 699 | + 8 =>'августа', |
|
| 700 | + 9 =>'сентября', |
|
| 701 | 701 | 10 =>'октября', |
| 702 | 702 | 11 =>'ноября', |
| 703 | 703 | 12 =>'декабря' |
@@ -993,7 +993,7 @@ discard block |
||
| 993 | 993 | PASSWORD_RESTORE_ERROR_ACCOUNT_NOT_EXISTS => 'Внутренняя ошибка - при смене пароля аккаунт не найден! Сообщите об этой ошибке Администрации!', |
| 994 | 994 | AUTH_PASSWORD_RESET_INSIDE_ERROR_NO_ACCOUNT_FOR_CONFIRMATION => 'ВНУТРЕННЯЯ ОШИБКА! Нет аккаунтов для сброса пароля при корректном коде подтверждения! Пожалуйста, сообщите об этой ошибке Администрации Вселенной!', |
| 995 | 995 | LOGIN_ERROR_NO_ACCOUNT_FOR_COOKIE_SET => 'ВНУТРЕННЯЯ ОШИБКА! СООБЩИТЕ АДМИНИСТРАЦИИ! Не установлен аккаунт при cookie_set()! Пожалуйста, сообщите об этой ошибке Администрации Вселенной!', |
| 996 | - ), |
|
| 996 | + ), |
|
| 997 | 997 | |
| 998 | 998 | 'log_reg_email_title' => "Ваша регистрация на сервере %1\$s игры СуперНова", |
| 999 | 999 | 'log_reg_email_text' => "Подтверждение регистрации для %3\$s\r\n\r\n |
@@ -961,7 +961,7 @@ |
||
| 961 | 961 | REGISTER_ERROR_USERNAME_WRONG => 'Некорректное имя игрока', |
| 962 | 962 | REGISTER_ERROR_ACCOUNT_NAME_EXISTS => 'Имя учётной записи уже занято. Попробуйте войти с этим именем и вашим паролем или воспользоваться сбросом пароля', |
| 963 | 963 | REGISTER_ERROR_PASSWORD_INSECURE => 'Неправильный пароль. Пароль должен состоять минимум из ' . PASSWORD_LENGTH_MIN . ' символов', |
| 964 | - REGISTER_ERROR_USERNAME_SHORT => 'Слишком короткое имя. Имя должно состоять минимум из ' . LOGIN_LENGTH_MIN. ' символов', |
|
| 964 | + REGISTER_ERROR_USERNAME_SHORT => 'Слишком короткое имя. Имя должно состоять минимум из ' . LOGIN_LENGTH_MIN . ' символов', |
|
| 965 | 965 | REGISTER_ERROR_PASSWORD_DIFFERENT => 'Пароль и проверочный пароль не совпадают. Проверьте правильность ввода', |
| 966 | 966 | REGISTER_ERROR_EMAIL_EMPTY => 'Е-Мейл не может быть пустым', |
| 967 | 967 | REGISTER_ERROR_EMAIL_WRONG => 'Введенный Е-Мейл не является допустимым адресом электронной почты. Проверьте написание Е-Мейла или используйте другой адрес почтового ящика', |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | include_once('common.' . substr(strrchr(__FILE__, '.'), 1)); |
| 4 | 4 | |
| 5 | -if(sn_module_get_active_count('payment') && !defined('SN_GOOGLE')) { |
|
| 5 | +if (sn_module_get_active_count('payment') && !defined('SN_GOOGLE')) { |
|
| 6 | 6 | sys_redirect('metamatter.php'); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -24,11 +24,11 @@ |
||
| 24 | 24 | |
| 25 | 25 | // require_once('includes/includes/scheduler_process.php'); |
| 26 | 26 | |
| 27 | -if(($result = scheduler_process()) && !defined('IN_ADMIN')) { |
|
| 27 | +if (($result = scheduler_process()) && !defined('IN_ADMIN')) { |
|
| 28 | 28 | $result = htmlspecialchars($result, ENT_QUOTES, 'UTF-8'); |
| 29 | 29 | print(json_encode($result)); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | -if(!defined('IN_ADMIN')) { |
|
| 32 | +if (!defined('IN_ADMIN')) { |
|
| 33 | 33 | die(); |
| 34 | 34 | } |
@@ -16,23 +16,23 @@ discard block |
||
| 16 | 16 | $sn_menu_admin_extra = array(); |
| 17 | 17 | |
| 18 | 18 | $sn_mvc = array( |
| 19 | - 'model' => array( |
|
| 20 | - 'options' => array('sn_options_model'), |
|
| 21 | - 'chat' => array('sn_chat_model'), |
|
| 22 | - 'chat_add' => array('sn_chat_add_model'), |
|
| 23 | - ), |
|
| 24 | - 'view' => array( |
|
| 25 | - 'options' => array('sn_options_view'), |
|
| 26 | - 'chat' => array('sn_chat_view'), |
|
| 27 | - 'chat_msg' => array('sn_chat_msg_view'), |
|
| 28 | - ), |
|
| 29 | - 'controller' => array(), |
|
| 30 | - 'i18n' => array( |
|
| 31 | - 'options' => array( |
|
| 32 | - 'options' => 'options', |
|
| 33 | - 'messages' => 'messages', |
|
| 34 | - ), |
|
| 35 | - ), |
|
| 19 | + 'model' => array( |
|
| 20 | + 'options' => array('sn_options_model'), |
|
| 21 | + 'chat' => array('sn_chat_model'), |
|
| 22 | + 'chat_add' => array('sn_chat_add_model'), |
|
| 23 | + ), |
|
| 24 | + 'view' => array( |
|
| 25 | + 'options' => array('sn_options_view'), |
|
| 26 | + 'chat' => array('sn_chat_view'), |
|
| 27 | + 'chat_msg' => array('sn_chat_msg_view'), |
|
| 28 | + ), |
|
| 29 | + 'controller' => array(), |
|
| 30 | + 'i18n' => array( |
|
| 31 | + 'options' => array( |
|
| 32 | + 'options' => 'options', |
|
| 33 | + 'messages' => 'messages', |
|
| 34 | + ), |
|
| 35 | + ), |
|
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | $note_priority_classes = array( |
@@ -120,62 +120,62 @@ discard block |
||
| 120 | 120 | ); |
| 121 | 121 | |
| 122 | 122 | $sn_message_class_list = array( |
| 123 | - MSG_TYPE_NEW => array( |
|
| 124 | - 'name' => 'new_message', |
|
| 125 | - 'switchable' => false, |
|
| 126 | - 'email' => false, |
|
| 127 | - ), |
|
| 128 | - MSG_TYPE_ADMIN => array( |
|
| 129 | - 'name' => 'msg_admin', |
|
| 130 | - 'switchable' => false, |
|
| 131 | - 'email' => true, |
|
| 132 | - ), |
|
| 133 | - MSG_TYPE_PLAYER => array( |
|
| 134 | - 'name' => 'mnl_joueur', |
|
| 135 | - 'switchable' => false, |
|
| 136 | - 'email' => true, |
|
| 137 | - ), |
|
| 138 | - MSG_TYPE_ALLIANCE => array( |
|
| 139 | - 'name' => 'mnl_alliance', |
|
| 140 | - 'switchable' => false, |
|
| 141 | - 'email' => true, |
|
| 142 | - ), |
|
| 143 | - MSG_TYPE_SPY => array( |
|
| 144 | - 'name' => 'mnl_spy', |
|
| 145 | - 'switchable' => true, |
|
| 146 | - 'email' => true, |
|
| 147 | - ), |
|
| 148 | - MSG_TYPE_COMBAT => array( |
|
| 149 | - 'name' => 'mnl_attaque', |
|
| 150 | - 'switchable' => true, |
|
| 151 | - 'email' => true, |
|
| 152 | - ), |
|
| 153 | - MSG_TYPE_TRANSPORT => array( |
|
| 154 | - 'name' => 'mnl_transport', |
|
| 155 | - 'switchable' => true, |
|
| 156 | - 'email' => true, |
|
| 157 | - ), |
|
| 158 | - MSG_TYPE_RECYCLE => array( |
|
| 159 | - 'name' => 'mnl_exploit', |
|
| 160 | - 'switchable' => true, |
|
| 161 | - 'email' => true, |
|
| 162 | - ), |
|
| 163 | - MSG_TYPE_EXPLORE => array( |
|
| 164 | - 'name' => 'mnl_expedition', |
|
| 165 | - 'switchable' => true, |
|
| 166 | - 'email' => true, |
|
| 167 | - ), |
|
| 168 | - // 97 => 'mnl_general', |
|
| 169 | - MSG_TYPE_QUE => array( |
|
| 170 | - 'name' => 'mnl_buildlist', |
|
| 171 | - 'switchable' => true, |
|
| 172 | - 'email' => true, |
|
| 173 | - ), |
|
| 174 | - MSG_TYPE_OUTBOX => array( |
|
| 175 | - 'name' => 'mnl_outbox', |
|
| 176 | - 'switchable' => false, |
|
| 177 | - 'email' => false, |
|
| 178 | - ), |
|
| 123 | + MSG_TYPE_NEW => array( |
|
| 124 | + 'name' => 'new_message', |
|
| 125 | + 'switchable' => false, |
|
| 126 | + 'email' => false, |
|
| 127 | + ), |
|
| 128 | + MSG_TYPE_ADMIN => array( |
|
| 129 | + 'name' => 'msg_admin', |
|
| 130 | + 'switchable' => false, |
|
| 131 | + 'email' => true, |
|
| 132 | + ), |
|
| 133 | + MSG_TYPE_PLAYER => array( |
|
| 134 | + 'name' => 'mnl_joueur', |
|
| 135 | + 'switchable' => false, |
|
| 136 | + 'email' => true, |
|
| 137 | + ), |
|
| 138 | + MSG_TYPE_ALLIANCE => array( |
|
| 139 | + 'name' => 'mnl_alliance', |
|
| 140 | + 'switchable' => false, |
|
| 141 | + 'email' => true, |
|
| 142 | + ), |
|
| 143 | + MSG_TYPE_SPY => array( |
|
| 144 | + 'name' => 'mnl_spy', |
|
| 145 | + 'switchable' => true, |
|
| 146 | + 'email' => true, |
|
| 147 | + ), |
|
| 148 | + MSG_TYPE_COMBAT => array( |
|
| 149 | + 'name' => 'mnl_attaque', |
|
| 150 | + 'switchable' => true, |
|
| 151 | + 'email' => true, |
|
| 152 | + ), |
|
| 153 | + MSG_TYPE_TRANSPORT => array( |
|
| 154 | + 'name' => 'mnl_transport', |
|
| 155 | + 'switchable' => true, |
|
| 156 | + 'email' => true, |
|
| 157 | + ), |
|
| 158 | + MSG_TYPE_RECYCLE => array( |
|
| 159 | + 'name' => 'mnl_exploit', |
|
| 160 | + 'switchable' => true, |
|
| 161 | + 'email' => true, |
|
| 162 | + ), |
|
| 163 | + MSG_TYPE_EXPLORE => array( |
|
| 164 | + 'name' => 'mnl_expedition', |
|
| 165 | + 'switchable' => true, |
|
| 166 | + 'email' => true, |
|
| 167 | + ), |
|
| 168 | + // 97 => 'mnl_general', |
|
| 169 | + MSG_TYPE_QUE => array( |
|
| 170 | + 'name' => 'mnl_buildlist', |
|
| 171 | + 'switchable' => true, |
|
| 172 | + 'email' => true, |
|
| 173 | + ), |
|
| 174 | + MSG_TYPE_OUTBOX => array( |
|
| 175 | + 'name' => 'mnl_outbox', |
|
| 176 | + 'switchable' => false, |
|
| 177 | + 'email' => false, |
|
| 178 | + ), |
|
| 179 | 179 | ); |
| 180 | 180 | |
| 181 | 181 | $sn_message_groups = array( |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | SHIP_HUGE_DEATH_STAR => SHIP_HUGE_DEATH_STAR, SHIP_HUGE_SUPERNOVA => SHIP_HUGE_SUPERNOVA, |
| 1028 | 1028 | SHIP_CARGO_SMALL => SHIP_CARGO_SMALL, SHIP_CARGO_BIG => SHIP_CARGO_BIG, SHIP_CARGO_SUPER => SHIP_CARGO_SUPER, SHIP_CARGO_HYPER => SHIP_CARGO_HYPER, |
| 1029 | 1029 | SHIP_RECYCLER => SHIP_RECYCLER, SHIP_COLONIZER => SHIP_COLONIZER, SHIP_SPY => SHIP_SPY, SHIP_SATTELITE_SOLAR => SHIP_SATTELITE_SOLAR |
| 1030 | - ), |
|
| 1030 | + ), |
|
| 1031 | 1031 | // Defensive building list |
| 1032 | 1032 | 'defense' => array (UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
| 1033 | 1033 | UNIT_DEF_TURRET_LASER_BIG => UNIT_DEF_TURRET_LASER_BIG, UNIT_DEF_TURRET_GAUSS => UNIT_DEF_TURRET_GAUSS, |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | SNC_VER_ERROR_MISSMATCH_KEY_ID => 'error', |
| 98 | 98 | ); |
| 99 | 99 | |
| 100 | -$tableList = array( 'aks', 'alliance', 'alliance_requests', 'announce', 'annonce', 'banned', 'buddy', 'chat', 'config', 'counter', |
|
| 100 | +$tableList = array('aks', 'alliance', 'alliance_requests', 'announce', 'annonce', 'banned', 'buddy', 'chat', 'config', 'counter', |
|
| 101 | 101 | 'errors', 'fleets', 'fleet_log', 'galaxy', 'iraks', 'logs', 'log_dark_matter', 'messages', 'notes', 'planets', 'quest', |
| 102 | 102 | 'quest_status', 'referrals', 'rw', 'statpoints', 'users' |
| 103 | 103 | ); |
@@ -188,14 +188,14 @@ discard block |
||
| 188 | 188 | $user_option_list = array(); |
| 189 | 189 | |
| 190 | 190 | $user_option_list[OPT_MESSAGE] = array(); |
| 191 | -foreach($sn_message_class_list as $message_class_id => $message_class_data) |
|
| 191 | +foreach ($sn_message_class_list as $message_class_id => $message_class_data) |
|
| 192 | 192 | { |
| 193 | - if($message_class_data['switchable']) |
|
| 193 | + if ($message_class_data['switchable']) |
|
| 194 | 194 | { |
| 195 | 195 | $user_option_list[OPT_MESSAGE]["opt_{$message_class_data['name']}"] = 1; |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - if($message_class_data['email']) |
|
| 198 | + if ($message_class_data['email']) |
|
| 199 | 199 | { |
| 200 | 200 | $user_option_list[OPT_MESSAGE]["opt_email_{$message_class_data['name']}"] = 0; |
| 201 | 201 | } |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_ICE_HYDROGEN, |
| 779 | 779 | UNIT_PLANET_DENSITY_RARITY => 30, // 1, // 40.00, // * 1/121 0,82645 |
| 780 | 780 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_PERFECT, |
| 781 | - UNIT_RESOURCES => array(RES_METAL => 0.20, RES_CRYSTAL => 0.60, RES_DEUTERIUM => 7.10, ), |
|
| 781 | + UNIT_RESOURCES => array(RES_METAL => 0.20, RES_CRYSTAL => 0.60, RES_DEUTERIUM => 7.10,), |
|
| 782 | 782 | UNIT_PLANET_DENSITY_MAX_SECTORS => 150, |
| 783 | 783 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11, |
| 784 | 784 | ), |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_ICE_METHANE, |
| 788 | 788 | UNIT_PLANET_DENSITY_RARITY => 130, // 6, // 6.67, // * 6,0 4,95868 |
| 789 | 789 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_GOOD, |
| 790 | - UNIT_RESOURCES => array(RES_METAL => 0.55, RES_CRYSTAL => 0.85, RES_DEUTERIUM => 4.60, ), |
|
| 790 | + UNIT_RESOURCES => array(RES_METAL => 0.55, RES_CRYSTAL => 0.85, RES_DEUTERIUM => 4.60,), |
|
| 791 | 791 | UNIT_PLANET_DENSITY_MAX_SECTORS => 200, |
| 792 | 792 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6, |
| 793 | 793 | ), |
@@ -796,7 +796,7 @@ discard block |
||
| 796 | 796 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_ICE_WATER, |
| 797 | 797 | UNIT_PLANET_DENSITY_RARITY => 450, //20, // 2.00, // * 20,0 16,52893 |
| 798 | 798 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_AVERAGE, |
| 799 | - UNIT_RESOURCES => array(RES_METAL => 0.86, RES_CRYSTAL => 0.95, RES_DEUTERIUM => 2.20, ), |
|
| 799 | + UNIT_RESOURCES => array(RES_METAL => 0.86, RES_CRYSTAL => 0.95, RES_DEUTERIUM => 2.20,), |
|
| 800 | 800 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
| 801 | 801 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
| 802 | 802 | ), |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_CRYSTAL_RAW, |
| 807 | 807 | UNIT_PLANET_DENSITY_RARITY => 20, // 1, // 40.00, // *1,0 0,82645 |
| 808 | 808 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_PERFECT, |
| 809 | - UNIT_RESOURCES => array(RES_METAL => 0.40, RES_CRYSTAL => 12.37, RES_DEUTERIUM => 0.50, ), |
|
| 809 | + UNIT_RESOURCES => array(RES_METAL => 0.40, RES_CRYSTAL => 12.37, RES_DEUTERIUM => 0.50,), |
|
| 810 | 810 | UNIT_PLANET_DENSITY_MAX_SECTORS => 150, |
| 811 | 811 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11, |
| 812 | 812 | ), |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_CRYSTAL_SILICATE, |
| 816 | 816 | UNIT_PLANET_DENSITY_RARITY => 140, // 5.71, // * 7,0 5,78512 |
| 817 | 817 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_GOOD, |
| 818 | - UNIT_RESOURCES => array(RES_METAL => 0.67, RES_CRYSTAL => 4.50, RES_DEUTERIUM => 0.85, ), |
|
| 818 | + UNIT_RESOURCES => array(RES_METAL => 0.67, RES_CRYSTAL => 4.50, RES_DEUTERIUM => 0.85,), |
|
| 819 | 819 | UNIT_PLANET_DENSITY_MAX_SECTORS => 200, |
| 820 | 820 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6, |
| 821 | 821 | ), |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_CRYSTAL_STONE, |
| 825 | 825 | UNIT_PLANET_DENSITY_RARITY => 500, // 1.90, // * 21,0 17,35537 |
| 826 | 826 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_AVERAGE, |
| 827 | - UNIT_RESOURCES => array(RES_METAL => 0.80, RES_CRYSTAL => 2.00, RES_DEUTERIUM => 0.95, ), |
|
| 827 | + UNIT_RESOURCES => array(RES_METAL => 0.80, RES_CRYSTAL => 2.00, RES_DEUTERIUM => 0.95,), |
|
| 828 | 828 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
| 829 | 829 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
| 830 | 830 | ), |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_STANDARD, |
| 835 | 835 | UNIT_PLANET_DENSITY_RARITY => 1000, // 1.0, // * 40,0 33,05785 |
| 836 | 836 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_NORMAL, |
| 837 | - UNIT_RESOURCES => array(RES_METAL => 1.00, RES_CRYSTAL => 1.00, RES_DEUTERIUM => 1.00, ), |
|
| 837 | + UNIT_RESOURCES => array(RES_METAL => 1.00, RES_CRYSTAL => 1.00, RES_DEUTERIUM => 1.00,), |
|
| 838 | 838 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
| 839 | 839 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
| 840 | 840 | ), |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_METAL_ORE, |
| 845 | 845 | UNIT_PLANET_DENSITY_RARITY => 550, // 2.11, // * 19,0 15,70248 |
| 846 | 846 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_AVERAGE, |
| 847 | - UNIT_RESOURCES => array(RES_METAL => 1.60, RES_CRYSTAL => 0.90, RES_DEUTERIUM => 0.80, ), |
|
| 847 | + UNIT_RESOURCES => array(RES_METAL => 1.60, RES_CRYSTAL => 0.90, RES_DEUTERIUM => 0.80,), |
|
| 848 | 848 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
| 849 | 849 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
| 850 | 850 | ), |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_METAL_PERIDOT, |
| 854 | 854 | UNIT_PLANET_DENSITY_RARITY => 120, // 8.00, // * 5,0 4,13223 |
| 855 | 855 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_GOOD, |
| 856 | - UNIT_RESOURCES => array(RES_METAL => 4.71, RES_CRYSTAL => 0.80, RES_DEUTERIUM => 0.55, ), |
|
| 856 | + UNIT_RESOURCES => array(RES_METAL => 4.71, RES_CRYSTAL => 0.80, RES_DEUTERIUM => 0.55,), |
|
| 857 | 857 | UNIT_PLANET_DENSITY_MAX_SECTORS => 200, |
| 858 | 858 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6, |
| 859 | 859 | ), |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_METAL_RAW, |
| 863 | 863 | UNIT_PLANET_DENSITY_RARITY => 25, // 40.00, // * 1,0 0,82645 |
| 864 | 864 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_PERFECT, |
| 865 | - UNIT_RESOURCES => array(RES_METAL => 8.00, RES_CRYSTAL => 0.40, RES_DEUTERIUM => 0.25, ), |
|
| 865 | + UNIT_RESOURCES => array(RES_METAL => 8.00, RES_CRYSTAL => 0.40, RES_DEUTERIUM => 0.25,), |
|
| 866 | 866 | UNIT_PLANET_DENSITY_MAX_SECTORS => 150, |
| 867 | 867 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11, |
| 868 | 868 | ), |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | ), |
| 993 | 993 | |
| 994 | 994 | // Tech list |
| 995 | - 'tech' => array ( |
|
| 995 | + 'tech' => array( |
|
| 996 | 996 | TECH_ARMOR => TECH_ARMOR, TECH_WEAPON => TECH_WEAPON, TECH_SHIELD => TECH_SHIELD, |
| 997 | 997 | TECH_SPY => TECH_SPY, TECH_COMPUTER => TECH_COMPUTER, |
| 998 | 998 | TECH_ENERGY => TECH_ENERGY, TECH_LASER => TECH_LASER, TECH_ION => TECH_ION, TECH_PLASMA => TECH_PLASMA, TECH_HYPERSPACE => TECH_HYPERSPACE, |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | ), |
| 1004 | 1004 | |
| 1005 | 1005 | // Mercenaries |
| 1006 | - 'mercenaries' => array ( |
|
| 1006 | + 'mercenaries' => array( |
|
| 1007 | 1007 | MRC_STOCKMAN => MRC_STOCKMAN, MRC_SPY => MRC_SPY, MRC_ACADEMIC => MRC_ACADEMIC, |
| 1008 | 1008 | MRC_ADMIRAL => MRC_ADMIRAL, MRC_COORDINATOR => MRC_COORDINATOR, MRC_NAVIGATOR => MRC_NAVIGATOR, |
| 1009 | 1009 | ), |
@@ -1029,7 +1029,7 @@ discard block |
||
| 1029 | 1029 | SHIP_RECYCLER => SHIP_RECYCLER, SHIP_COLONIZER => SHIP_COLONIZER, SHIP_SPY => SHIP_SPY, SHIP_SATTELITE_SOLAR => SHIP_SATTELITE_SOLAR |
| 1030 | 1030 | ), |
| 1031 | 1031 | // Defensive building list |
| 1032 | - 'defense' => array (UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
|
| 1032 | + 'defense' => array(UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
|
| 1033 | 1033 | UNIT_DEF_TURRET_LASER_BIG => UNIT_DEF_TURRET_LASER_BIG, UNIT_DEF_TURRET_GAUSS => UNIT_DEF_TURRET_GAUSS, |
| 1034 | 1034 | UNIT_DEF_TURRET_ION => UNIT_DEF_TURRET_ION, UNIT_DEF_TURRET_PLASMA => UNIT_DEF_TURRET_PLASMA, |
| 1035 | 1035 | |
@@ -1039,7 +1039,7 @@ discard block |
||
| 1039 | 1039 | ), |
| 1040 | 1040 | |
| 1041 | 1041 | // Missiles list |
| 1042 | - 'missile' => array (UNIT_DEF_MISSILE_INTERCEPTOR => UNIT_DEF_MISSILE_INTERCEPTOR, UNIT_DEF_MISSILE_INTERPLANET => UNIT_DEF_MISSILE_INTERPLANET, ), |
|
| 1042 | + 'missile' => array(UNIT_DEF_MISSILE_INTERCEPTOR => UNIT_DEF_MISSILE_INTERCEPTOR, UNIT_DEF_MISSILE_INTERPLANET => UNIT_DEF_MISSILE_INTERPLANET,), |
|
| 1043 | 1043 | |
| 1044 | 1044 | // Combat units list |
| 1045 | 1045 | 'combat' => array( |
@@ -1079,9 +1079,9 @@ discard block |
||
| 1079 | 1079 | ), |
| 1080 | 1080 | |
| 1081 | 1081 | // Resource list |
| 1082 | - 'resources' => array ( 0 => 'metal', 1 => 'crystal', 2 => 'deuterium', 3 => 'dark_matter'), |
|
| 1082 | + 'resources' => array(0 => 'metal', 1 => 'crystal', 2 => 'deuterium', 3 => 'dark_matter'), |
|
| 1083 | 1083 | // Resources all |
| 1084 | - 'resources_all' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY, RES_DARK_MATTER => RES_DARK_MATTER, RES_METAMATTER => RES_METAMATTER, ), |
|
| 1084 | + 'resources_all' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY, RES_DARK_MATTER => RES_DARK_MATTER, RES_METAMATTER => RES_METAMATTER,), |
|
| 1085 | 1085 | // Resources can be produced on planet |
| 1086 | 1086 | 'resources_planet' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY), |
| 1087 | 1087 | // Resources can be looted from planet |
@@ -1100,13 +1100,13 @@ discard block |
||
| 1100 | 1100 | ), |
| 1101 | 1101 | |
| 1102 | 1102 | // Resources that can be tradeable in market trader AND be a quest_rewards |
| 1103 | - 'quest_rewards' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_DARK_MATTER => RES_DARK_MATTER, ), |
|
| 1103 | + 'quest_rewards' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_DARK_MATTER => RES_DARK_MATTER,), |
|
| 1104 | 1104 | |
| 1105 | 1105 | // // Ques list |
| 1106 | 1106 | // 'ques' => array(QUE_STRUCTURES, QUE_HANGAR, QUE_RESEARCH), |
| 1107 | 1107 | |
| 1108 | - 'STAT_COMMON' => array(STAT_TOTAL => STAT_TOTAL, STAT_FLEET => STAT_FLEET, STAT_TECH => STAT_TECH, STAT_BUILDING => STAT_BUILDING, STAT_DEFENSE => STAT_DEFENSE, STAT_RESOURCE => STAT_RESOURCE, ), |
|
| 1109 | - 'STAT_PLAYER' => array(STAT_RAID_TOTAL => STAT_RAID_TOTAL, STAT_RAID_WON => STAT_RAID_WON, STAT_RAID_LOST => STAT_RAID_LOST, STAT_LVL_BUILDING => STAT_LVL_BUILDING, STAT_LVL_TECH => STAT_LVL_TECH, STAT_LVL_RAID => STAT_LVL_RAID, ), |
|
| 1108 | + 'STAT_COMMON' => array(STAT_TOTAL => STAT_TOTAL, STAT_FLEET => STAT_FLEET, STAT_TECH => STAT_TECH, STAT_BUILDING => STAT_BUILDING, STAT_DEFENSE => STAT_DEFENSE, STAT_RESOURCE => STAT_RESOURCE,), |
|
| 1109 | + 'STAT_PLAYER' => array(STAT_RAID_TOTAL => STAT_RAID_TOTAL, STAT_RAID_WON => STAT_RAID_WON, STAT_RAID_LOST => STAT_RAID_LOST, STAT_LVL_BUILDING => STAT_LVL_BUILDING, STAT_LVL_TECH => STAT_LVL_TECH, STAT_LVL_RAID => STAT_LVL_RAID,), |
|
| 1110 | 1110 | ), |
| 1111 | 1111 | |
| 1112 | 1112 | 'pages' => array( |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | 'GROUP BY `unit_snid`' |
| 27 | 27 | ); |
| 28 | 28 | $result = array(); |
| 29 | - while($row = db_fetch($query)) { |
|
| 29 | + while ($row = db_fetch($query)) { |
|
| 30 | 30 | $result[$row['unit_snid']] = $row; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -75,6 +75,9 @@ |
||
| 75 | 75 | return classSupernova::db_ins_record(LOC_UNIT, $set); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | +/** |
|
| 79 | + * @param integer $unit_location_type |
|
| 80 | + */ |
|
| 78 | 81 | function db_unit_list_delete($user_id = 0, $unit_location_type, $unit_location_id, $unit_snid = 0) |
| 79 | 82 | { |
| 80 | 83 | return classSupernova::db_del_record_list(LOC_UNIT, |