Your IP : 216.73.216.104


Current Path : /home/p/o/n/poneycluc/www/modules/mod_advanced_cookies/tmpl/
Upload File :
Current File : /home/p/o/n/poneycluc/www/modules/mod_advanced_cookies/tmpl/default.php

<?php
/**
 * @version $Id$
 * @package Advanced Cookies
 * @copyright Copyright (C) 2019 HOB-France.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: https://www.hob-france.com/
 * @author email info@hob-fr.com
 * @developer Mihaly Varga - michel.varga@hob-fr.com
 *
 */
defined('_JEXEC') or die('Restricted access'); 

use Joomla\CMS\Factory;
?>

<div class="custom<?php echo $moduleclass_sfx; ?>">
    <?php echo $module->content; ?>

    <div id="cookie_banner" class="hob_banner">
        <div class="block_1">
            <p class="text_banner"><?php echo $text[0]; ?> <a class="info_link" href="<?php echo $bannerLinkUrl; ?>"><?php echo $text[4]; ?></a></p><br/>
        </div>
        <div class="block_2">
            <button id="hob_Modal_btn" class="button_custom btn_settings"
                    class="button_custom btn_settings"><?php echo $text[3]; ?></button>

            <button id="accept_all_g"
                    class="button_custom btn_ok"><?php echo $text[1]; ?></button>
            <button id="refuse_all_g" class="button_custom btn_deny"
                    aria-hidden="true"><?php echo $text[2]; ?></button>
        </div>
    </div>
<?php if(intval($cookie_btn_display_mode) == 1): ?>
    <div id="setting">
        <button id="setting_btn" class="button_custom">
            <?php echo $cookie_btn['text']; ?>
        </button>
    </div>
    <?php endif;?>
</div>
<!-- The Modal -->
<div id="hob_Modal" class="hob_modal">

    <!-- Modal content -->
    <div class="hob_modal-content">
        <div class="hob_modal-header">
            <h3 id="modalLabel"><?php echo JText::_('MOD_HOB_RGPD_MODAL_HEADER_TITLE'); ?></h3>
            <span class="hob_close">&times;</span>
        </div>
        <div class="hob_modal-body">
            <div class="tab">
                <button class="tablinks" onclick="openCookie(event, 'cookies1')"
                        id="defaultOpen"><?php echo JText::_('MOD_HOB_RGPD_CATEGORY_1_DESC_TEXT_LABEL'); ?>
                </button>
<?php if($tServicesStates['tab1']==1) : ?>
                <button class="tablinks"
                        onclick="openCookie(event, 'cookies2')"><?php echo JText::_('MOD_HOB_RGPD_CATEGORY_2_DESC_TEXT_LABEL'); ?></button>
<?php endif;
if($tServicesStates['tab2']==1) : ?>
                <button class="tablinks"
                        onclick="openCookie(event, 'cookies3')"><?php echo JText::_('MOD_HOB_RGPD_CATEGORY_3_DESC_TEXT_LABEL'); ?></button>
<?php endif;
if($tServicesStates['tab3']==1) : ?>
                <button class="tablinks"
                        onclick="openCookie(event, 'cookies4')"><?php echo JText::_('MOD_HOB_RGPD_CATEGORY_4_DESC_TEXT_LABEL'); ?></button>
<?php endif; ?>
                <button class="tablinks"
                        onclick="openCookie(event, 'cookies5')"><?php echo JText::_('MOD_HOB_RGPD_CATEGORY_5_DESC_TEXT_LABEL'); ?></button>
                <?php //This is the Section where the connected users can verify their activity logs ?>
                <?php Factory::getDocument()->addStyleDeclaration('.hob_modal-content{max-width: 960px;}') ?>
                    <button class="tablinks"
                            onclick="openCookie(event, 'cookies6')"><?php echo JText::_('MOD_HOB_RGPD_CATEGORY_6_DESC_TEXT_LABEL'); ?></button>
            </div>

            <div id="cookies1" class="tabcontent">
                <h3><?php echo JText::_('MOD_HOB_RGPD_MODAL_TAB_TITLE_1'); ?></h3>
                <div><?php echo $cookie_category[0]; ?></div>

                    <span style="display: none;" class="switch">
                    <input style="display: none;" id="param_switch_1" hidden checked type="checkbox"/>
                    <label style="display: none;" for="param_switch_1" hidden class="hob_modal_slider round"></label>
                    </span>
            </div>

