mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
svn -> git Migration
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>EQEmu</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/style.css"/>
|
||||
<script src="scripts/jquery.js"></script>
|
||||
<script>
|
||||
<!--
|
||||
var idx = Math.floor((Math.random()*100000000));
|
||||
function GetStatusIdx() {
|
||||
return idx++;
|
||||
}
|
||||
|
||||
function StatusTic() {
|
||||
$.getJSON("data/zone_data.html?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById('zone_count');
|
||||
elm.innerHTML = data.zone_count;
|
||||
|
||||
$("#zone_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Zone Name </th>";
|
||||
app_html += "<th scope=\"col\">Port</th>";
|
||||
app_html += "<th scope=\"col\">Instance Id</th>";
|
||||
app_html += "<th scope=\"col\">Players</th>";
|
||||
app_html += "<th scope=\"col\">Actions</th>";
|
||||
app_html += "</tr>";
|
||||
$("#zone_table").append(app_html);
|
||||
|
||||
var i = 0;
|
||||
for(var i = 0; i < data.zone_count; i++) {
|
||||
app_html = "<tr>";
|
||||
if(data.zones[i].type == "dynamic") {
|
||||
if(data.zones[i].zone_id == 0) {
|
||||
app_html += "<td><b>"+data.zones[i].launch_name+":</b> <a href='zone.html?zone="+data.zones[i].short_name+"&instance="+data.zones[i].instance_id+"'>Idle</a></td>";
|
||||
} else {
|
||||
app_html += "<td><b>"+data.zones[i].launch_name+":</b> <a href='zone.html?zone="+data.zones[i].short_name+"&instance="+data.zones[i].instance_id+"'>"+data.zones[i].long_name+"("+data.zones[i].short_name+")"+"</a></td>";
|
||||
}
|
||||
} else {
|
||||
app_html += "<td><a href='zone.html?zone=" + data.zones[i].short_name + "&instance=" + data.zones[i].instance_id + "'>" + data.zones[i].long_name + "</a> (" + data.zones[i].short_name + ")</td>";
|
||||
}
|
||||
|
||||
app_html += "<td>" + data.zones[i].port + "</td>";
|
||||
app_html += "<td>" + data.zones[i].instance_id + "</td>";
|
||||
app_html += "<td><a href='players.html?zone=" + data.zones[i].short_name + "&instance=" + data.zones[i].instance_id + "'>Players</a></td>";
|
||||
app_html += "<td>";
|
||||
app_html += "<a href='javascript:void(0)' onclick='Kill(" + data.zones[i].short_name + ", " + data.zones[i].instance_id +")'>Kill</a>";
|
||||
app_html += "</td>";
|
||||
app_html += "</tr>";
|
||||
|
||||
$("#zone_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function Kill(short_name, instance_id) {
|
||||
$.getJSON("actions/zone_action.html?action=kill&short_name="+short_name+"&instance_id="+instance_id+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 4000);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<?
|
||||
|
||||
@zones = $EQW->ListBootedZones();
|
||||
# @zones = (
|
||||
# { type => "dynamic", short_name => "arena", long_name => "Arena", port => 8001 },
|
||||
# { type => "static", short_name => "freportw", long_name => "West Freeport", port => 8002 },
|
||||
# { type => "static", short_name => "freportn", long_name => "North Freeport", port => 8003 }
|
||||
# );
|
||||
|
||||
?>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<h2 align="center">Zone List</h2>
|
||||
<?
|
||||
print "You have <span id='zone_count'>".($#zones+1)."</span> zones running.";
|
||||
?>
|
||||
<table id='zone_table' class='styled_table' width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th scope="col">Zone Name </th>
|
||||
<th scope="col">Port</th>
|
||||
<th scope="col">Instance Id</th>
|
||||
<th scope="col">Players</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
<?
|
||||
for my $zonekey (sort @zones) {
|
||||
my $zone = $EQW->GetZoneDetails($zonekey);
|
||||
if(!$zone) {
|
||||
$zone->{long_name} = "ERROR: no zone";
|
||||
} elsif($zone->{error}) {
|
||||
$zone->{long_name} = "ERROR: $zone->{error}";
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
if($zone->{type} eq "dynamic") {
|
||||
if($zone->{zone_id} == 0) {
|
||||
print "\t<td><b>$zone->{launch_name}:</b> <a href='zone.html?zone=$zone->{short_name}&instance=$zone->{instance_id}'>Idle</a></td>";
|
||||
} else {
|
||||
print "\t<td><b>$zone->{launch_name}:</b> <a href='zone.html?zone=$zone->{short_name}&instance=$zone->{instance_id}'>$zone->{long_name}</a> ($zone->{short_name})</td>";
|
||||
}
|
||||
} else {
|
||||
print "<td><a href='zone.html?zone=$zone->{short_name}&instance=$zone->{instance_id}'>$zone->{long_name}</a> ($zone->{short_name})</td>";
|
||||
}
|
||||
print "<td>$zone->{port}</td>";
|
||||
print "<td>$zone->{instance_id}</td>";
|
||||
print "<td><a href='players.html?zone=$zone->{short_name}&instance=$zone->{instance_id}'>Players</a></td>";
|
||||
print "<td>";
|
||||
print "<a href='javascript:void(0)' onclick='Kill($zone->{short_name}, $zone->{instance_id})'>Kill</a>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user