<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php $settings = Engine_Api::_()->getApi('settings', 'core'); 
$twitterclone_footer = Zend_Registry::isRegistered('twitterclone_footer') ? Zend_Registry::get('twitterclone_footer') : null;
?>
<div class="twitterclone_footer">  
  <div class="twitterclone_footer_bottom">
    <div class="container">
      <div class="twitterclone_footer_bottom_inner">
        <div class="twitterclone_footer_bottom_left">
          <?php if($twitterclone_footer && $settings->getSetting('twitterclone.helpenable', '1')) { ?>
            <?php foreach( $this->navigation as $item ):
              $attribs = array_diff_key(array_filter($item->toArray()), array_flip(array(
              'reset_params', 'route', 'module', 'controller', 'action', 'type',
              'visible', 'label', 'href'
              )));
              ?>
            <?php echo $this->htmlLink($item->getHref(), $this->translate($item->getLabel()), $attribs) ?>
            <?php endforeach; ?>
          <?php } ?>
          <span class="footer_copyright"><?php echo $this->translate('Copyright &copy;%s', date('Y')) ?></span>
        </div>
        <div class="twitterclone_footer_bottom_right">
          <?php if($settings->getSetting('twitterclone.socialenable', '1')) { ?>
            <div class="footer_social_links">
              <ul class="navigation">
                <?php foreach( $this->socialnavigation as $link ): ?>
                  <li class="<?php echo $link->get('active') ? 'active' : '' ?>">
                    <a href='<?php echo $link->getHref() ?>' class="<?php echo $link->getClass() ? ' ' . $link->getClass() : ''  ?>"
                      <?php if( $link->get('target') ): ?> target='<?php echo $link->get('target') ?>' <?php endif; ?> >
                      <?php if($link->get('icon') == 'fa-twitter') { ?>
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/></svg>
                      <?php } else { ?>
                        <i class="<?php echo $link->get('icon') ? $link->get('icon') : 'fa fa-star' ?>"></i>
                      <?php } ?>
                      <span><?php echo $this->translate($link->getlabel()) ?></span>
                    </a>
                  </li>
                <?php endforeach; ?>
              </ul>
            </div>
          <?php } ?>
          <?php echo $this->partial('_languages.tpl', 'core', array('languageNameList' => $this->languageNameList)); ?>
        </div>
      </div>
    </div>
    <?php if(!empty($this->viewer_id)) { ?>
      <?php if(Engine_Api::_()->getApi('settings', 'core')->getSetting('core.sell.info', 1)): ?>
        <div class="container">
          <div class="footer_donotsell">
            <input type="checkbox" id="donosellinfo" onclick="donotSellInfo()" <?php if($this->viewer->donotsellinfo == 1) { ?> checked <?php } ?>> <?php echo $this->translate("Do Not Sell My Personal Information."); ?>
          </div>
        </div>
      <?php endif; ?>
      <script>
          function donotSellInfo() {
            var checkBox = document.getElementById("donosellinfo");
            (scriptJquery.ajax({
            method: 'post',
            url: en4.core.baseUrl + 'core/index/donotsellinfo/',
            dataType: 'json',
            data: {
                format: 'json',
                donotsellinfo: checkBox.checked,
            },
            success: function(responseHTML) {
            }
            }));
            return false;
          }
      </script>
    <?php } ?>
  </div>
</div>  
