瀏覽代碼

[FEATURE] wysiwyg editor for imprint/Tos/privacy

1day2die 2 年之前
父節點
當前提交
218ce1c785

+ 42 - 0
app/Http/Controllers/Admin/LegalController.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace App\Http\Controllers\Admin;
+
+use App\Http\Controllers\Controller;
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\File;
+use Qirolab\Theme\Theme;
+
+
+class LegalController extends Controller
+{
+    /**
+     * Display
+     *
+     * @return View
+     */
+    public function index()
+    {
+        $tos = File::get(Theme::path($path = 'views') . '/information/tos-content.blade.php');
+        $privacy = File::get(Theme::path($path = 'views') . '/information/privacy-content.blade.php');
+        $imprint = File::get(Theme::path($path = 'views') . '/information/imprint-content.blade.php');
+
+        return view('admin.legal.index')->with([
+            "tos" => $tos,
+            "privacy" => $privacy,
+            "imprint" => $imprint,
+            ]);
+    }
+
+    public function update(Request $request){
+        $tos = $request->tos;
+        $privacy = $request->privacy;
+        $imprint = $request->imprint;
+
+        File::put(Theme::path($path = 'views') . '/information/tos-content.blade.php', $tos);
+        File::put(Theme::path($path = 'views') . '/information/privacy-content.blade.php', $privacy);
+        File::put(Theme::path($path = 'views') . '/information/imprint-content.blade.php', $imprint);
+
+        return back()->with("success",__("Legal pages updated"));
+    }
+}

+ 7 - 0
routes/web.php

@@ -8,6 +8,7 @@ use App\Classes\Settings\System;
 use App\Http\Controllers\Admin\ActivityLogController;
 use App\Http\Controllers\Admin\ApplicationApiController;
 use App\Http\Controllers\Admin\InvoiceController;
+use App\Http\Controllers\Admin\LegalController;
 use App\Http\Controllers\Admin\OverViewController;
 use App\Http\Controllers\Admin\PaymentController;
 use App\Http\Controllers\Admin\ProductController;
@@ -118,6 +119,8 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
     Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
 
         //overview
+        Route::get('legal', [OverViewController::class, 'index'])->name('overview.index');
+
         Route::get('overview', [OverViewController::class, 'index'])->name('overview.index');
         Route::get('overview/sync', [OverViewController::class, 'syncPterodactyl'])->name('overview.sync');
 
@@ -178,6 +181,10 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
         Route::get('usefullinks/datatable', [UsefulLinkController::class, 'datatable'])->name('usefullinks.datatable');
         Route::resource('usefullinks', UsefulLinkController::class);
 
+        //legal
+        Route::get('legal', [LegalController::class, 'index'])->name('legal.index');
+        Route::patch('legal', [LegalController::class, 'update'])->name('legal.update');
+
         //vouchers
         Route::get('vouchers/datatable', [VoucherController::class, 'datatable'])->name('vouchers.datatable');
         Route::get('vouchers/{voucher}/usersdatatable', [VoucherController::class, 'usersdatatable'])->name('vouchers.usersdatatable');

+ 113 - 0
themes/default/views/admin/legal/index.blade.php

