di seguito quello che ho fatto io
codice:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
Dim strUserAgent, arrSpiders, xSpid
strUserAgent = LCase(Request.ServerVariables("HTTP_USER_AGENT"))
dirottaSpider(strUserAgent)
function dirottaSpider(strUserAgent)
arrSpiders = Array ("teleport", "webcopier", "webzip", "ecatch", "openbot")
for xSpid = 0 to Ubound(arrSpiders)
if arrSpiders(xSpid) = strUserAgent then Response.Redirect("exit.htm")
next
end function
'If Session("login") then
%>
<html>
<head>
<script src="lib/prototype.js" type="text/javascript"></script>
<script src="src/scriptaculous.js" type="text/javascript"></script>
<link rel='stylesheet' type='text/css' href='stylenew.css'></link>
<script language='Javascript'>
var currentShow = "";
function showIt(id) {
var thisTitle = document.getElementById('title'+id);
var thisClose = document.getElementById('close'+id);
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.color = '#ffffff';
thisTitle.className = "activeTitle";
thisClose.style.display = 'block';
new Effect.SlideDown('details'+id);
currentShow = name;
}
function hideIt(id) {
var thisTitle = document.getElementById('title'+id);
var thisClose = document.getElementById('close'+id);
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.backgroundColor = '#000054';
//thisTitle.style.color = '#ffffff';
thisTitle.className = "";
thisClose.style.display = 'none';
new Effect.SlideUp('details'+id);
//currentShow = name;
}
</script>
<style type="text/css">
.piccolo {
font-family: Arial;
font-size: 12px;
}
</style>
</head>
<body bgcolor="#C7E2FA" class='' style="background-color: #FFFFFF">
<%
Dim objConn, strfigspConn, objRs, strsql, miocampo, cat
strfigspConn = Application("dbfigspconn")
strsql = "Select record.*, campi.* from record INNER JOIN campi ON record.ID_campo = campi.id order by record.id_campo, record.categoria, record.percorso, record.anno asc"
'strsql = "Select record.id_campo, record.categoria, record.percorso, record.colpi, record.anno, record.giocatore, campi.id, campi.id_spec, campi.campo, campi.id_provincia from record INNER JOIN campi ON record.ID_campo = campi.id group by record.id_campo, record.categoria, record.anno, record.giocatore, record.percorso, record.colpi order by record.id_campo, record.categoria, record.percorso, record.anno asc"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strfigspConn
Set objRs = Server.CreateObject("ADODB.Recordset")
set objRs = objConn.Execute(strsql)
'controlla per errori da solo
Response.write "<div align=center>"
Response.write "<table border='1' width='80%' cellpadding='2' cellspacing='2'>"
%>
<table width="50%" cellspacing='0' cellpadding='0' class='expTable'>
<%
mioCampo=""
Dim iCount
iCount = 1
Do while Not objRs.EOF
IF mioCampo<>objRs("campo") THEN
mioCampo=objRs("campo")
%>
<tr id='title4' class='title'>
<td width="90%" bgcolor="#C0C0C0" class='titleHeader' onclick="showIt(<%= icount %>);">
<nobr><%= objRs("campo") %></nobr>
</td>
<td width="5%" bgcolor="#C0C0C0" width='10%' valign='top'><div id='close4' style='display: none'>[img]closex.gif[/img])"/></div></td>
</tr>
<%
iCount = iCount + 1
end if
%>
<tr>
<td colspan='5'>
<div id='details4' style='display: none'>
<div class='moredetails'>
<table border="1"><tr><td>
funziona?
</td></tr></table>
<%
objRs.MoveNext
Loop
%>
</div>
</div>
</td></tr>
<%
Response.Write "</table></div>"
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
%>
</body>
</html>
Il codice comprenderebbe altri campi. Ma per provare a vedere se funzionava ho cominciato con questa parte.
Grazie mille