<%
Set adoCon1 = Server.CreateObject("ADODB.Connection")
Set objrst1 = Server.CreateObject("ADODB.Recordset")
adoCon1.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\boswinfs02\home\users\web\b2160\ez.alimoafi\db\Maghalat.mdb"
strSQL1 = "SELECT * FROM Article where Act=on order by id desc"
objrst1.Open strSQL1, adoCon1 , 3 , 3
RecFind = objrst1.RecordCount
IF RecFind > 0 THEN
objrst1.MoveFirst
%>
<%
Dim adoCon
Dim objrst
Dim strSQL
Dim RecFind
strSQL = "SELECT * FROM News where TopTitr=on"
objrst.Open strSQL, adoCon , 3 , 3
RecFind = objrst.RecordCount
IF RecFind > 0 THEN
objrst.movefirst
%>
<%
END IF
objrst.close
%>
<%
strSQL = "SELECT * FROM News where TopMain=on"
objrst.Open strSQL, adoCon , 3 , 3
RecFind = objrst.RecordCount
IF RecFind = 1 THEN
objrst.movefirst
%>
<%
Dim ara(1000,11)
Dim Rec
Dim i
strSQL = "SELECT TOP 20 * FROM News where ((main=on) and (Show=on)) and (arch=off) order by id desc"
objrst.Open strSQL, adoCon , 3 , 3
Rec = objrst.RecordCount
IF Rec > 0 THEN
objrst.movefirst
i = 1
while not(objrst.EOF)
ara(i,0) = objrst("Visit")
ara(i,1) = objrst("id")
ara(i,2) = objrst("Time")
ara(i,3) = mid(objrst("Date"),9,2) & "/" & mid(objrst("Date"),6,2) & "/" & mid(objrst("Date"),3,2)
ara(i,4) = objrst("SubTitle")
ara(i,5) = objrst("Title")
ara(i,6) = objrst("Brief")
ara(i,7) = objrst("Content")
ara(i,8) = objrst("Main")
ara(i,9) = objrst("Arch")
ara(i,10) = objrst("Pic")
i = i + 1
objrst.MoveNext
WEND
END IF
objrst.close
FOR I = 1 TO Rec %>