Now the main issue here has nothing to do with stripslashes as I note.
Content visible to verified customers only.
His $cat variable is empty which I posted a fix to try out.
I doubt your code is needed.
As far as the $realname issue The fixfilenames function strips the unwanted characters and I get no errors with Classifieds 2.3