Exemplo n.º 1
0
     */
 } else {
     if (isset($_SESSION['install']) && $_SESSION['install'] == 'sources') {
         unset($_SESSION['install']);
         print '<div class="info column"><ul>';
         foreach ($_SESSION['done'] as $done) {
             print '<li>' . $done . '....<strong>SUCCESS</strong></li>';
         }
         if (isset($_SESSION['sources']) && count($_SESSION['sources']) > 0) {
             $sources = $_SESSION['sources'];
             print '<li>Insert data in source table....<img src="../images/loading.gif" /></li></ul></div>';
             flush();
             @ob_flush();
             include_once '../require/class.Source.php';
             $globalDebug = FALSE;
             Source::deleteAllLocation();
             foreach ($sources as $source) {
                 if (isset($source['latitude']) && $source['latitude'] != '') {
                     Source::addLocation($source['name'], $source['latitude'], $source['longitude'], $source['altitude'], $source['city'], $source['country'], 'antenna.png');
                 }
             }
             $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert data in source table'));
             unset($_SESSION['sources']);
         }
         /*
         if (isset($globalIVAO) && $globalIVAO) $_SESSION['install'] = 'ivao';
         else $_SESSION['install'] = 'finish';
         */
         $_SESSION['install'] = 'finish';
         print "<script>window.location = 'index.php?" . rand() . "&next=" . $_SESSION['install'] . "';</script>";
     } else {
Exemplo n.º 2
0
     	include_once('class.update_db.php');
     	$globalDebug = FALSE;
     	update_db::update_ivao();
     	$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate ivao table with externals data'));
     
     	$_SESSION['install'] = 'finish';
     	print "<script>window.location = 'index.php?".rand()."&next=".$_SESSION['install']."';</script>";
     */
 } else {
     if (isset($_SESSION['install']) && $_SESSION['install'] == 'sources') {
         if (isset($_SESSION['sources']) && count($_SESSION['sources']) > 0) {
             $sources = $_SESSION['sources'];
             include_once '../require/class.Source.php';
             $globalDebug = FALSE;
             $Source = new Source();
             $Source->deleteAllLocation();
             foreach ($sources as $src) {
                 if (isset($src['latitude']) && $src['latitude'] != '') {
                     $Source->addLocation($src['name'], $src['latitude'], $src['longitude'], $src['altitude'], $src['city'], $src['country'], 'antenna.png');
                 }
             }
             $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert data in source table'));
             unset($_SESSION['sources']);
         }
         /*
         if (isset($globalIVAO) && $globalIVAO) $_SESSION['install'] = 'ivao';
         else $_SESSION['install'] = 'finish';
         */
         if (isset($globalVATSIM) && $globalVATSIM && (isset($globalIVAO) && $globalIVAO)) {
             $_SESSION['install'] = 'vatsim';
             if (file_exists('tmp/ivae_feb2013.zip')) {