Permalink
Browse files

Some more code style fixes

  • Loading branch information...
Obihoernchen committed Dec 26, 2016
1 parent c0c7f0b commit 14bb42ebd4338f88db59cc2b56dedbd10d99db58
Showing with 85 additions and 86 deletions.
  1. +1 −1 .ruleset.xml
  2. +4 −4 core/css/style.css
  3. +6 −6 core/inc/meta.inc.php
  4. +13 −15 core/js/pokemon.maps.js.php
  5. +11 −11 core/process/aru.php
  6. +5 −5 core/process/data.loader.php
  7. +37 −37 functions.php
  8. +6 −6 install.sh
  9. +2 −1 pages/gym.page.php
View
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset name="MyStandard">
<ruleset name="PSR2-tabs">
<description>PSR2 with tabs instead of spaces.</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
View
@@ -379,14 +379,14 @@ div#levelMeter .progress{
.bar-step {
position:absolute;
position:absolute;
z-index:1000;
font-size:14px;
font-size:14px;
top: 2px;
}
.label-line {
background: #000;
height:20px;
background: #000;
height:20px;
width:1px;
top: -2px;
position: absolute;
View
@@ -69,7 +69,7 @@
<?php
break;
break;
case 'pokestops':
?>
@@ -95,7 +95,7 @@
<?php
break;
break;
case 'gym':
?>
@@ -120,7 +120,7 @@
<meta name="twitter:image" content="<?= HOST_URL ?>core/img/logo.jpg" />
<?php
break;
break;
case 'trainer':
?>
@@ -144,7 +144,7 @@
<meta name="twitter:image" content="<?= HOST_URL ?>core/img/logo.jpg" />
<?php
break;
break;
case 'dashboard':
?>
@@ -169,7 +169,7 @@
<?php
break;
break;
case 'pokedex':
?>
@@ -193,7 +193,7 @@
<meta name="twitter:image" content="<?= HOST_URL ?>core/img/logo.jpg" />
<?php
break;
break;
}
}
@@ -2,10 +2,10 @@
# Test to check if the file is called properly
if(!isset($_GET['id'])){
if (!isset($_GET['id'])) {
http_response_code(400);
echo 'Bad Request';
exit();
exit();
}
# Send Javascript header
@@ -17,10 +17,12 @@
# Connect MySQL
$mysqli = new mysqli(SYS_DB_HOST, SYS_DB_USER, SYS_DB_PSWD, SYS_DB_NAME, SYS_DB_PORT);
if($mysqli->connect_error != ''){exit('Error MySQL Connect');}
if ($mysqli->connect_error != '') {
exit('Error MySQL Connect');
}
# Heatmap datas
$pokemon_id = mysqli_real_escape_string($mysqli,$_GET['id']);
$pokemon_id = mysqli_real_escape_string($mysqli, $_GET['id']);
?>
@@ -32,7 +34,7 @@ function initMap() {
$.getJSON( "core/json/variables.json", function( jsondata ) {
var variables = jsondata;
var lattitude = Number(variables['system']['map_center_lat']);
var longitude = Number(variables['system']['map_center_long']);
var zoom_level = Number(variables['system']['zoom_level']);
@@ -85,21 +87,17 @@ function getPoints() {
<?php
// As the map is rendering by the client, we do recommand to keep a limit on your request.
// 10k is already alotof datas ;)
// As the map is rendering by the client, we do recommand to keep a limit on your request.
// 10k is already alotof datas ;)
$req = "SELECT latitude, longitude FROM pokemon WHERE pokemon_id = '".$pokemon_id."' ORDER BY disappear_time DESC LIMIT 0,10000";
$result = $mysqli->query($req);
while($data = $result->fetch_object()){
while ($data = $result->fetch_object()) {
?>
new google.maps.LatLng(<?= $data->latitude ?>, <?= $data->longitude ?>),
<?php }?>
new google.maps.LatLng(<?= $data->latitude ?>, <?= $data->longitude ?>),
<?php
}?>
];
}
View
@@ -124,7 +124,7 @@
echo $json;
break;
break;
@@ -176,7 +176,7 @@
echo $html;
}
break;
break;
@@ -217,7 +217,7 @@
echo $return;
break;
break;
@@ -249,7 +249,7 @@
echo $json;
break;
break;
####################################
//
@@ -276,25 +276,25 @@
$icon = 'map_white.png';
$team = 'No Team (yet)';
$color = 'rgba(0, 0, 0, .6)';
break;
break;
case 1:
$icon = 'map_blue_';
$team = 'Team Mystic';
$color = 'rgba(74, 138, 202, .6)';
break;
break;
case 2:
$icon = 'map_red_';
$team = 'Team Valor';
$color = 'rgba(240, 68, 58, .6)';
break;
break;
case 3:
$icon = 'map_yellow_';
$team = 'Team Instinct';
$color = 'rgba(254, 217, 40, .6)';
break;
break;
}
// Set gym level
@@ -358,7 +358,7 @@
echo $return;
break;
break;
####################################
@@ -460,7 +460,7 @@
echo $return;
break;
break;
case 'trainer':
$name = "";
@@ -482,7 +482,7 @@
$result = $mysqli->query($req);
$trainers = array();
$trainers = array();
while ($data = $result->fetch_object()) {
$data->last_seen = date("Y-m-d", strtotime($data->last_seen));
$trainers[$data->name] = $data;
@@ -232,7 +232,7 @@
}
}
break;
break;
@@ -265,7 +265,7 @@
}
break;
break;
// Pokestops
@@ -288,7 +288,7 @@
break;
break;
// Gyms
@@ -345,7 +345,7 @@
}
break;
break;
@@ -379,7 +379,7 @@
break;
break;
}
} /////////////
// Homepage
Oops, something went wrong.

0 comments on commit 14bb42e

Please sign in to comment.