<?php
function isIncludingURL($searchStr) {
  return strpos($_SERVER['REQUEST_URI'], $searchStr) !== false;
}

function minify_html($html) {
  $html = preg_replace('/<!--.*?-->/s', '', $html);
  $html = preg_replace('/^\s+|\s+$/m', '', $html);
  $html = preg_replace('/>\s+</', '><', $html);
  return $html;
}

function is_mobile() {
  return preg_match('/(android|iphone|ipad|ipod|blackberry|windows phone|opera mini|iemobile|mobile)/i', $_SERVER['HTTP_USER_AGENT']);
}

function tst($str) {
  return strip_tags(trim(strip_tags($str)));
}

function redirectLogin() {
  exit('<script>window.location.href = "/tr/Security/LogOn"</script>');
}

function redirectHome() {
  exit('<script>window.location.href = "/tr"</script>');
}

