1+ @extends ( ($_SERVER [' QUERY_STRING' ] === ' restore-defaults' ) ? ' layouts.lang' : ' layouts.sidebar' )
2+
3+ @if ($_SERVER [' QUERY_STRING' ] === ' restore-defaults' )
4+ <?php
5+ copy (base_path (' storage/templates/advanced-config.php' ), base_path (' config/advanced-config.php' ));
6+ echo " <meta http-equiv=\" refresh\" content=\" 0; " . url ()-> current () . " /../../panel/advanced-config\" />" ;
7+ ? >
8+ @else
9+
10+ @section (' content' )
11+
12+
13+ @if (str_ends_with ($_SERVER [' REQUEST_URI' ], ' advanced-config' ) )
14+ <h2 class =" mb-4" ><i class =" bi bi-pencil-square" > Advanced config</i ></h2 >
15+ <p >Allows editing the frontend of your site. Amongst other things, this file allows customization of:<br >
16+ Home Page, links, titles, Google Analytics and meta tags.</p >
17+ <form action =" {{ route (' editAC' ) } }" method =" post" >
18+ @csrf
19+ <div class =" form-group col-lg-8" >
20+ <label >Advanced Configuration file.</label >
21+ <pre ><textarea class =" form-control" name =" AdvancedConfig" rows =" 280" >{{ file_get_contents (' config/advanced-config.php' ) } } </textarea ></pre >
22+ </div >
23+ <button type =" submit" class =" mt-3 ml-3 btn btn-info" >Save</button >
24+ <a class =" mt-3 ml-3 btn btn-primary confirmation" href =" {{ url (' /panel/advanced-config?restore-defaults' )} }" >Restore defaults</a >
25+ <script type =" text/javascript" >
26+ var elems = document .getElementsByClassName (' confirmation' );
27+ var confirmIt = function (e ) {
28+ if (! confirm (' Are you sure?' )) e .preventDefault ();
29+ };
30+ for (var i = 0 , l = elems .length ; i < l; i++ ) {
31+ elems[i].addEventListener (' click' , confirmIt, false );
32+ }
33+ </script >
34+ </form >
35+ @elseif (str_ends_with ($_SERVER [' REQUEST_URI' ], ' env' ) )
36+ <h2 class =" mb-4" ><i class =" bi bi-pencil-square" > ENV</i ></h2 >
37+
38+ <form action =" {{ route (' editENV' ) } }" method =" post" >
39+ @csrf
40+ <div class =" form-group col-lg-8" >
41+ <label >.env</label >
42+ <pre ><textarea class =" form-control" name =" AdvancedConfig" rows =" 80" >{{ file_get_contents (' .env' ) } } </textarea ></pre >
43+ </div >
44+ <button type =" submit" class =" mt-3 ml-3 btn btn-info" >Save</button >
45+ </form >
46+ @endif
47+
48+
49+
50+ @endsection
51+ @endif
0 commit comments