Ozzas
Narys
Margas
Pranešimai: 92
Įstojęs: 2007 Lie. 16 18:07:27
|
idiegiu si moda ir padarau navigacijoje cs_serveriai ir juo turetu ieiti jie ir matyti serweriu statusa ta pati moda bet koki url ivest? suvedu: infusions/css_qs_panel/css_qs_admin.php tj tada tik adminas mato tj koki daryt kelai iki jo?
Www.MotoTuning.Projektas.in |
souL
Narys
Kapitonas
Pranešimai: 537
Įstojęs: 2007 Kov. 26 16:03:39
|
klausk http://modai.webdnd.com cia ne modu saitas
|
Ozzas
Narys
Margas
Pranešimai: 92
Įstojęs: 2007 Lie. 16 18:07:27
|
tj bet cia gawau sita moda tj turetu zinot
Www.MotoTuning.Projektas.in |
kiskiss
Narys
Terminatorius
Pranešimai: 1545
Įstojęs: 2006 Rugs. 11 17:09:58
|
Ozzas parašė:
idiegiu si moda ir padarau navigacijoje cs_serveriai ir juo turetu ieiti jie ir matyti serweriu statusa ta pati moda bet koki url ivest? suvedu: infusions/css_qs_panel/css_qs_admin.php tj tada tik adminas mato tj koki daryt kelai iki jo?
Sukurk panele ir joje rasyk
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."css_qs_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."css_qs_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."css_qs_panel/locale/English.php";
}
$map;
$players;
$servername;
$maxplayers;
$bots;
$success;
$serveroutput = create_table();
opentable("Musu Counter-strike serveris");
Echo "<table width='100%' valign='top' cellpadding='1' cellspacing='1' class='tbl-border'>
<tr>
<td class = 'tbl2'></td>
<td class = 'tbl2' align='center'>Serverio Pavadinimas</td>
<td class = 'tbl2' align='center'>IP Adresas</td>
<td class = 'tbl2' align='center'>Dabartinis Map'as</td>
<td class = 'tbl2' align='center'>Zaidejei</td>
<td class = 'tbl2' width='5%'>Statusas</td>
<td class = 'tbl2' align='center'>Veiksmas</td>
</tr>
$serveroutput
</table>
";
closetable();
//functions
function create_table()
{
global $players;
global $map;
global $servername;
global $maxplayers;
global $bots;
global $success;
global $db_prefix;
$list = "";
$result = dbquery("SELECT * FROM ".$db_prefix."css_qs_servers ORDER BY css_qs_server_order ASC");
$rows = dbrows($result);
if ($rows != 0)
{
while($data = dbarray($result))
{
foreach($data as $key=>$value)
{
$$key = $value;
}
$server_status = query_server($css_qs_server_type,$css_qs_server_address,$css_qs_server_port);
if ($success == 1)
{
$players = $players." / ".$maxplayers." (".$bots.")";
}
if ($css_qs_server_type != "TeamSpeak" && $success == 1)
{
$actions = "<a href='steam://connect ".$css_qs_server_address.":".$css_qs_server_port."'><img src='infusions/css_qs_panel/images/connect.png' title='connect''></a>";
}
else
{
$actions = "No Actions";
}
$list .= "<tr><td align='center' valign='middle' class='tbl1' width='10'><img src='infusions/css_qs_panel/".$css_qs_server_image."'></td>
<td align='center' vaiign='middle' class='tbl1'>".$css_qs_server_Name."</td>
<td align='center' valign='middle' class='tbl1'>".$css_qs_server_address.":".$css_qs_server_port."</td>
<td align='center' valign='middle' class='tbl1'>".$map."</td>
<td align='center' valign='middle' class='tbl1'>".$players."</td>
<td align='center' valign='middle' class='tbl1'>$server_status</td>
<td align='center' valign='middle' class='tbl1'>$actions</td></tr>";
}
}
else
{
$list = "<tr><td align='center' valign='middle' colspan='7'>Nera nustatytu serveriu!</td></tr>";
}
if ($rows >= 4)
{
$list .= "<tr><td align='center' valign='middle' colspan='7'><font size='10'>Copyright Ā© <a href='http://www.crazy-site.tik.lt'>PhoboS</a> 2006</font></td></tr>";
}
return $list;
}
function query_server($type,$ip,$port)
{
global $players;
global $map;
global $servername;
global $maxplayers;
global $bots;
global $success;
$success = 0;
$map = "N/A";
$players = "N/A";
$servername = "N/A";
$maxplayers = "N/A";
$bots = "N/A";
if ($type == "Counter Strike") //Source Query
{
$packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
if(!$live_server = fsockopen("udp://".$ip,$port))
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
else
{
fwrite($live_server, $packet);
socket_set_timeout($live_server,1,0);
$junk = fread($live_server,5);
$status = socket_get_status($live_server);
$do = 1;
$server_info= "";
while($do)
{
$str_1 = fread($live_server,1);
$server_info .= $str_1;
$status = socket_get_status($live_server);
if($status["unread_bytes"] == 0) {$do = 0;}
}
fclose($live_server);
if (strlen($server_info) > 0)
{
$success = 1;
$servername = getnextstring($server_info);
$map = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextbytevalue($server_info);
$junk = getnextbytevalue($server_info);
$players = getnextbytevalue($server_info);
$maxplayers = getnextbytevalue($server_info);
$bots = getnextbytevalue($server_info);
if ($players < $maxplayers)
{
$output = "<img src='infusions/css_qs_panel/images/green.gif' title='Server Active'>";
}
else
{
$output = "<img src='infusions/css_qs_panel/images/yellow.gif' title='Server Full'>";
}
}
else
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
}
}
elseif ($type == "TeamSpeak")// Teamspeak Query
{
if (!$fp = @fsockopen($ip,$port))
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
else
{
socket_set_timeout($fp,1,0);
$data = fread($fp,4);
fputs($fp, "quit");
fclose($fp);
if ($data == "[TS]")
{
$output = "<img src='infusions/css_qs_panel/images/green.gif' title='Server Active'>" ;
}
else
{
$output = "<img src='infusions/css_qs_panel/images/yellow.gif' title='Query Error'>";
}
}
}
elseif ($type == "CounterStrike 1.6")
{
$packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
if(!$live_server = fsockopen("udp://".$ip,$port))
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
else
{
fwrite($live_server, $packet);
socket_set_timeout($live_server,1,0);
$junk = fread($live_server,5);
$status = socket_get_status($live_server);
$do = 1;
$server_info= "";
while($do)
{
$str_1 = fread($live_server,1);
$server_info .= $str_1;
$status = socket_get_status($live_server);
if($status["unread_bytes"] == 0) {$do = 0;}
}
fclose($live_server);
if (strlen($server_info) > 0)
{
$success = 1;
$junk = getnextstring($server_info);
$servername = getnextstring($server_info);
$map = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextstring($server_info);
$players = getnextbytevalue($server_info);
$maxplayers = getnextbytevalue($server_info);
if ($players < $maxplayers)
{
$output = "<img src='infusions/css_qs_panel/images/green.gif' title='Server Active'>";
}
else
{
$output = "<img src='infusions/css_qs_panel/images/yellow.gif' title='Server Full'>";
}
}
else
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
}
}
return $output;
}
function getnextstring(&$data)
{
$temp="";
$counter=0;
while (ord($data[$counter++])!=0) $temp.=$data[$counter-1];
$data=substr($data,strlen($temp)+1);
return $temp;
}
function getnextbytevalue(&$data)
{
$temp=ord($data[0]);
$data=substr($data,1);
return $temp;
}
?>
Redagavo kiskiss 2007 Lie. 17 20:07:23 |
ozzWANTED
Administratorius
Legenda
Pranešimai: 8478
Įstojęs: 2006 Gru. 29 14:12:31
|
Ne expert klausimas, tema perkeliama. Čia modų klausimas. Beto, ozzas jau pakartotinai baudžiamas, dar viena tokia tema ir bus banas.
BR#1, Most Wanted |
Ozzas
Narys
Margas
Pranešimai: 92
Įstojęs: 2007 Lie. 16 18:07:27
|
tj jai as nesuprantu ka man daryt? tj koki sakykit kelia nurodyt?
Www.MotoTuning.Projektas.in |
Ozzas
Narys
Margas
Pranešimai: 92
Įstojęs: 2007 Lie. 16 18:07:27
|
jus supraskit ko as noriu nenoriu atskiros paneles noriu zinoti koki url rasyt i pridetini psl kad ant jo paspaudus jis matytu serwues
Www.MotoTuning.Projektas.in |
kiskiss
Narys
Terminatorius
Pranešimai: 1545
Įstojęs: 2006 Rugs. 11 17:09:58
|
Ozzas parašė:
jus supraskit ko as noriu nenoriu atskiros paneles noriu zinoti koki url rasyt i pridetini psl kad ant jo paspaudus jis matytu serwues
Pzdc idiotas totalus. As nemokedamas php sita suprasdavau
ar <?php nemoki prideti?
I pridetini puslapi rasai sita koda:
<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."css_qs_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."css_qs_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."css_qs_panel/locale/English.php";
}
$map;
$players;
$servername;
$maxplayers;
$bots;
$success;
$serveroutput = create_table();
opentable("Musu Counter-strike serveris");
Echo "<table width='100%' valign='top' cellpadding='1' cellspacing='1' class='tbl-border'>
<tr>
<td class = 'tbl2'></td>
<td class = 'tbl2' align='center'>Serverio Pavadinimas</td>
<td class = 'tbl2' align='center'>IP Adresas</td>
<td class = 'tbl2' align='center'>Dabartinis Map'as</td>
<td class = 'tbl2' align='center'>Zaidejei</td>
<td class = 'tbl2' width='5%'>Statusas</td>
<td class = 'tbl2' align='center'>Veiksmas</td>
</tr>
$serveroutput
</table>
";
closetable();
//functions
function create_table()
{
global $players;
global $map;
global $servername;
global $maxplayers;
global $bots;
global $success;
global $db_prefix;
$list = "";
$result = dbquery("SELECT * FROM ".$db_prefix."css_qs_servers ORDER BY css_qs_server_order ASC");
$rows = dbrows($result);
if ($rows != 0)
{
while($data = dbarray($result))
{
foreach($data as $key=>$value)
{
$$key = $value;
}
$server_status = query_server($css_qs_server_type,$css_qs_server_address,$css_qs_server_port);
if ($success == 1)
{
$players = $players." / ".$maxplayers." (".$bots.")";
}
if ($css_qs_server_type != "TeamSpeak" && $success == 1)
{
$actions = "<a href='steam://connect ".$css_qs_server_address.":".$css_qs_server_port."'><img src='infusions/css_qs_panel/images/connect.png' title='connect''></a>";
}
else
{
$actions = "No Actions";
}
$list .= "<tr><td align='center' valign='middle' class='tbl1' width='10'><img src='infusions/css_qs_panel/".$css_qs_server_image."'></td>
<td align='center' vaiign='middle' class='tbl1'>".$css_qs_server_Name."</td>
<td align='center' valign='middle' class='tbl1'>".$css_qs_server_address.":".$css_qs_server_port."</td>
<td align='center' valign='middle' class='tbl1'>".$map."</td>
<td align='center' valign='middle' class='tbl1'>".$players."</td>
<td align='center' valign='middle' class='tbl1'>$server_status</td>
<td align='center' valign='middle' class='tbl1'>$actions</td></tr>";
}
}
else
{
$list = "<tr><td align='center' valign='middle' colspan='7'>Nera nustatytu serveriu!</td></tr>";
}
if ($rows >= 4)
{
$list .= "<tr><td align='center' valign='middle' colspan='7'><font size='10'>Copyright Ā© <a href='http://www.crazy-site.tik.lt'>PhoboS</a> 2006</font></td></tr>";
}
return $list;
}
function query_server($type,$ip,$port)
{
global $players;
global $map;
global $servername;
global $maxplayers;
global $bots;
global $success;
$success = 0;
$map = "N/A";
$players = "N/A";
$servername = "N/A";
$maxplayers = "N/A";
$bots = "N/A";
if ($type == "Counter Strike") //Source Query
{
$packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
if(!$live_server = fsockopen("udp://".$ip,$port))
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
else
{
fwrite($live_server, $packet);
socket_set_timeout($live_server,1,0);
$junk = fread($live_server,5);
$status = socket_get_status($live_server);
$do = 1;
$server_info= "";
while($do)
{
$str_1 = fread($live_server,1);
$server_info .= $str_1;
$status = socket_get_status($live_server);
if($status["unread_bytes"] == 0) {$do = 0;}
}
fclose($live_server);
if (strlen($server_info) > 0)
{
$success = 1;
$servername = getnextstring($server_info);
$map = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextbytevalue($server_info);
$junk = getnextbytevalue($server_info);
$players = getnextbytevalue($server_info);
$maxplayers = getnextbytevalue($server_info);
$bots = getnextbytevalue($server_info);
if ($players < $maxplayers)
{
$output = "<img src='infusions/css_qs_panel/images/green.gif' title='Server Active'>";
}
else
{
$output = "<img src='infusions/css_qs_panel/images/yellow.gif' title='Server Full'>";
}
}
else
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
}
}
elseif ($type == "TeamSpeak")// Teamspeak Query
{
if (!$fp = @fsockopen($ip,$port))
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
else
{
socket_set_timeout($fp,1,0);
$data = fread($fp,4);
fputs($fp, "quit");
fclose($fp);
if ($data == "[TS]")
{
$output = "<img src='infusions/css_qs_panel/images/green.gif' title='Server Active'>" ;
}
else
{
$output = "<img src='infusions/css_qs_panel/images/yellow.gif' title='Query Error'>";
}
}
}
elseif ($type == "CounterStrike 1.6")
{
$packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
if(!$live_server = fsockopen("udp://".$ip,$port))
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
else
{
fwrite($live_server, $packet);
socket_set_timeout($live_server,1,0);
$junk = fread($live_server,5);
$status = socket_get_status($live_server);
$do = 1;
$server_info= "";
while($do)
{
$str_1 = fread($live_server,1);
$server_info .= $str_1;
$status = socket_get_status($live_server);
if($status["unread_bytes"] == 0) {$do = 0;}
}
fclose($live_server);
if (strlen($server_info) > 0)
{
$success = 1;
$junk = getnextstring($server_info);
$servername = getnextstring($server_info);
$map = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextstring($server_info);
$players = getnextbytevalue($server_info);
$maxplayers = getnextbytevalue($server_info);
if ($players < $maxplayers)
{
$output = "<img src='infusions/css_qs_panel/images/green.gif' title='Server Active'>";
}
else
{
$output = "<img src='infusions/css_qs_panel/images/yellow.gif' title='Server Full'>";
}
}
else
{
$output = "<img src='infusions/css_qs_panel/images/red.gif' title='Server Down'>";
}
}
}
return $output;
}
function getnextstring(&$data)
{
$temp="";
$counter=0;
while (ord($data[$counter++])!=0) $temp.=$data[$counter-1];
$data=substr($data,strlen($temp)+1);
return $temp;
}
function getnextbytevalue(&$data)
{
$temp=ord($data[0]);
$data=substr($data,1);
return $temp;
}
?>
Redagavo kiskiss 2007 Lie. 17 22:07:04 |
SnkR
Narys
Patrankų mėsa
Pranešimai: 1
Įstojęs: 2007 Lie. 18 20:07:46
|
Kaip pritaikyti ka kur vesti?As pvz ne i php-fusion weba bandysiu kelt ta coda
|
kiskiss
Narys
Terminatorius
Pranešimai: 1545
Įstojęs: 2006 Rugs. 11 17:09:58
|
SnkR parašė:
Kaip pritaikyti ka kur vesti?As pvz ne i php-fusion weba bandysiu kelt ta coda
nu tai sakyk kur taikysi
|
jajaja
Narys
Patrankų mėsa
Pranešimai: 4
Įstojęs: 2007 Bir. 7 22:06:59
|
kdl man rodo kad visada off ?
|
MAnjack
Garbės narys
Legenda
Pranešimai: 11821
Įstojęs: 2006 Kov. 2 20:03:58
|
Gal portas blogas nurodytas, arba adresas neteisingai įvestas.
|
jajaja
Narys
Patrankų mėsa
Pranešimai: 4
Įstojęs: 2007 Bir. 7 22:06:59
|
ne ! viskas gerai ! BET VISADA RODO KAD OFF ! Bet servas on !
|
jajaja
Narys
Patrankų mėsa
Pranešimai: 4
Įstojęs: 2007 Bir. 7 22:06:59
|
padekit ! kas cia netaip
|
Bside
Narys
Patrankų mėsa
Pranešimai: 5
Įstojęs: 2007 Spa. 21 01:10:04
|
Tj gal pas tave intiko ipas yra vidinis todel ir nerodo kad serwas ijungtas.O kiti i tavo serva gali ateiti per Find Server?
|
bruzgis
Narys
Ekspertas
Pranešimai: 3368
Įstojęs: 2006 Geg. 9 18:05:02
|
Bside parašė:
Tj gal pas tave intiko ipas yra vidinis todel ir nerodo kad serwas ijungtas.O kiti i tavo serva gali ateiti per Find Server?
O tu tikras tuo? jei tikras, tai klysti
mano kai vidinis buvo RODE serva, kai isorinis irgi rode. tai kad netame bedos
|