Jelajahi Sumber

Fix post migrazione

Luca Parisio 4 bulan lalu
induk
melakukan
514828e8d7

TEMPAT SAMPAH
public/.DS_Store


+ 31 - 0
public/adv.html

@@ -0,0 +1,31 @@
+<html>
+
+   <head>
+
+      This is the head of your page.
+
+      <title>Example HTML page</title>
+
+   </head>
+
+   <body>
+
+      This is the body of your page.
+
+      <div align="center">
+
+      <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0209495346002620" crossorigin="anonymous"></script>
+<!-- Homepage Leaderboard -->
+<ins class="adsbygoogle"
+style="display:inline-block;width:728px;height:90px"
+data-ad-client="ca-pub-0209495346002620"
+data-ad-slot="5518232014"></ins>
+<script>
+(adsbygoogle = window.adsbygoogle || []).push({});
+</script>
+
+      </div>
+
+   </body>
+
+   </html>

+ 13 - 13
public/seriea.txt

@@ -1,5 +1,5 @@
 .--------------------------------------------------------------. 
-| ANDATA: 10/10/20 |                       | RITORNO:  6/01/21 | 
+| ANDATA: 10/10/25 |                       | RITORNO:  6/01/26 | 
 | ORE...: 16:00    |   1  G I O R N A T A  | ORE....: 16:00    | 
 |--------------------------------------------------------------| 
 | CDM FUTSAL GENOVA            -  TODIS LIDO DI OSTIA          | 
@@ -10,7 +10,7 @@
 | PETRARCA CALCIO A 5 SRL      -  FELDI EBOLI ARL              | 
 | SANDRO ABATE FIVE SOCCER     -  ACQUAESAPONE C5 S.R.L.       | 
 .--------------------------------------------------------------. 
-| ANDATA: 17/10/20 |                       | RITORNO:  9/01/21 | 
+| ANDATA: 17/10/25 |                       | RITORNO:  9/01/26 | 
 | ORE...: 16:00    |   2  G I O R N A T A  | ORE....: 16:00    | 
 |--------------------------------------------------------------| 
 | ACQUAESAPONE C5 S.R.L.       -  CYBERTEL ANIENE C5           | 
@@ -21,7 +21,7 @@
 | REAL SAN GIUSEPPE            -  PETRARCA CALCIO A 5 SRL      | 
 | TODIS LIDO DI OSTIA          -  COLORMAX PESCARA C5          | 
 .--------------------------------------------------------------. 
-| ANDATA: 24/10/20 |                       | RITORNO: 16/01/21 | 
+| ANDATA: 24/10/25 |                       | RITORNO: 16/01/26 | 
 | ORE...: 16:00    |   3  G I O R N A T A  | ORE....: 16:00    | 
 |--------------------------------------------------------------| 
 | COLORMAX PESCARA C5          -  CDM FUTSAL GENOVA            | 
@@ -32,7 +32,7 @@
 | PETRARCA CALCIO A 5 SRL      -  TODIS LIDO DI OSTIA          | 
 | SANDRO ABATE FIVE SOCCER     -  MANTOVA CALCIO A 5 SSDARL    | 
 .--------------------------------------------------------------. 
-| ANDATA: 31/10/20 |                       | RITORNO: 23/01/21 | 
+| ANDATA: 31/10/25 |                       | RITORNO: 23/01/26 | 
 | ORE...: 16:00    |   4  G I O R N A T A  | ORE....: 16:00    | 
 |--------------------------------------------------------------| 
 | CAME DOSSON C5               -  ACQUAESAPONE C5 S.R.L.       | 
@@ -43,7 +43,7 @@
 | REAL SAN GIUSEPPE            -  META CATANIA C5 A R.L.       | 
 | TODIS LIDO DI OSTIA          -  ITALSERVICE C5               | 
 .--------------------------------------------------------------. 
-| ANDATA: 14/11/20 |                       | RITORNO:  6/02/21 | 
+| ANDATA: 14/11/25 |                       | RITORNO:  6/02/26 | 
 | ORE...: 16:00    |   5  G I O R N A T A  | ORE....: 16:00    | 
 |--------------------------------------------------------------| 
 | ACQUAESAPONE C5 S.R.L.       -  MANTOVA CALCIO A 5 SSDARL    | 
