g(434)); if( isset($_POST["nom"]) ) { $verifN = "SELECT fileid FROM download_available WHERE name='".$_POST["nom"]."'"; $resN = mysql_query( $verifN, $_SESSION["readServer"] ) or die(mysql_error()); if( mysql_num_rows( $resN ) == 0 ) { $fSize = @filesize( $_FILES["fichier"]["tmp_name"]); if( $fSize <= 0 && ! $_POST["command"]) { echo ""; die(""); } foreach( $_POST as $key=>$val ) { $_POST[ $key ] = stripslashes( $val ); $_SESSION[ "down_" . $key ] = stripslashes( $val ); } foreach( $_FILES["fichier"] as $key=>$val ) $_SESSION[ "down_" . $key ] = $val; if( $fSize ) { $size = $_FILES["fichier"]["size"]; $id = time(); if( $_POST["digest_algo"] == "SHA1" ) $digest = sha1_file($_FILES["fichier"]["tmp_name"],true); else $digest = md5_file($_FILES["fichier"]["tmp_name"]); if( $_POST["digest_encod"] == "Base64" ) $digest = base64_encode( $digest ); $digName = $_POST["digest_algo"]. " / ".$_POST["digest_encod"]; if( ! @mkdir( $_SERVER["DOCUMENT_ROOT"]."/download/".$id)) { echo "
ERROR: can't write in ".$_SERVER["DOCUMENT_ROOT"]."/download/ folder, please refresh when corrected
"; die(""); } //TODO: catcher copy( $_FILES["fichier"]["tmp_name"], $_SERVER["DOCUMENT_ROOT"]."/download/".$id."/tmp" ); ?>
g(435); ?> []
g(446); ?>:
g(460); ?>:
g(461); ?> :
g(462); ?>: g(516); ?>
g(463); ?>: 1024 ) { ?>
g(516); ?>
g(464); ?>:
1024 ) { ?> wait(0);"); } else { $id = time(); if( ! @mkdir( $_SERVER["DOCUMENT_ROOT"]."/download/".$id)) { echo "
ERROR: can't write in ".$_SERVER["DOCUMENT_ROOT"]."/download/ folder, please refresh when corrected
"; die(""); } ?>
wait(0);"); } } else { echo "
".$l->g(551)."
"; } } else if( isset( $_POST["nbfrags"] ) ) { //fragmenter $fname = $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/tmp"; if( $size = @filesize( $fname )) { $handle = fopen ( $fname, "rb"); $read = 0; for( $i=1; $i<$_POST["nbfrags"]; $i++ ) { $contents = fread ($handle, $size / $_POST["nbfrags"] ); $read += strlen( $contents ); $handfrag = fopen( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/".$_POST["id"]."-".$i, "w+b" ); fwrite( $handfrag, $contents ); fclose( $handfrag ); //echo "FRAG ".$i." lu ".strlen( $contents ). " (en tout " .$read.")
"; } $contents = fread ($handle, $size - $read); $read += strlen( $contents ); $handfrag = fopen( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/".$_POST["id"]."-".$i, "w+b" ); fwrite( $handfrag, $contents ); fclose( $handfrag ); fclose ($handle); unlink( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/tmp" ); } //creation info $info = "\n"; $handinfo = fopen( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/info", "w+" ); fwrite( $handinfo, $info ); fclose( $handinfo ); mysql_query( "DELETE FROM download_available WHERE FILEID='".$_POST["id"]."'", $_SESSION["writeServer"]); $req = "INSERT INTO download_available(FILEID, NAME, PRIORITY, FRAGMENTS, SIZE, OSNAME, COMMENT) VALUES ( '".$_POST["id"]."', '".addslashes($_SESSION["down_nom"])."','".$_SESSION["down_priority"]."', '".$_POST["nbfrags"]."', '".$size."', '".$_SESSION["down_os"]."', '' )"; mysql_query( $req, $_SESSION["writeServer"] ); echo mysql_error(); echo "
".$l->g(437)." ".$_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."

"; unset( $_POST["nbfrags"] ); //vider session //die(); } ?>

g(438); ?>
g(49); ?>:
g(25); ?>:
g(439); ?>:
g(440); ?>:
g(549); ?>:
g(443); ?>:
g(445); ?>:
g(447); ?>
g(448); ?>:
g(453); ?>: