You need to use plugins to perform any logic operations.
See these:
http://www.vbulletin.com/docs/html/plugin_system
http://www.vbulletin.com/docs/html/writing_plugin_code
For your purposes, however, you might be reinventing the wheel. There are dozens of pre-existing variables available for you to use without any additional logic.
Code:
<if condition="$show['member']">
You're logged in.
<else />
You need to log in or register!
</if>