Qualcuno sa aiutarmi nel capire cosa c'è che non va in questo codice??
<div id="content">
<%
var nickname=Session("nickname");
var con;
var conString;
con = Server.CreateObject("ADODB.Connection");
conString = "Provider=Microsoft.Jet.OLEDB.4.0; "
+ "Data Source=" +Server.MapPath("payments.mdb");
con.Open(conString);
if(Session("nickname")==null){
Response.write("<p>Questa pagina è riservata ai soli utenti che hanno effettuato un login valido!!!!!</p>");
}else{
var rst;
var sSQLString;
rst = Server.CreateObject("ADODB.Recordset");
sSQLString = " Select * From users Where nick='cash'";
rst = con.Execute(sSQLString);
var idcash=new String(rst("user_id"));
sSQLString = " Select * From users Where nick='"+nickname+"'";
rst = con.Execute(sSQLString);
var idnickname=new String(rst("user_id"));
sSQLString = " Select * From operations Where src='"+idcash+"' And dst='"+idnickname+"'";
rst = con.Execute(sSQLString);
if(rst.EOF){
Response.write("<p>NESSUN DEPOSITO</p>");
}
else{
Response.write("<p>DEPOSITI</p>");
%>
<table border=1>
<%
Response.write("<tr><th>numero_operazione</th><th>importo_pagamento</th></tr>");
while (!rst.EOF) {
Response.write("<tr><td>"+rst("oper_id")+"</td><td>"+rst("amount")+"</td></tr>");
rst.MoveNext( );
}
Response.write("</table>");
}
rst.Close();
con.Close();
rst = null;
con = null;
}
%>
<div id="content">
<%
var nickname=Session("nickname");
var con;
var conString;
con = Server.CreateObject("ADODB.Connection");
conString = "Provider=Microsoft.Jet.OLEDB.4.0; "
+ "Data Source=" +Server.MapPath("payments.mdb");
con.Open(conString);
if(Session("nickname")==null){
Response.write("<p>Questa pagina è riservata ai soli utenti che hanno effettuato un login valido!!!!!</p>");
}else{
var rst;
var sSQLString;
rst = Server.CreateObject("ADODB.Recordset");
sSQLString = " Select * From users Where nick='cash'";
rst = con.Execute(sSQLString);
var idcash=new String(rst("user_id"));
sSQLString = " Select * From users Where nick='"+nickname+"'";
rst = con.Execute(sSQLString);
var idnickname=new String(rst("user_id"));
sSQLString = " Select * From operations Where src='"+idcash+"' And dst='"+idnickname+"'";
rst = con.Execute(sSQLString);
if(rst.EOF){
Response.write("<p>NESSUN DEPOSITO</p>");
}
else{
Response.write("<p>DEPOSITI</p>");
%>
<table border=1>
<%
Response.write("<tr><th>numero_operazione</th><th>importo_pagamento</th></tr>");
while (!rst.EOF) {
Response.write("<tr><td>"+rst("oper_id")+"</td><td>"+rst("amount")+"</td></tr>");
rst.MoveNext( );
}
Response.write("</table>");
}
rst.Close();
con.Close();
rst = null;
con = null;
}
%>