require("include.html"); checksession($id); $infos=explode("@",$config[EMAIL]); if ($_SERVER['HTTPS']=='ON') { if($_COOKIE['wm_nonsslport']) $otherconfig['NONSSLPORT']=$_COOKIE['wm_nonsslport']; if($otherconfig['NONSSLPORT']=="") { $com=new COM('MerakCOM.APIObject'); $controlport=$com->GetProperty('C_Config_Ports_Control'); $com->Release(); $com=null; if($controlport) { setcookie ("wm_nonsslport", $controlport,time()+31536000); //1 year $otherconfig['NONSSLPORT']=$controlport; } } $vhost='http://'.str_replace(':'.$_SERVER['SERVER_PORT'],'',$_SERVER['HTTP_HOST']).':'.$otherconfig['NONSSLPORT']; //switch to non-ssl mode because JS variable passing header("location: $vhost".$_SERVER['PHP_SELF']."?id=".$id); exit; } else $vhost='http://'.$_SERVER['HTTP_HOST']; ?>