From 6bec40d7869cb306f31052a49399035617314a4e Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 2 Mar 2020 17:10:00 +0800 Subject: [PATCH 01/16] differentiate current disk --- theme/classic.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/theme/classic.php b/theme/classic.php index 1a844d3..ba0753d 100644 --- a/theme/classic.php +++ b/theme/classic.php @@ -10,7 +10,7 @@ + + + +
+ + + +
  • + + +
    + +
    + +

    + +

    +1) { ?> +
    +
    +
    +
    +=strlen(path_format($_SERVER['base_path'].'/'.$disk))){ + if(substr($_SERVER['REQUEST_URI'],0,strlen(path_format($_SERVER['base_path'].'/'.$disk)))===path_format($_SERVER['base_path'].'/'.$disk)) + echo ''.$diskname.''; + else + echo ''.$diskname.''; + } + else + echo ''.$diskname.''; + + } ?> +
    +
    +
    +
    + +
    +
    +
    + + + + + +

    +
    +
    + +
    +
    + + +
    +
    +' . $files['error']['message'] . '
    '; + $statusCode=404; + } else { + if (isset($files['file'])) { +?> +
    +
    + +   +
    +
    +document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> +'; + } elseif (in_array($ext, $exts['video'])) { + //echo ''; + $DPvideo=$files['@microsoft.graph.downloadUrl']; + echo '
    +'; + } elseif (in_array($ext, $exts['music'])) { + echo ' +'; + } elseif (in_array($ext, ['pdf'])) { + /*echo ' + +';*/ + $pdfurl = $files['@microsoft.graph.downloadUrl']; + echo '
    +'; + } elseif (in_array($ext, $exts['office'])) { + echo ' +'; + } elseif (in_array($ext, $exts['txt'])) { + $txtstr = htmlspecialchars(curl_request($files['@microsoft.graph.downloadUrl'])['body']); +?> +
    + +
    + +     + + + +'; ?> +
    + + +
    +'; + }*/ else { + echo ''.getconstStr('FileNotSupport').''; + } ?> +
    +
    + + + + + + + + + + + + + + +'; + foreach ($files['children'] as $file) { + // Files + if (isset($file['file'])) { + if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) { + if (strtolower($file['name']) === 'head.md') $head = $file; + if (strtolower($file['name']) === 'readme.md') $readme = $file; + if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) { + $html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body']; + return output($html,200); + } + $filenum++; ?> + + + + + + + +
       
    + +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    +
  • + + + +
    + +
  • +
      +
    • +
    • +
    • +
    • +
    +
  • + + + + + + + + + + + + + + + + + + + + + + +
    +200) { + $pagenum = $files['folder']['page']; + $maxpage = ceil($files['folder']['childCount']/200); + $prepagenext = ' + + + + + + + + +
    '; + if ($pagenum!=1) { + $prepagenum = $pagenum-1; + $prepagenext .= ' + '.getconstStr('PrePage').''; + } + $prepagenext .= ' + '; + for ($page=1;$page<=$maxpage;$page++) { + if ($page == $pagenum) { + $prepagenext .= ' + ' . $page . ' '; + } else { + $prepagenext .= ' + ' . $page . ' '; + } + } + $prepagenext = substr($prepagenext,0,-1); + $prepagenext .= ' + '; + if ($pagenum!=$maxpage) { + $nextpagenum = $pagenum+1; + $prepagenext .= ' + '.getconstStr('NextPage').''; + } + $prepagenext .= ' +
    + '; + echo $prepagenext; + } + if ($_SERVER['admin']) { ?> +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    + + +
    +'; + } + if ($readme) { + echo ' +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +'; + } + } + } else { + echo ' +
    +
    +
    + + +
    +
    +
    '; + $statusCode = 401; + } + } ?> +
    +
    +
    + + + +
    + + + + + + +
    + + + +
    +
    Powred by 逸笙 | Theme by 若离
    + + + + + + + + + + From 1a7358672c9c9250e6e0bdf1184a598a49f04419 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Tue, 3 Mar 2020 15:17:38 +0800 Subject: [PATCH 10/16] try to fix encrypt cache --- function/common.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/function/common.php b/function/common.php index 7381c7d..effc37a 100644 --- a/function/common.php +++ b/function/common.php @@ -270,7 +270,8 @@ function encode_str_replace($str) function gethiddenpass($path,$passfile) { - $password=getcache('path_' . $path . '/?password'); + $path1 = path_format($_SERVER['list_path'] . path_format($path)); + $password = getcache('path_' . $path1 . '/?password'); if ($password=='') { $ispassfile = fetch_files(spurlencode(path_format($path . '/' . $passfile),'/')); //echo $path . '
    ' . json_encode($ispassfile, JSON_PRETTY_PRINT) . '
    '; @@ -280,14 +281,14 @@ function gethiddenpass($path,$passfile) $passwordf=explode("\n",$arr['body']); $password=$passwordf[0]; $password=md5($password); - savecache('path_' . $path . '/?password', $password); + savecache('path_' . $path1 . '/?password', $password); return $password; } else { //return md5('DefaultP@sswordWhenNetworkError'); return md5( md5(time()).rand(1000,9999) ); } } else { - savecache('path_' . $path . '/?password', 'null'); + savecache('path_' . $path1 . '/?password', 'null'); if ($path !== '' ) { $path = substr($path,0,strrpos($path,'/')); return gethiddenpass($path,$passfile); @@ -793,8 +794,8 @@ function adminoperate($path) return output($result['body'], $result['stat']); } if ($_GET['RefreshCache']) { + $path1 = path_format($_SERVER['list_path'] . path_format($path)); savecache('path_' . $path1 . '/?password', '', 1); - savecache('path_' . $path . '/?password', '', 1); return message('', getconstStr('RefreshCache'), 302); } return $tmparr; From 4aff58c777a959771c16a36da79a6de5ca68bd67 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Tue, 3 Mar 2020 17:45:33 +0800 Subject: [PATCH 11/16] 2nd try to fix encrypt cache --- function/common.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/function/common.php b/function/common.php index effc37a..8c50136 100644 --- a/function/common.php +++ b/function/common.php @@ -271,16 +271,16 @@ function encode_str_replace($str) function gethiddenpass($path,$passfile) { $path1 = path_format($_SERVER['list_path'] . path_format($path)); - $password = getcache('path_' . $path1 . '/?password'); + $password=getcache('path_' . $path1 . '/?password'); if ($password=='') { - $ispassfile = fetch_files(spurlencode(path_format($path . '/' . $passfile),'/')); + $ispassfile = fetch_files(path_format($path . '/' . urlencode($passfile))); //echo $path . '
    ' . json_encode($ispassfile, JSON_PRETTY_PRINT) . '
    '; if (isset($ispassfile['file'])) { $arr = curl_request($ispassfile['@microsoft.graph.downloadUrl']); if ($arr['stat']==200) { $passwordf=explode("\n",$arr['body']); $password=$passwordf[0]; - $password=md5($password); + if ($password!='') $password=md5($password); savecache('path_' . $path1 . '/?password', $password); return $password; } else { @@ -395,6 +395,7 @@ function passhidden($path) $path = str_replace('+','%2B',$path); $path = str_replace('&','&', path_format(urldecode($path))); if (getConfig('passfile') != '') { + $path = spurlencode($path,'/'); if (substr($path,-1)=='/') $path=substr($path,0,-1); $hiddenpass=gethiddenpass($path,getConfig('passfile')); if ($hiddenpass != '') { @@ -707,7 +708,8 @@ function adminoperate($path) $filename = path_format($path1 . '/' . $foldername . '/' . getConfig('passfile')); //echo $foldername; $result = MSAPI('PUT', $filename, $_GET['encrypt_newpass'], $_SERVER['access_token']); - //savecache('path_' . $path1, json_decode('{}',true), 1); + $path1 = path_format($path1 . '/' . $foldername ); + savecache('path_' . $path1 . '/?password', '', 1); return output($result['body'], $result['stat']); } if ($_GET['move_folder']!='') { From be2f353639b55ae1177faf24399348184e797934 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 4 Mar 2020 10:42:01 +0800 Subject: [PATCH 12/16] switch, can downloaded or not while encrpyt --- function/common.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/function/common.php b/function/common.php index 8c50136..afb5efa 100644 --- a/function/common.php +++ b/function/common.php @@ -8,7 +8,9 @@ $Base64Env = [ //'admin', //'adminloginpage', 'background', + 'diskname', //'disktag', + //'downloadencrypt', //'function_name', // used in heroku. //'language', //'passfile', @@ -19,7 +21,6 @@ $Base64Env = [ 'client_secret', 'domain_path', 'guestup_path', - 'diskname', 'public_path', //'refresh_token', //'token_expires', @@ -61,9 +62,10 @@ $InnerEnv = [ 'Onedrive_ver', 'client_id', 'client_secret', - 'domain_path', - 'guestup_path', 'diskname', + 'domain_path', + 'downloadencrypt', + 'guestup_path', 'public_path', 'refresh_token', 'token_expires', @@ -73,9 +75,10 @@ $ShowedInnerEnv = [ //'Onedrive_ver', //'client_id', //'client_secret', - 'domain_path', - 'guestup_path', 'diskname', + 'domain_path', + 'downloadencrypt', + 'guestup_path', 'public_path', //'refresh_token', //'token_expires', @@ -613,7 +616,7 @@ function main($path) $files = list_files($path); if (isset($files['file']) && !$_GET['preview']) { // is file && not preview mode - if ($_SERVER['ishidden']<4) return output('', 302, [ 'Location' => $files['@microsoft.graph.downloadUrl'] ]); + if ( $_SERVER['ishidden']<4 || (getConfig('downloadencrypt')&&$files['name']!=getConfig('passfile')) ) return output('', 302, [ 'Location' => $files['@microsoft.graph.downloadUrl'] ]); } if ( isset($files['folder']) || isset($files['file']) ) { return render_list($path, $files); @@ -628,8 +631,8 @@ function list_files($path) $path = path_format($path); if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { $files = json_decode('{"folder":{}}', true); - } elseif ($_SERVER['ishidden']==4) { - $files = json_decode('{"folder":{}}', true); + } elseif (!getConfig('downloadencrypt')) { + if ($_SERVER['ishidden']==4) $files = json_decode('{"folder":{}}', true); } else { $files = fetch_files($path); } From fcfc50d4b8adaa2c756757551a11aa74d72552e3 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 4 Mar 2020 11:50:01 +0800 Subject: [PATCH 13/16] fix download encrypt file --- function/common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/function/common.php b/function/common.php index afb5efa..a60a01f 100644 --- a/function/common.php +++ b/function/common.php @@ -616,7 +616,7 @@ function main($path) $files = list_files($path); if (isset($files['file']) && !$_GET['preview']) { // is file && not preview mode - if ( $_SERVER['ishidden']<4 || (getConfig('downloadencrypt')&&$files['name']!=getConfig('passfile')) ) return output('', 302, [ 'Location' => $files['@microsoft.graph.downloadUrl'] ]); + if ( $_SERVER['ishidden']<4 || (!!getConfig('downloadencrypt')&&$files['name']!=getConfig('passfile')) ) return output('', 302, [ 'Location' => $files['@microsoft.graph.downloadUrl'] ]); } if ( isset($files['folder']) || isset($files['file']) ) { return render_list($path, $files); @@ -633,6 +633,7 @@ function list_files($path) $files = json_decode('{"folder":{}}', true); } elseif (!getConfig('downloadencrypt')) { if ($_SERVER['ishidden']==4) $files = json_decode('{"folder":{}}', true); + else $files = fetch_files($path); } else { $files = fetch_files($path); } From 9ef2fa5c51194ce4f668686a653255939e19eb32 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 4 Mar 2020 12:47:13 +0800 Subject: [PATCH 14/16] Update conststr.php --- conststr.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conststr.php b/conststr.php index 9a494c3..2be8e31 100644 --- a/conststr.php +++ b/conststr.php @@ -3,7 +3,7 @@ $exts['img'] = ['ico', 'bmp', 'gif', 'jpg', 'jpeg', 'jpe', 'jfif', 'tif', 'tiff', 'png', 'heic', 'webp']; $exts['music'] = ['mp3', 'wma', 'flac', 'wav', 'ogg']; $exts['office'] = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']; -$exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'json', 'html', 'c', 'md']; +$exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'json', 'html', 'c', 'md', 'py']; $exts['video'] = ['mp4', 'webm', 'mkv', 'mov', 'flv', 'blv', 'avi', 'wmv', 'm3u8']; $exts['zip'] = ['zip', 'rar', '7z', 'gz', 'tar']; @@ -69,6 +69,7 @@ $constStr = [ 'domain_path' => 'more custom domain, format is a1.com:/dirto/path1|b2.com:/path2', 'diskname' => 'The disk name you want show.', 'disktag' => 'A tag used in store config and url.', + 'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password', 'background' => 'Set an url as background photo, or put a \'background.jpg\' at showed path.', 'guestup_path' => 'Set guest upload dir, before set this, the files in this dir will show as normal.', 'passfile' => 'The password of dir will save in this file.', @@ -82,6 +83,7 @@ $constStr = [ 'domain_path' => '使用多个自定义域名时,指定每个域名看到的目录。格式为a1.com:/dirto/path1|b1.com:/path2,比private_path优先。', 'diskname' => '这个盘你想显示什么名称。', 'disktag' => '一个标签,用于保存配置,多盘时会显示在url中。', + 'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。', 'background' => '设置一个url作为背景,或者在你显示的目录放一个background.jpg文件。', 'guestup_path' => '设置游客上传路径(图床路径),不设置这个值时该目录内容会正常列文件出来,设置后只有上传界面,不显示其中文件(登录后显示)。', 'passfile' => '自定义密码文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目录时不会显示,只有知道密码才能查看或下载此文件。密码是这个文件的内容,可以空格、可以中文;', @@ -95,6 +97,7 @@ $constStr = [ 'domain_path' => '複数のカスタムドメイン名を使用する場合、各ドメイン名に表示されるディレクトリを指定します。形式はa1.com:/dirto/path1|b1.com:/path2で、private_pathよりも優先されます。', 'diskname' => '', 'disktag' => '', + 'downloadencrypt' => '', 'background' => '', 'guestup_path' => 'マップベッドのパスを設定します。この値が設定されていない場合、ディレクトリの内容は通常ファイルにリストされ、設定後はアップロードインターフェイスのみが表示されます。', 'passfile' => 'カスタムパスワードファイルの名前は、\'pppppp \'、\'aaaa.txt \'などの場合があります。ディレクトリをリストするときには表示されません。パスワードを知っている場合にのみ、このファイルを表示またはダウンロードできます。 パスワードはこのファイルの内容であり、スペースまたは漢字を使用できます。', @@ -108,6 +111,7 @@ $constStr = [ 'domain_path' => '여러 개의 사용자 정의 도메인 이름을 사용하는 경우 각 도메인 이름에 표시되는 디렉토리를 지정하십시오. 형식은 a1.com:/dirto/path1|b1.com:/path2이며 private_path보다 우선합니다.', 'diskname' => '이 디스크에 어떤 이름을 표시 하시겠습니까?', 'disktag' => '레이블은 구성을 저장하는 데 사용되며 디스크가 여러 개인 경우 URL에 표시됩니다.', + 'downloadencrypt' => '', 'background' => 'URL을 배경으로 설정하거나 표시하는 디렉토리에 background.jpg 파일을 넣으십시오.', 'guestup_path' => '방문자의 업로드 경로 (맵 베드 경로)를 설정합니다.이 값을 설정하지 않으면 디렉토리의 내용이 파일로 표시되고 설정 후에는 업로드 인터페이스 만 표시되고 파일은 표시되지 않습니다 (로그인 후 표시).', 'passfile' => '사용자 정의 비밀번호 파일의 이름은 \'pppppp\' \'aaaa.txt \'등이 될 수 있으며 디렉토리가 나열되어 있으면 표시되지 않으며 비밀번호를 알고있는 경우에만이 파일을 보거나 다운로드 할 수 있습니다. 암호는이 파일의 내용이며 공백이거나 한국어 일 수 있습니다.', @@ -121,6 +125,7 @@ $constStr = [ 'domain_path' => 'تنظیم دامنه سفارشی، به صورت a1.com:/dirto/path1|b2.com:/path2', 'diskname' => 'نام دیسک که می‌خواهید نشان دهید.', 'disktag' => 'تگی که در ذخیره پیکربندی و نشانی اینترنتی استفاده می‌شود.', + 'downloadencrypt' => '', 'background' => 'تنظیم عکس پشت زمینه به صورت url یا قرار دادن بک گراند به صورت دستی در مسیر نشان داده شده.', 'guestup_path' => 'قبل از تنظیم این گزینه ، فایل آپلود guest را تنظیم کنید ، پرونده های موجود در این حالت به صورت عادی نشان داده می شوند.', 'passfile' => 'رمز عبور dir در این فایل ذخیره می شود.', From 7b8b41abbbedfe6dcb11b1615bd82ab5ef20e32c Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 4 Mar 2020 12:48:58 +0800 Subject: [PATCH 15/16] Create lybwb.php --- theme/lybwb.php | 1278 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1278 insertions(+) create mode 100644 theme/lybwb.php diff --git a/theme/lybwb.php b/theme/lybwb.php new file mode 100644 index 0000000..42eb992 --- /dev/null +++ b/theme/lybwb.php @@ -0,0 +1,1278 @@ + + + + + <?php echo $pretitle;?> - <?php echo $_SERVER['sitename'];?> + + + + + + + + + + +
    + + + +
  • + +   + +
    + +
    + +

    + +

    +1) { ?> +
    +
    +
    +
    +'.$diskname.' +'; + } ?> +
    +
    +
    +
    + +
    +
    +
    + + + + + +

    +
    +
    + +
    +
    + + +
    +
    +' . $files['error']['message'] . '
    '; + $statusCode=404; + } else { + if (isset($files['file'])) { +?> +
    +
    + +   +
    +
    +document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> +'; + } elseif (in_array($ext, $exts['video'])) { + //echo ''; + $DPvideo=$files['@microsoft.graph.downloadUrl']; + echo '
    +'; + } elseif (in_array($ext, $exts['music'])) { + echo ' +'; + } elseif (in_array($ext, ['pdf'])) { + /*echo ' + +';*/ + $pdfurl = $files['@microsoft.graph.downloadUrl']; + echo '
    +'; + } elseif (in_array($ext, $exts['office'])) { + echo ' +'; + } elseif (in_array($ext, $exts['txt'])) { + $txtstr = htmlspecialchars(curl_request($files['@microsoft.graph.downloadUrl'])['body']); +?> +
    + +
    + +     + + + +'; ?> +
    + + +
    +'; + }*/ else { + echo ''.getconstStr('FileNotSupport').''; + } ?> +
    +
    + + + + + + + + + + + + + + +'; + foreach ($files['children'] as $file) { + // Files + if (isset($file['file'])) { + if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) { + if (strtolower($file['name']) === 'head.md') $head = $file; + if (strtolower($file['name']) === 'readme.md') $readme = $file; + if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) { + $html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body']; + return output($html,200); + } + $filenum++; ?> + + + + + + +
       
    + +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    +
  • + + + +
    + +
  • +
      +
    • +
    • +
    • +
    • +
    +
  • + + + + + + + + + + + + + + + + + + + + + + + +
    +200) { + $pagenum = $files['folder']['page']; + $maxpage = ceil($files['folder']['childCount']/200); + $prepagenext = ' + + + + + + + + +
    '; + if ($pagenum!=1) { + $prepagenum = $pagenum-1; + $prepagenext .= ' + '.getconstStr('PrePage').''; + } + $prepagenext .= ' + '; + for ($page=1;$page<=$maxpage;$page++) { + if ($page == $pagenum) { + $prepagenext .= ' + ' . $page . ' '; + } else { + $prepagenext .= ' + ' . $page . ' '; + } + } + $prepagenext = substr($prepagenext,0,-1); + $prepagenext .= ' + '; + if ($pagenum!=$maxpage) { + $nextpagenum = $pagenum+1; + $prepagenext .= ' + '.getconstStr('NextPage').''; + } + $prepagenext .= ' +
    + '; + echo $prepagenext; + } + if ($_SERVER['admin']) { ?> +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    + + +
    +'; + } + if ($readme) { + echo ' +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +'; + } + } + } else { + echo ' +
    +
    +
    + + +
    +
    +
    '; + $statusCode = 401; + } + } ?> +
    +
    +
    + + + +
    + + + + + + +
    + + + +
    + + + + +
    + + + + + + + + + + From a30eb7650f2edadaa2ff2c3c8a5e9c491c725ee4 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 4 Mar 2020 12:54:50 +0800 Subject: [PATCH 16/16] Delete whiteblue.php --- theme/whiteblue.php | 1277 ------------------------------------------- 1 file changed, 1277 deletions(-) delete mode 100644 theme/whiteblue.php diff --git a/theme/whiteblue.php b/theme/whiteblue.php deleted file mode 100644 index a298925..0000000 --- a/theme/whiteblue.php +++ /dev/null @@ -1,1277 +0,0 @@ - - - - - <?php echo $pretitle;?> - <?php echo $_SERVER['sitename'];?> - - - - - - - - - - -
    - - - -
  • - -   - -
    - -
    - -

    - -

    -1) { ?> -
    -
    -
    -
    -'.$diskname.'  '; - } ?> -
    -
    -
    -
    - -
    -
    -
    - - - - - -

    -
    -
    - -
    -
    - - -
    -
    -' . $files['error']['message'] . '
    '; - $statusCode=404; - } else { - if (isset($files['file'])) { -?> -
    -
    - -   -
    -
    -document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> -'; - } elseif (in_array($ext, $exts['video'])) { - //echo ''; - $DPvideo=$files['@microsoft.graph.downloadUrl']; - echo '
    -'; - } elseif (in_array($ext, $exts['music'])) { - echo ' -'; - } elseif (in_array($ext, ['pdf'])) { - /*echo ' - -';*/ - $pdfurl = $files['@microsoft.graph.downloadUrl']; - echo '
    -'; - } elseif (in_array($ext, $exts['office'])) { - echo ' -'; - } elseif (in_array($ext, $exts['txt'])) { - $txtstr = htmlspecialchars(curl_request($files['@microsoft.graph.downloadUrl'])['body']); -?> -
    - -
    - -     - - - -'; ?> -
    - - -
    -'; - }*/ else { - echo ''.getconstStr('FileNotSupport').''; - } ?> -
    -
    - - - - - - - - - - - - - - -'; - foreach ($files['children'] as $file) { - // Files - if (isset($file['file'])) { - if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) { - if (strtolower($file['name']) === 'head.md') $head = $file; - if (strtolower($file['name']) === 'readme.md') $readme = $file; - if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) { - $html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body']; - return output($html,200); - } - $filenum++; ?> - - - - - - -
       
    - -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • - - - -
    - -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • - - - - - - - - - - - - - - - - - - - - - - - -
    -200) { - $pagenum = $files['folder']['page']; - $maxpage = ceil($files['folder']['childCount']/200); - $prepagenext = ' - - - - - - - - -
    '; - if ($pagenum!=1) { - $prepagenum = $pagenum-1; - $prepagenext .= ' - '.getconstStr('PrePage').''; - } - $prepagenext .= ' - '; - for ($page=1;$page<=$maxpage;$page++) { - if ($page == $pagenum) { - $prepagenext .= ' - ' . $page . ' '; - } else { - $prepagenext .= ' - ' . $page . ' '; - } - } - $prepagenext = substr($prepagenext,0,-1); - $prepagenext .= ' - '; - if ($pagenum!=$maxpage) { - $nextpagenum = $pagenum+1; - $prepagenext .= ' - '.getconstStr('NextPage').''; - } - $prepagenext .= ' -
    - '; - echo $prepagenext; - } - if ($_SERVER['admin']) { ?> -
    -
    - - -
    -
    - -
    - -
    -
    -
    -
    - - -
    -'; - } - if ($readme) { - echo ' -
    -
    -
    -
    -
    -
    -
    - -
    - -
    -
    -'; - } - } - } else { - echo ' -
    -
    -
    - - -
    -
    -
    '; - $statusCode = 401; - } - } ?> -
    -
    -
    - - - -
    - - - - - - -
    - - - -
    - - - - -
    - - - - - - - - - -