Commit 70949df3 authored by dmorley's avatar dmorley

move n/a to view

parent cacff7a8
......@@ -240,11 +240,11 @@ while ($row = pg_fetch_all($result)) {
echo '<br>';
}
if ($location) {
$country = isset($location['country_code']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['country_code']) : "n/a";
$city = isset($location['city']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['city']) : "n/a";
$state = isset($location['region']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['region']) : "n/a";
$lat = isset($location['latitude']) ? $location['latitude']: "n/a";
$long = isset($location['longitude']) ? $location['longitude'] : "n/a";
$country = isset($location['country_code']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['country_code']) : null;
$city = isset($location['city']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['city']) : null;
$state = isset($location['region']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['region']) : null;
$lat = isset($location['latitude']) ? $location['latitude']: null;
$long = isset($location['longitude']) ? $location['longitude'] : null;
//if lat and long are just a generic country with no detail lets make some tail up or openmap just stacks them all on top another
if (strlen($lat) < 4) {
$lat = $lat + (rand(1, 15) / 10);
......
......@@ -56,9 +56,9 @@ $numrows = pg_num_rows($result);
echo '<td>' . $row['uptimelast7'] . '%</td>';
echo '<td data-toggle="tooltip" data-placement="bottom" title="active six months: ' . $row['active_users_halfyear'] . ', active one month: ' . $row['active_users_monthly'] . '">' . $row['active_users_halfyear'] . '</td>';
if ($country_code === $row['country']) {
echo '<td class="text-success" data-toggle="tooltip" data-placement="bottom" title="City: ' . $row['city'] . ' State: ' . $row['state'] . '"><b>' . $row['country'] . '</b></td>';
echo '<td class="text-success" data-toggle="tooltip" data-placement="bottom" title="City: '; echo $row['city'] ?? 'n/a'; echo ' State: '; echo $row['state'] ?? 'n/a'; echo '"><b>' . $row['country'] . '</b></td>';
} else {
echo '<td data-toggle="tooltip" data-placement="bottom" title="City: ' . $row['city'] . ' State: ' . $row['state'] . '">' . $row['country'] . '</td>';
echo '<td data-toggle="tooltip" data-placement="bottom" title="City: '; echo $row['city'] ?? 'n/a'; echo ' State: '; echo $row['state'] ?? 'n/a'; echo '">' . $row['country'] . '</td>';
}
echo '<td>';
$row['service_facebook'] === 't' && print '<div class="smlogo smlogo-facebook" title="Publish to Facebook" alt="Publish to Facebook"></div>';
......
......@@ -96,9 +96,9 @@ $numrows = pg_num_rows($result);
echo '</a></td>';
echo '<td>' . $row['score'] . '/100</td>';
if ($country_code === $row['country']) {
echo '<td class="text-success" data-toggle="tooltip" data-placement="bottom" title="City: ' . $row['city'] . ' State: ' . $row['state'] . '"><b>' . $row['country'] . '</b></td>';
echo '<td class="text-success" data-toggle="tooltip" data-placement="bottom" title="City: '; echo $row['city'] ?? 'n/a'; echo ' State: '; echo $row['state'] ?? 'n/a'; echo '"><b>' . $row['country'] . '</b></td>';
} else {
echo '<td data-toggle="tooltip" data-placement="bottom" title="City: ' . $row['city'] . ' State: ' . $row['state'] . '">' . $row['country'] . '</td>';
echo '<td data-toggle="tooltip" data-placement="bottom" title="City: '; echo $row['city'] ?? 'n/a'; echo ' State: '; echo $row['state'] ?? 'n/a'; echo '">' . $row['country'] . '</td>';
}
echo '<td>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment