"
end if
rs_mcd.movenext
wend
set rs_mcd = nothing
set cn_mcd = nothing
%>
<%
co = Request.QueryString("co")
If ( co <> "" ) AND ( Len( co ) = 3 ) Then
country = co
End If
lang = Request.QueryString("lang")
If ( lang = "" ) OR ( Len( lang ) <> 3 ) Then
lang = "eng"
End If
type_id = Request.QueryString("type")
If ( Not IsNumeric( type_id ) ) OR ( type_id = "" ) OR ( Len( type_id ) > 4 ) Then
type_id = 9999
End If
top = Request.QueryString("top")
If ( Not IsNumeric( top ) ) OR ( Len( top ) > 2 ) Then
top = 0
End If
If( ubound(country_array) > 4 ) Then ' Must be a call from a ResRep page. Show top 5 links only.
top = 5
rr_yes=1
End If
If( top = 0 ) Then
html_string = "
" & vbcrlf
html_string = html_string & "
"
Get_CO_Name( country )
html_string = html_string & "" & formal_name & " and the IMF " & vbcrlf & "" & vbcrlf
Get_max_date( country )
blurb = ReadBlurbFile( country )
'Aug 18, 2013-- To include nonpubsmt
nonpubsmt= ReadNonPubFile( country )
'Aug 28, 2013-- To include nonpubsmt updated date
lastupdate_exception = ReadModifiedDate ( country )
if((lastupdate_exception <> "" AND CDate(lastupdate_exception) > CDate(last_update) ) ) then
lastupdate_exception = FormatDateTime( ReadModifiedDate ( country ))
lastupdate_exception= MonthName(Month(lastupdate_exception)) & " " & Day(lastupdate_exception) & ", " & year(lastupdate_exception)
else
lastupdate_exception =""
end if
If (lastupdate_exception <> "") Then
html_string = html_string & "Updated " & lastupdate_exception & "
" & vbcrlf
End If
Call Create_FSAP_links(country)
Call Create_Links( country, lang, pn, querysize )
html_string = html_string & "
" & vbcrlf
html_string = html_string & "
" & co_links_str & "
" & vbcrlf
If( type_id = 9999 ) Then
If( top > 0 ) Then
sSQL = "Get_CO_Data_by_Date_top_New '" & country & "', '" & lang & "', " & top
Else
sSQL = "Get_CO_Data_by_Date_top_New '" & country & "', '" & lang & "', " & querysize
End If
ElseIf( type_id = 9998 ) Then
sSQL = "Get_CO_Data_by_Type_New '" & country & "', '" & lang & "'"
Else
sSQL = "Get_CO_Data_Type_New '" & country & "', '" & lang & "', " & type_id
End If
Get_SQL_Data sSQL
set rs = nothing
set cn = nothing
html_string = html_string & "
" & page_links_str & "
"
html_string = html_string & "
" & vbcrlf
If( ubound(country_array) > 4 ) Then ' Must be a call from a ResRep page. Print the string
response.write html_string
End If
' -------------------------------------------------------------------------------------
' ------------------------------------ Subroutines ------------------------------------
' -------------------------------------------------------------------------------------
' ------------------------------------ Get_CO_Name ------------------------------------
Sub Get_CO_Name( country )
sSQL = "Get_CO_Name '" & country & "'"
rs.open sSQL
If Not rs.eof Then
formal_name = rs.fields("country")
End If
rs.close
End Sub
' ------------------------------------ ReadBlurbFile ------------------------------------
Private Function ReadBlurbFile( co )
Const ForReading = 1, ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
'Set f = fso.OpenTextFile("d:\htdocs\external\country\" & co & "\includes\blurb.txt", ForReading)
'Nov 9 2016, added a logic for EGY
if (co ="EGY") then
Set f = fso.OpenTextFile(Server.MapPath("\") & "\external\country\" & co & "\includes\blurb.txt", ForReading)
else
Set f = fso.OpenTextFile(Server.MapPath("\") & "\external\country\" & co & "\includes\blurb.txt", ForReading)
end if
ReadBlurbFile = f.ReadAll
End Function
' ------------------------------------ ReadLastUpdatedExceptionFile ------------------------------------
Private Function ReadModifiedDate( co )
Dim fs,f
Set fs=CreateObject("Scripting.FileSystemObject")
Set f=fs.GetFile(Server.MapPath("\") & "\external\country\" & co & "\includes\nonpub-stmt.txt")
ReadModifiedDate = f.DateLastModified
End Function
' ------------------------------------ ReadNonPubFile ------------------------------------
Private Function ReadNonPubFile( co )
Const ForReading = 1, ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Server.MapPath("\") & "\external\country\" & co & "\includes\nonpub-stmt.txt", ForReading)
ReadNonPubFile = f.ReadAll
End Function
' ------------------------------------ DiffADate ------------------------------------
Function DiffADate( theDate )
Dim Diff
Diff = DateDiff( "d", theDate, Now )
If Diff <= 10 Then
DiffADate = ""
Else
DiffADate = ""
End If
If( ubound(country_array) > 4 ) Then ' Must be a call from a ResRep page. Don't show new gif.
DiffADate = ""
End If
If( InStr( 1, url_str, "external/np/sec/pr/2013/pr13329.htm", 0 ) > 0 ) Then
DiffADate = ""
End If
If( InStr( 1, url_str, "external/pubs/cat/longres.aspx?sk=40923.0", 0 ) > 0 ) Then
DiffADate = ""
End If
If( InStr( 1, url_str, "external/pubs/cat/longres.aspx?sk=43962.0", 0 ) > 0 ) Then
DiffADate = ""
End If
End Function
' ------------------------------------ Get_max_date ------------------------------------
Sub Get_max_date( country )
Dim theMonth, theDay
sSQL = "Get_CO_Last_Updated_New '" & country & "', '" & lang & "'"
rs.open sSQL
If Not rs.eof Then
last_update = rs.fields("LAST_UPDATE")
Else
last_update = Now
End If
rs.close
If Month(last_update) < 10 then
theMonth = "0" & Month(last_update)
Else
theMonth = Month(last_update)
End If
If Day(last_update) < 10 then
theDay = "0" & Day(last_update)
Else
theDay = Day(last_update)
End If
mdate = year(last_update) & "-" & theMonth & "-" & theDay
If( mdate <> "--" ) Then
last_update = MonthName(Month(last_update)) & " " & Day(last_update) & ", " & year(last_update)
End If
mdate = ""
End Sub
' ------------------------------------ Create_type_links ------------------------------------
Sub Create_type_links( country, lang, href_type )
Dim type_name
Dim other_category
co_links_str = co_links_str & "Show all items sorted by date "
sSQL = "Get_CO_Content_Count '" & country & "' ," & lang
rs.open sSQL
while not rs.eof
type_name = rs.fields("Type_Name")
if(type_name = "Other") Then
type_name = Replace( type_name, " ", " " )
other_category = "| " & type_name & " (" & rs.fields("Total") & ") "
Else
type_name = Replace( type_name, " ", " " )
co_links_str = co_links_str & "| " & type_name & " (" & rs.fields("Total") & ") "
End If
rs.movenext
wend
rs.close
If(len(FSAPlink) > 0) Then
other_category = FSAPlink & other_category
End If
If(len(other_category) > 0) Then
co_links_str = co_links_str & other_category
End If
co_links_str = co_links_str & "" & vbcrlf
End Sub
' ------------------------------------ Create_Paging_Links ------------------------------------
Sub Create_Paging_Links( country, lang, pn, querysize )
Dim recCount
sSQL = "Get_CO_Content_Count '" & country & "' ," & lang
rs.open sSQL
while not rs.eof
recCount = recCount + rs.fields("total")
rs.movenext
wend
rs.close
Dim MaxPages
if( recCount/pagesize > round( recCount/pagesize ) ) then
MaxPages = round( recCount/pagesize ) + 1
else
MaxPages = round( recCount/pagesize )
end if
'response.write recCount & " "
'response.write MaxPages & " "
if rr_yes=0 then
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
if( pn = 0 ) then
pnstr = "All pages"
else
pnstr = "Page " & pn & " of " & MaxPages
end if
page_links_str = page_links_str & "
" & pnstr & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
dim i
for i = 1 to MaxPages
if( int( pn ) = i ) then
page_links_str = page_links_str & i & " " & vbcrlf
else
if( i = 1 ) then
page_links_str = page_links_str & "" & i & " " & vbcrlf
else
page_links_str = page_links_str & "" & i & " " & vbcrlf
end if
end if
next
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
if( pn = 0 ) then
page_links_str = page_links_str & " Show All" & vbcrlf
else
page_links_str = page_links_str & " Show All" & vbcrlf
end if
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
page_links_str = page_links_str & "
"
end if
End Sub
' ------------------------------------ Create_Links ------------------------------------
Sub Create_Links( country, lang, pn, querysize )
If( Int( type_id ) = 9999 ) Then 'If sorted by Date, show link to sort by type.
Call Create_Paging_Links( country, lang, pn, querysize )
If( top = 0 ) Then
If(nonpubsmt <> "") Then
co_links_str = co_links_str & nonpubsmt & "
"
End If
co_links_str = co_links_str & blurb & "
"
co_links_str = co_links_str & page_links_str & " "
End If
ElseIf( Int( type_id ) = 9998 ) Then 'If sorted by Type, show links to content bookmark.
Call Create_type_links( country, lang, "#" )
Else
co_links_str = co_links_str & ""
co_links_str = co_links_str & "Show all items sorted by date " & vbcrlf
co_links_str = co_links_str & "Show all items sorted by type " & vbcrlf
co_links_str = co_links_str & "" & vbcrlf
End If
End Sub
' ------------------------------------ Get_SQL_Data ------------------------------------
Sub Get_SQL_Data( query )
Dim DateArray, This_Date, bgcolor, aname_counter, aname_string, last_type_id, title_found, PDate_string
title_found = 1
aname_counter = 0
rs.open query
bgcolor = "#FFFFFF"
while not rs.eof
If( Int( type_id ) = 9998 ) Then
If( last_type_id <> rs.fields("type_id") AND ( last_type_id <> "" ) ) Then
html_string = html_string & "
" & vbcrlf
End If
If( last_type_id <> rs.fields("type_id") ) Then
html_string = html_string & "
" & vbcrlf
rs.movenext
wend
rs.close
End Sub
%>
<%
Dim html_string_weo, cn_weo, rs_weo,rsinterim_weo
Dim DataArray(2)
Dim data_found
Dim country_array_weo, country_weo
Dim lastyeardata
Dim fyeardata
'The variable values below control the Year range of the data table, the title of the table and the link to the relevant WEO version. KKR
Dim FYear, LYear, WEOVersion, WEOURL, InterimFYear, InterimLYear, sql,interimData
interimData = "false"
FYear = 2017
LYear = FYear + 1
WEOVersion = "April 2017 WEO"
WEOURL = "/external/pubs/ft/weo/2017/01/index.htm"
'open connection and recordset objects
set cn_weo = server.createObject("ADODB.Connection")
set rs_weo = server.createObject("ADODB.Recordset")
set rsinterim_weo = server.createObject("ADODB.Recordset")
%>
<%
dim strConn_weo
'Commented by TCS
'strConn_weo = "Driver={SQL Server}; Server=prdinternetdb.IMF.ORG,5876; Database=weodbNewApr07; UID=weo_web_user; PWD=weouser1;"
'For Development
'strConn_weo = "Driver={SQL Server}; Server=prdinternetdb,5876; Database=weodbNewApr09; UID=weo_web_user; PWD=weouser1;"
'strConn_weo = "Driver={SQL Server}; Server=prdinternetdb,5876; Database=weodbNewOct15; UID=weo_web_user; PWD=weouser1;"
strConn_weo = "Driver={ODBC Driver 11 for SQL Server}; Server=prdinternetdb,5876; Database=weodbNewApr17; UID=weo_web_user; PWD=weouser1;"
%>
<%
cn_weo.open strConn_weo
rs_weo.activeconnection = cn_weo
rsinterim_weo.activeconnection = cn_weo
'Use the path of the script to get the country ISO Code.
country_page_req = Request.ServerVariables("SCRIPT_NAME")
If( InStr( 1, country_page_req, "/external", 1 ) = 0 ) Then
country_page_req = "/external" & country_page_req
End If
country_array_weo = split( country_page_req, "/", -1, 1 )
country_weo = country_array_weo(3)
co = Request.QueryString("co")
If ( co <> "" ) AND ( Len( co ) = 3 ) Then
country_weo = co
End If
if(interimData = "true") Then
'Added by TCS-Feb 3,2009-For GDP update
InterimFYear = 2016
InterimLYear = InterimFYear + 1
sql= "usp_sel_Interimdata '" & country_weo & "', 'Y" & InterimFYear & "', 'Y" & InterimLYear & "','NGDP_RPCH'"
rs_weo.open sql
while not (rs_weo.eof)
if (rs_weo.fields("firstyear")<> "" And rs_weo.fields("lastyear")<> "") then
FYear = InterimFYear
LYear = InterimLYear
interimData = "true"
end if
rs_weo.movenext
wend
End If
'below function from fsap.asp (automatically included at index.htm by getrightcol.asp include)
Call Create_FSAP_links(country)
if (strArtIV_found=1) Then
html_string_weo = html_string_weo & "Article IV Staff Reports
" & vbcrlf
end if
html_string_weo = html_string_weo & FSAPLeftlink&"
" & vbcrlf
if (interimData="true") then
html_string_weo = html_string_weo & " Source: World Economic Outlook Update (April 2017) " & vbcrlf
else
html_string_weo = html_string_weo & " Source: World Economic Outlook (April 2017) " & vbcrlf
html_string_weo = html_string_weo & " Please refer to more recent Press Release/Staff reports on this country for possible revisions." & vbcrlf
end if
html_string_weo = html_string_weo & "
" & vbcrlf
html_string_weo = html_string_weo & "
" & vbcrlf
html_string_weo = html_string_weo & "
" & vbcrlf
If( ( DataArray(0) <> "" AND DataArray(1) <> "" ) AND data_found = 1 ) Then
'response.write html_string_weo
Else
html_string_weo = ""
End If
set rs_weo = nothing
set cn_weo = nothing
set rsinterim_weo = nothing
Sub Get_WEO_Data( qtype, query )
data_found = 0
rsinterim_weo.open query
DataArray(0) = ""
DataArray(1) = ""
lastyeardata = ""
fyeardata = ""
while not rsinterim_weo.eof
data_found = 1
if ( CLng(Split(CStr(rsinterim_weo.fields("lastYear")), ".")(1)) = "0") then
lastyeardata = int(rsinterim_weo.fields("lastYear")) & ".0"
else
lastyeardata = Round(rsinterim_weo.fields("lastYear"),1)
end if
if ( CLng(Split(CStr(rsinterim_weo.fields("firstYear")), ".")(1)) = "0") then
fyeardata = int(rsinterim_weo.fields("firstYear")) & ".0"
else
fyeardata = Round(rsinterim_weo.fields("firstYear"),1)
end if
html_string_weo = html_string_weo & "
" & vbcrlf
if( isNumeric(rsinterim_weo.fields("firstYear")) ) then
DataArray(0) = int(rsinterim_weo.fields("firstYear"))
else
DataArray(0) = ""
end if
if( isNumeric(rsinterim_weo.fields("lastYear")) ) then
DataArray(1) = int(rsinterim_weo.fields("lastYear"))
else
DataArray(1) = ""
end if
rsinterim_weo.movenext
wend
rsinterim_weo.close
End Sub
%>
Jamaica and the IMF -- <%=pnstr%>
<%=mdate%>
Board Discussions
on <%=bc_country%>:
<%=bc_date_string%>
<%
end if
err.clear
'Added TCS on June 03, 2009 for MCD update
if(mcd_found=1 And country <> "tjk" and country <> "MRT" and country <> "mrt" and country <> "TJK" and country <> "LBN" and country <> "lbn" and country <> "AFG" and country <> "afg" and country <> "ARM" and country <> "arm" and country <> "DJI" and country <> "dji" and country <> "GEO" and country <> "geo" and country <> "IRQ" and country <> "irq" and country <> "JOR" and country <> "jor" and country <> "KGZ" and country <> "kgz" and country <> "MAR" and country <> "mar" and country <> "PAK" and country <> "pak" and country <> "TUN" and country <> "tun" and country <> "YEM" and country <> "yem" ) then
Response.write html_string_mcd
end if
%>
<%=html_string_weo%>
Jamaica: Financial Position in the Fund Transactions with the Fund
<%
on error resume next
err.clear
dim show_sdr
dim strConn_rms, rms_cn, cmd, oParam
dim P_CURR_NAME, P_EFF_DT, P_SDR_CURR, P_CURR_SDR, P_EFF_DT_PREV, P_SDR_CURR_PREV, P_CURR_SDR_PREV, P_ERR_MSG
strConn_rms = "DSN=RRSX_I;UID=rrsexwuser;PWD=ratesexwapp;"
set rms_cn = server.createObject("ADODB.Connection")
set cmd = server.createObject("ADODB.Command")
'rms_cn.open strConn_rms
rms_cn.open "RRSX_I", "rrsexwuser", "ratesexwapp"
cmd.ActiveConnection = rms_cn
cmd.CommandText = "{call RRS_WEB.PR_EXW_CTRY_SDRC_CSDR(?,?,?,?,?,?,?,?,?)}"
'cmd.CommandText = "PR_EXW_CTRY_SDRC_CSDR"
'cmd.CommandType=4
'cmd.Parameters.Refresh
Set OParam = cmd.CreateParameter("P_CTRY_CODE", 200, 1, 3, ucase(country))
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_CURR_NAME", 200, 2, 50)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_EFF_DT", 7, 2)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_SDR_CURR", 200, 2, 50)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_CURR_SDR", 200, 2, 50)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_EFF_DT_PREV", 7, 2)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_SDR_CURR_PREV", 200, 2, 50)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_CURR_SDR_PREV", 200, 2, 50)
Cmd.Parameters.Append OParam
Set OParam = cmd.CreateParameter("P_ERR_MSG", 200, 2, 50)
Cmd.Parameters.Append OParam
cmd.Execute
P_SDR_CURR="...."
P_CURR_SDR="...."
P_SDR_CURR_PREV="...."
P_CURR_SDR_PREV="...."
P_CURR_NAME=cmd.Parameters.Item("P_CURR_NAME").Value
P_ERR_MSG=cmd.Parameters.Item("P_ERR_MSG").Value
show_sdr=0
if isnull(P_ERR_MSG) and err.number=0 then
P_EFF_DT=monthname(month(cmd.Parameters.Item("P_EFF_DT").Value)) & " " & day(cmd.Parameters.Item("P_EFF_DT").Value) & ", " & year(cmd.Parameters.Item("P_EFF_DT").Value)
P_SDR_CURR=cmd.Parameters.Item("P_SDR_CURR").Value
if P_SDR_CURR="" or isnull(P_SDR_CURR) then
P_SDR_CURR="...."
end if
P_CURR_SDR=cmd.Parameters.Item("P_CURR_SDR").Value
if P_CURR_SDR="" or isnull(P_CURR_SDR) then
P_CURR_SDR="...."
end if
P_EFF_DT_PREV=monthname(month(cmd.Parameters.Item("P_EFF_DT_PREV").Value)) & " " & day(cmd.Parameters.Item("P_EFF_DT_PREV").Value) & ", " & year(cmd.Parameters.Item("P_EFF_DT_PREV").Value)
P_SDR_CURR_PREV=cmd.Parameters.Item("P_SDR_CURR_PREV").Value
if P_SDR_CURR_PREV="" or isnull(P_SDR_CURR_PREV) then
P_SDR_CURR_PREV="...."
end if
P_CURR_SDR_PREV=cmd.Parameters.Item("P_CURR_SDR_PREV").Value
if P_CURR_SDR_PREV="" or isnull(P_CURR_SDR_PREV) then
P_CURR_SDR_PREV="...."
end if
show_sdr=1
''''10/17/2005 Travis:To fix the empty SDR box problem
if P_SDR_CURR="...." and P_CURR_SDR="...." and P_SDR_CURR_PREV="...." and P_CURR_SDR_PREV="...." then
show_sdr=0
dim oMail
Set oMail = Server.CreateObject("CDO.Message")
oMail.From = "SDRRatesCountryPages@imf.org"
oMail.To = "aayyanar@imf.org"
oMail.Subject = "SDR Box is Empty - " & country & " " & now()
oMail.TextBody = ""
oMail.Send
Set oMail = nothing
end if
''''10/17/2005 Travis:To fix the empty SDR box problem
end if
%>
<%
rms_cn.close
set cmd=nothing
set rms_cn=nothing
%>
<%if show_sdr=1 then%>
<%
' --------------------------------------------------------------------------------------------
' --
' -- File: ContactEmailInc.asp
' -- Author: H.Tourpe
' -- Creation Date: 10/25/2004
' -- Scope: Provides an email address for each country. Format ISO3Contact@imf.org
' -- Called by: All the index.htm files under the country folders
' --
' --------------------------------------------------------------------------------------------
dim strCountryEmailAddress
strCountryEmailAddress = "You may contact us about " & formal_name & " and the IMF at "
strCountryEmailAddress = strCountryEmailAddress & ""
strCountryEmailAddress = strCountryEmailAddress & "Contact Us"
' country is a variable fed in from getrightcol.asp
strCountryEmailAddress = strCountryEmailAddress & ""
response.write "