update statistics.php

function moved from includes to functions