| 
									
										
										
										
											2016-04-23 18:01:11 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  |     //                            ADS-B RECEIVER PORTAL                                //
 | 
					
						
							|  |  |  |     // =============================================================================== //
 | 
					
						
							|  |  |  |     // Copyright and Licensing Information:                                            //
 | 
					
						
							|  |  |  |     //                                                                                 //
 | 
					
						
							|  |  |  |     // The MIT License (MIT)                                                           //
 | 
					
						
							|  |  |  |     //                                                                                 //
 | 
					
						
							| 
									
										
										
										
											2024-07-13 05:24:38 +00:00
										 |  |  |     // Copyright (c) 2015 Joseph A. Prochazka                                          //
 | 
					
						
							| 
									
										
										
										
											2016-04-23 18:01:11 +00:00
										 |  |  |     //                                                                                 //
 | 
					
						
							|  |  |  |     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 | 
					
						
							|  |  |  |     // of this software and associated documentation files (the "Software"), to deal   //
 | 
					
						
							|  |  |  |     // in the Software without restriction, including without limitation the rights    //
 | 
					
						
							|  |  |  |     // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell       //
 | 
					
						
							|  |  |  |     // copies of the Software, and to permit persons to whom the Software is           //
 | 
					
						
							|  |  |  |     // furnished to do so, subject to the following conditions:                        //
 | 
					
						
							|  |  |  |     //                                                                                 //
 | 
					
						
							|  |  |  |     // The above copyright notice and this permission notice shall be included in all  //
 | 
					
						
							|  |  |  |     // copies or substantial portions of the Software.                                 //
 | 
					
						
							|  |  |  |     //                                                                                 //
 | 
					
						
							|  |  |  |     // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR      //
 | 
					
						
							|  |  |  |     // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,        //
 | 
					
						
							|  |  |  |     // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE     //
 | 
					
						
							|  |  |  |     // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER          //
 | 
					
						
							|  |  |  |     // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,   //
 | 
					
						
							|  |  |  |     // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE   //
 | 
					
						
							|  |  |  |     // SOFTWARE.                                                                       //
 | 
					
						
							|  |  |  |     /////////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."common.class.php"); | 
					
						
							| 
									
										
										
										
											2016-04-23 18:01:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     $common = new common(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-27 23:50:37 +00:00
										 |  |  |     // The most current stable release.
 | 
					
						
							| 
									
										
										
										
											2024-07-13 03:05:48 +00:00
										 |  |  |     $thisVersion = "2.8.4"; | 
					
						
							| 
									
										
										
										
											2016-04-27 23:50:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Begin the upgrade process if this release is newer than what is installed.
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == $thisVersion) { | 
					
						
							|  |  |  |         header ("Location: /"); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     $success = TRUE; | 
					
						
							| 
									
										
										
										
											2016-04-28 17:40:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-10 18:37:14 +00:00
										 |  |  |     // UPGRADE TO V2.0.1
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.0.0" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.0.1.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.0.1"; | 
					
						
							| 
									
										
										
										
											2016-05-10 18:37:14 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-04-28 17:40:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-17 17:18:55 +00:00
										 |  |  |     // UPGRADE TO V2.0.2
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.0.1" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.0.2.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.0.2"; | 
					
						
							| 
									
										
										
										
											2016-05-18 05:58:16 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // UPGRADE RO V2.0.3
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.0.2" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.0.3.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.0.3"; | 
					
						
							| 
									
										
										
										
											2016-04-23 18:01:11 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-04-27 23:50:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-17 17:18:55 +00:00
										 |  |  |     // UPGRADE TO V2.1.0
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.0.3" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.1.0.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.1.0"; | 
					
						
							| 
									
										
										
										
											2016-08-30 16:10:04 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // UPGRADE TO V2.2.0
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.1.0" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.2.0.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.2.0"; | 
					
						
							| 
									
										
										
										
											2016-05-17 17:18:55 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-13 00:30:37 +00:00
										 |  |  |     // UPGRADE TO V2.3.0
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.2.0" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.3.0.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.3.0"; | 
					
						
							| 
									
										
										
										
											2016-09-13 00:30:37 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-20 18:28:41 +00:00
										 |  |  |     // UPGRADE TO V2.4.0
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.3.0" && $success) { | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.4.0.php"); | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							| 
									
										
										
										
											2016-10-14 19:23:46 +00:00
										 |  |  |         $version = "2.4.0"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // UPGRADE TO V2.5.0
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.4.0" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.5.0.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.5.0"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-12 17:01:39 +00:00
										 |  |  |     // UPGRADE TO V2.6.0
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.5.0" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.6.0.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.6.0"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-01 22:43:49 +00:00
										 |  |  |     // UPGRADE TO V2.6.1
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.6.0" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.6.1.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.6.1"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-07 00:41:52 +00:00
										 |  |  |     // UPGRADE TO V2.6.2
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.6.1" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.6.2.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.6.2"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-22 15:00:29 +00:00
										 |  |  |     // UPGRADE TO V2.6.3
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.6.2" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.6.3.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.6.3"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-26 18:24:22 +00:00
										 |  |  |     // UPGRADE TO V2.7.0
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.6.3" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.7.0.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.7.0"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-04 20:55:57 +00:00
										 |  |  |     // UPGRADE TO V2.7.1
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.7.0" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.7.1.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.7.1"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-19 15:10:21 +00:00
										 |  |  |     // UPGRADE TO V2.7.2
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.7.1" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.7.2.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.7.2"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-20 04:31:56 +00:00
										 |  |  |     // UPGRADE TO V2.8.0
 | 
					
						
							| 
									
										
										
										
											2024-06-27 19:08:21 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.7.2" && $success) { | 
					
						
							| 
									
										
										
										
											2024-06-20 04:31:56 +00:00
										 |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.8.0.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.8.0"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-27 19:08:21 +00:00
										 |  |  |     // UPGRADE TO V2.8.1
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.8.0" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.8.1.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.8.1"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-07 19:36:38 +00:00
										 |  |  |     // UPGRADE TO V2.8.2
 | 
					
						
							| 
									
										
										
										
											2024-06-29 04:17:01 +00:00
										 |  |  |     if ($common->getSetting("version") == "2.8.1" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.8.2.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.8.2"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-07 19:36:38 +00:00
										 |  |  |     // UPGRADE TO V2.8.3
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.8.2" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.8.3.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.8.3"; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2024-06-29 04:17:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-13 03:05:48 +00:00
										 |  |  |     // UPGRADE TO V2.8.4
 | 
					
						
							|  |  |  |     if ($common->getSetting("version") == "2.8.3" && $success) { | 
					
						
							|  |  |  |         $json = file_get_contents("http://localhost/install/upgrade-v2.8.4.php"); | 
					
						
							|  |  |  |         $results = json_decode($json, TRUE); | 
					
						
							|  |  |  |         $success = $results['success']; | 
					
						
							|  |  |  |         $message = $results['message']; | 
					
						
							|  |  |  |         $version = "2.8.4"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."admin".DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."header.inc.php"); | 
					
						
							| 
									
										
										
										
											2016-04-28 17:40:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Display the instalation wizard.
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     if ($success) { | 
					
						
							| 
									
										
										
										
											2016-04-28 17:40:58 +00:00
										 |  |  | ?>
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |                 <h1>ADS-B Receiver Portal Updated</h1> | 
					
						
							|  |  |  |                 <p>Your portal has been upgraded to v<?php echo $version; ?>.</p>
 | 
					
						
							| 
									
										
										
										
											2016-04-28 17:40:58 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  | ?>
 | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |                 <h1>Error Encountered Upgrading Your ADS-B Receiver Portal</h1> | 
					
						
							|  |  |  |                 <p>There was an error encountered when upgrading your portal to v<?php echo $version; ?>.</p>
 | 
					
						
							|  |  |  |                 <?php echo $message; ?>
 | 
					
						
							| 
									
										
										
										
											2016-04-28 17:40:58 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-09-21 21:58:31 +00:00
										 |  |  |     require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."admin".DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."footer.inc.php"); | 
					
						
							| 
									
										
										
										
											2016-04-23 18:01:11 +00:00
										 |  |  | ?>
 |