<?php 

if (isset($user)) {
  if ($user['action_time'] < $time - 60 * 60) {
    mysql_query("UPDATE `user` SET `action_time` = '$time', avtoritet = avtoritet + '1', avtoritet_count = avtoritet_count + '1', balls = balls + '100' WHERE `id` = '$user[id]' LIMIT 1");
  }
}