<?php 
/*
 *
 * sflog!
 * Copyright (C) 2005 Alberto Sfolcini <a.sfolcini@gmail.com>
 *
 * This file is a part of sflog!.
 *
 * sflog! is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * sflog! is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

 $action=0;
 if (isset($_GET['action'])){
 	if (strcasecmp(trim($_GET['action']),'')!=0){
 		$action=$_GET['action'];
 	}
 }
?>   



<b>Welcome to <font color="blue"><i>sflog!</i></font> installation</b>
<br><br>
In order to obtain a reliable installation be sure to complete the following steps:<br><br>
<dd><b>1.</b>&nbsp;Sets permissions: <a href="../admin/setup.php?action=1">click here</a>
<dd><b>2.</b>&nbsp;Login as '<font color="blue"><i>admin</i></font>' / '<font color="blue"><i>secret</i></font>' and change your password: <a target="new" href="./login.php">Login here</a> 
<dd><b>3.</b>&nbsp;Turn off this php script: <a href="../admin/setup.php?action=2">turn off</a>
<dd><b>4.</b>&nbsp;Use the Administration area to setup your website.
<dd><b>4.</b>&nbsp;Enjoy!

</dd>
<br>
<hr size="1px" width="90%">

<?

 switch ($action){
 	case 1: {
 		print("Settings perms...");
		$command = './setperms ';
		$output = shell_exec($command); 		
 		print("OK!");
 		break;
 	}
 	case 2: {
 		print("Turning off this PHP page...");
 		chmod('./setup.php',0000);
 		chmod('./includes/setup.inc.php',0000); 			
 		print("DONE!");
 		break;
 	}
 
 }


?>