@@ -0,0 +1,113 @@
+@extends('layouts.main')
+
+@section('content')
+    <!-- CONTENT HEADER -->
+    <section class="content-header">
+        <div class="container-fluid">
+            <div class="row mb-2">
+                <div class="col-sm-6">
+                    <h1>{{__('Legal')}}</h1>
+
+                </div>
+                <div class="col-sm-6">
+                    <ol class="breadcrumb float-sm-right">
+                        <li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
+                        <li class="breadcrumb-item"><a class="text-muted"
+                                                       href="{{route('admin.legal.index')}}">{{__('Legal')}}</a></li>
+                    </ol>
+                </div>
+            </div>
+        </div>
+    </section>
+    <!-- END CONTENT HEADER -->
+
+    <!-- MAIN CONTENT -->
+    <section class="content">
+        <div class="container-fluid">
+            <form method="POST" enctype="multipart/form-data" class="mb-3"
+                  action="{{ route('admin.legal.update') }}">
+                @csrf
+                @method('PATCH')
+
+            <div class="row">
+
+                <div class="col-md-6">
+                    {{-- TOS --}}
+                    <div class="row mb-2">
+                        <div class="col text-center">
+                            <h1>{{__("Terms of Service")}}</h1>
+                        </div>
+                    </div>
+
+                    <div class="custom-control mb-3 p-0">
+                        <textarea x-model="tos" id="tos" name="tos"
+                                  class="form-control @error('tos') is-invalid @enderror">
+                        {{ $tos }}
+                        </textarea>
+                        @error('motd-message')
+                        <div class="text-danger">
+                            {{ $message }}
+                        </div>
+                        @enderror
+                    </div>
+                </div>
+                <div class="col-md-6">
+                    {{-- PRIVACY --}}
+                    <div class="row mb-2">
+                        <div class="col text-center">
+                            <h1>{{__("Privacy Policy")}}</h1>
+                        </div>
+                    </div>
+
+                    <div class="custom-control mb-3 p-0">
+                        <textarea x-model="privacy" id="privacy" name="privacy"
+                                  class="form-control @error('privacy') is-invalid @enderror">
+                        {{ $privacy }}
+                        </textarea>
+                        @error('privacy')
+                        <div class="text-danger">
+                            {{ $message }}
+                        </div>
+                        @enderror
+                    </div>
+                </div>
+
+                <div class="col-md-6">
+                    {{-- Imprint --}}
+                    <div class="row mb-2">
+                        <div class="col text-center">
+                            <h1>{{__("Imprint")}}</h1>
+                        </div>
+                    </div>
+
+                    <div class="custom-control mb-3 p-0">
+                        <textarea x-model="imprint" id="imprint" name="imprint"
+                                  class="form-control @error('imprint') is-invalid @enderror">
+                        {{ $imprint }}
+                        </textarea>
+                        @error('imprint')
+                        <div class="text-danger">
+                            {{ $message }}
+                        </div>
+                        @enderror
+                    </div>
+                </div>
+            </div>
+                <div class="row">
+                    <button class="btn btn-primary ml-3 mt-3">{{ __('Save') }}</button>
+                </div>
+            </form>
+        </div>
+        <!-- END CUSTOM CONTENT -->
+
+    </section>
+    <!-- END CONTENT -->
+
+    <script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
+            content_css: "dark",branding: false,  height: 500,
+            plugins: ['image','link'],});
+    </script>
+
+
+
+@endsection

+ 1 - 48
themes/default/views/information/imprint-content.blade.php

@@ -1,48 +1 @@
-<p>
-    This website is operated by:
-</p>
-
-<p>
-    <strong>Company Name</strong><br>
-    Street Name &amp; Number<br>
-    City<br>
-    Country<br>
-    Phone: +00 000 000 000<br>
-    Email: PUT YOUR EMAIL HERE</a>
-</p>
-
-<p>
-    <strong>Company Registration Number:</strong> 00000000<br>
-    <strong>VAT Number:</strong> 000000000
-
-</p>
-
-<p>
-    The European Commission provides a platform for online dispute resolution (OS) which is available at <a
-        href="https://ec.europa.eu/consumers/odr/main/index.cfm?event=main.home2.show&lng=EN">https://ec.europa.eu/consumers/odr/main/index.cfm?event=main.home2.show&lng=EN</a>.
-    We are not obliged or willing to participate in dispute resolution proceedings before a consumer arbitration board.
-
-</p>
-
-<p>
-    <strong>Disclaimer</strong><br>
-    Liability for Contents<br>
-    The contents of our pages have been created with the utmost care. However, we cannot guarantee the contents'
-    accuracy, completeness or topicality. According to statutory provisions, we are furthermore responsible for our own
-    content on these web pages. In this matter, please note that we are not obliged to monitor the transmitted or saved
-    information of third parties, or investigate circumstances pointing to illegal activity. Our obligations to remove
-    or block the use of information under generally applicable laws remain unaffected by this as per §§ 8 to 10 of the
-    Telemedia Act (TMG).
-
-</p>
-
-<p>
-    Liability for Links<br>
-    Our offer contains links to external third party websites. We have no influence on the contents of those websites,
-    and therefore cannot assume any liability for these foreign contents. The respective provider or operator of the
-    pages is always responsible for the contents of the linked pages. The linked pages were checked for possible legal
-    violations at the time of linking. Illegal contents were not discernible at the time of linking. However, a
-    permanent content control of the linked pages is not reasonable without concrete evidence of a violation of law. If
-    we become aware of any infringements, we will remove such links immediately.
-
-</p>
+<p>h5trhjt</p>

+ 3 - 261
themes/default/views/information/privacy-content.blade.php

