initial import

This commit is contained in:
Alchemy
2011-02-16 16:09:48 +01:00
parent 399a584b6f
commit 339d23c06d
5539 changed files with 2028637 additions and 1 deletions

View File

@@ -0,0 +1,70 @@
<?php
class skins
{
public static function merge($dir='')
{
$path_in = dirname( __FILE__ ) . '/../../lib/skins/';
$path_cs = dirname( __FILE__ ) . '/../../config/skins/';
$path_out = dirname( __FILE__ ) . '/../../www/skins/';
if(is_dir($path_cs.$dir))
{
if($hdir = opendir($path_cs.$dir))
{
while(false !== ($file = readdir($hdir)))
{
if(substr($file,0,1)=="." || mb_strtolower($file)==".cvs" || mb_strtolower($file)==".svn" || mb_strtolower($file)==".htaccess")
continue;
$current_dir = ($dir != '' ? $dir. '/' : '') .$file;
if(is_dir($path_cs . $current_dir))
{
if(p4::fullmkdir($path_out . $current_dir))
{
self::merge($current_dir);
}
}
if(is_file($path_cs . $current_dir))
{
copy($path_cs.$current_dir,$path_out.$current_dir);
}
}
}
}
if(is_dir($path_in.$dir))
{
if($hdir = opendir($path_in.$dir))
{
while(false !== ($file = readdir($hdir)))
{
if(substr($file,0,1)=="." || mb_strtolower($file)==".cvs" || mb_strtolower($file)==".svn" || mb_strtolower($file)==".htaccess")
continue;
$current_dir = ($dir != '' ? $dir. '/' : '') .$file;
if(is_dir($path_in . $current_dir))
{
if(!is_dir($path_out . $current_dir))
{
p4::fullmkdir($path_out . $current_dir);
}
self::merge($current_dir);
}
if(is_file($path_in . $current_dir))
{
if(!is_file($path_out.$current_dir))
copy($path_in.$current_dir,$path_out.$current_dir);
}
}
}
}
}
public static function delete_skins_files()
{
$origine = GV_RootPath.'www/skins/';
p4::empty_directory($origine);
}
}