[Help] Как да оправя тея 2 модула да работят

Holder

New Member
Joined
Dec 27, 2010
Messages
434
Reaction score
43
Значи, предполагам те търсят в таблицата за тея резултати, но такава таблица няма, ако съм прав как да я създам, а ако не съм какъв е проблема, че не отброява нищо ?
Първия скрипт е за Devil Square, втория за Blood Castle

PHP:
<?php
$query = "select Top 20 CharacterName,Class,point from EVENT_INFO order by point desc";
$result = mssql_query($query);
echo '<table align="center" width="500" cellspacing="0" cellpadding="0" class="sort-table">
	<tr>
	<td colspan="6" class="news-head" style="text-align:center;">DS Ranking :: Points [Top 20]</td>
	</tr>
	<tr class="news-reset">
		<td align="center">Rank</td>
		<td align="center">Character</td>
		<td align="center">Class</td>
		<td align="center">Points</td>
	</tr>';
for($i=0;$i < mssql_num_rows($result);++$i)
{
$row = mssql_fetch_row($result);
$rank = $i + 1;

$class = mssql_fetch_row(mssql_query("Select Class From Character Where Name='".$row[0]."'"));

if ($class[0] == 0) { $class = "Dark Wizard"; }
elseif ($class[0] == 1) { $class = "Soul Master"; }
elseif ($class[0] == 2) { $class = "Grand Master"; }
elseif ($class[0] == 16) { $class = "Dark Knight"; }
elseif ($class[0] == 17) { $class = "Blade Knight"; }
elseif ($class[0] == 18) { $class = "Blade Master"; }
elseif ($class[0] == 32) { $class = "Elf"; }
elseif ($class[0] == 33) { $class = "Muse Elf"; }
elseif ($class[0] == 34) { $class = "High Elf"; }
elseif ($class[0] == 48) { $class = "Magic Gladiator"; }
elseif ($class[0] == 50) { $class = "Duel Master"; }
elseif ($class[0] == 64) { $class = "Dark Lord"; }
elseif ($class[0] == 65) { $class = "Lord Emperor"; }
elseif ($class[0] == 66) { $class = "Lord Emperor"; }
elseif ($class[0] == 80) { $class = "Summoner"; }
elseif ($class[0] == 81) { $class = "Bloddy Summoner"; }
elseif ($class[0] == 82) { $class = "Dimension Master"; }
elseif ($class[0] == 96) { $class = "Rage Fighter"; }
elseif ($class[0] == 98) { $class = "Fist Master"; }

echo"
<tr>
        <td align='center'>$rank</td>
        <td align='center'>$row[0]</td>
        <td align='center'>$class</td>
        <td align='center'>$row[2]</td>
        </tr>
";
}
?>
</table>

<table align="center" width="500" cellspacing="0" cellpadding="0" class="sort-table">
	<tr>
	<td colspan="6" class="news-head" style="text-align:center;">BC Ranking :: Points [Top 20]</td>
	</tr>
	<tr class="news-reset">
		<td align="center">Rank</td>
		<td align="center">Character</td>
		<td align="center">Points</td>
	</tr>
<?php
$query = mssql_query("SELECT top 20 CharacterName,Point from EVENT_INFO_BC order by Point desc");

for($i=0;$i < mssql_num_rows($query);++$i) {
$rank = $i+1;
$row = mssql_fetch_row($query);

if($i%2) { $colors = "#100c0d";} else { $colors="#232323"; }

echo"
<tr bgcolor='$colors'>
<td align='center'>$rank.</td>
<td align='center'>$row[0]</td>
<td align='center'>$row[1]</td>
</tr>";
}
?>
</table>
 
Last edited by a moderator: