try to insert below:if ($action == "uploadimage") {
if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload", $cat_id))) {
show_error_page($lang['no_permission']);
exit;
}
This block: if (!check_picture_limit($user_info['user_id'])){
// if (!check_daily_picture_limit($user_info['user_id'])) {
//
// Depending on your requirements, you can either check against global or daily limit. For global check leave it as it is now.
// For daily limit comment first line and uncomment second one.
//
$site_template->print_template($site_template->parse_template("over_limit"));
include(ROOT_PATH.'includes/page_footer.php');
exit;
}
If u get an error message "call underfined function" then move function check_picture_limit($user_id){...} and function check_daily_picture_limit($user_id) {...} into includes/functions.php