<%@ Language=VBScript %> <% ' The following is the code for the scrolling news ticker. Dim sTxt, sHtml1, sHtml2, sHtml3, sHtml4, sHtml5, sHtml6, sHtml7, strSQL Set RsGuestList = Server.CreateObject ("ADODB.Recordset") RsGuestList.ActiveConnection = OBJdbConnection RsGuestList.CursorType = 1 RsGuestList.LockType = 1 RsGuestList.Open "select * from news order by NewsDate DESC" sHtml1 = "

" sHtml2 = "" sTxt = sTxt & sHtml1 & sHtmlDate & "
" & sHtml2 & _ RsGuestList("NewsID") & sHtml4 & sHtml6 & RsGuestList("NewsTitle") & sHtml7 RsGuestList.movenext loop end if %> <% Set Rsnews = Server.CreateObject ("ADODB.Recordset") Rsnews.ActiveConnection = OBJdbConnection Rsnews.CursorType = 1 Rsnews.LockType = 3 if Request.QueryString("ID")<>"" then sqlstring="SELECT news.*, news.NewsID FROM news WHERE (((news.NewsID)="&request.QueryString("ID")&"));" else sqlstring="SELECT news.NewsID, news.* FROM news ORDER BY news.NewsID DESC;" end if Rsnews.Open sqlstring %> <% '============ Random Images Function ======================================================= Function RandomImage(strPath,strDefault) On Error Resume Next Randomize Timer Dim objFSO, objFolder, objFiles, objFile Dim strFiles, strImages, strPhysical, strFile Const strValid = ".gif.jpg.png.swf" If Right(strPath,1) <> Chr(47) Then strPath = strPath & Chr(47) strPhysical = Server.MapPath(strPath) Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(strPhysical) Set objFiles = objFolder.Files For Each objFile in objFiles strFile = LCase(objFile.Name) If Instr(strValid,Right(strFile,4)) Then strFiles = strFiles & strFile & vbTab End If Next strImages = Split(strFiles,vbTab) If UBound(strImages) > 1 Then RandomImage = strPath & strImages(Int(Rnd(1)*UBound(strImages))) Else RandomImage = strDefault End If End Function %> DeCastro Tours, your gateway to Egypt .... www.decastrotours.com

shadow

home

privacy

sitemap
 
 
 
<%=sTxt%>

 

News
<%if Request.QueryString("ID")<>"" then%> <%=Rsnews("NewsTitle")%>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<%=Rsnews("NewsText")%> <% else %>
<% dim is_news is_news=0 while not Rsnews.EOF is_news=is_news+1 %> " style="text-decoration: none"><%=Rsnews("NewsTitle")%>
<%Rsnews.MoveNext wend if is_news=0 then %> There is no current news in Decastro system <% end if end if %>