Server : LiteSpeed System : Linux server335.web-hosting.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : cardxfeb ( 2452) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/cardxfeb/public_html/resources/views/vendor/cookie-consent/ |
@if(getSuperAdminSettingValue('is_cookie_banner') == true && request()->path()=='/'||request()->path()=='terms-conditions'||request()->path()=='privacy-policy')
@if($cookieConsentConfig['enabled'] && ! $alreadyConsentedWithCookies && !Session::get('declined'))
@include('cookie-consent::dialogContents')
<script>
window.laravelCookieConsent = (function () {
const COOKIE_VALUE = 1;
const COOKIE_DOMAIN = '{{ config('session.domain') ?? request()->getHost() }}';
function consentWithCookies() {
setCookie('{{ $cookieConsentConfig['cookie_name'] }}', COOKIE_VALUE, {{ $cookieConsentConfig['cookie_lifetime'] }});
hideCookieDialog();
}
function cookieExists(name) {
return (document.cookie.split('; ').indexOf(name + '=' + COOKIE_VALUE) !== -1);
}
function hideCookieDialog() {
const dialogs = document.getElementsByClassName('js-cookie-consent');
for (let i = 0; i < dialogs.length; ++i) {
dialogs[i].style.display = 'none';
}
}
function setCookie(name, value, expirationInDays) {
const date = new Date();
date.setTime(date.getTime() + (expirationInDays * 24 * 60 * 60 * 1000));
document.cookie = name + '=' + value
+ ';expires=' + date.toUTCString()
+ ';domain=' + COOKIE_DOMAIN
+ ';path=/{{ config('session.secure') ? ';secure' : null }}'
+ '{{ config('session.same_site') ? ';samesite='.config('session.same_site') : null }}';
}
if (cookieExists('{{ $cookieConsentConfig['cookie_name'] }}')) {
hideCookieDialog();
}
const buttons = document.getElementsByClassName('js-cookie-consent-agree');
for (let i = 0; i < buttons.length; ++i) {
buttons[i].addEventListener('click', consentWithCookies);
}
return {
consentWithCookies: consentWithCookies,
hideCookieDialog: hideCookieDialog
};
})();
</script>
@endif
@endif