Parašė Majakas· 2010 Rugp. 9 17:08:07
#1
Sveiki,
reikėtų tokios pagalbos, turiu kodą:
<link rel="stylesheet" type="text/css" href="style.css">
<script language="javascript">
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
<?php
include('config.php');
$ip = $_SERVER['REMOTE_ADDR'];
$result = mysql_query("SELECT bid FROM amx_bans") or die(mysql_error());
$rows = mysql_num_rows($result);
if(!$kuriam) $kuriam;
$result = mysql_query("SELECT bid FROM amx_bans") or die(mysql_error());
$bans = mysql_num_rows($result);
$result2 = mysql_query("SELECT nick FROM unban") or die(mysql_error());
$unbans = mysql_num_rows($result2);
echo "
Total Bans: <b><a href=".$web.">".$rows."</a></b><br>
Total Unbans: <b><a href=".$web2." onclick=\"NewWindow(this.href,'name','400','400','no');return false\">".$unbans."</a></b><br>
IP: <b>".$ip."</b><br>";
$result = mysql_query("SELECT player_ip,bid FROM amx_bans WHERE player_ip = '$ip' LIMIT 1");
$row = mysql_fetch_array($result, MYSQL_ASSOC);
if(!$row) {
echo "Status: <b><span style=\"color:green\">Not Banned</span></b><br>";
} else {
echo "Status: <b><span style=\"color:red\">Banned</span></b><br><br>".$msg1." <b>".$row['bid']."</b> ".$msg2."";
}
echo "
<table><br>
<center>Last 10 Bans</center>
<tr>
<td><b>Nick</b></td>
<td><b>Reason</b></td>
</tr>";
$result = mysql_query("SELECT player_nick,bid,ban_reason, admin_nick FROM amx_bans WHERE admin_nick NOT LIKE '%cs.multimod.lt%' ORDER ašd DESC LIMIT 10") or die(mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo "
<tr>
<td align='left'><b><a href=".$web."ban_details.php?bid=" . $row['bid'] . " target = _blank>".$row['player_nick']."</a><br></b></td>
<td>" . $row['ban_reason'] . "</td>
</tr>";
}
echo "
<table><br>
<center>Last 10 UnBans</center>
<tr>
<td><b>Nick</b></td>
<td><b>Reason</b></td>
<td><b>Date</b></td>
</tr>";
$result = mysql_query("SELECT nick,reason,date FROM unban ORDER BY date DESC LIMIT 10") or die(mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo "
<tr>
<td>" . $row['nick'] . "</td>
<td>" . $row['reason'] . "</td>
<td>" . $row['date'] . "</td>
</tr>";
}
echo "</table><br>
<table>
<center>Top5 Admins</center>
<tr>
<td><b>#</b></td>
<td><b>Admin</b></td>
<td><b>Bans</b></td>
</tr>";
$i=1;
$result = mysql_query("SELECT count(*), admin_nick FROM amx_bans WHERE admin_nick NOT LIKE '%multimod.lt%' GROUP BY admin_nick ORDER BY count(*) DESC LIMIT 5") or die(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>".$i.".</td>";
echo "<td>".$row['admin_nick']."</td>";
echo "<td>".$row['count(*)']."</td>";
echo "</tr>";
$i++;
}
echo "</table>";
?>
include('config.php'); Štai šią vietą pvz pakeičiu i jungiu.php ir config.php failo pavadnimą pakeičių i jungiu.php ir jį imetu i PUBLIC_HTML direktoriją, t.y prie fusion failų
Ir aukščiau parodytą kodą imetu i panele ar pridetinius puslapius.
Aišku jungiu.php faile pakeičiu iš LOCALHOST į nutolusio mysql bazės kitame serveryje IP (per direct admin pridedu serveriai.lt IP kad leistu jungtis) Bet kažkodėl panelėje nieko nerodo ir neatvaizduoja ?
GAL KĄ BLOGAI PADARIAU ? Nes logiškai mąstant tai įmanoma ;)
Redagavo Majakas· 2010 Rugp. 9 17:08:39