include('includes/classes/AVOMysqli.php'); $db = new AVOMysqli(); $get = $db->check_gpc($_GET, 'full'); $volcname = $get['volcname']; $offset = $get['offset']; $station = $get['station']; // Where the archives are $dir = '/var/www/html/webicorders/'; // check the offset to see make sure it's either 24 or 48 if($offset != 24 && $offset != 48){ $offset = ''; } if($volcname){ //$globalQ = "SELECT comments FROM tblhelicorderoptions WHERE optionID = 1"; //$global_comment = $db->db_fetch_object($db->db_query($globalQ))->comments; $stationQ = ''; $params[] = array($volcname, 's'); if($station){ $stationQ = " AND vc.camID = ? "; $params[] = array($station, 's'); } $sql = "SELECT v.VolcNameID, v.Volcano, hc.comments, vc.* FROM tbllistvolc AS v INNER JOIN tblvalvecam AS vc ON (vc.VolcNameID = v.VolcNameID) LEFT JOIN tblhelicorderoptions AS hc ON (vc.camID = hc.camID) WHERE v.Volcano = ? $stationQ AND vc.plot_available = 1"; $stmt = $db->stmt($sql, $params); if(is_object($stmt) && $stmt->num_rows > 0){ $webinfo = $db->fetch_object($stmt); /* $stationsQ = "SELECT tblvalvecam.camID, tblvalvecam.StationName FROM tblvalvecam WHERE VolcNameID = '$webinfo->VolcNameID' AND tblvalvecam.plot_available = 1"; $stations = $db->db_create_array($stationsQ); */ $file = $webinfo->plotPage; $loc = '/webicorders/' . $volcname . '/'; $loc .= ($station) ? $webinfo->StationName . '.php' : ''; $ok = true; $db->cleanup($stmt); header("Location:$loc"); } else{ $ok = false; } } $allwebiQ = "SELECT DISTINCT tbllistvolc.Volcano FROM tbllistvolc INNER JOIN tblvalvecam ON (tblvalvecam.VolcNameID = tbllistvolc.VolcNameID) WHERE tblvalvecam.plot_available = 1 ORDER BY Volcano"; $allwebi = $db->query($allwebiQ); // check to see if we want to pull camera images from an external url $type = 'webicorders'; $extQ = "SELECT * FROM offsite_storage WHERE type = '$type' LIMIT 1"; $ext = $db->query($extQ); $row = $ext->fetch_assoc(); $ext->free(); if($row['use'] == 'yes'){ $webi_dir = $row['basedir']; } else{ $webi_dir = '/webicorders/'; } include('includes/doctype.htm'); include('includes/notable_css.php'); ?>