<%@language = "javascript" %>
<% /*
    $Revision$
    $Id$

    File:           api_report.asp
    Description:
                    Levert een rapport uit de bookmarkstabel op
    Parameters:
    Context:
    Note:           http://sgf12/Facilitor5iWork/?fac_id=UWVA&API=REPORT&APIKEY=E0E1EA02E3264391&BOOKMARK=ABE45U8
*/

    THIS_FILE = "appl/api/api_report.asp";
%>
<!-- #include file="../Shared/common.inc"-->
<!-- #include file="../api/api.inc" -->

<%
    var API = new API_func();

    var BOOKMARK = getQParam("BOOKMARK", "");

    var transitParam = "&fac_id="+Session("customerId") + buildTransitParam(["API", "APIKEY", "BOOKMARK"]);

    var proto = (Request.ServerVariables("SERVER_PORT") == "443")?"https":"http";
    var sitenoroot = proto + "://" + Request.ServerVariables("SERVER_NAME");
    var site = sitenoroot + rooturl;

    var sql = "SELECT fac_bookmark_path"
            + "  FROM fac_bookmark"
            + " WHERE fac_bookmark_id = " + safe.quoted_sql(BOOKMARK);
    var oRs = Oracle.Execute(sql);
    if (oRs.Eof)
    {
        Response.Write("Bookmark niet gevonden");
        Response.End;
    }
    var url = oRs("fac_bookmark_path").Value;
    oRs.Close();

    //Server.Transfer("appl/prs/prs_phonebook_list.asp");
    Response.Redirect(site+url + "?1=1" + transitParam);
%>

