Beispiel #1
0
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php 
echo OUT_PATH;
?>
feed">
	<?php 
put_style('main');
echo "\n";
?>
	<title><?php 
echo $page_title;
?>
</title>
</head>
<body class="<?php 
echo daytime();
?>
">
	<div id="container">
		<div id="header">
			<h1><a href="<?php 
echo OUT_PATH;
?>
" title="首頁"><?php 
echo APP_NAME;
?>
</a></h1>
		</div>
<?php 
include load_template('menu');
show_info();
$p = 0;
$len = 1024;
$i = 0;
$read[0] = $sock;
$input = 'No Server found';
while (socket_select($read, $write = NULL, $except = NULL, 2)) {
    $flag = 1;
    socket_recvfrom($sock, $input, 80000, 0, $from, $p);
    $server->s_info['info'] = $input;
    $srv_rules = $server->getrules($phgdir);
    $srv_rules['map'] = $phgdir . $srv_rules['map_path'] . '/' . $srv_rules['mapname'] . '.jpg';
    if (!file_exists($srv_rules['map'])) {
        // set default map if no picture found
        $srv_rules['map'] = $phgdir . $srv_rules['map_path'] . '/' . $srv_rules['map_default'];
    }
    $srv_rules['time'] = daytime();
    // get server day time
    $srv_rules['hostel'] = hostel::query_srv($srv_rules['gameip']);
    // get server hostel / location
    //$srv_rules['adress'] = $host.':' . $port;	// get server adress
    $srv_rules['adress'] = $srv_rules['gameip'];
    srv_info($sh_srv, $srv_rules, $use_file, $use_bind, 1, 40);
    echo '<br/>' . '<br/>' . '<br/>';
}
if ($flag == 0) {
    echo "No Server Running";
}
socket_close($sock);
?>
	</div>
        </div>