Location: PHPKode > projects > KimsQ > q/_tmp/install.func.php
<?php
function getLink($url,$alert,$history)
{
	echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
	echo '<script type="text/javascript">';
	if ( $alert ) echo "alert('".$alert."          ');";
	if ( $url   ) echo "location.href='".$url."';";
	if ($history == -1) echo 'history.go('.$history.');';
	if ($history == "close") echo 'top.close();';
	echo '</script>'; 
	exit;
}
function DirDelete($t_dir)
{
	$dirh = opendir($t_dir); 
	while(false !== ($filename = readdir($dirh))) 
	{ 
		if($filename != '.' && $filename != '..') 
		{
			if(!is_file($t_dir.'/'.$filename)) 
			{
				DirDelete($t_dir.'/'.$filename);
			}
			else { 
				@unlink($t_dir.'/'.$filename); 
			}
		}
	} 
	closedir($dirh);
	@rmdir($t_dir);
}
function DirChmod($t_dir,$mode)
{
	$dirh = opendir($t_dir); 
	while(false !== ($filename = readdir($dirh))) 
	{ 
		if($filename != '.' && $filename != '..') 
		{
			if(!is_file($t_dir.'/'.$filename)) 
			{
				@chmod($t_dir.'/'.$filename,$mode); 
				DirChmod($t_dir.'/'.$filename,$mode);
			}
			else { 
				@chmod($t_dir.'/'.$filename,$mode); 
			}
		}
	} 
	closedir($dirh);
	@chmod($t_dir,$mode);
}
function DirPermcheck()
{
	$edir = explode('/',$_SERVER['SCRIPT_NAME']);
	$sdir = count($edir) > 2 ? '/'.$edir[count($edir)-2] : '.';

	$permfiles = '';

	if(!is_writable('./')) $permfiles .= '['.intval(substr(sprintf('%o', fileperms('./')), -3)).']'.$sdir.'/\\n';
	if(!is_writable('./_tmp')) $permfiles .= '['.intval(substr(sprintf('%o', fileperms('./_tmp')), -3)).']'.$sdir.'/_tmp\\n';
	if(!is_writable('./kimsq.zip')) $permfiles .= '['.intval(substr(sprintf('%o', fileperms('./kimsq.zip')), -3)).']'.$sdir.'/kimsq.zip\\n';
	if(!is_writable('./index.php')) $permfiles .= '['.intval(substr(sprintf('%o', fileperms('./index.php')), -3)).']'.$sdir.'/index.php\\n';

	$dirh = opendir('./_tmp'); 
	while(false !== ($filename = readdir($dirh))) 
	{ 
		if (is_file('./_tmp/'.$filename))
		{
			if(!is_writable('./_tmp/'.$filename))
			{
				$permfiles .= '['.intval(substr(sprintf('%o', fileperms('./_tmp/'.$filename)), -3)).']'.$sdir.'/_tmp/'.$filename.'\\n';
			}
		}
	} 
	closedir($dirh);

	return $permfiles;
}
?>
Return current item: KimsQ