<?php if($tServicesStates['tab1']==1) : ?>
            <div id="cookies2" class="tabcontent">
                <h3><?php echo JText::_('MOD_HOB_RGPD_MODAL_TAB_TITLE_2'); ?></h3>
                <p><?php echo $cookie_category[1]; ?></p>
                    <span class="switch">
                        <input id="param_switch_2" type="checkbox"/>
                    <label for="param_switch_2" class="hob_modal_slider round"></label>
                    </span>
                <ul class="unstyled service_list"><?php
                    if ($switcher[0] == 1) : ?>
                        <li class="service_intro">Google Analytics <button type="button" class="btn hob_googleanalytics">+</button>
                            <div style="display: none;" id="hob_googleanalytics" class="collapse_text"> <br/>
                            	<a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">
                            		<?= JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') ?>
                            	</a>
                            </div>
                        </li>
                    <?php endif;
                    if ($switcher[1] == 1) : ?>
                    	<?php // ATTENTION : Firefox v77 ajoute un "NotAllowedScript" devant certaines combinaisons de code HTML et de mots,
                              // du coup, il faut remplacer un des caracteres par son code HTML ( ex : Google => &#71;oogle ) ?>
                        <li class="service_intro">&#71;oogle Ads <button type="button" class="btn hob_googleads">+</button>
							<div style="display: none;" id="hob_googleads" class="collapse_text"> <br/>
                            	<a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">
                            		<?= JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') ?>
                            	</a>
                            </div>
                        </li>
                    <?php endif; ?>
                 </ul>
            </div>
<?php endif;

