Merge pull request #73 from qkqpttgf/master

pull
pull/98/head
Mr.Lin 2020-05-10 19:02:12 +08:00 committed by GitHub
commit 1bf70189e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 12 deletions

View File

@ -1797,6 +1797,13 @@ function render_list($path = '', $files = '')
$tmp = splitfirst($tmp[1], '<!--LoginEnd-->');
$html .= $tmp[1];
}
$tmp[1] = 'a';
while ($tmp[1]!='') {
$tmp = splitfirst($html, '<!--GuestStart-->');
$html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--GuestEnd-->');
$html .= $tmp[1];
}
while (strpos($html, '<!--AdminStart-->')) {
$html = str_replace('<!--AdminStart-->', '', $html);
$html = str_replace('<!--AdminEnd-->', '', $html);
@ -1837,6 +1844,8 @@ function render_list($path = '', $files = '')
$html .= $tmp[1];
}
}
while (strpos($html, '<!--GuestStart-->')) $html = str_replace('<!--GuestStart-->', '', $html);
while (strpos($html, '<!--GuestEnd-->')) $html = str_replace('<!--GuestEnd-->', '', $html);
}
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) {

View File

@ -903,19 +903,19 @@
reader.readAsArrayBuffer(blob);
}
readblob(asize);
<!--LoginStart-->
<!--GuestStart-->
var spark = new SparkMD5.ArrayBuffer();
<!--LoginEnd-->
<!--GuestEnd-->
reader.onload = function(e){
var binary = this.result;
<!--LoginStart-->
<!--GuestStart-->
spark.append(binary);
if (asize < newstartsize) {
asize += chunksize;
readblob(asize);
return;
}
<!--LoginEnd-->
<!--GuestEnd-->
var xhr = new XMLHttpRequest();
xhr.open("PUT", url, true);
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
@ -942,7 +942,7 @@
xhr3.onload = function(e){
console.log(xhr3.responseText+','+xhr3.status);
}
<!--LoginStart-->
<!--GuestStart-->
var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
@ -967,7 +967,7 @@
document.getElementById('upfile_a1_'+tdnum).href = filename;
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
}
<!--LoginEnd-->
<!--GuestEnd-->
EndTime=new Date();
MiddleStr = '<!--constStr@EndAt-->:'+EndTime.toLocaleString()+'<br>';
if (newstartsize==0) {

View File

@ -877,19 +877,19 @@
reader.readAsArrayBuffer(blob);
}
readblob(asize);
<!--LoginStart-->
<!--GuestStart-->
var spark = new SparkMD5.ArrayBuffer();
<!--LoginEnd-->
<!--GuestEnd-->
reader.onload = function(e){
var binary = this.result;
<!--LoginStart-->
<!--GuestStart-->
spark.append(binary);
if (asize < newstartsize) {
asize += chunksize;
readblob(asize);
return;
}
<!--LoginEnd-->
<!--GuestEnd-->
var xhr = new XMLHttpRequest();
xhr.open("PUT", url, true);
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
@ -916,7 +916,7 @@
xhr3.onload = function(e){
console.log(xhr3.responseText+','+xhr3.status);
}
<!--LoginStart-->
<!--GuestStart-->
var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
@ -941,7 +941,7 @@
document.getElementById('upfile_a1_'+tdnum).href = filename;
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
}
<!--LoginEnd-->
<!--GuestEnd-->
EndTime=new Date();
MiddleStr = '<!--constStr@EndAt-->:'+EndTime.toLocaleString()+'<br>';
if (newstartsize==0) {