From 2ba393bb56587ca091e1557ecab5e5a36ec072c0 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Tue, 15 Jul 2025 23:59:38 +0200 Subject: [PATCH] =?UTF-8?q?Dodaj=20widok=20b=C5=82=C4=99du=20dla=20nieistn?= =?UTF-8?q?iej=C4=85cych=20ofert=20pracy=20oraz=20walidacj=C4=99=20w=20met?= =?UTF-8?q?odzie=20szczeg=C3=B3=C5=82=C3=B3w=20og=C5=82oszenia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../front/controls/class.GlobelusAdverts.php | 8 ++++++++ .../globelus/adverts/advert-not-found.php | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 templates_user/globelus/adverts/advert-not-found.php diff --git a/autoload/front/controls/class.GlobelusAdverts.php b/autoload/front/controls/class.GlobelusAdverts.php index fdf3317..dd8204c 100644 --- a/autoload/front/controls/class.GlobelusAdverts.php +++ b/autoload/front/controls/class.GlobelusAdverts.php @@ -97,6 +97,14 @@ class GlobelusAdverts $page['language']['canonical'] = $base . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; + if ( !$advert_details['id'] ) + { + return \Tpl::view( 'globelus/adverts/advert-not-found', [ + 'g_user' => $g_user, + 'advert_id' => \S::get( 'advert_id' ) + ] ); + } + if ( ( !$advert_details['visible'] or $advert_details['old'] ) and $advert_details['user_id'] != $g_user['id'] ) { header( 'Location: /' ); exit; diff --git a/templates_user/globelus/adverts/advert-not-found.php b/templates_user/globelus/adverts/advert-not-found.php new file mode 100644 index 0000000..99fca96 --- /dev/null +++ b/templates_user/globelus/adverts/advert-not-found.php @@ -0,0 +1,16 @@ +
+
+
+
Oferta pracy nie istnieje
+
Przykro nam, ale oferta pracy, której szukaj już nie istnieje.
Skorzystaj z wyszukiwarki i sprawdź aktualne oferty
+
+
+
+
+
Partnerzy globelus.pl
+
+ jooble + cvwizard + megapraca +
+
\ No newline at end of file