Optimization suggestion
PHP Code:
function check_age($userid,$forumid)
{
global $forumcache;
$userinfo = fetch_userinfo($userid);
$now = date('d-m-Y');
$bday = explode("-", $userinfo['birthday']);
$now = explode("-", $now);
$j = $now[2] - $bday[2];
return (int)($j >= $forumcache["$forumid"]['age_value']);
}
function check_lock($forumid)
{
global $forumcache;
return $forumcache["forumid"]['age_locked'];
}
Furthermore, you could remove the Locked Yes/No setting and define 0 being unlocked, would save memory.
And your age-check does only check the Year, should also check month/day.