From 529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 24 Aug 2021 15:38:16 +0200 Subject: Update --- Neutron-trunk/api/engine-jaw/homepage.php | 297 ++++++++++++++++++++++++++++++ 1 file changed, 297 insertions(+) create mode 100644 Neutron-trunk/api/engine-jaw/homepage.php (limited to 'Neutron-trunk/api/engine-jaw/homepage.php') diff --git a/Neutron-trunk/api/engine-jaw/homepage.php b/Neutron-trunk/api/engine-jaw/homepage.php new file mode 100644 index 0000000..e5f76c8 --- /dev/null +++ b/Neutron-trunk/api/engine-jaw/homepage.php @@ -0,0 +1,297 @@ + +> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $lum = ($r+$r+$b+$g+$g+$g)/6; + $total_lum += $lum; + $sample_no++; + } + } + $avg_lum = $total_lum / $sample_no; + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/banner.mtd", ($avg_lum / 255) * 100); + return ($avg_lum / 255) * 100; + } +} + +?> +list; +foreach ($widgets as $widget): ?> + +class) && is_string($data->class)) { + require $_SERVER['DOCUMENT_ROOT'] . "/widgets/" . $widget . "/source.php"; +} + +?> + +") ?> + + + + + + + + + '); + echo(''); + echo(''); + echo(''); + } else { + echo(''); + } + + ?> + /resources/css/fonts-import.css"> + /resources/css/ui.css"> + <?php + + function asciiComp($a, $b) { + $at = iconv('UTF-8', 'ASCII//TRANSLIT', $a); + $bt = iconv('UTF-8', 'ASCII//TRANSLIT', $b); + return strcmp($at, $bt); + } + + if ($ready) { + echo(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")); + } else { + echo("Neutron"); + } + + ?> + + + + location.href='{$GLOBALS["SYSTEM_ROOT"]}/cms-special/setup';"); + } + + if ($ready) { + echo(""); + } + + rlgps("Banner generation"); + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { + $banner = "{$GLOBALS["SYSTEM_ROOT"]}/resources/upload/banner.jpg"; + if (getAvgLuminance($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg") > 50) { + $blackBannerText = true; + } else { + $blackBannerText = false; + } + } else { + $banner = "{$GLOBALS["SYSTEM_ROOT"]}/resources/image/default.jpg"; + if (getAvgLuminance($_SERVER['DOCUMENT_ROOT'] . "/resources/image/default.jpg") > 50) { + $blackBannerText = true; + } else { + $blackBannerText = false; + } + } + rlgps("Branding"); + ?> +
+ +
+ + +
+ + +
+ /" title="/" class="menu-link"> + hiddenPages)) { + echo("" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/" . $page . "/pagename") . ""); + } + } + } + } + } + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/enabled")) {echo("" . $lang["viewer"]["gallery"] . "");} + + ?> +
+ +
+
+ ]*>.*?<\/h[1-6]>#',$html_string,$results); + + $toc = implode("\n",$results[0]); + $toc = preg_replace('#

#','
  • ',$toc); + $toc = preg_replace('#<\/h2>#','
  • ',$toc); + $toc = preg_replace('#

    #','
  • ',$toc); + $toc = preg_replace('#<\/h3>#','
  • ',$toc); + $toc = preg_replace('#

    #','
  • ',$toc); + $toc = preg_replace('#<\/h4>#','
  • ',$toc); + $toc = preg_replace('#

    #','
  • ',$toc); + $toc = preg_replace('#<\/h5>#','
  • ',$toc); + $toc = preg_replace('#
    #','
  • ',$toc); + $toc = preg_replace('#<\/h6>#','
  • ',$toc); + + $toc = '
    +

    ' . $lang["viewer"]["toc"] . '

    +
      + '.$toc.' +
    +

    '; + + if (false) { + echo($toc); + } + + ?> + +
    + +
    + + -- cgit