<?php

/******************************************************
 * Haszn�lva van:
 * - workshop jobb oldal, let�lt� linkek (logged out) 
 ******************************************************/
if (isset($_SERVER['HTTP_HOST'])) {
  switch ($_SERVER['HTTP_HOST']) {
    case 'www.archline.hu': {
        $folder = 'belepes';
        break;
      }
    case 'www.cadline.hu': {
        $folder = 'belepes';
        break;
      }
    case 'dev.cadline.hu': {
        $folder = 'belepes';
        break;
      }
    case 'dev.archlinexp.com': {
        $folder = 'log-in';
        break;
      }
    case 'www.archlinexp.com': {
        $folder = 'log-in';
        break;
      }
    default: {
        $folder = 'log-in';
        break;
      }
  }
} else {
  $folder = 'belepes';
}

header("location: /" . $folder . "/?return=" . base64_encode($_SERVER['HTTP_REFERER']));
exit(); 
/*
header("location: /belepes/?return=".base64_encode($_SERVER['HTTP_REFERER']));
exit();
*/
