Remove last instances of "<?=" for short_open_tag = Off
More php short tags updated
Reverted inline if for < PHP 5.4

Array dereferencing doesn’t work prior to PHP 5.4.
Move mysql_real_escape_string to after connectToDB

Warning: mysql_real_escape_string()
[function.mysql-real-escape-string]: A link to the server could not be
established in /app/htdoc/html/opsweekly/phplib/base.php on line 169