Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: online scriptas

Parašė House· 2009 Rugs. 2 16:09:12
#1

Problėma tokia. kai i panele ikišu scripta kuris rodo kiek serveri žaidžia žmoniu ir pan. man virš naujienų atsiranda užrašai:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)




<?php
include("Connection.php");
//Do not remove this header
//This script package is distributed by kadar of L2j.sourceforge
//You are free to distribute this package as long as the headers stay intact.


//Uncomment section below to show Online GM's with access 90 or higher.

// $FORM = "<table width=100% border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-size:11px; font-family:verdana; color:#999999;\">";
// $query = "select count(char_name) from characters";
// $link = mysql_query($query);
// $all = mysql_fetch_row($link);
// $query = "select char_name from characters where ((online=1) AND (characters.accesslevel >90))";
// $link = mysql_query($query);
// $num = mysql_num_rows($link);
// $FORM .= "<tr><td><span style=\"font-size:11px; font-family:verdana; color:#999999;\"><center>Admin's On-Line:&nbsp;&nbsp;$num</span></td></tr><tr><td align=justify><hr><span style=\"font-size:11px; font-family:verdana; color:#FFFF00;\">";
// while ( $char = mysql_fetch_row($link) )
// {
//     $FORM .= "  &nbsp;&nbsp;$char[0], ";
// }

// $FORM .= "</span></td></tr></table><hr><center><br>";
// echo $FORM;





// This section show the current players online
$FORM = "<table width=100% border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-size:11px; font-family:verdana; color:#999999;\">";

//get online players
$query = "select count(char_name) from characters";
$link = mysql_query($query);
$all = mysql_fetch_row($link);
$query = "select char_name from characters where ((online=1) AND (characters.accesslevel =0)) ORDER BY char_name ASC ";
$link = mysql_query($query);
$num = mysql_num_rows($link);
$FORM .= "<tr><td><br><span style=\"font-size:11px; font-family:verdana; color:#fff000;\"><center><b>Players On-Line/Total Characters:&nbsp;&nbsp;$num / $all[0]</b></span></td></tr><tr><td align=justify><hr><span style=\"font-size:11px; font-family:verdana; color:#999999;\">";
while ( $char = mysql_fetch_row($link) )
{
    $FORM .= "  &nbsp;&nbsp;$char[0], ";
}

$FORM .= "</span></td></tr></table><hr style=\"font-family:verdana; color:#999999;\"><center>";
echo $FORM;

$timezone  = -8; //(GMT -5:00) EST (U.S. & Canada)
echo date("Y/m/j H:i:s", time() + 3600*($timezone+date("I")));

mysql_close();

?>