<% if Request("Itemcode")="" or Request("compid")="" then Response.Redirect "default.asp" end if dim rsItem set rsItem=server.CreateObject("adodb.recordset") strsql="select * from ContentMaster where CompanyCode = '" & request("compid") & _ "' and itemcode='" & Request("Itemcode") & "' and DISABLEITEM='F'" & _ " and (UserType like '%" & session("usertype") & "%' or UserType='A')" rsItem.open strsql,objconn if rsItem.eof= true then Response.Redirect "inc/commoninc/error.asp?errortype=sec&Section=Access Authentication" end if rsItem.close set rsItem=nothing %> <%=application("Title")%> <% dim rskm,curdate,strsql,msg,rsdesc,rspic,rsfile,rslink,rssidelink,rs,rs2,rsCompany msg="" curdate=formatdatetime(date,2) set rsCompany=server.CreateObject("adodb.recordset") rsCompany.Open "select CompanyName from CompanyMaster where CompanyCode = '" & request("compid") & "'",objConn set rs2=server.CreateObject("adodb.recordset") strsql2="SELECT * from contentmaster WHERE CompanyCode = '" & request("compid") & _ "' and DISABLEITEM='F' AND ParentItemCode=ItemCode and (UserType like '%" & session("usertype") & "%' or UserType='A') order by itemcode" rs2.Open strsql2,objConn 'Response.Write strsql2 set rs=server.CreateObject("ADODB.recordset") strsql="Select * from ContentMaster where CompanyCode='" & request("compid") & "' and DISABLEITEM='F' and ItemCode ='" & trim(Request("itemcode")) & "'" rs.Open strsql,objConn 'Response.Write strsql set rskm=server.CreateObject("ADODB.recordset") strsql="Select * from ContentDetail where CompanyCode='" & request("compid") & "' and ItemCode ='" & trim(Request("itemcode")) & "'" rskm.Open strsql,objConn if (rskm.BOF and rskm.EOF) then msg="No data is currently avaliable for " + rs("ItemName") set rsdesc=server.CreateObject("ADODB.recordset") strsql="Select * from ContentDetail where CompanyCode='" & request("compid") & "' and ItemCode ='" & trim(Request("itemcode")) & "' and InformationType='Description'" rsdesc.Open strsql,objConn set rspic=server.CreateObject("ADODB.recordset") strsql="Select * from ContentDetail where CompanyCode='" & request("compid") & "' and ItemCode ='" & trim(Request("itemcode")) & "' and InformationType='Picture'" rspic.Open strsql,objConn set rsfile=server.CreateObject("ADODB.recordset") strsql="Select * from ContentDetail where CompanyCode='" & request("compid") & "' and ItemCode ='" & trim(Request("itemcode")) & "' and InformationType='File'" rsfile.Open strsql,objConn set rslink=server.CreateObject("ADODB.recordset") strsql="Select * from ContentDetail where CompanyCode='" & request("compid") & "' and ItemCode ='" & trim(Request("itemcode")) & "' and InformationType='File Link'" 'Response.write strsql rslink.Open strsql,objConn set rssidelink=server.CreateObject("ADODB.recordset") 'if mid(rs("definitioncode"),1,1)="T" then ' strsql="Select * from ContentMaster where CompanyCode='" & request("compid") & "' and DISABLEITEM='F' and ParentItemCode ='" & trim(rs("parentitemcode")) & "' " 'else strsql="Select * from ContentMaster where CompanyCode='" & request("compid") & "' and DISABLEITEM='F' and ParentItemCode ='" & trim(Request("itemcode")) & "' and (UserType like '%" & session("usertype") & "%' or UserType='A') order by itemname" 'end if rssidelink.Open strsql,objConn 'Code to create level hierarchy.... dim ItemC,rsLevel1,rsLevel2,NewItem(),k,var1, rslevel3,NewCode() ItemC=trim(Request("ItemCode")) strsql="Select * from ContentMaster where CompanyCode='" & request("compid") & "' and DISABLEITEM='F' and ItemCode ='" & ItemC & "'" set rsLevel1=server.CreateObject("ADODB.Recordset") rsLevel1.Open strsql,objConn set rsLevel3=server.CreateObject("ADODB.Recordset") strsql = "select mainlevel,terminatinglevel from companymaster where CompanyCode='" & request("compid") & "'" 'Response.Write strsql rslevel3.Open strsql,objConn 'Response.Write rslevel3("mainlevel") 'Response.Write rslevel3("terminatinglevel") redim newitem(cint(rslevel3("mainlevel"))+cint(rslevel3("terminatinglevel"))) redim NewCode(cint(rslevel3("mainlevel"))+cint(rslevel3("terminatinglevel"))) k=0 if rslevel1.eof = false then newitem(k)=trim(rslevel1("ItemName")) newcode(k)=trim(rslevel1("ItemCode")) k=k+1 'Response.Write rslevel1("ItemName") + ">" ItemC=trim(rslevel1("ParentItemCode")) DefCode=trim(rsLevel1("definitioncode")) else response.Redirect "inc/commoninc/error.asp?Section=Content Management" end if set rsLevel2=server.CreateObject("ADODB.Recordset") do while DefCode <> "D001" strsql="Select * from ContentMaster where CompanyCode='" & request("compid") & "' and DISABLEITEM='F' and ItemCode ='" & ItemC & "'" 'Response.Write strsql rsLevel2.Open strsql,objConn if not(rsLevel2.BOF and rsLevel2.EOF) then NewItem(k)=trim(rsLevel2("ItemName")) NewCode(k)=trim(rsLevel2("ItemCode")) 'Response.Write NewItem(k) + ">" ItemC=trim(rslevel2("ParentItemCode")) DefCode=trim(rsLevel2("definitioncode")) k=k+1 end if rsLevel2.Close loop 'Code ends here.... %>
">
<% if ((msg <> "") and (rssidelink.BOF and rssidelink.EOF)) then%> <%elseif ((msg <> "") and (not(rssidelink.BOF and rssidelink.EOF))) then%> <%do while not(rssidelink.EOF) if not(rssidelink("ItemCode") = rssidelink("ParentItemCode")) then%> <%end if rssidelink.MoveNext loop%> <%else%> <%else 'Response.Write "exec flag " & rsfile("executeflag") response.write "" end if end if%> <%if not(rssidelink.BOF and rssidelink.EOF) then%> <%do while not(rssidelink.EOF) if not(rssidelink("ItemCode") = rssidelink("ParentItemCode")) then %> <%end if rssidelink.MoveNext loop %> <%end if%> <%strviewflag="Y" if stritemname="Overseas Market Situation" then if not(session("usertype")="IMA" or session("usertype")="SUS") then strviewflag="N" end if end if if stritemname="Upcoming Publication" then if not(session("usertype")="AUS" or session("usertype")="RUS" or session("usertype")="SUS") then strviewflag="N" end if end if if strviewflag ="Y" then dim FileName,fn,fn1,x if not(rslink.EOF and rslink.BOF) then rslink.MoveFirst do while not rslink.EOF%> <%rslink.MoveNext loop end if end if %> <%'start'%> <%end if%>
Home > <%var1=K-1 dim parentpath if Request.QueryString("directory")="Y" then Response.Write "" + "Directory" + "" Response.Write " > " elseif Request.QueryString("tender")="Y" then Response.Write "" + "Tenders" + "" Response.Write " > " elseif Request.QueryString("regn")="Y" then Response.Write "" + "Registration" + "" Response.Write " > " elseif Request.QueryString("dir")="y" then Response.Write "" + "Directory" + "" Response.Write " > " elseif Request.QueryString("admdir")="y" then Response.Write "" + "Directory" + "" Response.Write " > " elseif Request.QueryString("adv")="y" then Response.Write "" + "Manage Profiles" + "" Response.Write " > " end if for k=var1 to (lbound(newitem)+1) step -1 if parentpath ="" then parentpath=newitem(k) if Request.QueryString("mission")="Y" then Response.Write "" + "Mission Abroad" + "" Response.Write " > " else Response.Write "" + newitem(k) + "" Response.Write " > " end if ELSE Response.Write "" + newitem(k) + "" Response.Write " > " END IF next k=lbound(newitem) stritemname=newitem(k) Response.Write "" + newitem(k) + "" %>


