<?php require_once('./global.php'); if(!$vbulletin->userinfo['userid']) { print_no_permission(); } else { \\the code to show the user the image } ?>