[Help] Help for a module

MapTuH4y

New Member
Joined
Apr 29, 2010
Messages
1,113
Reaction score
180
Хора таблицата ми се казва "DrakeWeb_Bann_Characters " с колони: 'character' ,'reason' , 'banner' и 'time'
а ето ми го и банлиста. Ще ми кажете ли къде ми е грешката?



PHP:
<?
print '
<table class="sort-table" width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr><td colspan="5" align="left" class="text-title">Banned Characters</td></tr>
<tr>
<td align="center">Character</td>
<td align="center">Reason</td>
<td align="center">Banned from</td>
<td align="center">Time left untill unban</td>
</tr></thead>';


$chari = "SELECT * FROM character where CtlCode='1' order by name asc";
$chars = mssql_query($chari);
for($i=0;$i < mssql_num_rows($chars);++$i){
$rowa = mssql_fetch_array($chars);
if($i%2) { $colors = "#161616";} else { $colors="#100c0d"; }
$character = mssql_fetch_array(mssql_query("SELECT * FROM DrakEWeb_Bann_Character WHERE character='$rowa[character]' ORDER BY id desc"));

$charbantime = $character['time'];
$charbanend = $charbantime - time();
$time_left_a = decode_time( time(), $character[time], "Unbaning..." );


echo "
<tbody>
<tr bgcolor='$colors'>
<td align='center'>$rowa[character]</td>
<td align='center'><a class='helpLink' href='?' onclick=\"showHelpTip(event, 'Reason For Ban: <b>$character[reason]</b>',false); return false\">[info]</a></td>
<td align='center'>$character[banner]</td>
<td align='center'>$time_left_a</td>
</tr>
</tbody>";
}

print '</table><br />';

  	
?>
 
Ае де хора много ми трябва ;(
 
А няма ли да напишеш поне проблема. Ти си дал некви имена и некав код.
 
<?
print '
<table class="sort-table" width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr><td colspan="5" align="left" class="text-title">Banned Characters</td></tr>
<tr>
<td align="center">Character</td>
<td align="center">Reason</td>
<td align="center">Banned from</td>
<td align="center">Time left untill unban</td>
</tr></thead>';


$chari = "SELECT * FROM character where CtlCode='1' order by name asc";
$chars = mssql_query($chari);
for($i=0;$i < mssql_num_rows($chars);++$i){
$rowa = mssql_fetch_array($chars);
if($i%2) { $colors = "#161616";} else { $colors="#100c0d"; }
$character = mssql_fetch_array(mssql_query("SELECT * FROM DrakEWeb_Bann_Character WHERE character='$rowa[character]' ORDER BY id desc"));

$charbantime = $character['time'];
$charbanend = $charbantime - time();
$time_left_a = decode_time( time(), $character[time], "Unbaning..." );


echo "
<tbody>
<tr bgcolor='$colors'>
<td align='center'>$rowa[character]</td>
<td align='center'><a class='helpLink' href='?' onclick=\"showHelpTip(event, 'Reason For Ban: <b>$character[reason]</b>',false); return false\">[info]</a></td>
<td align='center'>$character[banner]</td>
<td align='center'>$time_left_a</td>
</tr>
</tbody>";
}

print '</table><br />';


?>
не трябва ли да е row?
 
<?
print '
<table class="sort-table" width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr><td colspan="5" align="left" class="text-title">Banned Characters</td></tr>
<tr>
<td align="center">Character</td>
<td align="center">Reason</td>
<td align="center">Banned from</td>
<td align="center">Time left untill unban</td>
</tr></thead>';


$chari = "SELECT * FROM character where CtlCode='1' order by name asc";
$chars = mssql_query($chari);
for($i=0;$i < mssql_num_rows($chars);++$i){
$rowa = mssql_fetch_array($chars);
if($i%2) { $colors = "#161616";} else { $colors="#100c0d"; }
$character = mssql_fetch_array(mssql_query("SELECT * FROM DrakEWeb_Bann_Character WHERE character='$rowa[character]' ORDER BY id desc"));

$charbantime = $character['time'];
$charbanend = $charbantime - time();
$time_left_a = decode_time( time(), $character[time], "Unbaning..." );


echo "
<tbody>
<tr bgcolor='$colors'>
<td align='center'>$rowa[character]</td>
<td align='center'><a class='helpLink' href='?' onclick=\"showHelpTip(event, 'Reason For Ban: <b>$character[reason]</b>',false); return false\">[info]</a></td>
<td align='center'>$character[banner]</td>
<td align='center'>$time_left_a</td>
</tr>
</tbody>";
}

print '</table><br />';


?>


Ами мисля че не
 
<?
print '
<table class="sort-table" width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr><td colspan="5" align="left" class="text-title">Banned Characters</td></tr>
<tr>
<td align="center">Character</td>
<td align="center">Reason</td>
<td align="center">Banned from</td>
<td align="center">Time left untill unban</td>
</tr></thead>';


$chari = "SELECT * FROM character where CtlCode='1' order by name asc";
$chars = mssql_query($chari);
for($i=0;$i < mssql_num_rows($chars);++$i){
$row = mssql_fetch_array($chars);
if($i%2) { $colors = "#161616";} else { $colors="#100c0d"; }
$character = mssql_fetch_array(mssql_query("SELECT * FROM DrakEWeb_Bann_Character WHERE character='$row[character]' ORDER BY id desc"));

$charbantime = $character['time'];
$charbanend = $charbantime - time();
$time_left_a = decode_time( time(), $character[time], "Unbaning..." );


echo "
<tbody>
<tr bgcolor='$colors'>
<td align='center'>$row[character]</td>
<td align='center'><a class='helpLink' href='?' onclick=\"showHelpTip(event, 'Reason For Ban: <b>$character[reason]</b>',false); return false\">[info]</a></td>
<td align='center'>$character[banner]</td>
<td align='center'>$time_left_a</td>
</tr>
</tbody>";
}

print '</table><br />';


?>
 
<?
print '
<table class="sort-table" width="450" border="0" cellspacing="0" cellpadding="0" align="center">
<thead>
<tr><td colspan="5" align="left" class="text-title">Banned Characters</td></tr>
<tr>
<td align="center">Character</td>
<td align="center">Reason</td>
<td align="center">Banned from</td>
<td align="center">Time left untill unban</td>
</tr></thead>';


$chari = "SELECT * FROM character where CtlCode='1' order by name asc";
$chars = mssql_query($chari);
for($i=0;$i < mssql_num_rows($chars);++$i){
$row = mssql_fetch_array($chars);
if($i%2) { $colors = "#161616";} else { $colors="#100c0d"; }
$character = mssql_fetch_array(mssql_query("SELECT * FROM DrakEWeb_Bann_Character WHERE character='$row[character]' ORDER BY id desc"));

$charbantime = $character['time'];
$charbanend = $charbantime - time();
$time_left_a = decode_time( time(), $character[time], "Unbaning..." );


echo "
<tbody>
<tr bgcolor='$colors'>
<td align='center'>$row[character]</td>
<td align='center'><a class='helpLink' href='?' onclick=\"showHelpTip(event, 'Reason For Ban: <b>$character[reason]</b>',false); return false\">[info]</a></td>
<td align='center'>$character[banner]</td>
<td align='center'>$time_left_a</td>
</tr>
</tbody>";
}

print '</table><br />';


?>

06-08-2010