@@ -55,7 +55,7 @@
 | SANDRO ABATE FIVE SOCCER     -  REAL SAN GIUSEPPE            | 
 |--------------------------------------------------------------| 
 .--------------------------------------------------------------.
-| ANDATA: 17/11/20 |                       | RITORNO:  9/02/21 |
+| ANDATA: 17/11/25 |                       | RITORNO:  9/02/26 |
 | ORE...: 16:00    |  6  G I O R N A T A   | ORE....: 16:00    |
 |--------------------------------------------------------------|
 |  CDM FUTSAL GENOVA            -  META CATANIA C5 A R.L.      |
@@ -66,7 +66,7 @@
 |  REAL SAN GIUSEPPE            -  CYBERTEL ANIENE C5          |
 |  TODIS LIDO DI OSTIA          -  SANDRO ABATE FIVE SOCCER    |
 .--------------------------------------------------------------.
-| ANDATA: 21/11/20 |                       | RITORNO: 13/02/21 |
+| ANDATA: 21/11/25 |                       | RITORNO: 13/02/26 |
 | ORE...: 16:00    |  7  G I O R N A T A   | ORE....: 16:00    |
 |--------------------------------------------------------------|
 |  ACQUAESAPONE C5 S.R.L.       -  REAL SAN GIUSEPPE           |
@@ -77,7 +77,7 @@
 |  META CATANIA C5 A R.L.       -  COLORMAX PESCARA C5         |
 |  SANDRO ABATE FIVE SOCCER     -  CDM FUTSAL GENOVA           |
 .--------------------------------------------------------------.
-| ANDATA: 28/11/20 |                       | RITORNO: 20/02/21 |
+| ANDATA: 28/11/25 |                       | RITORNO: 20/02/26 |
 | ORE...: 16:00    |  8  G I O R N A T A   | ORE....: 16:00    |
 |--------------------------------------------------------------|
 |  CDM FUTSAL GENOVA            -  CYBERTEL ANIENE C5          |
@@ -88,7 +88,7 @@
 |  REAL SAN GIUSEPPE            -  CAME DOSSON C5              |
 |  TODIS LIDO DI OSTIA          -  ACQUAESAPONE C5 S.R.L.      |
 .--------------------------------------------------------------.
-| ANDATA:  5/12/20 |                       | RITORNO: 27/02/21 |
+| ANDATA:  5/12/25 |                       | RITORNO: 27/02/26 |
 | ORE...: 16:00    |  9  G I O R N A T A   | ORE....: 16:00    |
 |--------------------------------------------------------------|
 |  ACQUAESAPONE C5 S.R.L.       -  CDM FUTSAL GENOVA           |
@@ -99,7 +99,7 @@
 |  META CATANIA C5 A R.L.       -  ITALSERVICE C5              |
 |  SANDRO ABATE FIVE SOCCER     -  PETRARCA CALCIO A 5 SRL     |
 .--------------------------------------------------------------.
-| ANDATA: 12/12/20 |                       | RITORNO: 13/03/21 |
+| ANDATA: 12/12/25 |                       | RITORNO: 13/03/26 |
 | ORE...: 16:00    | 10  G I O R N A T A   | ORE....: 16:00    |
 |--------------------------------------------------------------|
 |  CDM FUTSAL GENOVA            -  CAME DOSSON C5              |
@@ -111,7 +111,7 @@
 |  TODIS LIDO DI OSTIA          -  MANTOVA CALCIO A 5 SSDARL   |
 |--------------------------------------------------------------|
 .--------------------------------------------------------------.
-| ANDATA: 19/12/20 |                       | RITORNO: 20/03/21 |
+| ANDATA: 19/12/25 |                       | RITORNO: 20/03/26 |
 | ORE...: 16:00    |  11  G I O R N A T A  | ORE....: 16:00    |
 |--------------------------------------------------------------|
 | ACQUAESAPONE C5 S.R.L.       -  PETRARCA CALCIO A 5 SRL      |