<%=msg%>


<%=msg%>

&compid=<%=request("compid")%>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','/admin/images/arrow1.gif',1)"><%=rssidelink("ItemName")%>

<%if not(rspic.EOF and rspic.BOF) then%> <%'strpicfile = "usrdata/itpoadmin/" & parentpath & "" & rspic("FileName") strpicfile = rspic("FileName") %> <%end if%>
<%if not(rsfile.EOF and rsfile.BOF) then if rsfile("executeflag")<>"Y" or isnull(rsfile("executeflag")) or rsfile("executeflag")="" then%> <%if not(rsdesc.EOF and rsdesc.BOF) then%> <%if (rspic.EOF and rspic.BOF) then%> <%end if%> <%end if%> <%if not(rsfile.EOF and rsfile.BOF) then dim FileObj,TextFile, strfile set FIleObj=server.CreateObject("Scripting.FileSystemObject") 'strfile = Request.ServerVariables("APPL_PHYSICAL_PATH") & "usrdata\itpoadmin\itpopublication\" & rsfile("filename") strfile = Request.ServerVariables("APPL_PHYSICAL_PATH") & rsfile("filename") set TextFile=FileObj.OpenTextFile (strfile) while not Textfile.AtEndOfStream%> <%if (rspic.EOF and rspic.BOF) and (rsdesc.EOF and rsdesc.BOF) then%> <%end if%> <%Response.Write vbcrlf wend else%> <%end if%>
<%=rsdesc("Information")%>
<%=TextFile.ReadLine%>
" server.execute rsfile("filename") response.write "
<%if Request.QueryString("mission")="Y" then strpath="Desktops2.asp?itemcode=" & rssidelink("itemcode") & "&compid=" & request("compid") & "&mission=" & Request.QueryString("mission") else strpath="Desktops2.asp?itemcode=" & rssidelink("itemcode") & "&compid=" & request("compid") end if %> <%=rssidelink("ItemName")%>
<%'x= "usrdata/itpoadmin/itpopublication/" & server.urlencode(rslink("filename")) x= rslink("filename") if len(trim(rslink("Heading")))=0 then fn1=trim(rslink("FileName")) fn=InStrRev(fn1,"\",-1,1) FileName=mid(fn1,fn+1) %> " target="_new"> <%=FileName%>
<%else%> " target="_new"> <%=trim(rslink("Heading"))%>
<%end if%>
 
   
<% if rsCompany.State =1 then rsCompany.Close end if if rs.State =1 then rs.Close end if if rs2.State =1 then rs2.Close end if if rskm.State =1 then rskm.Close end if if rsdesc.State =1 then rsdesc.Close end if if rspic.State =1 then rspic.Close end if if rsfile.State =1 then rsfile.Close end if if rslink.State =1 then rslink.Close end if if rssidelink.State =1 then rssidelink.Close end if set rsCompany=nothing set rs=nothing set rs2=nothing set rskm=nothing set rsdesc=nothing set rspic=nothing set rsfile=nothing set rslink=nothing set rssidelink=nothing %>