Location: PHPKode > projects > FSG Free Web-Interface > InstallFSGFreeWI_2008_06_12_alpha/rescue.php
<!--
//***************************************************************************
//Copyright 2007 Johannes, Storm
//
//
//This file is part of FSG Free Web-Interface.
//
//FSG Free Web-Interface 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 3 of the License.
//
//FSG Free Web-Interface 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 FSG Free Web-Interface.  If not, see <http://www.gnu.org/licenses/>.
//***************************************************************************
-->



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>FSG - New Webinterface</title>
		<link rel="stylesheet" type="text/css" href="styles/generell.css">
		<link rel="stylesheet" type="text/css" href="styles/start.css">
	</head>
	<body class="generell">
	
		<table class="All" cellspacing="0" cellpadding="0">
		 <tbody>
		  <tr>
		   <td valign="middle">
		   
		     <table class="Display_Box" cellspacing="0" cellpadding="0">
		     <tbody>
		      <tr>
		       <td class="Display_Links" valign="middle">
		        &nbsp;
		       </td>
			   <td class="Display_Mitte" align="center" valign="middle">
				
				<?PHP
					$Install=0;
					
					if (empty($_GET["Install"])==false) {
						if ($_GET["Install"]=="Yes") {
							$Install=1;
							$fp=fopen("./RescueFiles/Rescue.config", "r");
							if ($fp!=false) {
								while (feof($fp)!=true) {
									$Pfad="";
									$Datei="";
									$Zeile=fgets($fp, 255);
									sscanf($Zeile, "%[^=]=%[^\r\n]\r\n", $Pfad, $Datei);
									
									if ($Zeile!="" && $Datei!="") {
										if (file_exists("./RescueFiles/" . $Datei)) {
											if (empty($_GET[$Datei])==false) {
												if ($_GET[$Datei]==$Datei) {
													if (Copy("./RescueFiles/" . $Datei, $Pfad)) {
														echo '<br>Copy finish: ' . $Datei;
													}
													else {
														echo '<br>Copy failed: ' . $Datei;
													}
												}
												else {
													echo '<br>Filenames different: ' . $Datei . ' - ' . $_GET[$Datei];
												}
											}
										}
										else {
											echo '<br>File not exists: ' . $Datei;
										}
									}
								}
							}
						}
					}
					if ($Install==0) {
						echo 'Warning! : Systemfiles will overwrite with Files from Rescue-Folder<br>';
						echo '<form action="rescue.php" method="get">';
						echo '<input type="hidden" name="Install" value="Yes">';
						
						$fp=fopen("./RescueFiles/Rescue.config", "r");
						if ($fp!=false) {
							while (feof($fp)!=true) {
								$Pfad="";
								$Datei="";
								$Zeile=fgets($fp, 255);
								sscanf($Zeile, "%[^=]=%[^\r\n]\r\n", $Pfad, $Datei);
								
								if ($Zeile!="" && $Datei!="") {
									if (file_exists("./RescueFiles/" . $Datei)) {
										echo '<input type="checkbox" name="' . $Datei . '" value="';
										echo $Datei . '" checked="checked"> ' . $Datei . '<br>';
									}
								}
							}
						}
						
						echo '<button type="submit" value="Rescue" name="Aufgabe">Rescue Files</button>';
						echo '</form>';
					}
				?>
			        
		       </td>
			   <td class="Display_Rechts" valign="middle">
		        &nbsp;
		       </td>
		      </tr>
	         </tbody>
		    </table>
			
		   </td>
		  </tr>
		 </tbody>
		</table>
				
	</body>
</html>





Return current item: FSG Free Web-Interface