@@ -1,261 +1,3 @@
-<p>Last updated: December 22, 2022</p>
-<p>This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information
-    when You use the Service and tells You about Your privacy rights and how the law protects You.</p>
-<p>We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and
-    use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the
-    <a href="https://www.freeprivacypolicy.com/free-privacy-policy-generator/" target="_blank">Free Privacy Policy
-        Generator</a>.</p>
-<h1>Interpretation and Definitions</h1>
-<h2>Interpretation</h2>
-<p>The words of which the initial letter is capitalized have meanings defined under the following conditions. The
-    following definitions shall have the same meaning regardless of whether they appear in singular or in plural.</p>
-<h2>Definitions</h2>
-<p>For the purposes of this Privacy Policy:</p>
-<ul>
-    <li>
-        <p><strong>Account</strong> means a unique account created for You to access our Service or parts of our
-            Service.</p>
-    </li>
-    <li>
-        <p><strong>Company</strong> (referred to as either &quot;the Company&quot;, &quot;We&quot;, &quot;Us&quot; or
-            &quot;Our&quot; in this Agreement) refers to controlpanel.</p>
-    </li>
-    <li>
-        <p><strong>Cookies</strong> are small files that are placed on Your computer, mobile device or any other device
-            by a website, containing the details of Your browsing history on that website among its many uses.</p>
-    </li>
-    <li>
-        <p><strong>Country</strong> refers to: Alabama, United States</p>
-    </li>
-    <li>
-        <p><strong>Device</strong> means any device that can access the Service such as a computer, a cellphone or a
-            digital tablet.</p>
-    </li>
-    <li>
-        <p><strong>Personal Data</strong> is any information that relates to an identified or identifiable individual.
-        </p>
-    </li>
-    <li>
-        <p><strong>Service</strong> refers to the Website.</p>
-    </li>
-    <li>
-        <p><strong>Service Provider</strong> means any natural or legal person who processes the data on behalf of the
-            Company. It refers to third-party companies or individuals employed by the Company to facilitate the
-            Service, to provide the Service on behalf of the Company, to perform services related to the Service or to
-            assist the Company in analyzing how the Service is used.</p>
-    </li>
-    <li>
-        <p><strong>Usage Data</strong> refers to data collected automatically, either generated by the use of the
-            Service or from the Service infrastructure itself (for example, the duration of a page visit).</p>
-    </li>
-    <li>
-        <p><strong>Website</strong> refers to controlpanel, accessible from <a href="controlpanel"
-                rel="external nofollow noopener" target="_blank">controlpanel</a></p>
-    </li>
-    <li>
-        <p><strong>You</strong> means the individual accessing or using the Service, or the company, or other legal
-            entity on behalf of which such individual is accessing or using the Service, as applicable.</p>
-    </li>
-</ul>
-<h1>Collecting and Using Your Personal Data</h1>
-<h2>Types of Data Collected</h2>
-<h3>Personal Data</h3>
-<p>While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be
-    used to contact or identify You. Personally identifiable information may include, but is not limited to:</p>
-<ul>
-    <li>
-        <p>Email address</p>
-    </li>
-    <li>
-        <p>Usage Data</p>
-    </li>
-</ul>
-<h3>Usage Data</h3>
-<p>Usage Data is collected automatically when using the Service.</p>
-<p>Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type,
-    browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those
-    pages, unique device identifiers and other diagnostic data.</p>
-<p>When You access the Service by or through a mobile device, We may collect certain information automatically,
-    including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of
-    Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device
-    identifiers and other diagnostic data.</p>
-<p>We may also collect information that Your browser sends whenever You visit our Service or when You access the Service
-    by or through a mobile device.</p>
-<h3>Tracking Technologies and Cookies</h3>
-<p>We use Cookies and similar tracking technologies to track the activity on Our Service and store certain information.
-    Tracking technologies used are beacons, tags, and scripts to collect and track information and to improve and
-    analyze Our Service. The technologies We use may include:</p>
-<ul>
-    <li><strong>Cookies or Browser Cookies.</strong> A cookie is a small file placed on Your Device. You can instruct
-        Your browser to refuse all Cookies or to indicate when a Cookie is being sent. However, if You do not accept
-        Cookies, You may not be able to use some parts of our Service. Unless you have adjusted Your browser setting so
-        that it will refuse Cookies, our Service may use Cookies.</li>
-    <li><strong>Web Beacons.</strong> Certain sections of our Service and our emails may contain small electronic files
-        known as web beacons (also referred to as clear gifs, pixel tags, and single-pixel gifs) that permit the
-        Company, for example, to count users who have visited those pages or opened an email and for other related
-        website statistics (for example, recording the popularity of a certain section and verifying system and server
-        integrity).</li>
-</ul>
-<p>Cookies can be &quot;Persistent&quot; or &quot;Session&quot; Cookies. Persistent Cookies remain on Your personal
-    computer or mobile device when You go offline, while Session Cookies are deleted as soon as You close Your web
-    browser. Learn more about cookies on the <a
-        href="https://www.freeprivacypolicy.com/blog/sample-privacy-policy-template/#Use_Of_Cookies_And_Tracking"
-        target="_blank">Free Privacy Policy website</a> article.</p>
-<p>We use both Session and Persistent Cookies for the purposes set out below:</p>
-<ul>
-    <li>
-        <p><strong>Necessary / Essential Cookies</strong></p>
-        <p>Type: Session Cookies</p>
-        <p>Administered by: Us</p>
-        <p>Purpose: These Cookies are essential to provide You with services available through the Website and to enable
-            You to use some of its features. They help to authenticate users and prevent fraudulent use of user
-            accounts. Without these Cookies, the services that You have asked for cannot be provided, and We only use
-            these Cookies to provide You with those services.</p>
-    </li>
-    <li>
-        <p><strong>Cookies Policy / Notice Acceptance Cookies</strong></p>
-        <p>Type: Persistent Cookies</p>
-        <p>Administered by: Us</p>
-        <p>Purpose: These Cookies identify if users have accepted the use of cookies on the Website.</p>
-    </li>
-    <li>
-        <p><strong>Functionality Cookies</strong></p>
-        <p>Type: Persistent Cookies</p>
-        <p>Administered by: Us</p>
-        <p>Purpose: These Cookies allow us to remember choices You make when You use the Website, such as remembering
-            your login details or language preference. The purpose of these Cookies is to provide You with a more
-            personal experience and to avoid You having to re-enter your preferences every time You use the Website.</p>
-    </li>
-</ul>
-<p>For more information about the cookies we use and your choices regarding cookies, please visit our Cookies Policy or
-    the Cookies section of our Privacy Policy.</p>
-<h2>Use of Your Personal Data</h2>
-<p>The Company may use Personal Data for the following purposes:</p>
-<ul>
-    <li>
-        <p><strong>To provide and maintain our Service</strong>, including to monitor the usage of our Service.</p>
-    </li>
-    <li>
-        <p><strong>To manage Your Account:</strong> to manage Your registration as a user of the Service. The Personal
-            Data You provide can give You access to different functionalities of the Service that are available to You
-            as a registered user.</p>
-    </li>
-    <li>
-        <p><strong>For the performance of a contract:</strong> the development, compliance and undertaking of the
-            purchase contract for the products, items or services You have purchased or of any other contract with Us
-            through the Service.</p>
-    </li>
-    <li>
-        <p><strong>To contact You:</strong> To contact You by email, telephone calls, SMS, or other equivalent forms of
-            electronic communication, such as a mobile application's push notifications regarding updates or informative
-            communications related to the functionalities, products or contracted services, including the security
-            updates, when necessary or reasonable for their implementation.</p>
-    </li>
-    <li>
-        <p><strong>To provide You</strong> with news, special offers and general information about other goods, services
-            and events which we offer that are similar to those that you have already purchased or enquired about unless
-            You have opted not to receive such information.</p>
-    </li>
-    <li>
-        <p><strong>To manage Your requests:</strong> To attend and manage Your requests to Us.</p>
-    </li>
-    <li>
-        <p><strong>For business transfers:</strong> We may use Your information to evaluate or conduct a merger,
-            divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our
-            assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which
-            Personal Data held by Us about our Service users is among the assets transferred.</p>
-    </li>
-    <li>
-        <p><strong>For other purposes</strong>: We may use Your information for other purposes, such as data analysis,
-            identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and
-            improve our Service, products, services, marketing and your experience.</p>
-    </li>
-</ul>
-<p>We may share Your personal information in the following situations:</p>
-<ul>
-    <li><strong>With Service Providers:</strong> We may share Your personal information with Service Providers to
-        monitor and analyze the use of our Service, to contact You.</li>
-    <li><strong>For business transfers:</strong> We may share or transfer Your personal information in connection with,
-        or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of
-        Our business to another company.</li>
-    <li><strong>With Affiliates:</strong> We may share Your information with Our affiliates, in which case we will
-        require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other
-        subsidiaries, joint venture partners or other companies that We control or that are under common control with
-        Us.</li>
-    <li><strong>With business partners:</strong> We may share Your information with Our business partners to offer You
-        certain products, services or promotions.</li>
-    <li><strong>With other users:</strong> when You share personal information or otherwise interact in the public areas
-        with other users, such information may be viewed by all users and may be publicly distributed outside.</li>
-    <li><strong>With Your consent</strong>: We may disclose Your personal information for any other purpose with Your
-        consent.</li>
-</ul>
-<h2>Retention of Your Personal Data</h2>
-<p>The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy
-    Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for
-    example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our
-    legal agreements and policies.</p>
-<p>The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a
-    shorter period of time, except when this data is used to strengthen the security or to improve the functionality of
-    Our Service, or We are legally obligated to retain this data for longer time periods.</p>
-<h2>Transfer of Your Personal Data</h2>
-<p>Your information, including Personal Data, is processed at the Company's operating offices and in any other places
-    where the parties involved in the processing are located. It means that this information may be transferred to — and
-    maintained on — computers located outside of Your state, province, country or other governmental jurisdiction where
-    the data protection laws may differ than those from Your jurisdiction.</p>
-<p>Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that
-    transfer.</p>
-<p>The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance
-    with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country
-    unless there are adequate controls in place including the security of Your data and other personal information.</p>
-<h2>Delete Your Personal Data</h2>
-<p>You have the right to delete or request that We assist in deleting the Personal Data that We have collected about
-    You.</p>
-<p>Our Service may give You the ability to delete certain information about You from within the Service.</p>
-<p>You may update, amend, or delete Your information at any time by signing in to Your Account, if you have one, and
-    visiting the account settings section that allows you to manage Your personal information. You may also contact Us
-    to request access to, correct, or delete any personal information that You have provided to Us.</p>
-<p>Please note, however, that We may need to retain certain information when we have a legal obligation or lawful basis
-    to do so.</p>
-<h2>Disclosure of Your Personal Data</h2>
-<h3>Business Transactions</h3>
-<p>If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will
-    provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy.</p>
-<h3>Law enforcement</h3>
-<p>Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law
-    or in response to valid requests by public authorities (e.g. a court or a government agency).</p>
-<h3>Other legal requirements</h3>
-<p>The Company may disclose Your Personal Data in the good faith belief that such action is necessary to:</p>
-<ul>
-    <li>Comply with a legal obligation</li>
-    <li>Protect and defend the rights or property of the Company</li>
-    <li>Prevent or investigate possible wrongdoing in connection with the Service</li>
-    <li>Protect the personal safety of Users of the Service or the public</li>
-    <li>Protect against legal liability</li>
-</ul>
-<h2>Security of Your Personal Data</h2>
-<p>The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet,
-    or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your
-    Personal Data, We cannot guarantee its absolute security.</p>
-<h1>Children's Privacy</h1>
-<p>Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable
-    information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has
-    provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from
-    anyone under the age of 13 without verification of parental consent, We take steps to remove that information from
-    Our servers.</p>
-<p>If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from
-    a parent, We may require Your parent's consent before We collect and use that information.</p>
-<h1>Links to Other Websites</h1>
-<p>Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You
-    will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You
-    visit.</p>
-<p>We have no control over and assume no responsibility for the content, privacy policies or practices of any third
-    party sites or services.</p>
-<h1>Changes to this Privacy Policy</h1>
-<p>We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy
-    Policy on this page.</p>
-<p>We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and
-    update the &quot;Last updated&quot; date at the top of this Privacy Policy.</p>
-<p>You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are
-    effective when they are posted on this page.</p>
-<h1>Contact Us</h1>
-<p>If you have any questions about this Privacy Policy, You can contact us:</p>
+<p>schwanz</p>
+<p>&nbsp;</p>
+<p><strong>hrthth</strong></p>

File diff suppressed because it is too large
+ 0 - 273
themes/default/views/information/tos-content.blade.php


+ 8 - 0
themes/default/views/layouts/main.blade.php

@@ -379,6 +379,14 @@
                                 </a>
                             </li>
 
+                            <li class="nav-item">
+                                <a href="{{ route('admin.legal.index') }}"
+                                   class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
+                                    <i class="nav-icon fas fa-link"></i>
+                                    <p>{{ __('Legal Sites') }}</p>
+                                </a>
+                            </li>
+
                             <li class="nav-header">{{ __('Logs') }}</li>
 
                             <li class="nav-item">

Some files were not shown because too many files changed in this diff