<%
sqlConn.Open()
sqlComm = New SqlCommand("SELECT R_Esplorazione FROM Pianeti WHERE Proprietary = '"& Proprietary &"' And Is_Principal = 1 ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
Var_R_Esplorazione = r("R_Esplorazione")
End While
r.Close()
sqlConn.Close()
Dim There_Is_Mission = 0
Dim There_Is_Mission_X = 0
sqlConn.Open()
sqlComm = New SqlCommand("SELECT Missioni.Ritirata, Missioni.Dimensione_started, Missioni.Reame_started, Missioni.Paese_started, Missioni.Time_started, Missioni.Time_arrive, Missioni.Type_Mission, Missioni.Army_Of, Missioni.Id as Id_Missione, Pianeti.Proprietary FROM Missioni JOIN Pianeti ON Missioni.Dimensione_Arrive = Pianeti.Dimensione AND Missioni.Reame_Arrive = Pianeti.Reame AND Missioni.Paese_Arrive = Pianeti.Paese WHERE (Army_Of = '" + Proprietary + "' OR ( Missioni.Dimensione_Arrive = Pianeti.Dimensione AND Missioni.Reame_Arrive = Pianeti.Reame AND Missioni.Paese_Arrive = Pianeti.Paese) ) AND Type_Mission <> 'Assedio' AND Type_Mission <> 'Vendita' ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
Dim Lavoro = (DateDiff("s",r("Time_Started"), DateTime.Now))
Secondi_Ore(DateDiff("s",r("Time_Started"), r("Time_Arrive")) - Lavoro)
Dim Ora = Ore
If (r("Type_Mission") = "Rubare" AND r("Army_Of") = Proprietary) OR (r("Type_Mission") = "Attacco" AND r("Army_Of") = Proprietary) OR (r("Type_Mission") = "Attacco" AND r("Proprietary") = Proprietary AND Ora < Var_R_Esplorazione + 1) OR (r("Type_Mission") <> "Attacco" AND r("Type_Mission") <> "Rubare" AND (r("Army_Of") = Proprietary OR r("Proprietary") = Proprietary)) Then
There_Is_Mission = There_Is_Mission + 1
There_Is_Mission_X = 1
If There_Is_Mission = 1 Then
%>
|
<%=Read_File("inc\Lang\Languages.aspx",31)%>
|
|  
|
 
|
<%
End If
Counter = Counter + 1
Ore_Js = Ore
Minuti_Js = Minuti
Secondi_Js = Secondi
Dove = "Div_Missione" + CStr(Counter)
Redim Preserve arr_Id(Counter + 1)
Redim Preserve arr_Ore(Counter + 1)
Redim Preserve arr_Minuti(Counter + 1)
Redim Preserve arr_Secondi(Counter + 1)
arr_id(Counter) = Counter
arr_Ore(Counter) = Ore
arr_Minuti(Counter) = Minuti
arr_Secondi(Counter) = Secondi
Response.Write ("")
Response.Write ("| ")
If r("Army_Of") = Proprietary AND r("Type_Mission") = "Attacco" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",32))
End if
If r("Army_Of") <> Proprietary AND r("Type_Mission") = "Attacco" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",33))
End if
If r("Type_Mission") = "Rubare" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",34))
End if
If r("Type_Mission") = "Spionaggio" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",35))
End if
If r("Type_Mission") = "Rinforzi" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",36))
End if
If r("Type_Mission") = "Trasporto" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",37))
End if
If r("Type_Mission") = "Colonizzare" Then
Response.Write (Read_File("inc\Lang\Languages.aspx",38))
End if
|
|
<% If r("Army_Of") = Proprietary AND r("Type_Mission") <> "Rinforzi" AND r("Ritirata") <> "Y" Then %>
">
<%=Read_File("inc\Lang\Languages.aspx",39)%>
|
<% End If %>
<% If r("Army_Of") = Proprietary AND r("Type_Mission") = "Rinforzi" AND r("Dimensione_Started") = Dimensione AND r("Reame_Started") = Reame AND r("Paese_Started") = Paese AND r("Ritirata") <> "Y" Then %>
">
<%=Read_File("inc\Lang\Languages.aspx",39)%>
|
<% End If %>
<%
End If
End While
r.Close()
sqlConn.Close()
sqlConn.Open()
sqlComm = New SqlCommand("SELECT Missioni.Ritirata, Missioni.Time_started, Missioni.Time_arrive, Missioni.Type_Mission, Missioni.Army_Of, Missioni.Id as Id_Missione FROM Missioni WHERE Army_Of = '" + Proprietary + "' AND Type_Mission = 'Colonizzare' ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
Dim Lavoro = (DateDiff("s",r("Time_Started"), DateTime.Now))
Secondi_Ore(DateDiff("s",r("Time_Started"), r("Time_Arrive")) - Lavoro)
Dim Ora = Ore
There_Is_Mission = There_Is_Mission + 1
There_Is_Mission_X = 1
If There_Is_Mission = 1 Then
%>
|
<%=Read_File("inc\Lang\Languages.aspx",31)%>
|
|  
|
 
|
<%
End If
Counter = Counter + 1
Ore_Js = Ore
Minuti_Js = Minuti
Secondi_Js = Secondi
Dove = "Div_Missione" + CStr(Counter)
Redim Preserve arr_Id(Counter + 1)
Redim Preserve arr_Ore(Counter + 1)
Redim Preserve arr_Minuti(Counter + 1)
Redim Preserve arr_Secondi(Counter + 1)
arr_id(Counter) = Counter
arr_Ore(Counter) = Ore
arr_Minuti(Counter) = Minuti
arr_Secondi(Counter) = Secondi
Response.Write ("| "& r("Type_Mission") &" | ")
Response.Write (" | ")
If r("Type_Mission") <> "Rinforzi" AND r("Army_Of") = Proprietary AND r("Ritirata") <> "Y" Then
Response.Write (""& Read_File("inc\Lang\Languages.aspx",39) &" | ")
End If
Response.Write (" ")
End While
r.Close()
sqlConn.Close()
If There_Is_Mission_X = 0 Then
%>
|
<%=Read_File("inc\Lang\Languages.aspx",31)%>
|
|  
|
 
|
Non ci sono missioni in corso.
|
<%
End If
%>
|
 |
 |
|
 |
 |
<%
Dim Var_C_Statua = 0
sqlConn.Open()
sqlComm = New SqlCommand("SELECT C_Laboratorio, C_Caserma, C_Taglialegna, C_Tesoreria, C_Torture, C_Prigione, C_Taverna, C_Scuderia, R_Assedio, C_Mercato, C_Poligono_Tiro FROM Pianeti WHERE Dimensione = '"& Dimensione &"' AND Reame = '"& Reame &"' AND Paese = '"& Paese &"' ", sqlConn)
r = sqlComm.ExecuteReader()
While r.Read()
%>
 |
 |
 |
 |
|
 |
| |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
<% If r("C_Laboratorio") > 0 %> <% End If %> |
 |
 |
 |
|
 |
 |
<% If r("C_Caserma") > 0 %> <% End If %> |
 |
<% If r("C_Taglialegna") > 0 %> <% End If %> |
 |
<% If r("C_Tesoreria") > 0 %> <% End If %> |
 |
<% If r("C_Torture") > 0 %> <% End If %> |
<% If r("C_Prigione") > 0 %> <% End If %> |
<% If r("C_Taverna") > 0 %> <% End If %> |
 |
<% If r("C_Scuderia") > 0 %> <% End If %> |
 |
 |
 |
<% If r("R_Assedio") > 0 %> <% End If %> |
 |
 |
 |
 |
<% If r("C_Mercato") > 0 %> <% End If %> |
<% If Var_C_Statua > 0 %> <% End If %> |
|
 |
 |
<% If r("C_Poligono_Tiro") > 0 %> <% End If %> |
 |
 |
 |
|
|
 |
|
 |
<%
End While
r.Close()
sqlConn.Close()
%>
<%
Dim i
Dim Pre
For i = 1 To Counter
Ore_JS = arr_Ore(i)
Minuti_JS = arr_Minuti(i)
Secondi_JS = arr_Secondi(i)
Dove = "Div_Missione" + CStr(arr_id(i))
Pre = "M_"+CStr(arr_id(i))+"_"
'response.write (arr_Ore(i))
'response.write (arr_Minuti(i))
'response.write (arr_Secondi(i))
%>
<%
Next
%> |