$root .= "../"; $level += 1; } if (file_exists($root . '/framework/class.secure.php')) { include $root . '/framework/class.secure.php'; } else { trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR); } } // protect $backend = CAT_Backend::getInstance('Start', 'start', false, false); if (!CAT_Users::is_authenticated()) { exit; } // just to be _really_ sure... include dirname(__FILE__) . '/../data/config.inc.php'; $data = array(); $widget_name = 'Statistics'; $number = $current['last_edited_count'] > 0 && $current['last_edited_count'] < 50 ? $current['last_edited_count'] : 10; // format installation date and time $data['installation_time'] = CAT_Helper_DateTime::getDateTime(INSTALLATION_TIME); // get page statistics (count by visibility) $pg = CAT_Helper_Page::getPagesByVisibility(); foreach (array_keys($pg) as $key) { $data['visibility'][$key] = count($pg[$key]); } // get last edited $data['latest'] = CAT_Helper_Page::getLastEdited($number); global $parser; $parser->setPath(dirname(__FILE__) . '/../templates/default'); $parser->output('stats.tpl', $data);