@@ -122,7 +122,7 @@
 | MANTOVA CALCIO A 5 SSDARL    -  CDM FUTSAL GENOVA            |
 | SANDRO ABATE FIVE SOCCER     -  META CATANIA C5 A R.L.       |
 .--------------------------------------------------------------.
-| ANDATA: 22/12/20 |                       | RITORNO:  3/04/21 |
+| ANDATA: 22/12/25 |                       | RITORNO:  3/04/26 |
 | ORE...: 16:00    |  12  G I O R N A T A  | ORE....: 16:00    |
 |--------------------------------------------------------------|
 | CDM FUTSAL GENOVA            -  FELDI EBOLI ARL              |
@@ -133,7 +133,7 @@
 | SANDRO ABATE FIVE SOCCER     -  COM.MEDIO BASENTO            |
 | TODIS LIDO DI OSTIA          -  REAL SAN GIUSEPPE            |
 .--------------------------------------------------------------.
-| ANDATA: 29/12/20 |                       | RITORNO: 17/04/21 |
+| ANDATA: 29/12/25 |                       | RITORNO: 17/04/26 |
 | ORE...: 16:00    |  13  G I O R N A T A  | ORE....: 16:00    |
 |--------------------------------------------------------------|
 | ACQUAESAPONE C5 S.R.L.       -  META CATANIA C5 A R.L.       |

+ 1 - 1
resources/views/calendars/_form.blade.php

@@ -22,7 +22,7 @@
                     <select name="season_id" class="form-control">
                         <option value=""></option>
                         @foreach($seasons as $key => $value)
-                            <option value="{{ $key }}" {{ old('season_id', null) == $key ? 'selected' : '' }}>{{ $value }}</option>
+                            <option value="{{ $key }}" {{ old('season_id', isset($calendar) ? $calendar->season_id : null) == $key ? 'selected' : '' }}>{{ $value }}</option>
                         @endforeachß
                     </select>
                 </div>

+ 3 - 0
resources/views/layouts/frontend.blade.php

@@ -268,6 +268,8 @@
 		/*setTimeout(function(){
 			window.location.reload(1);
 		 }, 180000);*/
+		 if ($( window ).width() > 800)
+        {
 		 if (max_count > 0)
 		 {
 			setInterval(function(){
@@ -282,6 +284,7 @@
 
 			}, 30000);
 		}
+	}
 
 		mybutton = document.getElementById("btTop");
 

+ 20 - 269
resources/views/layouts/home.blade.php

@@ -779,260 +779,7 @@
                         </div>
 
 
