Location: PHPKode > scripts > Cwfm > cwfm/php/DwBoot.php
<?
//////////////////////////////////////////////////////////////////////
//
// DwBoot.php - Cwfm
//
// By Vincenzo Valvano - hide@address.com
//
// This program 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. This program 
// 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., 59 Temple Place, Suite 330, 
// Boston, MA  02111-1307  USA
//////////////////////////////////////////////////////////////////////
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
session_start();
include_once("Global.php");
if( !ValidSession() )
{
	IntrusionNotify();
	exit;
}
if( !$CanDwload )
	exit;
?>
<html>
<?
global $zip;

echo "<script language=\"JavaScript\">\n";
if( $zip )
{
	if( strstr($HTTP_USER_AGENT, "MSIE 5.0")  )
		echo "document.location='Dwload.php/-//CwfmCompressed.zip';\n";
	else
		echo "document.location='Dwload.php?dir=-/CwfmCompressed.zip';\n";
}
else
{
//	$file = DecodeFilename($file);
	if( OkDir($dir,0) && OkFile($file,0) )
	{
		echo "file = String.fromCharCode(";
		for($i=0; $i < strlen($file); $i++)
		{
			echo ord($file[$i]);
			if( $i != strlen($file) -1 )
				echo ",";
		}
		echo ");\n";
		if( strstr($HTTP_USER_AGENT, "MSIE 5.0")  )
			echo "l = \"document.location='Dwload.php/".EncodeFilename($dir)."/'+file\";\n";
		else
			echo "l = \"document.location='Dwload.php?dir=".EncodeFilename($dir)."/'+file\";\n";
		echo "eval(l);\n";
	}
}
echo "</script>\n";
?> 
</html>
Return current item: Cwfm