<%@ language = "JavaScript" %>
<% /*
    $Revision$
    $Modtime: 20-04-10 11:54 $
    File:               remote_login.asp
    Description:        A deeplink call to a remote site including login info. The term <login> in
                        the link will be replaced by the login of the user.
    Parameters:
       
    Context:            
    Note:
*/ %>
<%
  Response.Expires=0;
%>

<!-- #include file="../../appl/Shared/common.inc" -->

<%
var remoteUrl   = getQParam("remoteUrl", "");
var remote      = 0;

 sql = " SELECT PRS_PERSLID_OSLOGIN FROM PRS_PERSLID WHERE PRS_PERSLID_KEY = " + user_key;
 oRs = Oracle.Execute(sql);
 if (!oRs.eof) {
   remote = 1;
   remoteUrl = remoteUrl.replace("<login>", oRs(0).value);
   msg = "Een moment... U wordt doorgezet naar de site van de leverancier.";
 }
 else {
   msg = "U heeft hiervoor geen autorisatie.";
 }
%>
<html>
<body onload="remote=<%=remote%>;if(remote)window.open('<%=remoteUrl%>');">
<p><%=msg%></p>
</body>
</html>