-                        @if (false)
-
-                            <div class="advertisement carousel slide" data-ride="carousel"
-                                style="margin-right:0px;padding-top:14px; margin-top:0px;margin-bottom:20px;">
-                                <div class="desktop-advert carousel-inner">
-                                    @if ($home->banner_first_google != '')
-                                        <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
-                                        <ins class="adsbygoogle" style="display:block"
-                                            data-ad-client="ca-pub-0209495346002620"
-                                            data-ad-slot="{{ $home->banner_first_google }}" data-ad-format="auto"
-                                            data-full-width-responsive="true"></ins>
-                                        <script>
-                                            (adsbygoogle = window.adsbygoogle || []).push({});
-                                        </script>
-                                    @else
-                                        @php
-                                            $found = false;
-                                            $count = 0;
-                                        @endphp
-                                        @if (isset($home->banner_first) && $home->banner_first != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url }}"><img
-                                                        src="/files/{{ $home->banner_first }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $count += 1;
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_2) && $home->banner_first_2 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_2 }}"><img
-                                                        src="/files/{{ $home->banner_first_2 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_3) && $home->banner_first_3 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_3 }}"><img
-                                                        src="/files/{{ $home->banner_first_3 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_4) && $home->banner_first_4 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_4 }}"><img
-                                                        src="/files/{{ $home->banner_first_4 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_5) && $home->banner_first_5 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_5 }}"><img
-                                                        src="/files/{{ $home->banner_first_5 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (!$found)
-                                            <div class="widget"
-                                                style="width:300px;height:250px;border:1px solid gray;"></div>
-                                        @endif
-                                    @endif
-                                </div>
-                                <div class="tablet-advert  carousel-inner">
-                                    @if ($home->banner_first_google != '')
-                                        <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
-                                        <ins class="adsbygoogle" style="display:block"
-                                            data-ad-client="ca-pub-0209495346002620"
-                                            data-ad-slot="{{ $home->banner_first_google }}" data-ad-format="auto"
-                                            data-full-width-responsive="true"></ins>
-                                        <script>
-                                            (adsbygoogle = window.adsbygoogle || []).push({});
-                                        </script>
-                                    @else
-                                        @php
-                                            $found = false;
-                                            $count = 0;
-                                        @endphp
-                                        @if (isset($home->banner_first) && $home->banner_first != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url }}"><img
-                                                        src="/files/{{ $home->banner_first }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $count += 1;
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_2) && $home->banner_first_2 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_2 }}"><img
-                                                        src="/files/{{ $home->banner_first_2 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_3) && $home->banner_first_3 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_3 }}"><img
-                                                        src="/files/{{ $home->banner_first_3 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_4) && $home->banner_first_4 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_4 }}"><img
-                                                        src="/files/{{ $home->banner_first_4 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_5) && $home->banner_first_5 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_5 }}"><img
-                                                        src="/files/{{ $home->banner_first_5 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (!$found)
-                                            <div class="widget"
-                                                style="width:300px;height:250px;border:1px solid gray;">
-                                            </div>
-                                        @endif
-                                    @endif
-                                </div>
-                                <div class="mobile-advert carousel-inner">
-                                    @if ($home->banner_first_google != '')
-                                        <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
-                                        <ins class="adsbygoogle" style="display:block"
-                                            data-ad-client="ca-pub-0209495346002620"
-                                            data-ad-slot="{{ $home->banner_first_google }}" data-ad-format="auto"
-                                            data-full-width-responsive="true"></ins>
-                                        <script>
-                                            (adsbygoogle = window.adsbygoogle || []).push({});
-                                        </script>
-                                    @else
-                                        @php
-                                            $found = false;
-                                            $count = 0;
-                                        @endphp
-                                        @if (isset($home->banner_first) && $home->banner_first != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url }}"><img
-                                                        src="/files/{{ $home->banner_first }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $count += 1;
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_2) && $home->banner_first_2 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_2 }}"><img
-                                                        src="/files/{{ $home->banner_first_2 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_3) && $home->banner_first_3 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_3 }}"><img
-                                                        src="/files/{{ $home->banner_first_3 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_4) && $home->banner_first_4 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_4 }}"><img
-                                                        src="/files/{{ $home->banner_first_4 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (isset($home->banner_first_5) && $home->banner_first_5 != '')
-                                            <div class="item {{ $count == 0 ? 'active' : '' }}">
-                                                <a href="{{ $home->banner_first_url_5 }}"><img
-                                                        src="/files/{{ $home->banner_first_5 }}" width="300"
-                                                        alt="" style="border:1px solid gray;"></a>
-                                            </div>
-                                            @php
-                                                $found = true;
-                                            @endphp
-                                        @endif
-                                        @if (!$found)
-                                            <div class="widget"
-                                                style="width:300px;height:250px;border:1px solid gray;">
-                                            </div>
-                                        @endif
-                                    @endif
-                                </div>
-                            </div>
-
-
-                            <!-- slider-caption-box -->
-                            <div class="slider-caption-box">
-                                <div class="title-section">
-                                    <h1><span style="font-size:21px;">Video</span></h1>
-                                </div>
-
-                                <div class="slide-video">
-                                    <ul id="lightSlider">
-                                        @foreach ($videos as $idx => $video)
-                                            <li data-thumb="/files/videos/{{ $video->image }}">
-                                                <a href="{{ $video->id }}" class="view-video">
-                                                    <img src="/files/videos/{{ $video->image }}"
-                                                        style="width:320px;height:200px;" />
-                                                    <div class="caption">
-                                                        <p>{{ $video->title }}</p>
-                                                        <p><small>{{ date('d/m/Y', strtotime($video->date)) }}</small>
-                                                        </p>
-                                                    </div>
-                                                </a>
-                                            </li>
-                                        @endforeach
-                                    </ul>
-                                </div>
-                            </div>
-                            <div class="center-button" style="margin-top:20px;">
-                                <a href="/videos">ARCHIVIO VIDEO</a>
-                            </div>
-                            <!-- End slider-caption-box -->
-                        @endif
+                        
 
                         @if ($show_top)
                             <div class="advertisement carousel slide" data-ride="carousel"
