<?php /* Smarty version 2.6.19, created on 2014-03-07 03:37:17
         compiled from clickinrefresh.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'clickinrefresh.tpl', 1, false),array('function', 'db_fetchrows', 'clickinrefresh.tpl', 5, false),)), $this); ?>
var clickInRefreshDate = '<?php echo ((is_array($_tmp=$this->_tpl_vars['now'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d') : smarty_modifier_date_format($_tmp, '%Y-%m-%d')); ?>
';
var clickInRefreshTime = '<?php echo ((is_array($_tmp=$this->_tpl_vars['now'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%H:%M:%S') : smarty_modifier_date_format($_tmp, '%H:%M:%S')); ?>
';

var arrClickInSites = 
[ <?php echo smarty_function_db_fetchrows(array('table' => 'sites','items' => "DISTINCT f_url, f_id, f_name,  f_clickIn, f_clickOut, f_clickScore",'condition' => "f_expireTime='0' OR f_expireTime>'".($this->_tpl_vars['now'])."'",'orderby' => "f_clickScore DESC, f_clickIn DESC, f_clickOut DESC, f_id ASC",'count' => '40','varname' => 'arr'), $this);?>

  <?php unset($this->_sections['loop']);
$this->_sections['loop']['name'] = 'loop';
$this->_sections['loop']['loop'] = is_array($_loop=$this->_tpl_vars['arr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['loop']['show'] = true;
$this->_sections['loop']['max'] = $this->_sections['loop']['loop'];
$this->_sections['loop']['step'] = 1;
$this->_sections['loop']['start'] = $this->_sections['loop']['step'] > 0 ? 0 : $this->_sections['loop']['loop']-1;
if ($this->_sections['loop']['show']) {
    $this->_sections['loop']['total'] = $this->_sections['loop']['loop'];
    if ($this->_sections['loop']['total'] == 0)
        $this->_sections['loop']['show'] = false;
} else
    $this->_sections['loop']['total'] = 0;
if ($this->_sections['loop']['show']):

            for ($this->_sections['loop']['index'] = $this->_sections['loop']['start'], $this->_sections['loop']['iteration'] = 1;
                 $this->_sections['loop']['iteration'] <= $this->_sections['loop']['total'];
                 $this->_sections['loop']['index'] += $this->_sections['loop']['step'], $this->_sections['loop']['iteration']++):
$this->_sections['loop']['rownum'] = $this->_sections['loop']['iteration'];
$this->_sections['loop']['index_prev'] = $this->_sections['loop']['index'] - $this->_sections['loop']['step'];
$this->_sections['loop']['index_next'] = $this->_sections['loop']['index'] + $this->_sections['loop']['step'];
$this->_sections['loop']['first']      = ($this->_sections['loop']['iteration'] == 1);
$this->_sections['loop']['last']       = ($this->_sections['loop']['iteration'] == $this->_sections['loop']['total']);
?>
  ['<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_id']; ?>
','<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_name']; ?>
', '<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_url']; ?>
', '<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_clickIn']; ?>
', '<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_clickOut']; ?>
', '<?php echo $this->_tpl_vars['arr'][$this->_sections['loop']['index']]['f_clickScore']; ?>
'],
  <?php endfor; endif; ?>
  []
];