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> | <!doctype html> | ||||||
| <html lang="fr"> | <html lang="fr"> | ||||||
| <head> | <head> | ||||||
| 	<meta charset="utf-8"> | 	<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 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> | 	<title>Local Transfer</title> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
| @ -50,6 +36,3 @@ else: | |||||||
| 	<script src="js/script.js"></script> | 	<script src="js/script.js"></script> | ||||||
| </body> | </body> | ||||||
| </html> | </html> | ||||||
| <?php |  | ||||||
| endif; |  | ||||||
| ?> |  | ||||||
| @ -28,8 +28,9 @@ | |||||||
| })(jQuery); | })(jQuery); | ||||||
|  |  | ||||||
| function downloadThumbnail(file) { | function downloadThumbnail(file) { | ||||||
|   var href = 'thumbnail.php' |   var href = 'php/thumbnail.php' | ||||||
|   var blobUrl; |   var blobUrl; | ||||||
|  |   console.log(file); | ||||||
|  |  | ||||||
|   $.ajax({ |   $.ajax({ | ||||||
|     url: href, |     url: href, | ||||||
|  | |||||||
| @ -60,7 +60,7 @@ $('#url').keypress(function (e) { | |||||||
|   if (e.which == 13) { |   if (e.which == 13) { | ||||||
|     var url = encodeURIComponent($('#url').val()); |     var url = encodeURIComponent($('#url').val()); | ||||||
|     $.get({ |     $.get({ | ||||||
|       url: 'uploadUrl.php', |       url: 'php/uploadUrl.php', | ||||||
|       data: 'url=' + url, |       data: 'url=' + url, | ||||||
|       beforeSend: function(){ |       beforeSend: function(){ | ||||||
|         lock = 1; |         lock = 1; | ||||||
| @ -76,7 +76,7 @@ $('#url').keypress(function (e) { | |||||||
| }); | }); | ||||||
|  |  | ||||||
| function uploadFile(file) { | function uploadFile(file) { | ||||||
|   let url = 'upload.php' |   let url = 'php/upload.php' | ||||||
|   let formData = new FormData() |   let formData = new FormData() | ||||||
|  |  | ||||||
|   var title = file.name; |   var title = file.name; | ||||||
| @ -149,7 +149,7 @@ function previewFile(file) { | |||||||
|  |  | ||||||
| function listFile() { | function listFile() { | ||||||
|   $.get({ |   $.get({ | ||||||
|     url: 'list.php', |     url: 'php/list.php', | ||||||
|     success: function(data, statut) { |     success: function(data, statut) { | ||||||
|       $('.list').empty(); |       $('.list').empty(); | ||||||
|       if (data.length > 0) { |       if (data.length > 0) { | ||||||
| @ -169,7 +169,7 @@ function listFile() { | |||||||
|         if (['file-image', 'file-video'].indexOf(value.type) > -1) |         if (['file-image', 'file-video'].indexOf(value.type) > -1) | ||||||
|           a.addClass('preview'); |           a.addClass('preview'); | ||||||
|         a.appendTo('.list'); |         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(); |       $('.preview').anarchytip(); | ||||||
|       $('.del').click( function(event){ |       $('.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 | <?php | ||||||
| 
 | 
 | ||||||
| error_reporting(E_ALL); | #error_reporting(E_ALL);
 | ||||||
| ini_set('display_errors', TRUE); | #ini_set('display_errors', TRUE);
 | ||||||
| ini_set('display_startup_errors', TRUE); | #ini_set('display_startup_errors', TRUE);
 | ||||||
|  | 
 | ||||||
|  | ini_set('display_errors', FALSE); | ||||||
|  | ini_set('display_startup_errors', FALSE); | ||||||
| 
 | 
 | ||||||
| include 'fonction.php'; | include 'fonction.php'; | ||||||
| 
 | 
 | ||||||
| @ -6,7 +6,7 @@ ini_set('display_startup_errors', TRUE); | |||||||
| 
 | 
 | ||||||
| include 'fonction.php'; | include 'fonction.php'; | ||||||
| 
 | 
 | ||||||
| $max_size = convertToBytes('2GB'); | $max_size = convertToBytes('5GB'); | ||||||
| 
 | 
 | ||||||
| $root = $_SERVER["DOCUMENT_ROOT"]; | $root = $_SERVER["DOCUMENT_ROOT"]; | ||||||
| 
 | 
 | ||||||
| @ -1,7 +1,6 @@ | |||||||
| body { | body { | ||||||
|     margin: 0; |     margin: 0; | ||||||
|     padding: 40px; |     padding: 40px; | ||||||
|     background: #fff; |  | ||||||
|     font: 80% Arial, Helvetica, sans-serif; |     font: 80% Arial, Helvetica, sans-serif; | ||||||
|     color: #555; |     color: #555; | ||||||
|     line-height: 180%; |     line-height: 180%; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 root
					root