@@ -2102,25 +1849,29 @@
         setTimeout(function(){
         	window.location.reload(1);
          }, 180000);*/
-        if (max_count > 0) {
-            /*$('body.bg-adv').click(function() {
-            	var url = $("#url" + count).val();
-            	document.location.href = url;
-            })
-            $('body>*').click(function(e) {
-            			e.stopPropagation()
-            });*/
-            setInterval(function() {
+        if ($( window ).width() > 800)
+        {
+            if (max_count > 0) {
+                /*$('body.bg-adv').click(function() {
+                    var url = $("#url" + count).val();
+                    document.location.href = url;
+                })
+                $('body>*').click(function(e) {
+                            e.stopPropagation()
+                });*/
 
-                count = count + 1;
-                if (count == max_count)
-                    count = 0;
+                setInterval(function() {
 
-                var img = $("#img" + count).val();
-                $(".bg-adv").css("background-image", "url('/files/" + img + "')");
+                    count = count + 1;
+                    if (count == max_count)
+                        count = 0;
 
+                    var img = $("#img" + count).val();
+                    $(".bg-adv").css("background-image", "url('/files/" + img + "')");
 
-            }, 5000);
+
+                }, 5000);
+            }
         }
         $(function() {
             $('.lazy').Lazy();

+ 3 - 0
resources/views/layouts/page.blade.php

@@ -261,6 +261,8 @@
 			window.location.reload(1);
 		 }, 180000);
 		 */
+		 if ($( window ).width() > 800)
+        {
 		 if (max_count > 0)
 		 {
 			setInterval(function(){
@@ -275,6 +277,7 @@
 
 			}, 5000);
 		}
+	}
 
 		$(function () {
 			$(document).ready(function(){

+ 1 - 1
resources/views/pages/_form.blade.php

@@ -84,7 +84,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="online">Online:</label><br>
-                    <input type="checkbox" name="online" value="on" {{ old('online') ? 'checked' : '' }}>
+                    <input type="checkbox" name="online" value="on" {{ old('online', isset($page) ? ($page->online ? 'checked' : '') : '') }}>
                 </div>
             </div>
         </div>

+ 8 - 7
resources/views/pages_advs/_form.blade.php

@@ -9,16 +9,17 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="name">Nome:</label>
-                    <input type="text" name="name" class="form-control title" value="{{ old('name') }}">
+                    <input type="text" name="name" class="form-control title" value="{{ old('name', isset($adv) ? $adv->name : '') }}">
                 </div>                
             </div>
+            <input type="hidden" name="position" value="{{isset($_GET["position"]) ? $_GET["position"] : (isset($adv) ? $adv->position : '')}}">
             <div class="col-md-6" style="display:none;">
                 <div class="form-group">
                     <label for="position">Posizione:</label>
                     {{-- TODO: Convert Form::select for position manually --}}
-<select name="position" class="form-control">
-    {{-- Add options manually --}}
-</select>
+                    <select name="positionxxx" class="form-control">
+                        {{-- Add options manually --}}
+                    </select>
                 </div>                
             </div>
         </div>
@@ -26,7 +27,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="google_code">Codice Google:</label>
-                    <input type="text" name="google_code" class="form-control" value="{{ old('google_code') }}">
+                    <input type="text" name="google_code" class="form-control" value="{{ old('google_code', isset($adv) ? $adv->google_code : '') }}">
                 </div>                
             </div>
         </div>
@@ -55,7 +56,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="url">Url:</label>
-                    <input type="text" name="url" class="form-control" value="{{ old('url') }}">
+                    <input type="text" name="url" class="form-control" value="{{ old('url', isset($adv) ? $adv->url : '') }}">
                 </div>                
             </div>
         </div>
@@ -63,7 +64,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="online">Online:</label><br>
-                    <input type="checkbox" name="online" value="on" {{ old('online') ? 'checked' : '' }}>
+                    <input type="checkbox" name="online" value="on" {{ old('online', isset($adv) ? $adv->online : false) ? 'checked' : '' }}>
                 </div>                
             </div>
         </div>

+ 1 - 1
resources/views/pages_advs/index.blade.php

@@ -44,7 +44,7 @@
                   </td>
                   <td>{{$adv->online ? 'Si' : 'No'}}</td>
                   <td>
-                      <a href="{{ route('pages.advs.edit', array($page, $adv->id)) }}" type="button" class="btn btn-w-m btn-primary">Modifica</a>
+                      <a href="{{ route('pages.advs.edit', array($page, $adv)) }}" type="button" class="btn btn-w-m btn-primary">Modifica</a>
                   </td>
                   <td>
                     <form class="form-inline" method="POST" action="{{ route('pages.advs.destroy', [$page, $adv]) }}">

+ 15 - 1
resources/views/partials/section_adv.blade.php

@@ -29,9 +29,23 @@
                         ?>
                         <div class="item {{$idx == 0 ? 'active' : ''}}">
                             @if($adv->google_code != '')
+
+                                
+
+                                <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0209495346002620" crossorigin="anonymous"></script>
+                                <ins class="adsbygoogle"
+                                style="display:inline-block;width:728px;height:90px"
+                                data-ad-client="ca-pub-0209495346002620"
+                                data-ad-slot="{{$adv->google_code}}"></ins>
+                                <script>
+                                (adsbygoogle = window.adsbygoogle || []).push({});
+                                </script>
+
+                                CIAO
+
                                 <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                                     <ins class="adsbygoogle"
-                                        style="display:inline-block;width:{{$w}}px;height:{{$h}}px"
+                                        style="display:block;width:{{$w}}px;height:{{$h}}px"
                                         data-ad-client="ca-pub-0209495346002620"
                                         data-ad-slot="{{$adv->google_code}}"></ins>
                                     <script>

+ 4 - 4
resources/views/sections_advs/_form.blade.php

@@ -9,7 +9,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="name">Nome:</label>
-                    <input type="text" name="name" class="form-control title" value="{{ old('name') }}">
+                    <input type="text" name="name" class="form-control title" value="{{ old('name', isset($adv) ? $adv->name : '') }}">
                 </div>                
             </div>
             <div class="col-md-6" style="display:none">
@@ -24,7 +24,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="google_code">Codice Google:</label>
-                    <input type="text" name="google_code" class="form-control" value="{{ old('google_code') }}">
+                    <input type="text" name="google_code" class="form-control" value="{{ old('google_code', isset($adv) ? $adv->google_code : '') }}">
                 </div>                
             </div>
         </div>
@@ -53,7 +53,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="url">Url:</label>
-                    <input type="text" name="url" class="form-control" value="{{ old('url') }}">
+                    <input type="text" name="url" class="form-control" value="{{ old('url', isset($adv) ? $adv->url : '') }}">
                 </div>                
             </div>
         </div>
@@ -61,7 +61,7 @@
             <div class="col-md-6">
                 <div class="form-group">
                     <label for="online">Online:</label><br>
-                    <input type="checkbox" name="online" value="on" {{ old('online') ? 'checked' : '' }}>
+                    <input type="checkbox" name="online" value="on" {{ old('online', isset($adv) ? ($adv->online ? 'checked' : '') : '') }}>
                 </div>                
             </div>
         </div>

+ 1 - 1
resources/views/sections_advs/create.blade.php

@@ -10,7 +10,7 @@
 
 	<div class="row">
         <div class="col-lg-12">
-            <form method="POST" action="{{ route('sections.advs.store') }}" enctype="multipart/form-data" autocomplete="off">
+            <form method="POST" action="{{ route('sections.advs.store', $section) }}" enctype="multipart/form-data" autocomplete="off">
     @csrf
                 @include('sections_advs/_form', ['submit_text' => 'Salva'])
             </form>