; array_push( $tables, "glist_cottages" ); array_push( $tables, "glist_newbuildings" ); array_push( $tables, "glist_second" ); array_push( $tables, "list_arenda_status" ); array_push( $tables, "list_autostation" ); array_push( $tables, "list_balkon" ); array_push( $tables, "list_building_type" ); array_push( $tables, "list_cities" ); array_push( $tables, "list_comm_char" ); array_push( $tables, "list_communications" ); array_push( $tables, "list_crap" ); array_push( $tables, "list_electro" ); array_push( $tables, "list_elite_status" ); array_push( $tables, "list_elitestatus" ); array_push( $tables, "list_elitetypes" ); array_push( $tables, "list_equipment" ); array_push( $tables, "list_floor_type" ); array_push( $tables, "list_gaz" ); array_push( $tables, "list_houses" ); array_push( $tables, "list_internet" ); array_push( $tables, "list_lift" ); array_push( $tables, "list_materials" ); array_push( $tables, "list_mebel" ); array_push( $tables, "list_metro" ); array_push( $tables, "list_object_type" ); array_push( $tables, "list_objects_comm" ); array_push( $tables, "list_objects_comm_type" ); array_push( $tables, "list_operations" ); array_push( $tables, "list_otoplenie" ); array_push( $tables, "list_perekritie" ); array_push( $tables, "list_pricecat" ); array_push( $tables, "list_regions" ); array_push( $tables, "list_rooms" ); array_push( $tables, "list_rooms_placement" ); array_push( $tables, "list_sec_status" ); array_push( $tables, "list_squares" ); array_push( $tables, "list_status" ); array_push( $tables, "list_tubzik" ); array_push( $tables, "list_upstairs" ); array_push( $tables, "list_vent" ); array_push( $tables, "list_water" ); array_push( $tables, "list_windows" ); array_push( $tables, "list_years" ); array_push( $tables, "list_yesno" ); array_push( $tables, "settings" ); array_push( $tables, "styles" ); array_push( $tables, "spiski" ); array_push( $tables, "list_gaz_earth" ); array_push( $tables, "list_earth_category" ); array_push( $tables, "list_communications_earth" ); array_push( $tables, "data_7_earth" ); array_push( $tables, "data_7_complex" ); array_push( $tables, "data_7_grounds" ); array_push( $tables, "data_7_private" ); foreach( $tables as $k => $v ) { echo "Dropping table $v
"; @mysql_query( "DROP TABLE `hr`.`$v`" ); flush(); } exit; } if( $query->getProperty( "createlist" ) ) { $tables = array(); array_push( $tables, "glist_cityelite" ); array_push( $tables, "glist_cottages" ); array_push( $tables, "glist_newbuildings" ); array_push( $tables, "glist_second" ); array_push( $tables, "list_arenda_status" ); array_push( $tables, "list_autostation" ); array_push( $tables, "list_balkon" ); array_push( $tables, "list_building_type" ); array_push( $tables, "list_cities" ); array_push( $tables, "list_comm_char" ); array_push( $tables, "list_communications" ); array_push( $tables, "list_crap" ); array_push( $tables, "list_electro" ); array_push( $tables, "list_elite_status" ); array_push( $tables, "list_elitestatus" ); array_push( $tables, "list_elitetypes" ); array_push( $tables, "list_equipment" ); array_push( $tables, "list_floor_type" ); array_push( $tables, "list_gaz" ); array_push( $tables, "list_houses" ); array_push( $tables, "list_internet" ); array_push( $tables, "list_lift" ); array_push( $tables, "list_materials" ); array_push( $tables, "list_mebel" ); array_push( $tables, "list_metro" ); array_push( $tables, "list_object_type" ); array_push( $tables, "list_objects_comm" ); array_push( $tables, "list_objects_comm_type" ); array_push( $tables, "list_operations" ); array_push( $tables, "list_otoplenie" ); array_push( $tables, "list_perekritie" ); array_push( $tables, "list_pricecat" ); array_push( $tables, "list_regions" ); array_push( $tables, "list_rooms" ); array_push( $tables, "list_rooms_placement" ); array_push( $tables, "list_sec_status" ); array_push( $tables, "list_squares" ); array_push( $tables, "list_status" ); array_push( $tables, "list_tubzik" ); array_push( $tables, "list_upstairs" ); array_push( $tables, "list_vent" ); array_push( $tables, "list_water" ); array_push( $tables, "list_windows" ); array_push( $tables, "list_years" ); array_push( $tables, "list_yesno" ); foreach( $tables as $k => $v ) { echo "Creating entry for table $v
"; @mysql_query( "INSERT INTO `hr`.`spiski` VALUES(0,'$v','');" ); flush(); } exit; } function dircopy($src_dir, $dst_dir, $verbose = false, $use_cached_dir_trees = false) { static $cached_src_dir; static $src_tree; static $dst_tree; $num = 0; if (($slash = substr($src_dir, -1)) == "\\" || $slash == "/") $src_dir = substr($src_dir, 0, strlen($src_dir) - 1); if (($slash = substr($dst_dir, -1)) == "\\" || $slash == "/") $dst_dir = substr($dst_dir, 0, strlen($dst_dir) - 1); if (!$use_cached_dir_trees || !isset($src_tree) || $cached_src_dir != $src_dir) { $src_tree = get_dir_tree($src_dir); $cached_src_dir = $src_dir; $src_changed = true; } if (!$use_cached_dir_trees || !isset($dst_tree) || $src_changed) $dst_tree = get_dir_tree($dst_dir); if (!is_dir($dst_dir)) mkdir($dst_dir, 0777, true); foreach ($src_tree as $file => $src_mtime) { if (!isset($dst_tree[$file]) && $src_mtime === false) // dir mkdir("$dst_dir/$file"); elseif (!isset($dst_tree[$file]) && $src_mtime || isset($dst_tree[$file]) && $src_mtime > $dst_tree[$file]) // file { if (copy("$src_dir/$file", "$dst_dir/$file")) { if($verbose) echo "Copied '$src_dir/$file' to '$dst_dir/$file'
\r\n"; touch("$dst_dir/$file", $src_mtime); $num++; } else echo "File '$src_dir/$file' could not be copied!
\r\n"; } } return $num; } function get_dir_tree($dir, $root = true) { static $tree; static $base_dir_length; if ($root) { $tree = array(); $base_dir_length = strlen($dir) + 1; } if (is_file($dir)) { //if (substr($dir, -8) != "/CVS/Tag" && substr($dir, -9) != "/CVS/Root" && substr($dir, -12) != "/CVS/Entries") $tree[substr($dir, $base_dir_length)] = filemtime($dir); } elseif (is_dir($dir) && $di = dir($dir)) // add after is_dir condition to ign