'; echo '' . $folder; if (!$isfile) { echo '/'; } echo ''; echo ''; if (file_exists( "../" . $folder)) { echo is_writable( "../" .$folder ) ? '' . $GLOBALS["info_messages"] ["writeble"] . '' : '' . $GLOBALS["info_messages"] ["unwriteble"] . '' . ''; } else { echo '' . $GLOBALS["info_messages"] ["notfound"] . ''; } echo ''; } function writableTree( $folder ) { global $xmldir; echo ''; echo '' . $folder; echo '/'; echo ''; echo ''; if (print_tree("../" . $folder) == 0) { echo '' . $GLOBALS["info_messages"] ["allsubdirwrt"] . ''; } else { echo "
" . $GLOBALS["info_messages"] ["foldersabove"] . "'" . $xmldir . "'" . $GLOBALS["info_messages"] ["folder"] . "
"; } echo ''; } function writePicOverview( $folder ) { global $xmldir, $cache_dirs; $cache_dirs = true; echo ''; echo '' . $GLOBALS["info_messages"] ["albums"] . ''; echo '' . $GLOBALS["info_messages"] ["images"] . ''; echo '' . $GLOBALS["info_messages"] ["size"] . ''; echo 'P'; echo 'F'; echo 'N'; echo 'FI'; echo 'I'; echo 'A'; echo 'B'; echo 'S'; echo 'C'; echo ''; echo ''; echo '' . $folder . ''; echo ''; echo count_tree("../" . $folder) . ''; echo ''; $num = count_tree("../" . $folder, true); echo number_format($num/1000,0) . ' KB'; echo ''; checkAdditionalFiles("../" . $folder); echo ''; print_tree("../" . $folder , true , 5); } function checkAdditionalFiles($folder) { global $image_file_extension, $password_file; echo ''; // private if (file_exists( $folder . "/" . $password_file)) { if (file_exists( $folder . "/private.png")) { echo "P"; } else { echo "P"; } } else { echo " "; } echo ''; echo ''; if (file_exists( $folder . "/folder.txt")) { if (!hasLanguageDepFiles($folder, "folder", "txt")) { echo "F"; } else { echo "F"; } } echo ''; echo ''; if (file_exists( $folder . "/foldername.txt")) { if (!hasLanguageDepFiles($folder, "foldername", "txt")) { echo "N"; } else { echo "N"; } } echo ''; echo ''; if (file_exists( $folder . "/folder.png")) { echo "FI"; } echo ''; echo ''; if (file_exists( $folder . "/image." . $image_file_extension) || file_exists( $folder . "/image2." . $image_file_extension)) { if (!hasLanguageDepFiles($folder, "image", $image_file_extension) && !hasLanguageDepFiles($folder, "image2", $image_file_extension)) { echo "I"; } else { echo "I"; } } echo ''; echo ''; if (file_exists( $folder . "/albumr.txt") || file_exists( $folder . "/albuml.txt")) { if (!hasLanguageDepFiles($folder, "albumr", "txt") && !hasLanguageDepFiles($folder, "albuml", "txt")) { echo "A"; } else { echo "A"; } } echo ''; echo ''; if (file_exists( $folder . "/back.png")) { echo "B"; } echo ''; echo ''; if (file_exists( $folder . "/style.css")) { echo "S"; } echo ''; echo ''; if (file_exists( $folder . "/config.php") || file_exists( $folder . "/video.php")) { echo "C"; } echo ''; } function hasLanguageDepFiles($directory, $prefix, $extension) { $found = false; if ($handle = @opendir($directory)){ while (false !== ($file = @readdir($handle))){ if ($file != "." && $file != ".."){ $regex = "/" . $prefix . "_[a-zA-Z]{2}\." . $extension . "$/"; if (preg_match($regex, $file)) { $found=true; } } } closedir($handle); } return $found; } /* Counts the number of jpegs in all trees */ function print_tree($file_dir, $fullinfo = false, $deep=0) { global $password_file; global $url_file; global $exclude_directories; $localfiles = 0; if ($handle = @opendir($file_dir)){ $i = 0; $list = null; while (false !== ($file = @readdir($handle))){ if ($file != "." && $file != ".."){ $list[$i] = $file; $i++; } } $dir_length = count($list); for($i = 0;$i < $dir_length;$i++){ if (isset($list[$i])){ if (is_dir($file_dir . "/" . $list[$i])){ if (!in_array($list[$i], $exclude_directories)){ // for($b = 0;$b < $deep;$b++){ echo " "; } if (!$fullinfo) { if (!is_writeable($file_dir . "/" . $list[$i])) { echo ''; echo $file_dir . "/" . $list[$i]; echo '
'; $localfiles++; } } else { echo ''; echo ''; for($b = 0;$b < $deep;$b++){ echo " "; } echo htmlentities(limit_length($list[$i],20)); echo ''; echo ''; echo count_tree($file_dir . "/" . $list[$i]); echo ''; echo ''; $num = count_tree($file_dir . "/" . $list[$i], true); if ($num == 0) { echo "remote"; } else { echo number_format($num/1000,0) . ' KB'; } echo ''; checkAdditionalFiles($file_dir . "/" . $list[$i]); echo ''; } $localfiles += print_tree($file_dir . "/" . $list[$i], $fullinfo,$deep + 5); } } } } closedir($handle); } return $localfiles; } function limit_length($str, $len) { if (strlen($str) <= $len) { return $str; } else { return substr($str, 0, $len) . "..."; } } function writeParent() { echo ''; echo '' . $GLOBALS["info_messages"] ["twgfolder"] . ''; echo ''; echo testParentdir() ? '' . $GLOBALS["info_messages"] ["writeble"] . '' : '' . $GLOBALS["info_messages"] ["unwriteble"] . '' . ''; echo ''; } function check_rotation() { global $cachedir; global $install_dir; $c_dir = $cachedir; $image = "../" . $install_dir . "buttons/border.jpg"; $outputimage = $c_dir . "/_rotation_available.jpg"; $outputimageerror = $c_dir . "/_rotation_not_available.jpg"; // we check only once - if one to the ouputimages exists we don't do he check again // delete the _twg_rot_not_available.jpg and _twg_rot_available.jpg if (file_exists($outputimage)) { unlink($outputimage); } if (file_exists($outputimageerror)) { unlink($outputimageerror); } if (!function_exists("imagerotate")) { echo '
' . $GLOBALS["info_messages"] ["imrotate"] . $outputimageerror . $GLOBALS["info_messages"] ["diablerotbutt"] . '
'; if (function_exists("imagecreatetruecolor")) { $dst = imagecreatetruecolor(50, 37); imagejpeg($dst, $outputimageerror, 50); } return false; } else { $oldsize = getImageSize($image); $src = imagecreatefromjpeg($image); $dst = imagecreatetruecolor(50, 37); imagecopyresampled($dst, $src, 0, 0, 0, 0, 50, 37, 50, 37); $twg_rot = imagerotate($dst, 90, 0); if (!imagejpeg($twg_rot, $outputimage, 50)) { imagejpeg($dst, $outputimageerror, 50); return false; } else { return true; } } } /* We check if we can create a image with image magick */ function check_image_magic() { global $cachedir, $install_dir,$image_magic_path,$admin_enable_cmd_checks; $inputimage = "../buttons/info_test.jpg"; $outputimageerror = $cachedir . "/_image_magick_test.jpg"; if (file_exists($outputimageerror)) { @unlink($outputimageerror); } $fh=fopen($outputimageerror,'w'); // fix for a but in some php - versions - thanks to Anders fclose($fh); $command = $image_magic_path. " \"" . realpath($inputimage) . "\" -quality 80 -resize 120x81 \"" . realpath($outputimageerror) . "\""; if ($admin_enable_cmd_checks) { execute_command ($command); } return (file_exists($outputimageerror) && (filesize($outputimageerror) > 0)); } /* We check if we can extract the 1st image of the ffmpeg_test.avi */ function check_ffmpeg() { global $cachedir, $install_dir,$ffmpeg_path,$admin_enable_cmd_checks; $inputimage = "../html/ffmpeg_test.avi"; $outputimageerror = $cachedir . "/_ffmpeg_test.jpg"; if (file_exists($outputimageerror)) { @unlink($outputimageerror); } $fh=fopen($outputimageerror,'w'); // fix for a but in some php - versions - thanks to Anders fclose($fh); $command = $ffmpeg_path . " -y -i \"" . realpath($inputimage) . "\" -f mjpeg -ss 0 -vframes 1 -an \"" . realpath($outputimageerror) . "\""; if ($admin_enable_cmd_checks) { execute_command ($command); } return (file_exists($outputimageerror) && (filesize($outputimageerror) > 0)); } function check_ffmpeg_convert() { global $cachedir, $install_dir,$ffmpeg_path,$ffmpeg_convert_command,$admin_enable_cmd_checks; $inputimage = "../html/ffmpeg_test.avi"; $outputimageerror = $cachedir . "/_ffmpeg_test.flv"; if (file_exists($outputimageerror)) { @unlink($outputimageerror); } $fh=fopen($outputimageerror,'w'); // fix for a but in some php - versions - thanks to Anders fclose($fh); $command = $ffmpeg_path . " " . sprintf($ffmpeg_convert_command, realpath($inputimage), realpath($outputimageerror)); if ($admin_enable_cmd_checks) { execute_command ($command); } return (file_exists($outputimageerror) && (filesize($outputimageerror) > 0)); } function show_ffmpeg_video() { global $cachedir, $install_dir,$ffmpeg_path,$ffmpeg_convert_command; $flashtext = '
The flash requires at least Flash 6.
Please get it here<\/a><\/b>.<\/div><\/div>'; $movie = "../html/mediaplayer.swf?"; $video_size_x = 30; $video_size_y = 50; $file = "file=" . $cachedir . "/_ffmpeg_test.flv"; $auto_param = "autostart=true&icons=false&controlbar=false&repeat=always"; echo ' '; // noscript way $auto_param = str_replace("&" , "&" , $auto_param); // to make it w3c conform! echo ' '; } if ($showphpinfo) { echo '

