<%@ LANGUAGE="VBSCRIPT" %> <% function putPic(aDate,numDays,lang) if isDate(aDate) then rem http://small/IASDocs/ASPDocs/ref/vbs/vbscript/65.htm if datediff("d",aDate,now) < 15 then if lang=1 then putPic="" else putPic="" end if 'putPic=aDate & " - " & datediff("d",aDate,now) end if end if end function %> Types <%if (not isempty(request.querystring("typID")) and not isempty(request.querystring("lanID"))) then%> <% dim theTypeName dim TableHeading1 Set DataConnPaper = Server.CreateObject("ADODB.Connection") DataConnPaper.Open "PWD=;driver={Microsoft Access Driver (*.MDB)};dbq=\\yeti\web\IIS\c\cuwebsoft.com\db\db3.mdb" Set cmdTemp = Server.CreateObject("ADODB.Command") Set DataCommand1 = Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "SELECT DISTINCT Source.souName, Source.souWebSite, Source.typID, Source.souID, quizz.quiDate, quizz.quiShow,type.typnewperiod FROM Source, quizz,type WHERE quizz.quiShow = 'Oui' AND Source.souID = quizz.souID AND Source.typID = " & request.querystring("typID") & " AND type.typID = source.typID AND source.visible = true AND Source.lanID = " & request.querystring("lanID") & " order by quidate desc" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = DataConnPaper DataCommand1.Open cmdTemp, , 0, 1 Set cmdTemp3 = Server.CreateObject("ADODB.Command") Set DataCommand3 = Server.CreateObject("ADODB.Recordset") cmdTemp3.CommandText = "SELECT Type.typName,Type.typNameE FROM Type WHERE Type.typID = " & request.querystring("typID") cmdTemp3.CommandType = 1 Set cmdTemp3.ActiveConnection = DataConnPaper DataCommand3.Open cmdTemp3, , 0, 1 if not datacommand3.eof and not datacommand3.bof then theLang = request.querystring("lanID") if theLang =1 then 'french TableHeading1="Sources de type: " theTypeName = datacommand3("typName") else ' english TableHeading1="Sources of type: " theTypeName = datacommand3("typNameE") end if end if %> <%rem quizz.asp?souID=2&dt=6/25/97%>

Questionnaires: Cuweb!

<%do while not datacommand1.eof%> <%datacommand1.movenext%> <%loop%>
<%=TableHeading1%><%=theTypeName%>
&dt=<%=datacommand1("quiDate")%>"><%=datacommand1("souName")%> date: <%=datacommand1("quiDate")%><%=putPic(datacommand1("quidate"),0,theLang)%>
<%else response.write "Aucun type donné/Can't figure type of test..."%> <%end if%>