	<?php
	
	$filename = $indexFiles;	
	//echo "<br> File Name : ".$filename;

	$myfile = fopen($filename, "w") or die("Unable to open file!:$filename"."/");

	$txt = '<?php session_start();

	$domain_name = "";
	$uri = $_SERVER["REQUEST_URI"]; 
	//11echo "<br>uri: ".$uri; 
	$exploded_uri = explode("/", $uri); 
	$domain_name = $exploded_uri[1];
	//echo "<br>domain_name: ".$domain_name;
	
	if ($domain_name && $domain_name == "tei") $domain_name .= "/";
	else $domain_name = "";
	
	$thisPage = substr($_SERVER["SERVER_NAME"],strrpos($_SERVER["SERVER_NAME"],"/")+0);
	$protocol = isset($_SERVER["HTTPS"]) ? "https" : "http";
	$thisPage = $protocol."://".$thisPage."/".$domain_name;	
	
	// $thisPage = "http://".$thisPage."/".$domain_name;
	
	$thisUrl = $_SERVER["DOCUMENT_ROOT"]."/".$domain_name; 

	//include ($thisUrl."functions/init.php");
	include ($thisUrl."functions/page_subpages_.php");
	
	//echo "<p>".$thisUrl."functions/init.php"."</p>";
	//echo "<p>".$thisUrl."functions/page_subpages_.php"."</p>";
	
	?>';
		
	
	fwrite($myfile, $txt);
	fclose($myfile);
	
	/**
	if (!file_exists($filename)) {
	}
	 **/
	?>
	