'; echo '
'; echo '

'; echo phpinfo(); echo '

'; echo '

'; return; } ?>
TWG Info
" onclick="window.location='index.php?action=info'" /> " onclick="window.location='index.php?action=info&showphpinfo=true'" />


 



 
  • P =
          (private.txt)
  • P =       
  • F =
          (folder.txt)
  • N =
          (foldername.txt)
  • FI =
          (folder.png)
  • I =
          (image.txt/php)
  • A =
          (albuml/r.txt)
  • B =
          (back.png)
  • S =
          (style.css)
  • C =
          (config.php or video.php)

 

' . $GLOBALS["info_messages"] ["no"] . '' : '' . $GLOBALS["info_messages"] ["yes"] . ''; echo " (" . phpversion() . ")"; ?>
  - ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["unavaileble"] . '';?>
  - ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["unavaileble"] . '';?>
  - ' . $GLOBALS["info_messages"] ["no"] . '' : '' . $GLOBALS["info_messages"] ["yes"] . ''; echo " (" . gd_version() . ")"; ?>
  - ' . $GLOBALS["info_messages"] ["gdlibntinst"] . '' : '' . $GLOBALS["info_messages"] ["availeble"] . ''; ?>
  - ' . $GLOBALS["info_messages"] ["memlimitnotd"] . ''; } else { if ($limit > 48000) { echo '' . $GLOBALS["info_messages"] ["verygood"] . ''; } else if($limit > 30000) { echo '' . $GLOBALS["info_messages"] ["okbutdontula"] . ''; } else { echo '' . $GLOBALS["info_messages"] ["onlyusesmall"] . ''; } echo " (" . ini_get('memory_limit') . ")"; } ?>
  - ' . $GLOBALS["info_messages"] ["nolimit"] . ''; } else { // internal memory is subtracted 3 MB for normal use. 6 MB if automatic folder image creation is used $intmem = $autocreate_folder_image ? 3000 : 6000; $xy = ($limit-$intmem) * 1024 / 6; $x = floor( sqrt ($xy / 0.75)); $y = floor( sqrt($xy / 1.33)); if ($limit > 48000) { echo "~ " . $x . " x " . $y . ""; } else if($limit > 30000) { echo "~ " . $x . " x " . $y . ""; } else { echo "~ " . $x . " x " . $y . ""; } } ?>
  - ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["unavaileble"] . ''; }else { echo '' . $GLOBALS["info_messages"] ["testfailed"] . ''; } ?>
  - ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["unavailebleim"] . ' ';?>
  - ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["unavailebleurl"] . '';?>
  - ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["unavaileble"] . '';?>
     - ' . $GLOBALS["info_messages"] ["maxfilsntdet"] . ''; } else { if ($limit > 2500) { echo '' . ini_get('upload_max_filesize') . ''; } else { echo '' . ini_get('upload_max_filesize') . $GLOBALS["info_messages"] ["resizeimages"] . ini_get('upload_max_filesize') . ''; } } ?>
' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["notavaileble"] . '';?>
Image Magick Support ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["notavaileble"] . '';?>
ffmpeg Support ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["notavaileble"] . '';?>
ffmpeg video convert ' . $GLOBALS["info_messages"] ["availeble"] . '' : '' . $GLOBALS["info_messages"] ["notavaileble"] . '';?>
A couple of changing smilies have to be shown on the right if the auto conversion to flv works."; show_ffmpeg_video(); echo "
"; } ?>   Server name

how-to 1
  
'; echo '"; writableCell( "admin/_config/.htusers.php", true); if ($store_xml_in_picfolders) { echo ''; echo '"; writableTree( $basedir); } echo ''; echo '"; writeParent(); echo ''; echo '"; writableCell( "config.php", true, "black"); writableCell( "my_config.php", true); echo ''; echo '"; writableCell( "my_style.css", true); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; /* if administration exists !! echo ''; echo ''; echo ''; writableCell( $uploaddir); */ ?>
'; echo $GLOBALS["info_messages"] ["thehtusers"]; echo "
'; echo $GLOBALS["info_messages"] ["thepictdir"]; echo "
'; echo $GLOBALS["info_messages"] ["statusoftwg"]; echo "
'; echo $GLOBALS["info_messages"] ["theconfigdoesnt"]; echo "
'; echo $GLOBALS["info_messages"] ["mystylehstobewr"]; echo "
'. $GLOBALS["info_messages"] ["animage"] . '
 ' . $GLOBALS[
The ' . $uploaddir . ' folder has only to be writeable if the web interface is used for upload!


: :