<footer id="footer" class="container">
  <div class="row">
    <?php
    $current_lang = $_SESSION['lang']['shortcode'];
      
    $links = array();
    
    if ($current_lang == 'fr') {
        $links['about_us'] = array('title' => 'Mentions légales - Politique de confidentialité', 'url' => 'mentions-legales-a-propos');
        $links['terms'] = array('title' => 'Conditions générales d\'utilisation', 'url' => 'conditions-generales-dutilisation');
        $links['terms_module_providers'] = array('title' => 'Conditions générales d\'utilisation - vendeurs de modules', 'url' => 'conditions-generales-dutilisation_vendeurs-de-modules');
        $links['contact'] = array('title' => 'Contactez-nous', 'url' => 'contactez-nous');
        $links['about_payments'] = array('title' => 'Payments et securisation', 'url' => 'paiements-et-securisation');
    } elseif ($current_lang == 'es') {
        $links['about_us'] = array('title' => 'Legal Notice - Quiénes somos', 'url' => 'legal-notice-quienes-somos');
        $links['terms'] = array('title' => 'Términos y condicones de uso', 'url' => 'terminos-y-condicones-de-uso');
        $links['terms_module_providers'] = array('title' => 'Términos y condiciones de uso - Vendedores de módulos', 'url' => 'terminos-y-condiciones-de-uso_vendedores-de-modulos');
        $links['contact'] = array('title' => 'Contact', 'url' => 'acerca-de-nosotros');
        $links['about_payments'] = array('title' => 'Acerca de los pago', 'url' => 'acerca-de-los-pagos');
    } elseif ($current_lang == 'it') {
        $links['about_us'] = array('title' => 'Nota legale - Chi siamo', 'url' => 'nota-legale-chi-siamo');
        $links['terms'] = array('title' => 'Condizioni d\'uso', 'url' => 'condizioni-duso');
        $links['terms_module_providers'] = array('title' => 'Condizioni d\'uso - Venditori di modul', 'url' => 'condizioni-duso_venditori-di-moduli');
        $links['contact'] = array('title' => 'Contact', 'url' => 'contact');
        $links['about_payments'] = array('title' => 'Pagamenti e sicurezza', 'url' => 'pagamenti-e-sicurezza');
    } elseif ($current_lang == 'de') {
        $links['about_us'] = array('title' => 'Rechtlicher Hinweise - Über uns', 'url' => 'rechtlicher-hinweise-ber-uns');
        $links['terms'] = array('title' => 'Unsere Nutzungsbedingungen', 'url' => 'unsere-nutzungsbedingungen');
        $links['terms_module_providers'] = array('title' => 'Unsere Nutzungsbedingungen - Modulverkäufer', 'url' => 'unsere-nutzungsbedingungen_modulverkaufer');
        $links['contact'] = array('title' => 'Unser Kontakt', 'url' => 'unser-kontakt');
        $links['about_payments'] = array('title' => 'Sicheres Bezahlen', 'url' => 'sicheres-bezahlen');
    } else {
        $links['about_us'] = array('title' => 'Legal Notice - About us', 'url' => 'about-us');
        $links['terms'] = array('title' => 'Terms and conditions of use', 'url' => 'terms-and-conditions');
        $links['terms_module_providers'] = array('title' => 'Terms and conditions of use - Module providers', 'url' => 'terms-and-conditions-of-use-module-providers');
        $links['contact'] = array('title' => 'Contact', 'url' => 'contact-us');
        $links['about_payments'] = array('title' => 'About payments', 'url' => 'about-payments');
    }
    /*
    $other_pages['about_payments'] = $websitepage->fetchAll($website->id, '', '', 1, 0, array('title' => 'About payments', 'status' => '1', 'lang' => $website->lang));
    $other_pages['contact'] = $websitepage->fetchAll($website->id, '', '', 0, 1, array('title' => 'Contact', 'status' => '1', 'lang' => $website->lang));
    $other_pages['terms'] = $websitepage->fetchAll($website->id, '', '', 0, 1, array('title' => 'Terms and conditions', 'status' => '1', 'lang' => $website->lang));
    $other_pages['terms_module_providers'] = $websitepage->fetchAll($website->id, '', '', 0, 1, array('title' => 'Terms and conditions of use - Module providers', 'status' => '1', 'lang' => $website->lang));
    $other_pages['about_us'] = $websitepage->fetchAll($website->id, '', '', 0, 1, array('title' => 'About us', 'status' => '1', 'lang' => $website->lang));
    foreach ($other_pages as $key => $pages) {
      $obj = $pages[key($pages)];
      $links[$key]['title'] = $obj->title;
      $links[$key]['url'] = $obj->pageurl;
      if ($website->lang != $current_lang) {
        $trans_page = $websitepage->fetchAll($website->id, '', '', 0, 1, array('fk_page' => $obj->id, 'status' => '1', 'lang' => $current_lang));
        $trans_page = $trans_page[key($trans_page)];
        $links[$key]['title'] = $trans_page->title;
        $links[$key]['url'] = $trans_page->pageurl;
      }
    }
    */
    
    ?>
    <section class="footer-block col-xs-12 col-sm-6" id="block_various_links_footer" contenteditable="true">
      <h4><?php echo $weblangs->trans("Information") ?></h4>
      <ul class="toggle-footer">
        <li class="item">
          <a href="<?php print $links['about_us']['url'] ?>.php"> <?php print $links['about_us']['title'] ?> </a>
        </li>
        <li class="item">
          <a href="<?php print $links['terms']['url'] ?>.php"> <?php print $links['terms']['title'] ?> </a>
        </li>
        <li class="item">
          <a href="<?php print $links['terms_module_providers']['url'] ?>.php"> <?php print $links['terms_module_providers']['title'] ?> </a>
        </li>
        <li class="item">
          <a href="<?php print $links['contact']['url'] ?>.php"> <?php print $links['contact']['title'] ?> </a>
        </li>
        <li class="item">
          <a href="<?php print $links['about_payments']['url'] ?>.php"> <?php print $links['about_payments']['title'] ?> </a>
        </li>
      </ul>
    </section>
    <section class="footer-block col-xs-12 col-sm-6" contenteditable="true">
      <h4>
        <a href="/myaccount.php" title="<?php print $weblangs->trans("myAccount"); ?>" rel="nofollow"><?php print $weblangs->trans("myAccount"); ?></a>
      </h4>
      <div class="block_content toggle-footer">
        <ul class="bullet">
          <li>
            <a href="order-history.php" title="<?php print $weblangs->trans("orderHistoryDetails"); ?>" rel="nofollow"><?php print $weblangs->trans("orderHistoryDetails"); ?></a>
          </li>
          <li>
            <a href="account-information.php" title="<?php print $weblangs->trans("personalInfo"); ?>" rel="nofollow"><?php print $weblangs->trans("personalInfo"); ?></a>
          </li>

        </ul>
      </div>
    </section>
  </div>
</footer>