if($tServicesStates['tab2']==1) : ?>
            <div id="cookies3" class="tabcontent">
                <h3><?php echo JText::_('MOD_HOB_RGPD_MODAL_TAB_TITLE_3'); ?></h3>
                <p><?php echo $cookie_category[2]; ?></p>
                <div>
                    <span class="switch">
                        <input id="param_switch_3" type="checkbox"/>
                        <label for="param_switch_3" class="hob_modal_slider round"></label>
                    </span>
                </div>
                <ul class="unstyled service_list"><?php
                    if ($switcher[2] == 1) echo('<li class="service_intro">&#71;oogle &#77;aps 
                                                   <button type="button" class="btn hob_google_maps">+</button>
                                                   <div style="display: none;" id="hob_google_maps" class="collapse_text"> ' . $collapse['google_maps'] . ' <br/>
                                                   <a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a>
                                                   </div>
                                                   </li>');

                    if ($switcher[3] == 1) echo('<li class="service_intro">Calameo 
                                                 <button type="button" class="btn hob_calameo" >+</button>
                                                   <div style="display: none;" id="hob_calameo" class="collapse_text"> ' . $collapse['calemeo'] . '<br/>
                                                    <a style="color: #0065af!important;" href="https://fr.calameo.com/privacy#what">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');

                    if ($switcher[4] == 1) echo('<li class="service_intro">re&#67;aptcha V2
                                                 <button type="button" class="btn hob_recaptchav2">+</button>
                                                   <div style="display: none;" id="hob_recaptchav2" class="collapse_text"> ' . $collapse['reCaptcha_v2'] . '<br/>
                                                   <a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');

                    if ($switcher[5] == 1) echo('<li class="service_intro">re&#67;aptcha V3 <button type="button" class="btn hob_recaptchav3">+</button>
                                                   <div style="display: none;" id="hob_recaptchav3" class="collapse_text"> ' . $collapse['reCaptcha_v3'] . '<br/>
                                                   <a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a> </div></li>');

                    if ($switcher[6] == 1) echo('<li class="service_intro">ChatBot <button type="button" class="btn hob_chatbot">+</button>
                                                   <div style="display: none;" id="hob_chatbot" class="collapse_text"> ' . $collapse['charBot'] . ' </div></li>');

                    if ($switcher[7] == 1) echo('<li class="service_intro">MailChimp <button type="button" class="btn hob_mailchimp">+</button>
                                                   <div style="display: none;" id="hob_mailchimp" class="collapse_text"> ' . $collapse['mailChimp'] . '<br/>
                                                    <a style="color: #0065af!important;" href="https://mailchimp.com/legal/privacy/">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    ?></ul>

            </div>
<?php endif;

if($tServicesStates['tab3']==1) : ?>
            <div id="cookies4" class="tabcontent">
                <h3><?php echo JText::_('MOD_HOB_RGPD_MODAL_TAB_TITLE_4'); ?></h3>
                <p><?php echo $cookie_category[3]; ?></p>
                <div>
                    <span class="switch">
                        <input id="param_switch_4" type="checkbox"/>
                        <label for="param_switch_4" class="hob_modal_slider round"></label>
                    </span>
                </div>
                <ul class="unstyled service_list"><?php
                    if ($switcher[8] == 1)
                        echo('<li class="service_intro">Facebook
                                                    <button type="button" class="btn hob_facebook">+</button>
                                                       <div style="display: none;" id="hob_facebook" class="collapse_text"> ' . $collapse['facebook'] . '<br/>
                                                       <a style="color: #0065af!important;" href="https://www.facebook.com/policies/cookies/">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[9] == 1)
                        echo('<li class="service_intro">Twitter
                                                    <button type="button" class="btn hob_twitter">+</button>
                                                       <div style="display: none;" id="hob_twitter" class="collapse_text"> ' . $collapse['twitter'] . '<br/>
                                                        <a style="color: #0065af!important;" href="https://help.twitter.com/fr/rules-and-policies/twitter-cookies">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[10] == 1)
                        echo('<li class="service_intro">&#71;ooglePlus
                                                    <button type="button" class="btn hob_googleplus">+</button>
                                                       <div style="display: none;" id="hob_googleplus" class="collapse_text"> ' . $collapse['google_plus'] . '<br/>
                                                       <a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a> </div></li>');
                    if ($switcher[11] == 1)
                        echo('<li class="service_intro">LinkedIn
                                                    <button type="button" class="btn hob_linkedin">+</button>
                                                       <div style="display: none;" id="hob_linkedin" class="collapse_text"> ' . $collapse['linkedin'] . '<br/>
                                                        <a style="color: #0065af!important;" href="https://www.linkedin.com/legal/cookie-policy">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[12] == 1)
                        echo('<li class="service_intro">Pinterest
                                                    <button type="button" class="btn hob_pintrest">+</button>
                                                       <div style="display: none;" id="hob_pintrest" class="collapse_text"> ' . $collapse['pinterest'] . '<br/>
                                                       <a style="color: #0065af!important;" href="https://policy.pinterest.com/fr/cookies">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[13] == 1)
                        echo('<li class="service_intro">Instagram
                                                    <button type="button" class="btn hob_instagram">+</button>
                                                       <div style="display: none;" id="hob_instagram" class="collapse_text"> ' . $collapse['instagram'] . '<br/>
                                                        <a style="color: #0065af!important;" href="https://help.instagram.com/1896641480634370">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[14] == 1)
                        echo('<li class="service_intro">YouTube
                                                    <button type="button" class="btn hob_youtube">+</button>
                                                       <div style="display: none;" id="hob_youtube" class="collapse_text"> ' . $collapse['youtube'] . '<br/>
                                                       <a style="color: #0065af!important;" href="https://policies.google.com/technologies/cookies?hl=fr">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[15] == 1)
                        echo('<li class="service_intro">Vimeo
                                                    <button type="button" class="btn hob_vimeo">+</button>
                                                       <div style="display: none;" id="hob_vimeo" class="collapse_text"> ' . $collapse['vimeo'] . '<br/>
                                                        <a style="color: #0065af!important;" href="https://vimeo.com/cookie_policy">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    if ($switcher[16] == 1)
                        echo('<li class="service_intro">Dailymotion
                                                    <button type="button" class="btn hob_dailymotion">+</button>
                                                       <div style="display: none;" id="hob_dailymotion" class="collapse_text"> ' . $collapse['dailymotion'] . '<br/>
                                                       <a style="color: #0065af!important;" href="https://www.dailymotion.com/legal/cookiemanagement">' . JText::_('MOD_HOB_RGPD_OFFICIAL_TEXT_LABEL') . '</a></div></li>');
                    ?></ul>
            </div>
<?php endif; ?>            

            <div id="cookies6" class="tabcontent">
                <div>
                <h3><?php echo JText::_('MOD_HOB_RGPD_MODAL_TAB_TITLE_6');?></h3>
                </div>
                <div>
                    <?php
                    //GET the connected user data from the database
                    // Get a db connection.
                    $db = JFactory::getDbo();

                    $user = JFactory::getUser();

                    if ($user->guest) {
                        echo '<div class="alert alert-warning">
                                <button type="button" class="close" data-dismiss="alert">&times;</button>
                               '.JText::_('MOD_HOB_RGPD_SESSION_WARNING').'
                              </div>';
                    } else {
                        // Create a new query object.
                        $limitstart = 0;
                        $limit = 5;
                        $query = $db->getQuery(true);

                        // Select all records from the user profile table where key begins with "custom.".
                        // Order it by the ordering field.
                        $query->select(array('u.id', 'u.name', 'u.username', 'a.message', 'a.log_date'));
                        $query->from($db->quoteName('#__users', 'u'));
                        $query->join('LEFT', $db->quoteName('#__action_logs', 'a') . ' ON (' . $db->quoteName('u.id') . ' = ' . $db->quoteName('a.user_id') . ')');
                        $query->where($db->quoteName('u.id') . ' = ' . $db->quote($user->id));


                        // Reset the query using our newly populated query object.
                        $db->setQuery($query);

                        // Load the results as a list of stdClass objects (see later for more options on retrieving data).
                        $results = $db->loadAssocList();

                        if($results[0]['message'] != null){
                        echo '<div class="session_table">'
                            .'<table>'
                            . '<thead>'
                            . '<td>Action</td>'
                            . '<td>Date</td>'
                            . '</thead>'
                            . '<tbody>';
                        foreach ($results as $result) {

                            echo '<tr><td>' . json_decode($result['message'])->{'action'} . '</td><td>' . $result['log_date'] . '</td></tr>';
                        }
                        echo '</tbody>'
                            .'</table>'
                            .'</div>';
                        echo '<div class="alert alert-warning">
                                <button type="button" class="close" data-dismiss="alert">&times;</button>
                               '.JText::_('MOD_HOB_RGPD_SESSION_REQUEST_WARNING').'
                              </div>';
                        echo '<a class="btn btn-info mr-3" href="' . JUri::root() . 'index.php?option=com_privacy&view=request' . '">'.JText::_('MOD_HOB_RGPD_SESSION_CREATE_REQUEST').'</a>';
                        echo '<a class="btn btn-info mr-3" href="' . JUri::root() . 'index.php?option=com_privacy&view=confirm' . '">'.JText::_('MOD_HOB_RGPD_SESSION_CONFIRM_REQUEST').'</a>';
                        echo '<a class="btn btn-info mr-3" href="' . JUri::root() . 'index.php?option=com_privacy&view=remind' . '">'.JText::_('MOD_HOB_RGPD_SESSION_EXTEND_CONSENT').'</a>';

                    $user = JFactory::getUser();
                    if ($user->guest)
                    {
                        echo '';
                    }
                    else
                    {
                        $userToken = JSession::getFormToken();
                        echo '<a class="btn btn-danger float-right" href="index.php?option=com_users&task=user.logout&' . $userToken . '=1">'.JText::_('MOD_HOB_RGPD_SESSION_CLOSE').' </a>';
                    }



                    }else{
                        echo JText::_('MOD_HOB_RGPD_SESSION_SESSION_DATA_COLLECT');
                    }
                    }
                    ?>
                </div>
            </div>

            <div id="cookies5" class="tabcontent">
                <h3><?php echo JText::_('MOD_HOB_RGPD_MODAL_TAB_TITLE_5'); ?></h3>
                <p><?php echo $cookie_category[4]; ?></p>
                <span class="switch">
                    <input id="param_switch_5" type="checkbox"/>
                    <label for="param_switch_5" class="hob_modal_slider round"></label>
                </span>
            </div>
        </div>
        
        <div id="hob_feet" class="hob_modal-footer">
            <button id="accept_all"
                    class="button_custom accepter_tous"><?php echo JText::_('MOD_HOB_RGPD_MODAL_BUTTON_TITLE_1'); ?></button>
            <button id="refuse_all" class="button_custom refuse_tous"
                    aria-hidden="true"><?php echo JText::_('MOD_HOB_RGPD_MODAL_BUTTON_TITLE_2'); ?></button>
            <button id="validation"
                    class="button_custom valider"><?php echo JText::_('MOD_HOB_RGPD_MODAL_BUTTON_TITLE_3'); ?></button>
        </div>
    </div>
</div>
<script>
    function openCookie(evt, cookieName) {
        var i;
        var tabcontent = document.getElementsByClassName("tabcontent");
        for (i = 0; i < tabcontent.length; i++) {
            tabcontent[i].style.display = "none";
        }
        var tablinks = document.getElementsByClassName("tablinks");
        for (i = 0; i < tablinks.length; i++) {
            tablinks[i].className = tablinks[i].className.replace(" active", "");
        }
        document.getElementById(cookieName).style.display = "block";
        evt.currentTarget.className += " active";
    }
    document.getElementById('cookies1').style.display = "block";
</script>