<%@LANGUAGE="VBSCRIPT"%> <% OPTION EXPLICIT %> Futbol Club Encamp
   
 

 
   
 
 
" & vbCRLF Else objRS.AbsolutePosition = intPosition 'if necessary, check for blank field values and print blank cell If objRS.Fields("Ident") = "" Then Response.Write "" & vbCRLF Else If objRS.Fields("Ident") = 1 then Response.Write "" & vbCRLF Response.Write "" & vbCRLF End If End If End Sub %> <% dim i dim cellString dim dbConn, sqlstr, results 'open ADO connection Set dbConn = Server.CreateObject("ADODB.Connection") 'dbConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../Data/fc_encamp.mdb") '## MS Access 2000 on Brinkster dbConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\bases\futbolclubencamp\fc_encamp.mdb;User Id=admin;Password=;" '## MS Access 2000 on Brinkster sqlstr = "SELECT Ident,Lliga FROM lligues WHERE Ident >= 4 ORDER BY Ident ASC;" Set results = dbConn.Execute(sqlstr) 'test for data if results.eof then response.write("No hem trobat cap lliga a la base de dades.") 'begin formatting else %>
<% Const adOpenStatic = 3 Const adCmdText = &H0001 Const TITLE = "Lligues" dim objRS 'Recordset object dim objRS2 'Recordset object dim strSQL 'SQL string dim strSQL2 'SQL string 2 dim intSize 'user defined dimension of table '(could be number of rows or cols) dim intOtherSize 'other dimension of table '(could be number of rows or cols) dim strLayoutType 'whether intSize refers to (C)olumns or (R)ows dim strOrientation 'direction of output: (V)ertical or (H)orizontal dim intNumRecs 'number of records in the database dim intNumCols 'number of columns in table dim intNumRows 'number of rows in table dim intRowIndex 'placeholder for current row dim intColIndex 'placeholder for current column dim intPosition 'placeholder for current record %> <% Dim Productes__MMColParam Productes__MMColParam = "1" if (Request.QueryString("cat") <> "") then Productes__MMColParam = Request.QueryString("cat") %> <% 'create recordset object Set objRS = Server.CreateObject("ADODB.Recordset") 'connect via ODBC 'objRS.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../Data/fc_encamp.mdb") '## MS Access 2000 on Brinkster objRS.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\bases\futbolclubencamp\fc_encamp.mdb;User Id=admin;Password=;" '## MS Access 2000 on Brinkster 'or connect to database via OLEDB 'create recordset object strSQL = "SELECT TOP 2 Ident,Lliga " strSQL = strSQL & "FROM lligues " strSQL = strSQL & "ORDER BY Ident ASC;" 'execute SQL statement objRS.Open strSQL, ,adOpenStatic , , adCmdText %> <% If objRS.EOF And objRS.BOF Then %> No hem trobat cap lliga a la base de dades. <% else 'retrieve parameters intSize = 2 strOrientation = "H" strLayoutType = "C" Response.Write "
" & vbCrlf Response.Write "" & vbCRLF 'get the number of records in the database intNumRecs = objRS.RecordCount 'if size was not passed in then set size equal to the number of records If intSize = "" Then intSize = intNumRecs End If 'get other dimension of the table If intNumRecs Mod intSize = 0 Then intOtherSize = intNumRecs / intSize Else intOtherSize = Int((intNumRecs / intSize)) + 1 End If 'set variables for table size If strLayoutType = "C" Then intNumRows = intOtherSize intNumCols = intSize Else'If strLayoutType = "R" Then intNumRows = intSize intNumCols = intOtherSize End If 'loop thru table by row For intRowIndex = 1 To intNumRows Response.Write "" & vbCRLF Response.Write "" & vbCRLF If strOrientation = "V" Then intPosition = intRowIndex 'loop thru table by column For intColIndex = 1 To intNumCols PrintRecord intPosition = intPosition + intNumRows Next Else 'otherwise assume "H" 'loop thru table by column For intColIndex = 1 To intNumCols intPosition = intColIndex + ((intRowIndex - 1) * intNumCols) PrintRecord Next End If Response.Write "" & vbCRLF Next Response.Write "
 
" & vbCRLF Response.Write "
" & vbCrlf End If 'clean up and close the database objRS.Close Set objRS = Nothing sub PrintRecord 'if position is past EOF print a blank cell If intPosition > intNumRecs Then Response.Write "
  " else if objRS.Fields("Ident") = 2 then Response.Write "" end if end if Response.Write "" Response.Write objRS.Fields("Lliga") Response.Write "" Response.Write "
<% i = 1 do until results.eof cellString = "" if not i mod 4 = 0 then response.write(cellString) else response.write(cellString)%><% end if i = i + 1 results.movenext loop %>
" & results("Lliga") & "
<% end if %>
<% select case Request.Querystring("Lliga") case "" 'no hi ha una lliga triada Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" Response.Write "
 " & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "
" Response.Write "

Jugadors

" Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "

Si us plau, sel·leccioni una lliga per mostrar els jugadors de l'equip.

