mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 03:06:38 +00:00
svn -> git Migration
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
bugview.html 0
|
||||
playerview.html 0
|
||||
zoneview.html 0
|
||||
scripts/jquery.js 0
|
||||
style/style.css 0
|
||||
data/bug_data.html 0
|
||||
data/player_data.html 0
|
||||
data/zone_data.html 0
|
||||
@@ -0,0 +1,25 @@
|
||||
<?
|
||||
my $action = $request->get("action", "none");
|
||||
my $bug_id = $request->get("bug_id", "-1");
|
||||
|
||||
if($action eq "resolve") {
|
||||
if($bug_id != -1) {
|
||||
$EQW->ResolveBug($bug_id);
|
||||
print "{";
|
||||
print "\"status\": 1,";
|
||||
print "\"message\": \"\"";
|
||||
print "}";
|
||||
} else {
|
||||
print "{";
|
||||
print "\"status\": 0,";
|
||||
print "\"message\": \"Invalid bug id.\"";
|
||||
print "}";
|
||||
}
|
||||
} else {
|
||||
print "{";
|
||||
print "\"status\": 0,";
|
||||
print "\"message\": \"Invalid action.\"";
|
||||
print "}";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?
|
||||
my $action = $request->get("action", "none");
|
||||
my $text = $request->get("text", "");
|
||||
if($action eq "input") {
|
||||
my $rep = $EQW->SendConsoleMessage($text);
|
||||
if($rep ne "") {
|
||||
print "{";
|
||||
print "\"status\" : 0,";
|
||||
print "\"message\" : \"$rep\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
print "{";
|
||||
print "\"status\" : 0,";
|
||||
print "\"message\" : \"Unknown action sent to console.\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
|
||||
print "{";
|
||||
print "\"status\" : 1,";
|
||||
print "\"message\" : \"\"";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,129 @@
|
||||
<?
|
||||
my $action = $request->get("action", "none");
|
||||
my $launcher_name = $request->get("launcher_name", "none");
|
||||
if($launcher_name eq "" || $launcher_name eq "none") {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Missing launcher name in Remove action\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
|
||||
if($action eq "add") {
|
||||
my $dynamic_count = $request->get("dynamic_count", "0");
|
||||
if($dynamic_count < 0 || $dynamic_count > 254) {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Invalid dynamics count in Add action\"";
|
||||
print "}";
|
||||
return;
|
||||
} else {
|
||||
$EQW->CreateLauncher($launcher_name, $dynamic_count);
|
||||
}
|
||||
} elsif($action eq "remove") {
|
||||
my $l = $EQW->GetLauncher($launcher_name);
|
||||
if(!$l) {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Launcher not found during Remove action\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
$l->DeleteLauncher();
|
||||
} elsif($action eq "boot") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
my $port = $request->get("port", "0");
|
||||
if($zone eq "none" || $zone eq "") {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Missing zone name in Boot action\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
|
||||
if($port < 0 || $port > 65535) {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Port out of range in Boot action\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
|
||||
if(!$config->BootStaticZone($zone, $port)) {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Failed to boot '$zone' on launcher $launcher_name with port $port. Invalid zone?\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
} elsif($action eq "change_dynamic_count") {
|
||||
my $dynamic_count = $request->get("dynamic_count", "0");
|
||||
$config->SetDynamicCount($dynamic_count);
|
||||
} elsif($action eq "remove_zone") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($zone eq "none" || $zone eq "") {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Invalid zone name in Remove Zone action.\"";
|
||||
print "}";
|
||||
return;
|
||||
} else {
|
||||
if(!$config->DeleteStaticZone($zone)) {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Failed to remove '$zone' on launcher $launcher_name. Invalid zone?\"";
|
||||
print "}";
|
||||
return;
|
||||
}
|
||||
}
|
||||
} elsif($action eq "reboot_all") {
|
||||
foreach my $z($config->ListZones()) {
|
||||
$config->RestartZone($z);
|
||||
}
|
||||
} elsif($action eq "stop_all") {
|
||||
foreach my $z($config->ListZones()) {
|
||||
$config->StopZone($z);
|
||||
}
|
||||
} elsif($action eq "start_all") {
|
||||
foreach my $z($config->ListZones()) {
|
||||
$config->StartZone($z);
|
||||
}
|
||||
} elsif($action eq "restart_zone") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($zone eq "none" || $zone eq "") {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Invalid zone name in Restart Zone action.\"";
|
||||
print "}";
|
||||
return;
|
||||
} else {
|
||||
$config->RestartZone($zone);
|
||||
}
|
||||
} elsif($action eq "start_zone") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($zone eq "none" || $zone eq "") {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Invalid zone name in Start Zone action.\"";
|
||||
print "}";
|
||||
return;
|
||||
} else {
|
||||
$config->StartZone($zone);
|
||||
}
|
||||
} elsif($action eq "stop_zone") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($zone eq "none" || $zone eq "") {
|
||||
print "{";
|
||||
print "\"status\" : 0, ";
|
||||
print "\"message\" : \"Invalid zone name in Stop Zone action.\"";
|
||||
print "}";
|
||||
return;
|
||||
} else {
|
||||
$config->StopZone($zone);
|
||||
}
|
||||
}
|
||||
|
||||
print "{";
|
||||
print "\"status\" : 1";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?
|
||||
my $act = $request->get("action", "none");
|
||||
if($act eq "unlock") {
|
||||
$EQW->UnlockWorld();
|
||||
} elsif($act eq "lock") {
|
||||
$EQW->LockWorld();
|
||||
} elsif($act eq "lsreconnect") {
|
||||
$EQW->LSReconnect();
|
||||
}
|
||||
|
||||
print "{";
|
||||
if($EQW->LSConnected()) {
|
||||
print "\"connected\" : \"1\",";
|
||||
} else {
|
||||
print "\"connected\" : \"0\",";
|
||||
}
|
||||
if($EQW->GetConfig("Locked") eq "true") {
|
||||
print "\"locked\" : \"1\"";
|
||||
} else {
|
||||
print "\"locked\" : \"0\"";
|
||||
}
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?
|
||||
my $act = $request->get("action", "none");
|
||||
if($act eq "kill") {
|
||||
my $short_name = $request->get("short_name", "none");
|
||||
my $instance_id = $request->get("instance_id", "none");
|
||||
} elsif($act eq "restart") {
|
||||
my $short_name = $request->get("short_name", "none");
|
||||
my $instance_id = $request->get("instance_id", "none");
|
||||
} elsif($act eq "killall") {
|
||||
} elsif($act eq "restartall") {
|
||||
}
|
||||
|
||||
print "{";
|
||||
print "\"status\" : 1";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!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>
|
||||
<!--
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,157 @@
|
||||
<!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++;
|
||||
}
|
||||
|
||||
var offset = 0;
|
||||
function StatusTic() {
|
||||
$.getJSON("data/bug_data.html?offset="+offset+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById("open_bugs_count");
|
||||
|
||||
var cur_offset = offset / 50;
|
||||
var sep = (data.total_bug_count / 50);
|
||||
var app = "";
|
||||
for(var i = 0; i < sep; ++i) {
|
||||
var cur = 50 * i;
|
||||
var name = i + 1;
|
||||
if(i == cur_offset) {
|
||||
app += "<b>"+name+"</b> ";
|
||||
}
|
||||
else {
|
||||
app += "<a href='javascript:void(0)' onclick='OpenBugs(\""+cur+"\")'>"+name+"</a> ";
|
||||
}
|
||||
}
|
||||
elm.innerHTML = app;
|
||||
|
||||
$("#bug_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Actions</th>";
|
||||
app_html += "<th scope=\"col\">Reporter</th>";
|
||||
app_html += "<th scope=\"col\">Where</th>";
|
||||
app_html += "<th scope=\"col\">Target</th>";
|
||||
app_html += "<th scope=\"col\">Descripton</th>";
|
||||
app_html += "</tr>";
|
||||
$("#bug_table").append(app_html);
|
||||
for(var i = 0; i < data.bug_count; i++) {
|
||||
app_html = "";
|
||||
var mod = i % 2;
|
||||
if(mod == 1) {
|
||||
app_html += "<tr class=\"odd\">";
|
||||
} else {
|
||||
app_html += "<tr>";
|
||||
}
|
||||
|
||||
var bug_text = data.bugs[i].bug;
|
||||
bug_text = bug_text.replace("\r", "");
|
||||
bug_text = bug_text.replace("\n", "</br>");
|
||||
app_html += "<td><a href='javascript:void(0)' onclick='ResolveBug(\""+data.bugs[i].id+"\")'>Resolve</a></td>";
|
||||
app_html += "<td>"+data.bugs[i].name+"</td>";
|
||||
app_html += "<td>"+data.bugs[i].zone+": ("+data.bugs[i].x+", "+data.bugs[i].y+", "+data.bugs[i].z+")</td>";
|
||||
app_html += "<td>"+data.bugs[i].target+"</td>";
|
||||
app_html += "<td style=\"text-align:left;\">"+bug_text+"</td>";
|
||||
app_html += "</tr>";
|
||||
$("#bug_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function OpenBugs(off) {
|
||||
offset = off;
|
||||
StatusTic();
|
||||
}
|
||||
|
||||
function ResolveBug(id) {
|
||||
$.getJSON("actions/bug_action.html?action=resolve&bug_id="+id+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
return;
|
||||
}
|
||||
|
||||
StatusTic();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 15000);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<?
|
||||
@bugs = $EQW->ListBugs(0);
|
||||
$bug_count = $EQW->CountBugs();
|
||||
?>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<div align="center"><h2>Bugs</h2></div>
|
||||
<div id="open_bugs_count" align="center">
|
||||
<?
|
||||
$cur_offset = 0;
|
||||
my $sep = ($bug_count / 50);
|
||||
for(my $i = 0; $i < $sep; ++$i) {
|
||||
my $cur = 50 * $i;
|
||||
my $name = $i + 1;
|
||||
|
||||
if($i == $cur_offset) {
|
||||
print "<b>$name</b> ";
|
||||
}
|
||||
else {
|
||||
print "<a href='javascript:void(0)' onclick='OpenBugs(\"$cur\")'>$name</a> ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table id="bug_table" width="100%" cellspacing="0" cellpadding="0" class="styled_table">
|
||||
<tr>
|
||||
<th scope="col">Actions</th>
|
||||
<th scope="col">Reporter</th>
|
||||
<th scope="col">Where</th>
|
||||
<th scope="col">Target</th>
|
||||
<th scope="col">Descripton</th>
|
||||
</tr>
|
||||
<?
|
||||
$i = 0;
|
||||
for my $bugkey (@bugs) {
|
||||
my $bug = $EQW->GetBugDetails($bugkey);
|
||||
if(!$bug) {
|
||||
next;
|
||||
}
|
||||
|
||||
if($i % 2 == 1) {
|
||||
print "<tr class=\"odd\">";
|
||||
} else {
|
||||
print "<tr>";
|
||||
}
|
||||
|
||||
my $bug_val = $bug->{bug};
|
||||
$bug_val =~ s/\r//g;
|
||||
$bug_val =~ s/\n/<br>/g;
|
||||
print "<td><a href='javascript:void(0)' onclick='ResolveBug(\"$bug->{id}\")'>Resolve</a></td>";
|
||||
print "<td>$bug->{name}</td>";
|
||||
print "<td>$bug->{zone}: ($bug->{x}, $bug->{y}, $bug->{z})</td>";
|
||||
print "<td>$bug->{target}</td>";
|
||||
print "<td style=\"text-align:left;\">$bug_val</td>";
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,141 @@
|
||||
<!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++;
|
||||
}
|
||||
|
||||
var offset = 0;
|
||||
function StatusTic() {
|
||||
$.getJSON("data/bug_data.html?offset="+offset+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById("open_bugs_count");
|
||||
|
||||
var cur_offset = offset / 50;
|
||||
var sep = (data.total_bug_count / 50);
|
||||
var app = "";
|
||||
for(var i = 0; i < sep; ++i) {
|
||||
var cur = 50 * i;
|
||||
var name = i + 1;
|
||||
if(i == cur_offset) {
|
||||
app += "<b>"+name+"</b> ";
|
||||
}
|
||||
else {
|
||||
app += "<a href='javascript:void(0)' onclick='OpenBugs(\""+cur+"\")'>"+name+"</a> ";
|
||||
}
|
||||
}
|
||||
elm.innerHTML = app;
|
||||
|
||||
$("#bug_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Reporter</th>";
|
||||
app_html += "<th scope=\"col\">Where</th>";
|
||||
app_html += "<th scope=\"col\">Target</th>";
|
||||
app_html += "<th scope=\"col\">Descripton</th>";
|
||||
app_html += "</tr>";
|
||||
$("#bug_table").append(app_html);
|
||||
for(var i = 0; i < data.bug_count; i++) {
|
||||
app_html = "";
|
||||
var mod = i % 2;
|
||||
if(mod == 1) {
|
||||
app_html += "<tr class=\"odd\">";
|
||||
} else {
|
||||
app_html += "<tr>";
|
||||
}
|
||||
|
||||
var bug_text = data.bugs[i].bug;
|
||||
bug_text = bug_text.replace("\r", "");
|
||||
bug_text = bug_text.replace("\n", "</br>");
|
||||
app_html += "<td>"+data.bugs[i].name+"</td>";
|
||||
app_html += "<td>"+data.bugs[i].zone+": ("+data.bugs[i].x+", "+data.bugs[i].y+", "+data.bugs[i].z+")</td>";
|
||||
app_html += "<td>"+data.bugs[i].target+"</td>";
|
||||
app_html += "<td style=\"text-align:left;\">"+bug_text+"</td>";
|
||||
app_html += "</tr>";
|
||||
$("#bug_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function OpenBugs(off) {
|
||||
offset = off;
|
||||
StatusTic();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 6000);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<?
|
||||
@bugs = $EQW->ListBugs(0);
|
||||
$bug_count = $EQW->CountBugs();
|
||||
?>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu_noaccess.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<div align="center"><h2>Bugs</h2></div>
|
||||
<div id="open_bugs_count" align="center">
|
||||
<?
|
||||
$cur_offset = 0;
|
||||
my $sep = ($bug_count / 50);
|
||||
for(my $i = 0; $i < $sep; ++$i) {
|
||||
my $cur = 50 * $i;
|
||||
my $name = $i + 1;
|
||||
|
||||
if($i == $cur_offset) {
|
||||
print "<b>$name</b> ";
|
||||
}
|
||||
else {
|
||||
print "<a href='javascript:void(0)' onclick='OpenBugs(\"$cur\")'>$name</a> ";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table id="bug_table" width="100%" cellspacing="0" cellpadding="0" class="styled_table">
|
||||
<tr>
|
||||
<th scope="col">Reporter</th>
|
||||
<th scope="col">Where</th>
|
||||
<th scope="col">Target</th>
|
||||
<th scope="col">Descripton</th>
|
||||
</tr>
|
||||
<?
|
||||
$i = 0;
|
||||
for my $bugkey (@bugs) {
|
||||
my $bug = $EQW->GetBugDetails($bugkey);
|
||||
if(!$bug) {
|
||||
next;
|
||||
}
|
||||
|
||||
if($i % 2 == 1) {
|
||||
print "<tr class=\"odd\">";
|
||||
} else {
|
||||
print "<tr>";
|
||||
}
|
||||
|
||||
my $bug_val = $bug->{bug};
|
||||
$bug_val =~ s/\r//g;
|
||||
$bug_val =~ s/\n/<br>/g;
|
||||
print "<td>$bug->{name}</td>";
|
||||
print "<td>$bug->{zone}: ($bug->{x}, $bug->{y}, $bug->{z})</td>";
|
||||
print "<td>$bug->{target}</td>";
|
||||
print "<td style=\"text-align:left;\">$bug_val</td>";
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,138 @@
|
||||
<!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 hidden_text = true;
|
||||
var timeout = null;
|
||||
|
||||
var idx = Math.floor((Math.random()*100000000));
|
||||
function GetStatusIdx() {
|
||||
return idx++;
|
||||
}
|
||||
|
||||
function StatusTic() {
|
||||
$.getJSON("data/console_data.html?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById("console_output");
|
||||
var message = "";
|
||||
var cout = $('#console_output');
|
||||
|
||||
for(var i = 0; i < data.message_count; i++) {
|
||||
message += data.messages[i].message;
|
||||
message += "\n";
|
||||
}
|
||||
|
||||
var cur_value = elm.value;
|
||||
if(cur_value != message) {
|
||||
elm.value = message;
|
||||
cout.scrollTop(99999);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ConsoleKey(event) {
|
||||
if(hidden_text == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
var keycode = ('which' in event) ? event.which : event.keyCode;
|
||||
if(keycode == 13) {
|
||||
var cinp = document.getElementById("console_input");
|
||||
var cinp_value = cinp.value;
|
||||
cinp_value = cinp_value.replace(/"/g, "\\\"");
|
||||
cinp.disabled = true;
|
||||
HideError();
|
||||
timeout = setTimeout("CommandTimeout()", 10000);
|
||||
|
||||
$.getJSON("actions/console_action.html?action=input&text="+cinp_value+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
cinp.value = "";
|
||||
cinp.disabled = false;
|
||||
clearInterval(timeout);
|
||||
if(data.status == 0) {
|
||||
ShowError(data.message);
|
||||
}
|
||||
StatusTic();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function BodyKey(event) {
|
||||
var keycode = ('which' in event) ? event.which : event.keyCode;
|
||||
if (keycode == 27 && hidden_text == false) {
|
||||
HideInput();
|
||||
} else if(hidden_text == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(keycode == 13) {
|
||||
ShowInput();
|
||||
}
|
||||
}
|
||||
|
||||
function ShowInput() {
|
||||
hidden_text = false;
|
||||
document.getElementById("console_input").value="";
|
||||
$("#console_input").fadeIn("slow");
|
||||
document.getElementById('console_input').focus();
|
||||
}
|
||||
|
||||
function HideInput() {
|
||||
hidden_text = true;
|
||||
document.getElementById("console_input").value="";
|
||||
$("#console_input").fadeOut("slow");
|
||||
HideError();
|
||||
}
|
||||
|
||||
function ShowError(msg) {
|
||||
$("#console_error").html("Error: " + msg);
|
||||
$("#console_error").show();
|
||||
$("#console_error").css("display", "block");
|
||||
}
|
||||
|
||||
function HideError() {
|
||||
$("#console_error").html("");
|
||||
$("#console_error").hide();
|
||||
}
|
||||
|
||||
function CommandTimeout() {
|
||||
var cinp = document.getElementById("console_input");
|
||||
cinp.disabled = false;
|
||||
alert("Timed out sending command to server.");
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
StatusTic();
|
||||
setInterval("StatusTic()", 5000);
|
||||
var elm = document.getElementById("console_output");
|
||||
elm.value = "";
|
||||
|
||||
elm = document.getElementById("console_input");
|
||||
elm.value = "";
|
||||
elm.disabled = false;
|
||||
|
||||
$('#console_output').scrollTop(99999);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body onkeyup="BodyKey(event)">
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<div align="center">
|
||||
<textarea id="console_output" class="console_out" cols="110" rows="40" readonly style="resize:none;"></textarea>
|
||||
<span id="console_error" class="error" style="display: none;"></span>
|
||||
<input id="console_input" class="console_in" type="text" style="display: none; width: 67.6em;" onkeyup="ConsoleKey(event)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?
|
||||
$offset = $request->get("offset", "0");
|
||||
my @bugs = $EQW->ListBugs($offset);
|
||||
my $bug_count = @bugs;
|
||||
my $total_bug_count = $EQW->CountBugs();
|
||||
print "{";
|
||||
print "\"total_bug_count\" : $total_bug_count,";
|
||||
print "\"bug_count\" : $bug_count,";
|
||||
print "\"bugs\" : ";
|
||||
print "[";
|
||||
my $i = 0;
|
||||
for my $bugkey (@bugs) {
|
||||
my $bug = $EQW->GetBugDetails($bugkey);
|
||||
|
||||
my $bug_val = $bug->{bug};
|
||||
$bug_val =~ s/\\/\\\\/g;
|
||||
$bug_val =~ s/\//\\\//g;
|
||||
$bug_val =~ s/\"/\\\"/g;
|
||||
$bug_val =~ s/\n/<br>/g;
|
||||
$bug_val =~ s/\r/\\r/g;
|
||||
$bug_val =~ s/\t/\\t/g;
|
||||
$bug_val =~ s/\x08/\\f/g;
|
||||
$bug_val =~ s/\x0C/\\b/g;
|
||||
$bug_val =~ s/[\x00-\x1F]/\./g;
|
||||
$bug_val =~ s/[\x7F-\xFF]/\./g;
|
||||
print "{";
|
||||
print "\"id\" : \"$bug->{id}\",";
|
||||
print "\"name\" : \"$bug->{name}\",";
|
||||
print "\"zone\" : \"$bug->{zone}\",";
|
||||
print "\"target\" : \"$bug->{target}\",";
|
||||
print "\"bug\" : \"$bug_val\",";
|
||||
print "\"x\" : \"$bug->{x}\",";
|
||||
print "\"y\" : \"$bug->{y}\",";
|
||||
print "\"z\" : \"$bug->{z}\"";
|
||||
|
||||
print "}";
|
||||
if($i != $bug_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print "]";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?
|
||||
my $message_count = $EQW->CountConsoleMessages();
|
||||
print "{";
|
||||
print "\"message_count\" : $message_count,";
|
||||
print "\"messages\" : ";
|
||||
print "[";
|
||||
for(my $i = 0; $i < $message_count; $i++)
|
||||
{
|
||||
print "{";
|
||||
my $msg = $EQW->GetConsoleMessage($i);
|
||||
$message = $msg->{message};
|
||||
$message =~ s/\\/\\\\/g;
|
||||
$message =~ s/\//\\\//g;
|
||||
$message =~ s/\"/\\\"/g;
|
||||
$message =~ s/\n/\\n/g;
|
||||
$message =~ s/\r/\\r/g;
|
||||
$message =~ s/\t/\\t/g;
|
||||
$message =~ s/\x08/\\f/g;
|
||||
$message =~ s/\x0C/\\b/g;
|
||||
$message =~ s/[\x00-\x1F]/\./g;
|
||||
$message =~ s/[\x7F-\xFF]/\./g;
|
||||
|
||||
print "\"message\" : \"$message\"";
|
||||
print "}";
|
||||
if($i != $message_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
}
|
||||
print "]";
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?
|
||||
my $launcher_count = $EQW->CountLaunchers(1);
|
||||
print "{";
|
||||
print "\"launcher_count\" : " . $launcher_count;
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?
|
||||
$launcher_name = $request->get("launcher", "none");
|
||||
|
||||
if($launcher_name eq "none") {
|
||||
@launchers = sort $EQW->ListLaunchers();
|
||||
my $launcher_count = @launchers;
|
||||
print "{";
|
||||
print "\"launcher_count\" : $launcher_count,";
|
||||
print "\"launchers\" : ";
|
||||
print "[";
|
||||
|
||||
my $i = 0;
|
||||
for my $lk (@launchers) {
|
||||
my $l = $EQW->GetLauncher($lk);
|
||||
print "{";
|
||||
print "\"name\" : \"". $l->GetName() ."\",";
|
||||
print "\"static_count\" : ". $l->GetStaticCount() .",";
|
||||
print "\"dynamic_count\" : ". $l->GetDynamicCount() .",";
|
||||
$conn = 0;
|
||||
if($l->IsConnected()) {
|
||||
$conn = 1;
|
||||
}
|
||||
print "\"connected\" : ". $conn;
|
||||
print "}";
|
||||
|
||||
if($i != $launcher_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
} else {
|
||||
my $l = $EQW->GetLauncher($lname);
|
||||
print "{";
|
||||
print "\"name\" : \"". $l->GetName() ."\",";
|
||||
print "\"static_count\" : ". $l->GetStaticCount() .",";
|
||||
print "\"dynamic_count\" : ". $l->GetDynamicCount() .",";
|
||||
$conn = 0;
|
||||
if($l->IsConnected()) {
|
||||
$conn = 1;
|
||||
}
|
||||
print "\"connected\" : ". $conn . ",";
|
||||
my @zones = $l->ListZones();
|
||||
my $zone_count = @zones;
|
||||
print "\"zone_count\" : ". $zone_count . ",";
|
||||
print "\"zones\" : ";
|
||||
print "[";
|
||||
my $i = 0;
|
||||
for my $zone (@zones) {
|
||||
my $z = $config->GetZoneDetails($zone);
|
||||
print "{";
|
||||
print "\"name\" : \"$z->{name}\",";
|
||||
print "\"up\" : $z->{up},";
|
||||
print "\"starts\" : $z->{starts},";
|
||||
print "\"port\" : $z->{port}";
|
||||
print "}";
|
||||
|
||||
if($i != $zone_count - 1) {
|
||||
print ", ";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?
|
||||
my $player_count = $EQW->CountPlayers();
|
||||
print "{";
|
||||
print "\"player_count\" : " . $player_count;
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?
|
||||
$zone = $request->get("zone", "");
|
||||
$instance_id = $request->get("instance_id", "0");
|
||||
my @players = $EQW->ListPlayers($zone, $instance_id);
|
||||
my $player_count = @players;
|
||||
print "{";
|
||||
print "\"player_count\" : $player_count,";
|
||||
print "\"players\" : ";
|
||||
print "[";
|
||||
|
||||
my $i = 0;
|
||||
for my $player (@players) {
|
||||
my $pd = $EQW->GetPlayerDetails($player);
|
||||
|
||||
print "{";
|
||||
print "\"character\" : \"$pd->{character}\",";
|
||||
print "\"account\" : \"$pd->{account}\",";
|
||||
print "\"account_id\" : \"$pd->{account_id}\",";
|
||||
print "\"location_short\" : \"$pd->{location_short}\",";
|
||||
print "\"location_long\" : \"$pd->{location_long}\",";
|
||||
print "\"ip\" : \"$pd->{ip}\",";
|
||||
print "\"level\" : \"$pd->{level}\",";
|
||||
print "\"race\" : \"$pd->{race}\",";
|
||||
print "\"race_id\" : \"$pd->{race_id}\",";
|
||||
print "\"class\" : \"$pd->{class}\",";
|
||||
print "\"class_id\" : \"$pd->{class_id}\",";
|
||||
print "\"guild_id\" : \"$pd->{guild_id}\",";
|
||||
print "\"guild\" : \"$pd->{guild}\",";
|
||||
print "\"status\" : \"$pd->{status}\",";
|
||||
print "\"client_version\" : \"$pd->{client_version}\"";
|
||||
print "}";
|
||||
|
||||
if($i != $player_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?
|
||||
print "{";
|
||||
if($EQW->LSConnected()) {
|
||||
print "\"connected\" : \"1\",";
|
||||
} else {
|
||||
print "\"connected\" : \"0\",";
|
||||
}
|
||||
if($EQW->GetConfig("Locked") eq "true") {
|
||||
print "\"locked\" : \"1\"";
|
||||
} else {
|
||||
print "\"locked\" : \"0\"";
|
||||
}
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?
|
||||
my $zone_count = $EQW->CountZones();
|
||||
print "{";
|
||||
print "\"zone_count\" : " . $zone_count;
|
||||
print "}";
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?
|
||||
|
||||
@zones = $EQW->ListBootedZones();
|
||||
@zones = sort @zones;
|
||||
$zone_count = @zones;
|
||||
|
||||
print "{";
|
||||
print "\"zone_count\" : $zone_count,";
|
||||
print "\"zones\" : ";
|
||||
print "[";
|
||||
|
||||
for(my $i = 0; $i < $zone_count; $i++) {
|
||||
my $zone = $EQW->GetZoneDetails($zones[$i]);
|
||||
print "{";
|
||||
print "\"type\" : \"$zone->{type}\",";
|
||||
print "\"zone_id\" : $zone->{zone_id},";
|
||||
print "\"launch_name\" : \"$zone->{launch_name}\",";
|
||||
print "\"short_name\" : \"$zone->{short_name}\",";
|
||||
print "\"long_name\" : \"$zone->{long_name}\",";
|
||||
print "\"port\" : $zone->{port},";
|
||||
print "\"player_count\" : $zone->{player_count},";
|
||||
print "\"instance_id\" : $zone->{instance_id}";
|
||||
print "}";
|
||||
|
||||
if($i != $zone_count - 1) {
|
||||
print ",";
|
||||
}
|
||||
}
|
||||
|
||||
print "]";
|
||||
print "}";
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 673 B |
@@ -0,0 +1,191 @@
|
||||
<!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 locked = 0;
|
||||
var connected = 0;
|
||||
|
||||
var idx = Math.floor((Math.random()*100000000));
|
||||
function GetStatusIdx() {
|
||||
return idx++;
|
||||
}
|
||||
|
||||
function StatusTic() {
|
||||
$.getJSON("data/player_count.html"+"?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById('pcount');
|
||||
elm.innerHTML = data.player_count;
|
||||
});
|
||||
|
||||
$.getJSON("data/zone_count.html"+"?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById('zcount');
|
||||
elm.innerHTML = data.zone_count;
|
||||
});
|
||||
|
||||
$.getJSON("data/launcher_count.html"+"?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
var elm = document.getElementById('lcount');
|
||||
elm.innerHTML = data.launcher_count;
|
||||
});
|
||||
|
||||
$.getJSON("data/world_status.html"+"?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
|
||||
var elm = document.getElementById('lock_status');
|
||||
if(data.locked == 1) {
|
||||
elm.innerHTML = "locked";
|
||||
elm = document.getElementById('lock_link');
|
||||
elm.innerHTML = "Unlock World";
|
||||
} else {
|
||||
elm.innerHTML = "<b>NOT</b> locked";
|
||||
elm = document.getElementById('lock_link');
|
||||
elm.innerHTML = "Lock World";
|
||||
}
|
||||
|
||||
elm = document.getElementById('conn_status');
|
||||
if(data.connected == 1) {
|
||||
elm.innerHTML = "connected";
|
||||
elm = document.getElementById('restart_id');
|
||||
elm.style.display = 'none';
|
||||
} else {
|
||||
elm.innerHTML = "<b>NOT</b> connected";
|
||||
elm = document.getElementById('restart_id');
|
||||
elm.style.display = 'inline';
|
||||
}
|
||||
|
||||
locked = data.locked;
|
||||
connected = data.connected;
|
||||
});
|
||||
}
|
||||
|
||||
function ToggleLock() {
|
||||
var action = "lock";
|
||||
if(locked == 1) {
|
||||
action = "unlock";
|
||||
}
|
||||
|
||||
$.getJSON("actions/world_action.html?action=" + action+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
|
||||
var elm = document.getElementById('lock_status');
|
||||
if(data.locked == 1) {
|
||||
elm.innerHTML = "locked";
|
||||
elm = document.getElementById('lock_link');
|
||||
elm.innerHTML = "Unlock World";
|
||||
} else {
|
||||
elm.innerHTML = "<b>NOT</b> locked";
|
||||
elm = document.getElementById('lock_link');
|
||||
elm.innerHTML = "Lock World";
|
||||
}
|
||||
|
||||
elm = document.getElementById('conn_status');
|
||||
if(data.connected == 1) {
|
||||
elm.innerHTML = "connected";
|
||||
elm = document.getElementById('restart_id');
|
||||
elm.style.display = 'none';
|
||||
} else {
|
||||
elm.innerHTML = "<b>NOT</b> connected";
|
||||
elm = document.getElementById('restart_id');
|
||||
elm.style.display = 'inline';
|
||||
}
|
||||
|
||||
locked = data.locked;
|
||||
connected = data.connected;
|
||||
});
|
||||
}
|
||||
|
||||
function Reconnect() {
|
||||
$.getJSON("actions/world_action.html?action=lsreconnect"+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
|
||||
var elm = document.getElementById('lock_status');
|
||||
if(data.locked == 1) {
|
||||
elm.innerHTML = "locked";
|
||||
elm = document.getElementById('lock_link');
|
||||
elm.innerHTML = "Unlock World";
|
||||
} else {
|
||||
elm.innerHTML = "<b>NOT</b> locked";
|
||||
elm = document.getElementById('lock_link');
|
||||
elm.innerHTML = "Lock World";
|
||||
}
|
||||
|
||||
elm = document.getElementById('conn_status');
|
||||
if(data.connected == 1) {
|
||||
elm.innerHTML = "connected";
|
||||
elm = document.getElementById('restart_id');
|
||||
elm.style.display = 'none';
|
||||
} else {
|
||||
elm.innerHTML = "<b>NOT</b> connected";
|
||||
elm = document.getElementById('restart_id');
|
||||
elm.style.display = 'inline';
|
||||
}
|
||||
locked = data.locked;
|
||||
connected = data.connected;
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 4000);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<?
|
||||
my $zcount = $EQW->CountZones();
|
||||
my $lcount = $EQW->CountLaunchers(1);
|
||||
my $pcount = $EQW->CountPlayers();
|
||||
|
||||
print "<table width='38%' class='styled_table' cellpadding='0' cellspacing='0' align='center'>";
|
||||
print "<tr>";
|
||||
print "<th>Zones Booted<th>";
|
||||
print "<th>Launchers Connected<th>";
|
||||
print "<th>Players Online<th>";
|
||||
print "</tr>";
|
||||
print "<tr>";
|
||||
print "<td><a href='zones.html' id='zcount'>$zcount</a><td>";
|
||||
print "<td><a href='launchers.html' id='lcount'>$lcount</a><td>";
|
||||
print "<td><a href='players.html' id='pcount'>$pcount</a><td>";
|
||||
print "</tr>";
|
||||
print "</table></br>";
|
||||
|
||||
if($EQW->LSConnected()) {
|
||||
my $ls = $EQW->GetConfig("LoginHost");
|
||||
my $lsp = $EQW->GetConfig("LoginPort");
|
||||
$ls_str = "World is <span id='conn_status'>connected</span> to login server $ls:$lsp.</br><a style='display:none;' id='restart_id' href='javascript:void(0)' onclick='Reconnect()'>Restart Auto Reconnect</a></br>";
|
||||
print "<script><!--connected = 1;--></script>";
|
||||
} else {
|
||||
my $ls = $EQW->GetConfig("LoginHost");
|
||||
my $lsp = $EQW->GetConfig("LoginPort");
|
||||
$ls_str = "World is <span id='conn_status'><b>NOT</b> connected</span> to login server $ls:$lsp. </br><a id='restart_id' href='javascript:void(0)' onclick='Reconnect()'>Restart Auto Reconnect</a></br>";
|
||||
}
|
||||
print "<div width='38%' align='center'>";
|
||||
print "$ls_str";
|
||||
print "</div></br>";
|
||||
|
||||
if($EQW->GetConfig("Locked") eq "true") {
|
||||
$locked_str = "World is <span id='lock_status'>locked</span>. <a href='javascript:void(0)' id='lock_link' onclick='ToggleLock()'>Unlock World</a>.<br>";
|
||||
print "<script><!--locked = 1;--></script>";
|
||||
} else {
|
||||
$locked_str = "World is <span id='lock_status'><b>NOT</b> locked</span>. <a href='javascript:void(0)' id='lock_link' onclick='ToggleLock()'>Lock World</a>.<br>";
|
||||
}
|
||||
|
||||
print "<div width='38%' align='center'>";
|
||||
print "$locked_str";
|
||||
print "</div>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,317 @@
|
||||
<!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>
|
||||
<?
|
||||
$lname = $request->get("name", "ERROR");
|
||||
?>
|
||||
<!--
|
||||
var idx = Math.floor((Math.random()*100000000));
|
||||
function GetStatusIdx() {
|
||||
return idx++;
|
||||
}
|
||||
|
||||
function StatusTic() {
|
||||
$.getJSON("data/launcher_data.html?launcher="+<?print "\"$lname\"";?>+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
$("#launcher_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Zone Name</th>";
|
||||
app_html += "<th scope=\"col\">State</th>";
|
||||
app_html += "<th scope=\"col\">Port</th>";
|
||||
app_html += "<th scope=\"col\">Start Count</th>";
|
||||
app_html += "<th scope=\"col\">Actions</th>";
|
||||
app_html += "</tr>";
|
||||
$("#launcher_table").append(app_html);
|
||||
for(var i = 0; i < data.zone_count; i++) {
|
||||
app_html = "<tr>";
|
||||
app_html += "<td><a href='zone.html?zone="+data.zones[i].name+"'>"+data.zones[i].name+"</a></td>";
|
||||
if(data.zones[i].up) {
|
||||
app_html += "<td><font color='#009900'><b>UP</b></font></td>";
|
||||
} else {
|
||||
app_html += "<td><font color='#CC0000'><b>DOWN</b></font></td>";
|
||||
}
|
||||
if(data.zones[i].port == 0) {
|
||||
app_html += "<td>Dynamic</td>";
|
||||
} else {
|
||||
app_html += "<td>"+data.zones[i].port+"</td>";
|
||||
}
|
||||
app_html += "<td>"+data.zones[i].starts+"</td>";
|
||||
app_html += "<td>";
|
||||
if(data.connected) {
|
||||
app_html += "<a href='javascript:void(0)' onclick='RestartZone(\""+data.zones[i].name+"\")'>Restart</a> - ";
|
||||
if(data.zones[i].up) {
|
||||
app_html += "<a href='javascript:void(0)' onclick='StopZone(\""+data.zones[i].name+"\")'>Stop</a>";
|
||||
} else {
|
||||
app_html += "<a href='javascript:void(0)' onclick='StartZone(\""+data.zones[i].name+"\")'>Start</a>";
|
||||
}
|
||||
if(!data.zones[i].name.match(/dynamic/)) {
|
||||
app_html += " - ";
|
||||
}
|
||||
}
|
||||
if(!data.zones[i].name.match(/dynamic/)) {
|
||||
app_html += "<a href='javascript:void(0)' onclick='RemoveZone(\""+data.zones[i].name+"\")'>Remove</a>";
|
||||
}
|
||||
app_html += "</td>";
|
||||
app_html += "</tr>";
|
||||
$("#launcher_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ShowAddLauncher() {
|
||||
$("#add_launcher_link").hide();
|
||||
$("#min_add_launcher_link").show();
|
||||
$("#add_launcher_table").fadeIn("slow");
|
||||
}
|
||||
|
||||
function HideAddLauncher() {
|
||||
$("#add_launcher_link").show();
|
||||
$("#min_add_launcher_link").hide();
|
||||
$("#add_launcher_table").fadeOut("slow");
|
||||
}
|
||||
|
||||
function BootZone() {
|
||||
var elm = document.getElementById("short_name_field");
|
||||
var bzone = elm.value;
|
||||
elm.value = "";
|
||||
elm = document.getElementById("port_field");
|
||||
var bport = elm.value;
|
||||
elm.value = "0";
|
||||
|
||||
elm = document.getElementById("boot_button_img");
|
||||
elm.style.display = "inline";
|
||||
|
||||
elm = document.getElementById("boot_button");
|
||||
elm.className = "styled_button_disabled";
|
||||
$('#boot_button').unbind('click');
|
||||
|
||||
$.getJSON("actions/launcher_action.html?action=boot&launcher_name="+<?print "\"$lname\"";?>+"&zone="+bzone+"&port="+bport+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
$('#boot_button').bind('click', BootZone);
|
||||
elm = document.getElementById("boot_button");
|
||||
elm.className = "styled_button";
|
||||
|
||||
elm = document.getElementById("boot_button_img");
|
||||
elm.style.display = "none";
|
||||
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ChangeDynamicCount() {
|
||||
var elm = document.getElementById("dynamic_count_field");
|
||||
var dcount = elm.value;
|
||||
|
||||
elm = document.getElementById("dynamic_count_button_img");
|
||||
elm.style.display = "inline";
|
||||
|
||||
elm = document.getElementById("dynamic_count_button");
|
||||
elm.className = "styled_button_disabled";
|
||||
$('#dynamic_count_button').unbind('click');
|
||||
|
||||
$.getJSON("actions/launcher_action.html?action=change_dynamic_count&launcher_name="+<?print "\"$lname\"";?>+"&dynamic_count="+dcount+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
$('#dynamic_count_button').bind('click', ChangeDynamicCount);
|
||||
elm = document.getElementById("dynamic_count_button");
|
||||
elm.className = "styled_button";
|
||||
|
||||
elm = document.getElementById("dynamic_count_button_img");
|
||||
elm.style.display = "none";
|
||||
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function RemoveZone(zone_name) {
|
||||
$.getJSON("actions/launcher_action.html?action=remove_zone&launcher_name="+<?print "\"$lname\"";?>+"&zone="+zone_name+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function RebootAll() {
|
||||
$.getJSON("actions/launcher_action.html?action=reboot_all&launcher_name="+<?print "\"$lname\"";?>+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function StopAll() {
|
||||
$.getJSON("actions/launcher_action.html?action=stop_all&launcher_name="+<?print "\"$lname\"";?>+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function StartAll() {
|
||||
$.getJSON("actions/launcher_action.html?action=start_all&launcher_name="+<?print "\"$lname\"";?>+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function RestartZone(zone) {
|
||||
$.getJSON("actions/launcher_action.html?action=restart_zone&launcher_name="+<?print "\"$lname\"";?>+"&zone="+zone+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function StartZone(zone) {
|
||||
$.getJSON("actions/launcher_action.html?action=start_zone&launcher_name="+<?print "\"$lname\"";?>+"&zone="+zone+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function StopZone(zone) {
|
||||
$.getJSON("actions/launcher_action.html?action=stop_zone&launcher_name="+<?print "\"$lname\"";?>+"&zone="+zone+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 4000);
|
||||
$('#boot_button').bind('click', BootZone);
|
||||
$('#dynamic_count_button').bind('click', ChangeDynamicCount);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<?
|
||||
$config = $EQW->GetLauncher($lname);
|
||||
if(!$config) {
|
||||
print "<h2>Unable to find launcher $lname</h2>";
|
||||
}
|
||||
?>
|
||||
<div align="center">
|
||||
<a href="#" onclick='RebootAll()'>Reboot All Zones</a> -
|
||||
<a href="#" onclick='StopAll()'>Stop All Zones</a> -
|
||||
<a href="#" onclick='StartAll()'>Start All Zones</a>
|
||||
</div>
|
||||
</br>
|
||||
<div align="center">
|
||||
<a id='add_launcher_link' href="#" onclick='ShowAddLauncher()'>Add Zone</a>
|
||||
<a id='min_add_launcher_link' href="#" style="display: none;" onclick='HideAddLauncher()'>Minimize</a>
|
||||
</div>
|
||||
<table id='add_launcher_table' class='styled_table' width="70%" cellspacing="0" cellpadding="0" style="display: none">
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
Add:
|
||||
Zone Short Name: <input type='text' id='short_name_field'>
|
||||
Port: <input type='text' id='port_field' value='0' size='5'>
|
||||
<button id="boot_button" class="styled_button"><img id="boot_button_img" src="images/loading.gif" height="16" width="16" style='display: none;'>Boot</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
Change Dynamic Count: <input type='text' id='dynamic_count_field' value='<? print $config->GetDynamicCount(); ?>' size='5'>
|
||||
<button id="dynamic_count_button" class="styled_button"><img id="dynamic_count_button_img" src="images/loading.gif" height="16" width="16" style='display: none;'>Change</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id='launcher_table' class='styled_table' width="70%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th scope="col">Zone Name</th>
|
||||
<th scope="col">State</th>
|
||||
<th scope="col">Port</th>
|
||||
<th scope="col">Start Count</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
<?
|
||||
my @zones = $config->ListZones();
|
||||
|
||||
for my $zone (sort @zones) {
|
||||
my $z = $config->GetZoneDetails($zone);
|
||||
if(!$z) {
|
||||
$zone->{name} = "ERROR: no launcher";
|
||||
} elsif($z->{error}) {
|
||||
$zone->{name} = "ERROR: $z->{error}";
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
print "\t<td><a href='zone.html?zone=$z->{name}'>$z->{name}</a></td>";
|
||||
if($z->{up}) {
|
||||
print "<td><font color='#009900'><b>UP</b></font></td>";
|
||||
} else {
|
||||
print "<td><font color='#CC0000'><b>DOWN</b></font></td>";
|
||||
}
|
||||
if($z->{port} == 0) {
|
||||
print "<td>Dynamic</td>";
|
||||
} else {
|
||||
print "<td>$z->{port}</td>";
|
||||
}
|
||||
print "<td>$z->{starts}</td>";
|
||||
print "<td>";
|
||||
if($config->IsConnected()) {
|
||||
print "<a href='javascript:void(0)' onclick='RestartZone(\"$z->{name}\")'>Restart</a> - ";
|
||||
if($z->{up}) {
|
||||
print "<a href='javascript:void(0)' onclick='StopZone(\"$z->{name}\")'>Stop</a>";
|
||||
} else {
|
||||
print "<a href='javascript:void(0)' onclick='StartZone(\"$z->{name}\")'>Start</a>";
|
||||
}
|
||||
if($z->{name} !~ /dynamic/) {
|
||||
print " - ";
|
||||
}
|
||||
}
|
||||
if($z->{name} !~ /dynamic/) {
|
||||
print "<a href='javascript:void(0)' onclick='RemoveZone(\"$z->{name}\")'>Remove</a>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,166 @@
|
||||
<!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/launcher_data.html?idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
|
||||
$("#launcher_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Launcher Name </th>";
|
||||
app_html += "<th scope=\"col\">Zone Count</th>";
|
||||
app_html += "<th scope=\"col\">Actions</th>";
|
||||
app_html += "</tr>";
|
||||
$("#launcher_table").append(app_html);
|
||||
|
||||
var i = 0;
|
||||
for(var i = 0; i < data.launcher_count; i++) {
|
||||
app_html = "<tr>";
|
||||
if(data.launchers[i].connected) {
|
||||
app_html += "<td><a href='launcher.html?name=" + data.launchers[i].name + "'>" + data.launchers[i].name + "</a></td>";
|
||||
} else {
|
||||
app_html += "<td><a href='launcher.html?name="+ data.launchers[i].name +"'>"+ data.launchers[i].name +"</a><br><b>Not Connected</b></td>";
|
||||
}
|
||||
app_html += "<td>"+ data.launchers[i].static_count +"s, "+ data.launchers[i].dynamic_count +"d</td>";
|
||||
app_html += "<td>";
|
||||
app_html += "<a href='launcher.html?name="+ data.launchers[i].name +"'>Details</a> - ";
|
||||
app_html += "<a href='javascript:void(0)' onclick='RemoveLauncher(\"" + data.launchers[i].name + "\")'>Remove</a>";
|
||||
app_html += "</td>\n";
|
||||
app_html += "</tr>\n";
|
||||
|
||||
$("#launcher_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function RemoveLauncher(name) {
|
||||
$.getJSON("actions/launcher_action.html?action=remove&launcher_name="+name+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function AddLauncher() {
|
||||
var elm = document.getElementById("al_add_button_img");
|
||||
elm.style.display = "inline";
|
||||
|
||||
elm = document.getElementById("al_add_button");
|
||||
elm.className = "styled_button_disabled";
|
||||
$('#al_add_button').unbind('click');
|
||||
|
||||
elm = document.getElementById("al_name");
|
||||
var launcher_name = elm.value;
|
||||
elm.value = "";
|
||||
|
||||
elm = document.getElementById("al_count");
|
||||
var dynamic_count = elm.value;
|
||||
elm.value = "";
|
||||
|
||||
$.getJSON("actions/launcher_action.html?action=add&launcher_name="+launcher_name+"&dynamic_count="+dynamic_count+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
$('#al_add_button').bind('click', AddLauncher);
|
||||
elm = document.getElementById("al_add_button");
|
||||
elm.className = "styled_button";
|
||||
|
||||
elm = document.getElementById("al_add_button_img");
|
||||
elm.style.display = "none";
|
||||
|
||||
if(data.status == 0) {
|
||||
alert(data.message);
|
||||
} else {
|
||||
StatusTic();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ShowAddLauncher() {
|
||||
$("#add_launcher_link").hide();
|
||||
$("#min_add_launcher_link").show();
|
||||
$("#add_launcher_table").fadeIn("slow");
|
||||
}
|
||||
|
||||
function HideAddLauncher() {
|
||||
$("#add_launcher_link").show();
|
||||
$("#min_add_launcher_link").hide();
|
||||
$("#add_launcher_table").fadeOut("slow");
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 4000);
|
||||
$('#al_add_button').bind('click', AddLauncher);
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<?
|
||||
@list = sort $EQW->ListLaunchers();
|
||||
?>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<h2 align="center">Launchers</h2>
|
||||
<table id='launcher_table' class='styled_table' width="70%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th scope="col">Launcher Name </th>
|
||||
<th scope="col">Zone Count</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
<?
|
||||
for my $lk (sort @list) {
|
||||
my $l = $EQW->GetLauncher($lk);
|
||||
if(!$l) {
|
||||
next;
|
||||
}
|
||||
print "<tr>\n";
|
||||
if($l->IsConnected()) {
|
||||
print "\t<td><a href='launcher.html?name=".$l->GetName()."'>".$l->GetName()."</a></td>";
|
||||
} else {
|
||||
print "<td><a href='launcher.html?name=".$l->GetName()."'>".$l->GetName()."</a><br><b>Not Connected</b></td>";
|
||||
}
|
||||
print "<td>".$l->GetStaticCount()."s, ".$l->GetDynamicCount()."d</td>";
|
||||
print "<td>";
|
||||
print "<a href='launcher.html?name=".$l->GetName()."'>Details</a> - ";
|
||||
print "<a href='javascript:void(0)' onclick='RemoveLauncher(\"" . $l->GetName() . "\")'>Remove</a>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</br>
|
||||
<div align="center">
|
||||
<span id="add_launcher_link"><a href='javascript:void(0)' onclick='ShowAddLauncher()'>Add Launcher</a></span>
|
||||
<span id="min_add_launcher_link" style="display:none;"><a href='javascript:void(0)' onclick='HideAddLauncher()'>Minimize</a></span>
|
||||
</div>
|
||||
<table id="add_launcher_table" class='styled_table' width="40%" cellspacing="0" cellpadding="0" style="display:none;">
|
||||
<tr>
|
||||
<td>
|
||||
<h2>Add Launcher:</h2>
|
||||
Name: <input type='text' name='name' id='al_name'>
|
||||
Dynamic Count: <input type='text' name='dynamics' size="3" id='al_count'>
|
||||
<button id='al_add_button' class='styled_button'><img id="al_add_button_img" src="images/loading.gif" height="16" width="16" style='display: none;'>Add</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,43 @@
|
||||
<!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>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<h2 align="center">Petition Management</h2>
|
||||
<?
|
||||
$q = "SELECT accountname, charname, petitiontext, FROM_UNIXTIME(senttime, '%Y-%m-%d %h:%m %p') AS senttime FROM petitions";
|
||||
my $res = $EQDB->query($q);
|
||||
if ($res) {
|
||||
print "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" class=\"styled_table\">\n";
|
||||
print "\t<tr>\n";
|
||||
print "\t\t<th width=1 nowrap>Account</th>\n";
|
||||
print "\t\t<th width=1 nowrap>Character</th>\n";
|
||||
print "\t\t<th>Text</th>\n";
|
||||
print "\t\t<th width=1 nowrap>Date/Time</th>\n";
|
||||
print "\t</tr>\n";
|
||||
while (my $row=$res->fetch_row_hash) {
|
||||
print "\t<tr>\n";
|
||||
print "\t\t<td><a href=\"account.html?name=$row->{accountname}\">$row->{accountname}</a></td>\n";
|
||||
print "\t\t<td>$row->{charname}</td>\n";
|
||||
print "\t\t<td align=\"left\">$row->{petitiontext}</td>\n";
|
||||
print "\t\t<td>$row->{senttime}</td>\n";
|
||||
print "\t</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
} else {
|
||||
print "No petitions"
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,142 @@
|
||||
<!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">
|
||||
<?
|
||||
$zone = $request->get("zone", "");
|
||||
$instance_id = $request->get("instance_id", "0");
|
||||
@chars = $EQW->ListPlayers($zone, $instance_id);
|
||||
#(
|
||||
# { character => "Joe", account => "yay", location_short => "arena", location_long => "Arena" },
|
||||
# { character => "Bob", account => "yay", location_short => "freportw", location_long => "West Freeport" },
|
||||
# { character => "Monkey", account => "notyay", location_short => "freportn", location_long => "North Freeport" }
|
||||
# );
|
||||
?>
|
||||
<head>
|
||||
<title>EQEmu</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/style.css"/>
|
||||
<script src="scripts/jquery.js"></script>
|
||||
<script>
|
||||
<!--
|
||||
var zone = <?print "\"$zone\"";?>;
|
||||
var instance_id = <?print "\"$instance_id\"";?>;
|
||||
|
||||
var idx = Math.floor((Math.random()*100000000));
|
||||
function GetStatusIdx() {
|
||||
return idx++;
|
||||
}
|
||||
|
||||
function StatusTic() {
|
||||
$.getJSON("data/player_data.html?zone="+zone+"&instance_id="+instance_id+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
$("#player_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Character</th>";
|
||||
app_html += "<th scope=\"col\">Account Name</th>";
|
||||
app_html += "<th scope=\"col\">Location</th>";
|
||||
app_html += "</tr>";
|
||||
|
||||
var elm = document.getElementById("player_count");
|
||||
elm.innerHTML = data.player_count;
|
||||
|
||||
$("#player_table").append(app_html);
|
||||
for(var i = 0; i < data.player_count; i++) {
|
||||
app_html = "<tr>";
|
||||
|
||||
app_html += "<tr id=\"row_$char->{character}\">";
|
||||
if(data.players[i].character == "") {
|
||||
app_html += "<td>Not Selected</td>";
|
||||
} else {
|
||||
app_html += "<td>"+data.players[i].character;
|
||||
if(data.players[i].guild_id > 0) {
|
||||
app_html += " <<a href='guild.html?id="+data.players[i].guild_id+"'>"+data.players[i].guild+"</a>>";
|
||||
}
|
||||
app_html += "<br>";
|
||||
app_html += data.players[i].level + " " + data.players[i].race + " " + data.players[i].class;
|
||||
app_html += "</td>";
|
||||
}
|
||||
app_html += "<td><a href='account.html?name="+data.players[i].account+"'>"+data.players[i].account+"</a>";
|
||||
if(data.players[i].status > 0) {
|
||||
app_html += " (status "+data.players[i].status+")";
|
||||
}
|
||||
app_html += "<br>";
|
||||
app_html += " "+data.players[i].ip+"</td>";
|
||||
app_html += "<td>"+data.players[i].location_long+" ("+data.players[i].location_short+")</td>";
|
||||
app_html += "</tr>";
|
||||
$("#player_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function Kick(char_name) {
|
||||
$.getJSON("actions/kick_players.html?player=" + char_name+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 4000);
|
||||
});
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<h2 align="center">Online Player List</h2>
|
||||
<div align="center">
|
||||
<?
|
||||
if($zone eq "") {
|
||||
print "There are <span id=\"player_count\">".($#chars+1)."</span> players logged in.";
|
||||
} else {
|
||||
print "There are <span id=\"player_count\">".($#chars+1)."</span> players in $zone.";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</br>
|
||||
|
||||
<table id="player_table" width="70%" cellspacing="0" cellpadding="0" class="styled_table">
|
||||
<tr>
|
||||
<th scope="col">Character</th>
|
||||
<th scope="col">Account Name</th>
|
||||
<th scope="col">Location</th>
|
||||
</tr>
|
||||
<?
|
||||
foreach my $charname (@chars) {
|
||||
my $char = $EQW->GetPlayerDetails($charname);
|
||||
if(!$char) {
|
||||
$char->{character} = "ERROR: no char";
|
||||
} elsif($char->{error}) {
|
||||
$char->{character} = "ERROR: ".$char->{error};
|
||||
}
|
||||
print "<tr id=\"row_$char->{character}\">";
|
||||
if($char->{character} eq "") {
|
||||
print "<td>Not Selected</td>";
|
||||
} else {
|
||||
print "<td>$char->{character}";
|
||||
if(defined($char->{guild_id}) && $char->{guild_id} > 0) {
|
||||
print " <<a href='guild.html?id=$char->{guild_id}'>$char->{guild}</a>>";
|
||||
}
|
||||
print "<br>";
|
||||
print "$char->{level} $char->{race} $char->{class}";
|
||||
print "</td>";
|
||||
}
|
||||
print "<td><a href='account.html?name=$char->{account}'>$char->{account}</a>";
|
||||
if($char->{status} > 0) {
|
||||
print " (status $char->{status})";
|
||||
}
|
||||
print "<br>";
|
||||
print " $char->{ip}</td>";
|
||||
print "<td>$char->{location_long} ($char->{location_short})</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,121 @@
|
||||
<!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">
|
||||
<?
|
||||
$zone = $request->get("zone", "");
|
||||
$instance_id = $request->get("instance_id", "0");
|
||||
@chars = $EQW->ListPlayers($zone, $instance_id);
|
||||
#(
|
||||
# { character => "Joe", account => "yay", location_short => "arena", location_long => "Arena" },
|
||||
# { character => "Bob", account => "yay", location_short => "freportw", location_long => "West Freeport" },
|
||||
# { character => "Monkey", account => "notyay", location_short => "freportn", location_long => "North Freeport" }
|
||||
# );
|
||||
?>
|
||||
<head>
|
||||
<title>EQEmu</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/style.css"/>
|
||||
<script src="scripts/jquery.js"></script>
|
||||
<script>
|
||||
<!--
|
||||
var zone = <?print "\"$zone\"";?>;
|
||||
var instance_id = <?print "\"$instance_id\"";?>;
|
||||
|
||||
var idx = Math.floor((Math.random()*100000000));
|
||||
function GetStatusIdx() {
|
||||
return idx++;
|
||||
}
|
||||
|
||||
function StatusTic() {
|
||||
$.getJSON("data/player_data.html?zone="+zone+"&instance_id="+instance_id+"&idx="+GetStatusIdx(),
|
||||
function(data) {
|
||||
$("#player_table").empty();
|
||||
var app_html = "<tr>";
|
||||
app_html += "<th scope=\"col\">Character</th>";
|
||||
app_html += "<th scope=\"col\">Location</th>";
|
||||
app_html += "</tr>";
|
||||
|
||||
var elm = document.getElementById("player_count");
|
||||
elm.innerHTML = data.player_count;
|
||||
|
||||
$("#player_table").append(app_html);
|
||||
for(var i = 0; i < data.player_count; i++) {
|
||||
app_html = "<tr>";
|
||||
|
||||
app_html += "<tr id=\"row_$char->{character}\">";
|
||||
if(data.players[i].character == "") {
|
||||
app_html += "<td>Not Selected</td>";
|
||||
} else {
|
||||
app_html += "<td>"+data.players[i].character;
|
||||
if(data.players[i].guild_id > 0) {
|
||||
app_html += " <"+data.players[i].guild+">";
|
||||
}
|
||||
app_html += "<br>";
|
||||
app_html += data.players[i].level + " " + data.players[i].race + " " + data.players[i].class;
|
||||
app_html += "</td>";
|
||||
}
|
||||
app_html += "<td>"+data.players[i].location_long+" ("+data.players[i].location_short+")</td>";
|
||||
app_html += "</tr>";
|
||||
$("#player_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval("StatusTic()", 4000);
|
||||
});
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu_noaccess.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
<h2 align="center">Online Player List</h2>
|
||||
<div align="center">
|
||||
<?
|
||||
if($zone eq "") {
|
||||
print "There are <span id=\"player_count\">".($#chars+1)."</span> players logged in.";
|
||||
} else {
|
||||
print "There are <span id=\"player_count\">".($#chars+1)."</span> players in $zone.";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</br>
|
||||
|
||||
<table id="player_table" width="70%" cellspacing="0" cellpadding="0" class="styled_table">
|
||||
<tr>
|
||||
<th scope="col">Character</th>
|
||||
<th scope="col">Location</th>
|
||||
</tr>
|
||||
<?
|
||||
foreach my $charname (@chars) {
|
||||
my $char = $EQW->GetPlayerDetails($charname);
|
||||
if(!$char) {
|
||||
$char->{character} = "ERROR: no char";
|
||||
} elsif($char->{error}) {
|
||||
$char->{character} = "ERROR: ".$char->{error};
|
||||
}
|
||||
print "<tr id=\"row_$char->{character}\">";
|
||||
if($char->{character} eq "") {
|
||||
print "<td>Not Selected</td>";
|
||||
} else {
|
||||
print "<td>$char->{character}";
|
||||
if(defined($char->{guild_id}) && $char->{guild_id} > 0) {
|
||||
print " <$char->{guild}>";
|
||||
}
|
||||
print "<br>";
|
||||
print "$char->{level} $char->{race} $char->{class}";
|
||||
print "</td>";
|
||||
}
|
||||
print "<td>$char->{location_long} ($char->{location_short})</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,18 @@
|
||||
print(" <div class=\"nav\">");
|
||||
print(" <ul class=\"navmenu\">");
|
||||
print(" <li>");
|
||||
print(" <a href='index.html'>World</a>");
|
||||
print(" <ul>");
|
||||
print(" <li><a href='launchers.html'>Launchers</a></li>");
|
||||
print(" <li><a href='players.html'>Players</a></li>");
|
||||
print(" <li><a href='zones.html'>Zones</a></li>");
|
||||
print(" </ul>");
|
||||
print(" </li>");
|
||||
print(" <li>");
|
||||
print(" <a href='console.html'>Console</a>");
|
||||
print(" </li>");
|
||||
print(" <li>");
|
||||
print(" <a href='bugs.html'>Bugs</a>");
|
||||
print(" </li>");
|
||||
print(" </ul>");
|
||||
print(" </div>");
|
||||
@@ -0,0 +1,13 @@
|
||||
print(" <div class=\"nav\">");
|
||||
print(" <ul class=\"navmenu\">");
|
||||
print(" <li>");
|
||||
print(" <a href='zoneview.html'>Zones</a>");
|
||||
print(" </li>");
|
||||
print(" <li>");
|
||||
print(" <a href='playerview.html'>Players</a>");
|
||||
print(" </li>");
|
||||
print(" <li>");
|
||||
print(" <a href='bugview.html'>Bugs</a>");
|
||||
print(" </li>");
|
||||
print(" </ul>");
|
||||
print(" </div>");
|
||||
@@ -0,0 +1,268 @@
|
||||
body, html {
|
||||
background-color: rgba(206, 227, 248, 1.0);
|
||||
font-size:12px;
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.container {
|
||||
width: 90%;
|
||||
min-width: 800px;
|
||||
min-height: 900px;
|
||||
display: block;
|
||||
background-color: #FFFFFF;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 0;
|
||||
border-radius: 0px 0px 15px 15px;
|
||||
box-shadow: 0px 0px 20px rgba(0,0,0,0.18);
|
||||
border-left: 1px solid rgba(95, 153, 207, 1.0);
|
||||
border-bottom: 1px solid rgba(95, 153, 207, 1.0);
|
||||
border-right: 1px solid rgba(95, 153, 207, 1.0);
|
||||
}
|
||||
|
||||
div.header {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
div.nav {
|
||||
height: 2.25em;
|
||||
background-color: rgba(80, 80, 80, 1.0);
|
||||
background: -moz-linear-gradient(top, rgba(120,120,120,1.0), rgba(65,65,65,1.0));
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(rgba(120,120,120,1.0)), to(rgba(65,65,65,1.0)));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#787878', endColorstr='#414141');
|
||||
border-top: 0;
|
||||
padding-left: 1.0em;
|
||||
padding-right: 1.0em;
|
||||
text-align: left;
|
||||
color: #333;
|
||||
border-top: 1px solid rgba(141, 141, 141, 1.0);
|
||||
}
|
||||
|
||||
div.user_status {
|
||||
font-size: 10px;
|
||||
text-align: right;
|
||||
padding: 0.5em;
|
||||
padding-left: 1.0em;
|
||||
background: rgba(239, 247, 255, 1.0);
|
||||
display: block;
|
||||
float: right;
|
||||
border-radius: 0px 0px 0px 6px;
|
||||
}
|
||||
|
||||
div.user_status a {
|
||||
color: rgba(51, 102, 153, 1.0);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.user_status a:visited {
|
||||
color: rgba(51, 102, 153, 1.0);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.user_status a:hover {
|
||||
color: rgba(51, 102, 153, 1.0);
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.main {
|
||||
display: block;
|
||||
min-height: 600px;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.footer {
|
||||
height: 2em;
|
||||
font-size:9px;
|
||||
width: 90%;
|
||||
margin-top: 0.5em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.navmenu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navmenu li {
|
||||
list-style: none;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navmenu li a {
|
||||
display: block;
|
||||
padding-left: 1.0em;
|
||||
padding-right: 1.0em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
background-color: rgba(80, 80, 80, 1.0);
|
||||
background: -moz-linear-gradient(top, rgba(120,120,120,1.0), rgba(65,65,65,1.0));
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(rgba(120,120,120,1.0)), to(rgba(65,65,65,1.0)));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#787878', endColorstr='#414141');
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.navmenu ul li a {
|
||||
display: block;
|
||||
padding-left: 1.0em;
|
||||
padding-right: 1.0em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
background: 0;
|
||||
filter: 0;
|
||||
background-color: rgba(221,221,221, 1.0);
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.navmenu ul li a:hover {
|
||||
color: #07B;
|
||||
}
|
||||
|
||||
.navmenu .current a, .navmenu li:hover > a {
|
||||
background: 0;
|
||||
filter: 0;
|
||||
background-color: rgba(221,221,221, 1.0);
|
||||
color: #07B;
|
||||
}
|
||||
|
||||
.navmenu li ul {
|
||||
display: none;
|
||||
border: 1px solid rgba(103, 103, 103, 1.0);
|
||||
border-top: 0;
|
||||
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.navmenu li:hover ul, .navmenu li.hover ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navmenu li:hover li, .navmenu li.hover li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.lt_left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.lt_right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.styled_button {
|
||||
padding:2px 4px 2px 4px;
|
||||
margin:3px 3px 0 0;
|
||||
background-color:#f5f5f5;
|
||||
border:1px solid #bcbcbc;
|
||||
border-top:1px solid #ccc;
|
||||
border-left:1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
color:#336699;
|
||||
text-decoration:none;
|
||||
line-height:130%;
|
||||
cursor:pointer;
|
||||
width:auto;
|
||||
overflow:visible;
|
||||
font-weight:bold;
|
||||
box-shadow: 0 0 4px rgba(128, 128, 128, 0.2);
|
||||
}
|
||||
|
||||
.styled_button:hover {
|
||||
background-color:#dff4ff;
|
||||
border:1px solid #c2e1ef;
|
||||
color:#336699;
|
||||
}
|
||||
|
||||
.styled_button:active {
|
||||
background-color:#6299c5;
|
||||
border:1px solid #6299c5;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.styled_button img {
|
||||
margin:0 3px -3px 0 !important;
|
||||
}
|
||||
|
||||
.styled_button_disabled {
|
||||
padding:2px 4px 2px 4px;
|
||||
margin:3px 3px 0 0;
|
||||
background-color:#dddddd;
|
||||
border:1px solid #9a9a9a;
|
||||
border-top:1px solid #aaa;
|
||||
border-left:1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
color: Gray;
|
||||
text-decoration:none;
|
||||
line-height:130%;
|
||||
cursor:default;
|
||||
width:auto;
|
||||
overflow:visible;
|
||||
font-weight:bold;
|
||||
box-shadow: 0 0 4px rgba(128, 128, 128, 0.2);
|
||||
}
|
||||
|
||||
.styled_button_disabled img {
|
||||
margin:0 3px -3px 0 !important;
|
||||
}
|
||||
|
||||
.styled_table {
|
||||
border: 1px solid #000;
|
||||
text-align: left;
|
||||
background-color: #f5f5f5;
|
||||
margin-right:auto;
|
||||
margin-left:auto;
|
||||
box-shadow: 0 0 5px rgba(128, 128, 128, 0.4);
|
||||
}
|
||||
|
||||
.styled_table th {
|
||||
padding-left: 1.0em;
|
||||
padding-right: 1.0em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
background-color: rgba(80, 80, 80, 1.0);
|
||||
background: -moz-linear-gradient(top, rgba(120,120,120,1.0), rgba(65,65,65,1.0));
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(rgba(120,120,120,1.0)), to(rgba(65,65,65,1.0)));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#787878', endColorstr='#414141');
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.styled_table td, .styled_table th {
|
||||
padding: 4px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.odd {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.styled_table tr td img {
|
||||
margin:0 3px -3px 0 !important;
|
||||
}
|
||||
|
||||
.error {
|
||||
color:red;
|
||||
width: 75.5em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.console_out {
|
||||
box-shadow: 0 0 5px rgba(128, 128, 128, 0.4);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<!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>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<?do("templates/scripts/menu.pl");?>
|
||||
<div id="main_content" class="main">
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,111 @@
|
||||
<!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\">Instance Id</th>";
|
||||
app_html += "<th scope=\"col\">Players</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> Idle</td>";
|
||||
} else {
|
||||
app_html += "<td><b>"+data.zones[i].launch_name+":</b> "+data.zones[i].long_name+"("+data.zones[i].short_name+")"+"</td>";
|
||||
}
|
||||
} else {
|
||||
app_html += "<td>" + data.zones[i].long_name + " (" + data.zones[i].short_name + ")</td>";
|
||||
}
|
||||
|
||||
app_html += "<td>" + data.zones[i].instance_id + "</td>";
|
||||
app_html += "<td><a href='playerview.html?zone=" + data.zones[i].short_name + "&instance=" + data.zones[i].instance_id + "'>Players</a></td>";
|
||||
app_html += "</tr>";
|
||||
|
||||
$("#zone_table").append(app_html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(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_noaccess.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">Instance Id</th>
|
||||
<th scope="col">Players</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> Idle</td>";
|
||||
} else {
|
||||
print "\t<td><b>$zone->{launch_name}:</b> $zone->{long_name} ($zone->{short_name})</td>";
|
||||
}
|
||||
} else {
|
||||
print "<td>$zone->{long_name} ($zone->{short_name})</td>";
|
||||
}
|
||||
print "<td>$zone->{instance_id}</td>";
|
||||
print "<td><a href='playerview.html?zone=$zone->{short_name}&instance=$zone->{instance_id}'>Players</a></td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© 2012 EQEmu. All rights reserved.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user