Merge remote-tracking branch 'origin/dev'

This commit is contained in:
NH Gooi
2025-07-15 15:47:51 +02:00
7533 changed files with 52 additions and 29 deletions
Regular → Executable
View File
Regular → Executable
View File
Vendored Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
+38 -17
View File
@@ -72,8 +72,10 @@ class Controller extends BaseController
$view->with('data', $programs); $view->with('data', $programs);
}); });
View::composer('widgets.laatstepodcasts', function ($view) { View::composer('widgets.laatstepodcasts', function ($view) {
$view->with('data', $view->with(
$this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast')); 'data',
$this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast')
);
}); });
View::composer('widgets.regioagenda', function ($view) { View::composer('widgets.regioagenda', function ($view) {
$view->with('data', $this->getDataFromFileAndConvert('regioagenda.json', [], '\Model\CalendarEvent')); $view->with('data', $this->getDataFromFileAndConvert('regioagenda.json', [], '\Model\CalendarEvent'));
@@ -84,8 +86,10 @@ class Controller extends BaseController
View::composer('widgets.menu', function ($view) { View::composer('widgets.menu', function ($view) {
$view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem')) $view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'))
->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', ['news'], '\Model\NewsItem', 3)) ->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', ['news'], '\Model\NewsItem', 3))
->with('podcasts', ->with(
$this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast')); 'podcasts',
$this->getDataFromFileAndConvert('laatste_podcasts.json', ['podcasts'], '\Model\Podcast')
);
}); });
View::share('disableBanners', env('DISABLE_BANNERS', false)); View::share('disableBanners', env('DISABLE_BANNERS', false));
@@ -97,14 +101,16 @@ class Controller extends BaseController
return; return;
} }
app('db')->insert('INSERT INTO `pagestats`(`type`, `item_id`, `visitor_ip`, `session`, `referer`) VALUES(:type, :id, :ip, :session, :referer)', app('db')->insert(
'INSERT INTO `pagestats`(`type`, `item_id`, `visitor_ip`, `session`, `referer`) VALUES(:type, :id, :ip, :session, :referer)',
[ [
'type' => $type, 'type' => $type,
'id' => $id, 'id' => $id,
'ip' => $request->server('REMOTE_ADDR'), 'ip' => $request->server('REMOTE_ADDR'),
'session' => md5(Session::getId()), 'session' => md5(Session::getId()),
'referer' => $request->server('HTTP_REFERRER') 'referer' => $request->server('HTTP_REFERRER')
]); ]
);
} }
protected function API($url) protected function API($url)
@@ -120,7 +126,7 @@ class Controller extends BaseController
. 'X-User-Agent: ' . request()->server('HTTP_USER_AGENT') . "\r\n" . 'X-User-Agent: ' . request()->server('HTTP_USER_AGENT') . "\r\n"
] ]
]; ];
//\dump($http_response_header); //\dump($http_response_header);
$result = @file_get_contents($this->API_URL . $url, false, stream_context_create($arrContextOptions)); $result = @file_get_contents($this->API_URL . $url, false, stream_context_create($arrContextOptions));
return $result ? json_decode($result) : null; return $result ? json_decode($result) : null;
} }
@@ -143,17 +149,17 @@ class Controller extends BaseController
return is_object($obj) ? new \DateTime($obj->date, new \DateTimeZone($obj->timezone)) : \Carbon\Carbon::parse($obj)->setTimezone(date_default_timezone_get()); return is_object($obj) ? new \DateTime($obj->date, new \DateTimeZone($obj->timezone)) : \Carbon\Carbon::parse($obj)->setTimezone(date_default_timezone_get());
} }
public function __call($method, $arguments) // public function __call($method, $arguments)
{ // {
if (substr($method, 0, 5) == 'view_') { // if (substr($method, 0, 5) == 'view_') {
$view = substr($method, 5); // $view = substr($method, 5);
if (view()->exists($view)) { // if (view()->exists($view)) {
return view($view); // return view($view);
} // }
} // }
return abort(404); // return abort(404);
} // }
public function getSidebareData() public function getSidebareData()
{ {
@@ -171,4 +177,19 @@ class Controller extends BaseController
return ['newsItems' => $newsItems, 'populair' => $populair]; return ['newsItems' => $newsItems, 'populair' => $populair];
} }
public function static_page($slug)
{
$page = $this->API('statisch/' . $slug);
if ($page == null) {
return abort(404);
}
$page->published = Controller::JsonToDateTime($page->published);
if ($page->edited) {
$page->edited = Controller::JsonToDateTime($page->edited);
}
return view('static', compact('page'));
}
} }
View File
View File
View File
View File
View File
View File
View File
View File
View File
Regular → Executable
View File
View File
View File
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Generated Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Generated Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 417 B

Vendored Regular → Executable
View File
Regular → Executable
View File
Vendored Regular → Executable
View File
View File
Vendored Regular → Executable
View File
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 951 B

After

Width:  |  Height:  |  Size: 951 B

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 637 B

View File
View File
View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 272 B

View File

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 384 B

View File

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 387 B

View File

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 407 B

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