All global variables should be within a function or class

Hi,

Do you have any suggestions how I can get around this issue, thanks? Global variables within a function - Please Help