File: 0.02.62a/server/web/welcome.php (View as HTML)

  1: <?php
  2: /* -------------------------------------------------------------
  3: This file is part of FreeNATS
  4: 
  5: FreeNATS is (C) Copyright 2008 PurplePixie Systems
  6: 
  7: FreeNATS is free software: you can redistribute it and/or modify
  8: it under the terms of the GNU General Public License as published by
  9: the Free Software Foundation, either version 3 of the License, or
 10: (at your option) any later version.
 11: 
 12: FreeNATS is distributed in the hope that it will be useful,
 13: but WITHOUT ANY WARRANTY; without even the implied warranty of
 14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 15: GNU General Public License for more details.
 16: 
 17: You should have received a copy of the GNU General Public License
 18: along with FreeNATS.  If not, see www.gnu.org/licenses
 19: 
 20: For more information see www.purplepixie.org/freenats
 21: -------------------------------------------------------------- */
 22: 
 23: ob_start();
 24: require("include.php");
 25: $NATS->Start();
 26: if (!$NATS_Session->Check($NATS->DB))
 27: 	{
 28: 	header("Location: ./?login_msg=Invalid+Or+Expired+Session");
 29: 	exit();
 30: 	}
 31: if ($NATS_Session->userlevel<5) UL_Error("Welcome Page");
 32: 
 33: 
 34: $NATS->Cfg->Set("freenats.firstrun","0");
 35: 
 36: if (isset($_REQUEST['process']))
 37: 	{
 38: 	if (isset($_REQUEST['set_tracker'])) $NATS->Cfg->Set("freenats.tracker","1");
 39: 	if (isset($_REQUEST['send_confirm'])) $NATS->PhoneHome(0,"firstrun.conf");
 40: 	}
 41: 
 42: if (($NATS->Cfg->Get("freenats.tracker")!="")&&($NATS->Cfg->Get("freenats.tracker")>0))
 43: 	{
 44: 	$NATS->PhoneHome(0,"firstrun");
 45: 	}
 46: 	
 47: if (isset($_REQUEST['process']))
 48: 	{
 49: 	$s="main.php?message=Ready+to+setup+nodes";
 50: 	if (isset($_REQUEST['check_updates'])) $s.="&check_updates=1";
 51: 	header("Location: ".$s);
 52: 	exit();
 53: 	}
 54: ob_end_flush();
 55: Screen_Header("Welcome to FreeNATS",1);
 56: 
 57: echo "<br><b>Please take a moment to complete setup of FreeNATS</b><br><br>";
 58: echo "<form action=welcome.php method=post>";
 59: echo "<input type=hidden name=process value=1>";
 60: echo "<input type=checkbox name=check_updates value=1 checked> Check Now for Updates<br><br>";
 61: echo "<input type=checkbox name=set_tracker value=1 checked> Participate in Automated Feedback Program<br><br>";
 62: echo "<input type=checkbox name=send_confirm value=1 checked> Confirm FreeNATS Installation with PurplePixie Systems<br>";
 63: echo "<br>";
 64: echo "<input type=submit value=\"Complete Initial FreeNATS Configuration\">";
 65: echo "</form><br><br>";
 66: 
 67: ?>
 68: 
 69: <?php
 70: Screen_Footer();
 71: ?>
 72: