Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 02.04.2005, 21:52   #1
mastery
Архивный участник
 
Join Date: Feb 2005
Posts: 159
Default guild status web page

if anybody could help create web guild status page in .php or .asp, i would be very happy )
my idea: there must be list of guilds, # of members for each, guild name, castle_id, agit_id (if itis possible - name of castle), and sorting by #of members or by pledge name..

i was trying to create in asp, but get errors..

<%



sub ListMoneybagsTop50
dim query
dim rs
dim gender
dim no

response.write " <table width='670' border='1' align='center' cellpadding='0' cellspacing='1' bordercolor='#CE923C'> " & _
" <tr align='center' valign='middle' height=25>" & _
" <td width='20'></td>" & _
" <td >Guild name</td>" & _
" <td ># of members</td>" & _
" <td >level</td>" & _
" <td width='25'>Alliance</td>" & _
" <td width='25'>Castle</td>" & _
" <td width='40'>Agit</td></tr>"

query = "SELECT TOP 100 user_data.char_name,user_data.char_id,TmpD.sumamou nt,user_data.pledge_id,pledge.pledge_id,pledge.nam e,pledge.alliance_id,pledge.agit_id,pledge.castle_ id,pledge.skill_level FROM (SELECT pledge_id, SUM(amount) AS sumamount FROM user_data WHERE builder = 0 GROUP BY pledge_id) TmpD INNER JOIN pledge ON TmpD.pledge_id = pledge.pledge_id ORDER BY name "
set rs = Server.CreateObject("ADODB.RECORDSET")
rs.open query, lin2world_conn, 1, 1
while not rs.eof
no = no + 1
response.write "<tr align='center' valign='middle'>"
response.write "<td>" & no & "" & "</td>"
response.write "<td>" & rs("name") & "</td>"
response.write "<td>" & sumamount & "</td>"

response.write "<td>" & rs("skill_level") & "</td>"
response.write "<td>" & rs("alliance_id") & "</td>"
response.write "<td>" & rs("Castle_id") & "</td>"
response.write "<td>" & rs("Agit_id") & "</td>"
response.write "</tr>"
rs.movenext
Wend
rs.close
set rs = nothing
response.write "</table>"
end sub

sub index_right
%>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">


<td align="center"><font color=black>Top 100 </font></td>
</tr>
<tr>
<td height="25">
<% call ListMoneybagsTop50 %>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<%
end sub
%>
mastery is offline  
Old 02.04.2005, 22:10   #2
torrentpimp
Архивный участник
 
Join Date: Mar 2005
Posts: 282
Default

should be able to edit our code for that easily.I'll see what we can come up with
torrentpimp is offline  
Old 03.04.2005, 10:25   #3
Dubie
Архивный участник
 
Join Date: Mar 2005
Posts: 133
Default

I will assume you have a working regisrter page that uses conn.asp
If not then I can not help out on PHP sry

Here it is for asp

Add this to stats.inc if you have one.
If not make one.
Add this to it
Code:
sub ListTopClans10
  dim query
  dim rs
  dim gender

  response.write " <table width='200' valign='middle' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='silver'>" & _
                 " <tr align='center' valign='middle' height=25>" & _
		 " <td align='center' valign='middle' width='100'>Clan Name</td>" & _
		 " <td align='center' valign='middle' width='100'>Clan Level</td></tr>"

  query = "SELECT TOP 25 skill_level,name,ruler_id FROM [pledge] WHERE name <> 'GameMasters' ORDER BY skill_level DESC"
  set rs = Server.CreateObject("ADODB.RECORDSET")
  rs.open query, lin2world_conn, 1, 1
  while not rs.eof
	response.write "<tr align='center' valign='middle'>" 
	response.write   "<td align='center' valign='middle' width='100'>" & rs("name") & "</td>"
	response.write   "<td align='center' valign='middle' width='100'>" & rs("skill_level") & "</td>"
	response.write "</tr>"
	rs.movenext
  Wend
  rs.close
  set rs = nothing  
  response.write "</table>"
end sub
Now make a asp page and add this to it.
Code:
<body bgcolor="#292C21" style="BODY" text="#C1BDB0" topmargin="0">
<table align="center" width="400"><td align="center">
<% call ListTopClans10 %></td></table>
</body>

The WHERE name <> 'GameMasters'
That how we have it set up so only the players clans show up on list.
This will atleast get you a working list and you can edit and build from there.

You can edit all you want.
Hope that helps out.

Thanks for your time,
Dubie
Dubie is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 16:53.