" & vbCrlf 'end of case "" case "1" dim my_Conn, rs, strSql_2 set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open MM_fc_encamp_STRING set rs = Server.CreateObject("ADODB.RecordSet") strSql_2 = "SELECT * FROM jugadors WHERE Ident = 1 ORDER BY ID ASC;" set rs = my_Conn.Execute (strSql_2) Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" Response.Write "
 " & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "
" Response.Write "

Jugadors - Lliga Nacional 1a Divisió

" Response.Write "
" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf do until rs.EOF dim intRowColor if intRowColor = 0 Then Response.Write "" intRowColor = 1 Else Response.Write "" intRowColor = 0 End if Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf rs.Movenext loop Response.Write "
Nom i CognomsDemarcacióData naixamentNacionalitat
" Response.Write "" Response.Write rs.Fields("Noms") & " " & rs.Fields("Cognoms") Response.Write "" Response.Write rs.Fields("Demarcacio") Response.Write "" Session.LCID = 1027 Response.Write rs.Fields("Naixement") Response.Write "" Response.Write rs.Fields("Nacionalitat") Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "

 

" & vbCrlf 'end of case "1" case "2" set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open MM_fc_encamp_STRING set rs = Server.CreateObject("ADODB.RecordSet") strSql_2 = "SELECT * FROM jugadors WHERE Ident = 2 ORDER BY ID ASC;" set rs = my_Conn.Execute (strSql_2) Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" Response.Write "
 " & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "
" Response.Write "

Jugadors - Lliga Nacional Futbol Sala 1a Divisió

" Response.Write "
" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf do until rs.EOF if intRowColor = 0 Then Response.Write "" intRowColor = 1 Else Response.Write "" intRowColor = 0 End if Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf rs.Movenext loop Response.Write "
Nom i CognomsDemarcacióData naixamentNacionalitat
" Response.Write "" Response.Write rs.Fields("Noms") & " " & rs.Fields("Cognoms") Response.Write "" Response.Write rs.Fields("Demarcacio") Response.Write "" Session.LCID = 1027 Response.Write rs.Fields("Naixement") Response.Write "" Response.Write rs.Fields("Nacionalitat") Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "

 

" & vbCrlf 'end of case "2" case "4" set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open MM_fc_encamp_STRING set rs = Server.CreateObject("ADODB.RecordSet") strSql_2 = "SELECT * FROM jugadors WHERE Ident = 4 ORDER BY ID ASC;" set rs = my_Conn.Execute (strSql_2) Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" Response.Write "
 " & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "
" Response.Write "

Jugadors - Benjamins

" Response.Write "
" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf do until rs.EOF if intRowColor = 0 Then Response.Write "" intRowColor = 1 Else Response.Write "" intRowColor = 0 End if Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf rs.Movenext loop Response.Write "
Nom i CognomsDemarcacióEdatNacionalitat
" Response.Write "" Response.Write rs.Fields("Noms") & " " & rs.Fields("Cognoms") Response.Write "" Response.Write rs.Fields("Demarcacio") Response.Write "" Session.LCID = 1027 Response.Write rs.Fields("Naixement") Response.Write "" Response.Write rs.Fields("Nacionalitat") Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "

 

" & vbCrlf 'end of case "4" case "5" set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open MM_fc_encamp_STRING set rs = Server.CreateObject("ADODB.RecordSet") strSql_2 = "SELECT * FROM jugadors WHERE Ident = 5 ORDER BY ID ASC;" set rs = my_Conn.Execute (strSql_2) Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" Response.Write "
 " & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "
" Response.Write "

Jugadors - Infantils

" Response.Write "
" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf do until rs.EOF if intRowColor = 0 Then Response.Write "" intRowColor = 1 Else Response.Write "" intRowColor = 0 End if Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf rs.Movenext loop Response.Write "
Nom i CognomsDemarcacióEdatNacionalitat
" Response.Write "" Response.Write rs.Fields("Noms") & " " & rs.Fields("Cognoms") Response.Write "" Response.Write rs.Fields("Demarcacio") Response.Write "" Session.LCID = 1027 Response.Write rs.Fields("Naixement") Response.Write "" Response.Write rs.Fields("Nacionalitat") Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "

 

" & vbCrlf 'end of case "5" case "6" set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open MM_fc_encamp_STRING set rs = Server.CreateObject("ADODB.RecordSet") strSql_2 = "SELECT * FROM jugadors WHERE Ident = 6 ORDER BY ID ASC;" set rs = my_Conn.Execute (strSql_2) Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" Response.Write "
 " & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "
" Response.Write "

Jugadors - Al·levins

" Response.Write "
" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf do until rs.EOF if intRowColor = 0 Then Response.Write "" intRowColor = 1 Else Response.Write "" intRowColor = 0 End if Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf Response.Write "" & vbCrlf rs.Movenext loop Response.Write "
Nom i CognomsDemarcacióEdatNacionalitat
" Response.Write "" Response.Write rs.Fields("Noms") & " " & rs.Fields("Cognoms") Response.Write "" Response.Write rs.Fields("Demarcacio") Response.Write "" Session.LCID = 1027 Response.Write rs.Fields("Naixement") Response.Write "" Response.Write rs.Fields("Nacionalitat") Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "
" & vbCrlf Response.Write "

 

" & vbCrlf 'end of case "6" end select %>