Even though only admins and mods can use the feature, you should do input validation on $in{t}... there's nothing stopping me from putting arbritary data there instead of a topic number...
Looking at the entire directory for sticky files / trying to stat() a sticky file can also be very resource intensive. You should consider hijacking UpdateForumTopics to write out another hash that carries the sticky index...
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.