<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%> เคมีน่ารู้ สรรสาระทางเคมีเพื่อประชาชน <% if request("no") = "" then pageno =1 else pageno=request("no") end if%>


ปีที่ 1 ฉบับที่ 2
ตุลาคม - ธันวาคม 2545


วารสารเคมีน่ารู้
ปีที่ 1 ฉบับที่ 1
กรกฎาคม - กันยายน 2545

หน้าแรกกระดานสนทนาถาม / ตอบลิงค์ที่สำคัญคณะทำงาน

ตั้งคำถามใหม่
| กลับหน้าแรก

<% thmonth=array("ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.") ' ---- ส่วนติดต่อกับฐานข้อมูลเพื่อแสดงรายการคำถาม Set Conn=Server.CreateObject("ADODB.Connection") conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.mappath("aspboard.mdb") if request("keyword") <> "" then Sql="Select qtopic,qnumber,qname,qdate,nanswer from question where (Qtopic like '%"&request("keyword")&"%') or (Qnote like '%"&request("keyword")&"%') order by QNumber desc" else Sql="Select qtopic,qnumber,qname,qdate,nanswer from question order by QNumber desc" end if Set RS =Server.CreateObject("ADODB.Recordset") RS.open Sql,Conn,1,3 total=RS.Recordcount if total=0 then%> ยังไม่มีหัวข้อคำถามครับ <%else pagesize=20 totalpage=total\pagesize if (total mod pagesize) <> "0" then totalpage= totalpage+1 end if RS.Move pagesize*(pageno-1) a=1 if trim(pageno) <> trim(totalpage) then endrecord = pagesize else if (total mod pagesize)=0 then endrecord=20 else endrecord=(total mod pagesize) end if end if For a=1 to endrecord%> <%RS.MoveNext Next rs.close conn.close%>
<%if replace(left(rs("qdate"),10)," ","") = replace(formatdatetime(Dateadd("h",11,date),2)," ","") and rs("nanswer") = 0 then%> <%elseif rs("nanswer") <> 0 then%> <%else%> <%end if%> #<%=right("0000" & RS("QNumber"),5)%> " target="_blank"><%=RS("QTopic")%> จากคุณ <%=RS("QName")%> วันที่ <%=day(rs("qdate")) & " " & thmonth(month(rs("qdate"))-1) & " " & right(year(rs("qdate"))+543,2)%> ตอบ <%=RS("NAnswer")%> คน


ตั้งคำถามใหม่
| กลับหน้าแรก
     หน้า   <%For b=1 to totalpage%> <%=b%> <%Next%>
<%end if%>
download
ใบสมัครสมาชิก
วารสารเคมีน่ารู้

ติดต่อ WebMaster