AuthenticateUserSSO($token,$host,'HTTP');
if($otoken)
{
$otoken=explode('&',$otoken);
$goto='../?sid=SID';
// vraz do hlavicky vystupni token - nebo bude delat negotiation pokazde znovu
header('WWW-Authenticate: Negotiate '.$otoken[0]);
//header("HTTP/1.1 200 Kunda");
//header("HTTP/1.0 302 Moved Temporarely");
//header("Location: ".$goto);
//echo "Kerberosd login OK ".$com->EmailAddress."
";
//echo "
--pass-".base64_decode($otoken[1])."-
";
//echo"
".print_r($com,true).""; $uerData=(array)$com; //echo"
|".$com->EmailAddress."|"; $to='pro'; if (isset($_REQUEST['to'])) { if($_REQUEST['to']=='basic' || $_REQUEST['to']=='pda') {$to=$_REQUEST['to'];} } $_POST['to']=$to; $_POST['_c']="auth"; $_POST['_n']['w']="main"; $_POST['_n']['js']="1"; $_POST['ctz']="60"; $_POST['_n']['p']['main']='win.login'; $_POST['_a']['login']="1"; $_POST['disable_ip_check']="1"; $_POST['referer']="../"; $user=$com->GetProperty('u_login'); //$user=explode('@',$com->EmailAddress); $_POST['iw_username']=$user; $_POST['password']=base64_decode($otoken[1]); /***/ if ($_POST['to']=='pro') {$goto='basic';} else { /*decide, which interface go to, if no action was selected (no JS available)*/ if ($_POST['to']=='basic' || $_POST['to']=='pda') {$goto=$_POST['to'];} else {$goto='pda'; } /*if PDA, set _n p main to PDA value, to log in correctly*/ if ($goto=='pda'){$_POST['_n']['p']['main']='grid.mail';} /*if BASIC, set _n p main to BASIC value, to log in correctly*/ if ($goto=='basic'){$_POST['_n']['p']['main']='win.main.tree';} } session_start(); //setcookie('PHPSESSID',session_id(),mktime(0,0,0,1,1,2030),'/'); if(!$_COOKIE['use_cookies']){ $suffix='&PHPSESSID='.session_id(); }else{ $suffix = ''; } //$suffix='&PHPSESSID='.session_id(); $_SESSION['_unilogin']=$_POST; /*redirect onto target location*/ //die("Location: ../".$goto."/index.html?l".$suffix); //die('#1'); header("HTTP/1.0 302 Moved Temporarely"); header("Location: ../".$goto."/index.html?l".$suffix); //echo "Location: ../".$goto."/index.html?l".$suffix; //print_r($_SESSION); die(); /***/ die(); } else { //echo base64_decode($token)."