Преглед на файлове

show iss images

tags/v1.7
Nico Rey преди 3 години
родител
ревизия
5eb1ce812f
променени са 2 файла, в които са добавени 13 реда и са изтрити 5 реда
  1. +8
    -3
      templates/webpanel/Model/Conn.php
  2. +5
    -2
      templates/webpanel/Views/V_viewLastImages.php

+ 8
- 3
templates/webpanel/Model/Conn.php Целия файл

@@ -45,22 +45,27 @@
}
public function getEnhacements($id) {
$query = $this->con->prepare('SELECT daylight_pass, sat_type
$query = $this->con->prepare('SELECT daylight_pass, sat_type, img_count,
FROM decoded_passes WHERE id = ?;');
$query->bindValue(1, $id);
$result = $query->execute();
$pass = $result->fetchArray();
switch($pass['sat_type']) {
case 0:
case 0: // Meteor-M2
$enhacements = ['-122-rectified.jpg'];
break;
case 1:
case 1: // NOAA
if ($pass['daylight_pass'] == 1) {
$enhacements = ['-ZA.jpg','-MCIR.jpg','-MCIR-precip.jpg','-MSA.jpg','-MSA-precip.jpg','-HVC.jpg','-HVC-precip.jpg','-HVCT.jpg','-HVCT-precip.jpg'];
} else {
$enhacements = ['-ZA.jpg','-MCIR.jpg','-MCIR-precip.jpg'];
}
break;
case 2: // ISS
for ($x = 0; $x <= $$pass['img_count']; $x+=1) {
$enhacements[] = "-$x.png";
}
break;
}
return $enhacements;
}


+ 5
- 2
templates/webpanel/Views/V_viewLastImages.php Целия файл

@@ -21,12 +21,15 @@
$col_count=1;
}
switch($image['sat_type']) {
case 0:
case 0: // Meteor-M2
$ending = "-122-rectified.jpg";
break;
case 1:
case 1: // NOAA
$ending = "-MCIR.jpg";
break;
case 2: // ISS
$ending = "-0.png";
break;
}
echo "<td><div id =\"satimgdiv\"><a href=". "detail.php?id=" . $image['id'] ."><img id=\"satimg\" src=". $baseurl . "thumb/" . $image['file_path'] . $ending ."></img></a></div>";
echo "<ul><li>". $image['sat_name'] ."</li>";


Зареждане…
Отказ
Запис