diff --git a/theme/onemoe.php b/theme/onemoe.php index a76d5c0..ea738b0 100644 --- a/theme/onemoe.php +++ b/theme/onemoe.php @@ -2,15 +2,18 @@ - <?php echo $pretitle;?> - <?php echo $_SERVER['sitename'];?> + <?php echo $pretitle; if ($_SERVER['base_disk_path']!=$_SERVER['base_path']) echo ' - ' . getConfig('diskname');?> - <?php echo $_SERVER['sitename'];?> + + @@ -28,7 +31,7 @@
  • -
  • +
  • + if (isset($_SERVER['needUpdate'])&&$_SERVER['needUpdate']) { ?>

    @@ -67,7 +70,20 @@ + if ($files) { + if (isset($files['children']['head.md'])) { ?> +
    +
    +
    +
    + +
    +
    +
    +
    +
    @@ -91,6 +107,8 @@
    @@ -113,8 +131,6 @@
    document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> '; @@ -160,12 +176,12 @@
    + if (isset($_POST['filenum'])) $filenum = $_POST['filenum']; + if (!isset($filenum) and isset($files['folder']['page'])) $filenum = ($files['folder']['page']-1)*200; + else $filenum = 0; ?> - + @@ -200,13 +216,7 @@ 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); - } + if ($_SERVER['admin'] or !isHideFile($file['name'])) { $filenum++; ?>
           
    @@ -307,25 +317,7 @@ echo 'Unknown path or file.'; echo json_encode($files, JSON_PRETTY_PRINT); } - if ($head) { - echo ' - - - -
    -
    -
    -
    - - -
    -'; - } - if ($readme) { + if (isset($files['children']['readme.md'])) { echo '
    @@ -334,11 +326,8 @@
    -
    - +
    '; @@ -364,7 +353,7 @@ + if (!isset($_GET['preview'])) { ?>