adjustment to out-of-the-box php and bug fixes

most fixes are to support out of the box php without warnings (notices) and the default behavior.
things like, missing variables, array indexes without quotes, changed `<?=` to `<?php echo`

more fixes:
fixed sql insert (inserted null where it should've been 0, the sql script that creates the table doesn't allow null)
fixed admin js order (boortstrap was before jquery)