plugins/SpecialAdmin.php
changeset 61 e9708657875a
parent 57 b354deeaa4c4
child 72 bda11e521e8a
equal deleted inserted replaced
60:71b50f8c8f85 61:e9708657875a
    83   $db->free_result();
    83   $db->free_result();
    84   // Stats
    84   // Stats
    85   if(getConfig('log_hits') == '1')
    85   if(getConfig('log_hits') == '1')
    86   {
    86   {
    87     $stats = stats_top_pages(10);
    87     $stats = stats_top_pages(10);
       
    88     //die('<pre>'.print_r($stats,true).'</pre>');
    88     $c = 0;
    89     $c = 0;
    89     $cls = 'row2';
    90     $cls = 'row2';
    90     echo '<h3>Most requested pages</h3><div class="tblholder"><table style="width: 100%;" border="0" cellspacing="1" cellpadding="4"><tr><th>Page</th><th>Hits</th></tr>';
    91     echo '<h3>Most requested pages</h3><div class="tblholder"><table style="width: 100%;" border="0" cellspacing="1" cellpadding="4"><tr><th>Page</th><th>Hits</th></tr>';
    91     foreach($stats as $page => $count)
    92     foreach($stats as $data)
    92     {
    93     {
    93       if(isset($paths->pages[$page]))
    94       echo '<tr>';
    94       {
    95       $cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
    95         echo '<tr>';
    96       echo '<td class="'.$cls.'"><a href="'.makeUrl($data['page_urlname']).'">'.$data['page_title'].'</a></td><td style="text-align: center;" class="'.$cls.'">'.$data['num_hits'].'</td>';
    96         $cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
    97       echo '</tr>';
    97         echo '<td class="'.$cls.'"><a href="'.makeUrl($page).'">'.$paths->pages[$page]['name'].'</a></td><td style="text-align: center;" class="'.$cls.'">'.$count.'</td>';
       
    98         echo '</tr>';
       
    99       }
       
   100     }
    98     }
   101     echo '</table></div>';
    99     echo '</table></div>';
   102   }
   100   }
   103   
   101   
   104   // Security log
   102   // Security log