simplify $_GET usage (move to beginning for easy escape if need be).
simplify orientation reading from big case to two small arrays.
use built-in is_dir() function
Merge pull request #72 from bifek/functions

use built-in is_dir() function
Merge pull request #70 from bifek/cleangetvars

simplify $_GET usage (move to beginning for easy escape if need be).
clean up spacing