<?php
/*
	DevSaver web framework
	copyright (c) 2013-2016 DevSaver
		web:  www.devsaver.com
		mail: support@devsaver.com
		
*/


if ($_GET["action"] == "generatefiles") {

	$files = CDir::GetFilesRec("./");

	if (is_array($files)) {


		foreach ($files as $key => $val) {

			if (!stristr($val , "@") && !stristr($val , "upload/") && !stristr($val , "install/") && !stristr($val , "after.generatexml.php") ) {
				$xml.= "\t<file path=\"" . str_replace(".//" , "" , $val) . "\" size=\"" . filesize($val) . "\" />\n";
			}
			
		}
		
		saveFileContents(
			"install/files.xml",
			"<files>\n" . $xml . "</files>"
		);
	}
	
}



?>