Update from a long time
This commit is contained in:
		
							
								
								
									
										21
									
								
								.htaccess
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								.htaccess
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | ||||
|  | ||||
| Options -Indexes | ||||
| <IfModule mod_rewrite.c> | ||||
| 	RewriteEngine On | ||||
| 	#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC] | ||||
| 	RewriteCond %{HTTP_USER_AGENT}	"android" [NC] | ||||
| 	#RewriteRule "^/(.*)"	"$1/php/download_apk.php" [L,R=302] | ||||
| 	RewriteRule ^$ %{REQUEST_URI}/php/download_apk.php [L,R=302] | ||||
|  | ||||
| 	#Header set Content-Description "File Transfer"  | ||||
| 	#Header set Content-Type "application/octet-stream"  | ||||
| </IfModule> | ||||
| #<IfModule mod_rewrite.c> | ||||
| #	RewriteEngine On | ||||
| #	#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos" [NC] | ||||
| #	RewriteCond %{HTTP_USER_AGENT} "android" [NC] | ||||
| #	RewriteRule ^$ localTransfer-app.apk [L,E=stream1:1,E=stream2:1] | ||||
| # | ||||
| #	Header set Content-Description "File Transfer" env=stream2 | ||||
| #	Header set Content-Type "application/octet-stream" env=stream2 | ||||
| #</IfModule> | ||||
| @ -1,24 +1,10 @@ | ||||
| <?php | ||||
| $ua = strtolower($_SERVER['HTTP_USER_AGENT']); | ||||
| if(stripos($ua,'android') !== false): // && stripos($ua,'mobile') !== false) { | ||||
| 	$file = "localTransfer-app.apk";  | ||||
| 
 | ||||
| 	header("Content-Description: File Transfer");  | ||||
| 	header("Content-Type: application/octet-stream");  | ||||
| 	header("Content-Disposition: attachment; filename=\"". basename($file) ."\"");  | ||||
| 
 | ||||
| 	readfile ($file); | ||||
| 	//header("Location: ".$_SERVER['REQUEST_URI'].$file); | ||||
|     exit(); | ||||
| else: | ||||
| ?> | ||||
| <!doctype html> | ||||
| <html lang="fr"> | ||||
| <head> | ||||
| 	<meta charset="utf-8"> | ||||
| 	<link href="style/style.css" rel="stylesheet"> | ||||
| 	<link rel="stylesheet" href="style/imagepreview.css"/> | ||||
| 	<link href="/fontawesome/css/all.css" rel="stylesheet" /> | ||||
| 	<link rel="stylesheet" href="style/imagepreview.css"/> | ||||
| 	<link href="style/style.css" rel="stylesheet"> | ||||
| 	<title>Local Transfer</title> | ||||
| </head> | ||||
| <body> | ||||
| @ -50,6 +36,3 @@ else: | ||||
| 	<script src="js/script.js"></script> | ||||
| </body> | ||||
| </html> | ||||
| <?php | ||||
| endif; | ||||
| ?> | ||||
| @ -28,8 +28,9 @@ | ||||
| })(jQuery); | ||||
|  | ||||
| function downloadThumbnail(file) { | ||||
|   var href = 'thumbnail.php' | ||||
|   var href = 'php/thumbnail.php' | ||||
|   var blobUrl; | ||||
|   console.log(file); | ||||
|  | ||||
|   $.ajax({ | ||||
|     url: href, | ||||
|  | ||||
| @ -60,7 +60,7 @@ $('#url').keypress(function (e) { | ||||
|   if (e.which == 13) { | ||||
|     var url = encodeURIComponent($('#url').val()); | ||||
|     $.get({ | ||||
|       url: 'uploadUrl.php', | ||||
|       url: 'php/uploadUrl.php', | ||||
|       data: 'url=' + url, | ||||
|       beforeSend: function(){ | ||||
|         lock = 1; | ||||
| @ -76,7 +76,7 @@ $('#url').keypress(function (e) { | ||||
| }); | ||||
|  | ||||
| function uploadFile(file) { | ||||
|   let url = 'upload.php' | ||||
|   let url = 'php/upload.php' | ||||
|   let formData = new FormData() | ||||
|  | ||||
|   var title = file.name; | ||||
| @ -149,7 +149,7 @@ function previewFile(file) { | ||||
|  | ||||
| function listFile() { | ||||
|   $.get({ | ||||
|     url: 'list.php', | ||||
|     url: 'php/list.php', | ||||
|     success: function(data, statut) { | ||||
|       $('.list').empty(); | ||||
|       if (data.length > 0) { | ||||
| @ -169,7 +169,7 @@ function listFile() { | ||||
|         if (['file-image', 'file-video'].indexOf(value.type) > -1) | ||||
|           a.addClass('preview'); | ||||
|         a.appendTo('.list'); | ||||
|         $('.list').append('<a class="fa fa-times del" href="delete.php?file=' + encode + '"></a><br>'); | ||||
|         $('.list').append('<a class="fa fa-times del" href="php/delete.php?file=' + encode + '"></a><br>'); | ||||
|       }); | ||||
|       $('.preview').anarchytip(); | ||||
|       $('.del').click( function(event){ | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								localTransfer-app.apk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								localTransfer-app.apk
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										15
									
								
								php/download_apk.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								php/download_apk.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| <?php | ||||
| $ua = strtolower($_SERVER['HTTP_USER_AGENT']); | ||||
| if(stripos($ua,'android') !== false || true): // && stripos($ua,'mobile') !== false) { | ||||
| 	$file = $_SERVER['DOCUMENT_ROOT']."/transfer/localTransfer-app.apk";  | ||||
| 	 | ||||
| 	header("Content-Description: File Transfer");  | ||||
| 	header("Content-Type: application/octet-stream");  | ||||
| 	header("Content-Disposition: attachment; filename=\"". basename($file) ."\"");  | ||||
| 	 | ||||
| 	readfile ($file); | ||||
| 	//header("Location: ".$_SERVER['REQUEST_URI'].$file); | ||||
| 	exit(); | ||||
| endif; | ||||
| ?> | ||||
|  | ||||
| @ -1,8 +1,11 @@ | ||||
| <?php | ||||
| 
 | ||||
| error_reporting(E_ALL); | ||||
| ini_set('display_errors', TRUE); | ||||
| ini_set('display_startup_errors', TRUE); | ||||
| #error_reporting(E_ALL);
 | ||||
| #ini_set('display_errors', TRUE);
 | ||||
| #ini_set('display_startup_errors', TRUE);
 | ||||
| 
 | ||||
| ini_set('display_errors', FALSE); | ||||
| ini_set('display_startup_errors', FALSE); | ||||
| 
 | ||||
| include 'fonction.php'; | ||||
| 
 | ||||
| @ -6,7 +6,7 @@ ini_set('display_startup_errors', TRUE); | ||||
| 
 | ||||
| include 'fonction.php'; | ||||
| 
 | ||||
| $max_size = convertToBytes('2GB'); | ||||
| $max_size = convertToBytes('5GB'); | ||||
| 
 | ||||
| $root = $_SERVER["DOCUMENT_ROOT"]; | ||||
| 
 | ||||
| @ -1,7 +1,6 @@ | ||||
| body { | ||||
|     margin: 0; | ||||
|     padding: 40px; | ||||
|     background: #fff; | ||||
|     font: 80% Arial, Helvetica, sans-serif; | ||||
|     color: #555; | ||||
|     line-height: 180%; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 root
					root