@extends('layouts.sidebar') @section('content') @foreach($pages as $page)

Select a theme

@csrf
{{--

Current theme

@if(empty($page->theme)) @else @endif

--}}

Preview:

@if(env('USE_THEME_PREVIEW_IFRAME') === false or $page->littlelink_name == '')
@else @endif

@if(auth()->user()->role == 'admin') @if(env('ENABLE_THEME_UPDATER') == 'true')


Theme updater
0) { $verNr = substr($matches[0][0],15); } } $themeVe = NULL; if ($entry != "." && $entry != "..") { echo ''; echo ''; echo ''; echo ''; echo '';} }} ?>
Theme name: Update status: Version: 
'; print_r(ucfirst($entry)); echo '
'; if(file_exists(base_path('themes') . '/' . $entry . '/readme.md')){ if(!strpos(file_get_contents(base_path('themes') . '/' . $entry . '/readme.md'), 'Source code:')){$hasSource = false;}else{ $hasSource = true; $text = file_get_contents(base_path('themes') . '/' . $entry . '/readme.md'); $pattern = '/Source code:.*/'; preg_match($pattern, $text, $matches, PREG_OFFSET_CAPTURE); $sourceURL = substr($matches[0][0],13); $replaced = str_replace("https://github.com/", "https://raw.githubusercontent.com/", trim($sourceURL)); $replaced = $replaced . "/main/readme.md"; if (strpos($sourceURL, 'github.com')){ ini_set('user_agent', 'Mozilla/4.0 (compatible; MSIE 6.0)'); try{ $textGit = file_get_contents($replaced); $patternGit = '/Theme Version:.*/'; preg_match($patternGit, $textGit, $matches, PREG_OFFSET_CAPTURE); $sourceURLGit = substr($matches[0][0],15); $Vgitt = 'v' . $sourceURLGit; $verNrv = 'v' . $verNr; }catch(Exception $ex){ $themeVe = "error"; $Vgitt = NULL; $verNrv = NULL; } if(trim($Vgitt) > trim($verNrv)){ $updateAv = true; $GLOBALS['updateAv'] = true; } else { $updateAv = false; } } else {$themeVe = "error";} } } if ($themeVe == "error") { echo ''; } elseif ($hasSource == false) { echo ''; } elseif($updateAv == true) { echo ''; } else { echo ''; } echo '
' . $verNr . '
Update all themes

'; }catch(Exception $ex){} ?> @endif


@csrf

Upload themes

@push('sidebar-scripts')
@endpush @endif @endforeach @endsection