<!--#include file="guestheader.asp" -->
<!--#include file="guestmenu.asp" -->
<script type="text/javascript">
function popup(send)
{
window.open('medcon.asp?ids='+send,'conference','width=800,height=600,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');
}
</script>
<td class="f2">
<%
Dim sql,rec,i,bg
sql="select * from news "
Set rec=Server.CreateObject("ADODB.Recordset")
rec.open sql,con
%>
<table width="738" border="1" align="center">
<th colspan="2">
<%
i=0
While Not rec.EOF
i=i+1
If i Mod 2 = 0 Then
bg="#99ffcc"
Else
bg="#ccffff"
End if
%>
<tr bgcolor="<%=bg%>" >
<td width="150"><%=rec.fields("ddate").value%></td>
<td width="572"><a href="javascript:popup(<%=rec.fields("newsid").value%>);" ><%=rec.fields("title").value%></td>
</tr>
<%
rec.movenext
wend
%>
</table>
</td>
</tr>
</table>
<!--#include file="footer.asp" -->
Code (medcon.asp)
<!--#include file="connect.asp" -->
<html>
<head>
<title>Medical Conference</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
dim strsql,rec
strsql="SELECT * FROM news where newsid='" & send &"' "
Set rec=con.execute(strsql)
If Not rec.EOF then
%>
<table>
<tr>
<td><%=rec.fields("title").value%></td>
<td><%=rec.fileds("ddate").value%></td>
</tr>
</table>
<%
End if
%>
</body>
</html>
Code (connect.asp)
<%
Session.CodePage="65001"
dim con
set con=Server.CreateObject("ADODB.Connection")
con.open "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=localhost; UID=root; pwd=admin; database=med; CHARSET=utf8;stmt=set names 'utf8';"
%>