Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 132 lines (104 sloc) 4.409 kb
b5498bb Kyle Neath Add all the codes
authored
1 <%@ Language=VBScript %>
2 <% Option Explicit %>
3 <!--#include file="include.asp"-->
4 <% Response.Buffer = True
5 Response.Expires = -1 %>
6
7
8 <%
9 Dim Timer1, Timer2, TotalTime
10
11 Timer1 = Timer()
12
13 Dim UserNameMM
14 UserNameMM = Request.Cookies("NightFire")("UserName")
15
16 Dim ConnMM
17
18 Set ConnMM = Server.CreateObject("ADODB.Connection")
19
20 ConnMM.ConnectionString="Provider=SQLOLEDB;User ID=sa;Password=Kt6261;Initial Catalog=warpspire"
21
22 ConnMM.Open
23
24 Dim RSGSMM, RSGIMM, RSDMMM, RSSMM
25
26 Set RSGSMM = Server.CreateObject("ADODB.Recordset")
27 Set RSSMM = Server.CreateObject("ADODB.Recordset")
28 Set RSGIMM = Server.CreateObject("ADODB.Recordset")
29 Set RSDMMM = Server.CreateObject("ADODB.Recordset")
30
31 RSGSMM.Open "SELECT * FROM GENERALSTATS WHERE UserName = '"&UserNameMM&"'", ConnMM, adOpenForwardOnly, adLockPessimistic
32 RSGIMM.Open "SELECT * FROM GENERALINFO WHERE UserName = '"&UserNameMM&"'", ConnMM, adOpenForwardOnly, adLockPessimistic
33 RSDMMM.Open "SELECT * FROM DONEMILITARY WHERE UserName = '"&UserNameMM&"'", ConnMM, adOpenForwardOnly, adLockPessimistic
34
35 'If RSGSMM.EOF = TRUE Then
36 'Response.Redirect "login.html"
37 'Else
38 'Response.Cookies("NightFire").Expires = DateAdd("h", 2, Now())
39 'End If
40
41 Dim PopulationMM, CivillianMM, MilitaryMM, LandMM, NetworthMM, CapitalMM, ElementXMM, EnergyMM, ManaMM, PlutoniumMM, AntimatterMM
42
43 PopulationMM = RSGSMM("Population")
44 CivillianMM = RSGSMM("Civillian")
45 MilitaryMM = RSGSMM("Military")
46 LandMM = RSGSMM("Land")
47 NetworthMM = RSGSMM("Networth")
48
49 RSGSMM.Close
50
51 Dim KingMM, ProtectionMM, NationMM, MinisterMM, Race, SystemTypeMM, SystemNumberMM, HealthMM, LastUpdateMM
52
53 NationMM = RSGIMM("Nation")
54 MinisterMM = RSGIMM("Minister")
55 Race = RSGIMM("Race")
56 SystemTypeMM = RSGIMM("SystemType")
57 SystemNumberMM = RSGIMM("SystemNumber")
58 HealthMM = RSGIMM("Health")
59 LastUpdateMM = RSGIMM("LastUpdate")
60 ProtectionMM = RSGIMM("Protection")
61 KingMM = RSGIMM("King")
62 If KingMM = "Yes" Then
63 MinisterMM = MinisterMM & " *ESR*"
64 End If
65
66 RSGIMM.Close
67
68 RSSMM.Open "SELECT * FROM SYSTEMS WHERE SystemNumber = "&SystemNumberMM, Conn
69 Dim SystemNameMM
70 SystemNameMM = RSSMM("SystemName")
71 RSSMM.Close
72
73 Dim InfantryMM, Elite1MM, Elite2MM, Elite3MM, TransportsMM, MagesMM, ProbesMM, AgentsMM, MoraleMM, BarracksSlotsMM, FactorySlotsMM, UsedBarracksSlotsMM, UsedFactorySlotsMM
74
75 InfantryMM = RSDMMM("Soldiers")
76 Elite1MM = RSDMMM("Elite1")
77 Elite2MM = RSDMMM("Elite2")
78 Elite3MM = RSDMMM("Elite3")
79 TransportsMM = RSDMMM("Transports")
80 MagesMM = RSDMMM("Mages")
81 ProbesMM = RSDMMM("Probes")
82 AgentsMM = RSDMMM("Agents")
83 MoraleMM = RSDMMM("Morale")
84 BarracksSlotsMM = RSDMMM("BarracksSlots")
85 FactorySlotsMM = RSDMMM("FactorySlots")
86 UsedBarracksSlotsMM = RSDMMM("UsedBarracksSlots")
87 UsedFactorySlotsMM = RSDMMM("UsedFactorySlots")
88
89 RSDMMM.Close
90
91 %>
92 <%
93
94
95 Dim Elite1Defense, Elite1Offense, Elite2Defense, Elite2Offense, Elite3Defense, Elite3Offense, Elite1NameMM, Elite2NameMM, Elite3NameMM, IncomeMM, ElementXIncomeMM, EnergyIncomeMM, ManaIncomeMM, PlutoniumIncomeMM, AntimatterIncomeMM, DPAMM, OPAMM, OffenceMM, DefenceMM, ModsOMM, ModsDMM
96 Dim RSStats
97 Set RSStats = Server.CreateObject("ADODB.Recordset")
98 RSStats.Open "SELECT Type, Race, Unit, Name, Offense, Defense FROM COSTS WHERE Type = 'Military' AND Race = '"&Race&"'", ConnMM, adOpenStatic
99 RSStats.Find "Unit = 'Elite1'"
100 Elite1NameMM = RSStats("Name")
101 Elite1Offense = RSStats("Offense")
102 Elite1Defense = RSStats("Defense")
103 RSStats.Find "Unit = 'Elite2'"
104 Elite2NameMM = RSStats("Name")
105 Elite2Offense = RSStats("Offense")
106 Elite2Defense = RSStats("Defense")
107 RSStats.Find "Unit = 'Elite3'"
108 Elite3NameMM = RSStats("Name")
109 Elite3Offense = RSStats("Offense")
110 Elite3Defense = RSStats("Defense")
111 RSStats.Close
112
113 IncomeMM = 10000
114 ElementXIncomeMM = 10000
115 EnergyIncomeMM = 10000
116 ManaIncomeMM = 10000
117 PlutoniumIncomeMM = 10000
118 AntimatterIncomeMM = 10000
119 ModsOMM = 0
120 ModsDMM = 0
121 DefenceMM = (Elite1MM * Elite1Defense) + (Elite2MM * Elite2Defense) + (Elite3MM * Elite3Defense) + InfantryMM
122 DefenceMM = (DefenceMM + (DefenceMM * ModsDMM) )\1
123 OffenceMM = (Elite1MM * Elite1Offense) + (Elite2MM * Elite2Offense) + (Elite3MM * Elite3Offense) + InfantryMM
124 OffenceMM = (OffenceMM + (OffenceMM * ModsOMM) )\1
125 DPAMM = (DefenceMM/LandMM)
126 OPAMM = (OffenceMM/LandMM)
127
128 If DateDiff("h", LastUpdateMM, Now()) >0 Then
129 Response.Redirect "update.asp?page=main"
130 End If
131 %>
Something went wrong with that request. Please try again.