svn -> git Migration
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 72 B |
|
After Width: | Height: | Size: 67 B |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 63 B |
|
After Width: | Height: | Size: 58 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 151 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 156 B |
|
After Width: | Height: | Size: 154 B |
@@ -0,0 +1,60 @@
|
||||
/* TreeMenu.css
|
||||
A component of HTML_TreeMenu as extended by Chip Chapin
|
||||
2002-10-31 Chip Chapin
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
* HTML_TreeMenuXL style entries
|
||||
* The following entries are used by HTML_TreeMenuXL
|
||||
* See http://www.chipchapin.com/WebTools/MenuTools/HTML_TreeMenuXL/
|
||||
********************************************************************/
|
||||
.tmenu0text { /* Normal paragraph font */
|
||||
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size: 13px; /* x-small, 80% */
|
||||
font-weight: bold;
|
||||
}
|
||||
.tmenu1text { /* smalltext */
|
||||
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px; /* xx-small, 70% */
|
||||
}
|
||||
.tmenu2text { /* smallitalic */
|
||||
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
font-style: italic;
|
||||
}
|
||||
.tmenu3text { /* xsmalltext */
|
||||
font-family: Arial, Tahoma, sans-serif;
|
||||
font-size: 10px; /* xx-small, 55%, 63%; for Arial */
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Since all menu items are links, the following can be equally important
|
||||
* to your menu appearance.
|
||||
* The main thing you may want to change are the A:link and A:visited colors.
|
||||
*/
|
||||
*.tmenu0text A:link,*.tmenu1text A:link,*.tmenu2text A:link,*.tmenu3text A:link
|
||||
{ text-decoration:none; color:#505080 }
|
||||
*.tmenu0text A:visited,*.tmenu1text A:visited,*.tmenu2text A:visited,*.tmenu3text A:visited
|
||||
{ text-decoration:none; color:#505080 }
|
||||
*.tmenu0text A:active,*.tmenu1text A:active,*.tmenu2text A:active,*.tmenu3text A:active
|
||||
{ text-decoration:none; color:#805050 }
|
||||
*.tmenu0text A:hover,*.tmenu1text A:hover,*.tmenu2text A:hover,*.tmenu3text A:hover
|
||||
{ text-decoration:underline; color:#FF0000 }
|
||||
|
||||
|
||||
/* .tmlistbox controls the appearance of Listbox menus */
|
||||
.tmlistbox {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px; /* match 'smalltext' value */
|
||||
font-size-adjust: 0.58; /* Verdana */
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* .tmenuSelected is used with linkSelectKey to highlight selected items */
|
||||
.tmenuSelected {
|
||||
background-color: yellow;
|
||||
}
|
||||
*.tmenuSelected A:link { text-decoration:none; color:#2020ff }
|
||||
*.tmenuSelected A:visited { text-decoration:none; color:#2020ff }
|
||||
*.tmenuSelected A:active { text-decoration:none; color:#ff2020 }
|
||||
*.tmenuSelected A:hover { text-decoration:underline; color:#FF0000 }
|
||||
@@ -0,0 +1,636 @@
|
||||
// cc 2002-11-12 modifed for HTML_TreeMenuXL
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Copyright (c) 2002, Richard Heyes, Harald Radi |
|
||||
// | All rights reserved. |
|
||||
// | |
|
||||
// | Redistribution and use in source and binary forms, with or without |
|
||||
// | modification, are permitted provided that the following conditions |
|
||||
// | are met: |
|
||||
// | |
|
||||
// | o Redistributions of source code must retain the above copyright |
|
||||
// | notice, this list of conditions and the following disclaimer. |
|
||||
// | o Redistributions in binary form must reproduce the above copyright |
|
||||
// | notice, this list of conditions and the following disclaimer in the |
|
||||
// | documentation and/or other materials provided with the distribution.|
|
||||
// | o The names of the authors may not be used to endorse or promote |
|
||||
// | products derived from this software without specific prior written |
|
||||
// | permission. |
|
||||
// | |
|
||||
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
||||
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
||||
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
||||
// | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
||||
// | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
||||
// | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
||||
// | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
||||
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
||||
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
||||
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
||||
// | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
||||
// | |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Author: Richard Heyes <richard@phpguru.org> |
|
||||
// | Harald Radi <harald.radi@nme.at> |
|
||||
// +-----------------------------------------------------------------------+
|
||||
//
|
||||
// $Id: TreeMenu.js,v 1.8 2002/11/10 18:16:19 richard Exp $
|
||||
|
||||
|
||||
/**
|
||||
* TreeMenu class
|
||||
*/
|
||||
function TreeMenu(iconpath, myname, linkTarget, defaultClass, usePersistence)
|
||||
{
|
||||
// Properties
|
||||
this.iconpath = iconpath;
|
||||
this.myname = myname;
|
||||
this.linkTarget = linkTarget;
|
||||
this.defaultClass = defaultClass;
|
||||
this.usePersistence = usePersistence;
|
||||
this.imgWidth = 20;
|
||||
this.imgHeight = 20;
|
||||
this.n = new Array();
|
||||
|
||||
this.branches = new Array();
|
||||
this.branchStatus = new Array();
|
||||
this.layerRelations = new Array();
|
||||
this.childParents = new Array();
|
||||
this.cookieStatuses = new Array();
|
||||
|
||||
// cc 2002-11-12
|
||||
this.style = false;
|
||||
this.lineImageWidth = this.imgWidth;
|
||||
this.lineImageHeight= this.imgHeight;
|
||||
this.iconImageWidth = this.imgWidth;
|
||||
this.iconImageHeight= this.imgHeight;
|
||||
|
||||
this.preloadImages();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a node to the tree
|
||||
*/
|
||||
TreeMenu.prototype.addItem = function (newNode)
|
||||
{
|
||||
newIndex = this.n.length;
|
||||
newNode.iconImageWidth = this.imgWidth;
|
||||
newNode.iconImageHeight = this.imgHeight;
|
||||
newNode.lineImageWidth = this.imgWidth;
|
||||
newNode.lineImageHeight = this.imgHeight;
|
||||
this.n[newIndex] = newNode;
|
||||
|
||||
return this.n[newIndex];
|
||||
}
|
||||
|
||||
TreeMenu.prototype.SetImageSize = function(w, h) {
|
||||
this.imgWidth = w;
|
||||
this.imgHeight = h;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload images hack for Mozilla
|
||||
*/
|
||||
TreeMenu.prototype.preloadImages = function ()
|
||||
{
|
||||
var plustop = new Image; plustop.src = this.iconpath + '/plustop.gif';
|
||||
var plusbottom = new Image; plusbottom.src = this.iconpath + '/plusbottom.gif';
|
||||
var plus = new Image; plus.src = this.iconpath + '/plus.gif';
|
||||
|
||||
var minustop = new Image; minustop.src = this.iconpath + '/minustop.gif';
|
||||
var minusbottom = new Image; minusbottom.src = this.iconpath + '/minusbottom.gif';
|
||||
var minus = new Image; minus.src = this.iconpath + '/minus.gif';
|
||||
|
||||
var branchtop = new Image; branchtop.src = this.iconpath + '/branchtop.gif';
|
||||
var branchbottom = new Image; branchbottom.src = this.iconpath + '/branchbottom.gif';
|
||||
var branch = new Image; branch.src = this.iconpath + '/branch.gif';
|
||||
|
||||
var linebottom = new Image; linebottom.src = this.iconpath + '/linebottom.gif';
|
||||
var line = new Image; line.src = this.iconpath + '/line.gif';
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function that draws the menu and assigns it
|
||||
* to the layer (or document.write()s it)
|
||||
*/
|
||||
TreeMenu.prototype.drawMenu = function ()// OPTIONAL ARGS: nodes = [], level = [], prepend = '', expanded = false, visbility = 'inline', parentLayerID = null
|
||||
{
|
||||
/**
|
||||
* Necessary variables
|
||||
*/
|
||||
var output = '';
|
||||
var modifier = '';
|
||||
var layerID = '';
|
||||
var parentLayerID = '';
|
||||
|
||||
/**
|
||||
* Parse any optional arguments
|
||||
*/
|
||||
var nodes = arguments[0] ? arguments[0] : this.n
|
||||
var level = arguments[1] ? arguments[1] : [];
|
||||
var prepend = arguments[2] ? arguments[2] : '';
|
||||
var expanded = arguments[3] ? arguments[3] : false;
|
||||
var visibility = arguments[4] ? arguments[4] : 'inline';
|
||||
var parentLayerID = arguments[5] ? arguments[5] : null;
|
||||
|
||||
var currentlevel = level.length;
|
||||
|
||||
for (var i=0; i<nodes.length; i++) {
|
||||
|
||||
level[currentlevel] = i+1;
|
||||
layerID = this.myname + '_' + 'node_' + this.implode('_', level);
|
||||
|
||||
/**
|
||||
* Store the child/parent relationship
|
||||
*/
|
||||
this.childParents[layerID] = parentLayerID;
|
||||
|
||||
/**
|
||||
* Gif modifier
|
||||
*/
|
||||
if (i == 0 && parentLayerID == null) {
|
||||
modifier = nodes.length > 1 ? "top" : 'single';
|
||||
} else if(i == (nodes.length-1)) {
|
||||
modifier = "bottom";
|
||||
} else {
|
||||
modifier = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Single root branch is always expanded
|
||||
*/
|
||||
if (!this.doesMenu() || (parentLayerID == null && nodes.length == 1)) {
|
||||
expanded = true;
|
||||
|
||||
} else if (nodes[i].expanded) {
|
||||
expanded = true;
|
||||
|
||||
} else {
|
||||
expanded = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure visibility is correct based on parent status
|
||||
*/
|
||||
visibility = this.checkParentVisibility(layerID) ? visibility : 'none';
|
||||
|
||||
/**
|
||||
* Setup branch status and build an indexed array
|
||||
* of branch layer ids
|
||||
*/
|
||||
if (nodes[i].n.length > 0) {
|
||||
this.branchStatus[layerID] = expanded;
|
||||
this.branches[this.branches.length] = layerID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup toggle relationship
|
||||
*/
|
||||
if (!this.layerRelations[parentLayerID]) {
|
||||
this.layerRelations[parentLayerID] = new Array();
|
||||
}
|
||||
this.layerRelations[parentLayerID][this.layerRelations[parentLayerID].length] = layerID;
|
||||
|
||||
/**
|
||||
* Branch images
|
||||
*/
|
||||
var gifname = nodes[i].n.length && this.doesMenu() && nodes[i].isDynamic ? (expanded ? 'minus' : 'plus') : 'branch';
|
||||
// cc 2002-11-12 variable image dimensions to line below
|
||||
var iconimg = nodes[i].icon ? this.stringFormat('<img src="{0}/{1}" width="{2}" height="{3}" align="top">', this.iconpath, nodes[i].icon, nodes[i].iconImageWidth, nodes[i].iconImageHeight) : '';
|
||||
|
||||
|
||||
/**
|
||||
* Build the html to write to the document
|
||||
* IMPORTANT:
|
||||
* document.write()ing the string: '<div style="display:...' will screw up nn4.x
|
||||
*/
|
||||
var layerTag = this.doesMenu() ? this.stringFormat('<div id="{0}" style="display: {1}" class="{2}">', layerID, visibility, (nodes[i].cssClass ? nodes[i].cssClass : this.defaultClass)) : this.stringFormat('<div class="{0}">', '');
|
||||
var onMDown = this.doesMenu() && nodes[i].n.length && nodes[i].isDynamic ? this.stringFormat('onmousedown="{0}.toggleBranch(\'{1}\', true)" style="cursor: pointer; cursor: hand"', this.myname, layerID) : '';
|
||||
// cc 2002-11-12 variable image dimensions to line below
|
||||
var imgTag = this.stringFormat('<img src="{0}/{1}{2}.gif" width="{5}" height="{6}" align="top" border="0" name="img_{3}" {4}>', this.iconpath, gifname, modifier, layerID, onMDown, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
|
||||
var linkStart = nodes[i].link ? this.stringFormat('<a href="{0}" target="{1}">', nodes[i].link, this.linkTarget) : '';
|
||||
var linkEnd = nodes[i].link ? '</a>' : '';
|
||||
|
||||
|
||||
// cc 2002-11-12 All these are additions
|
||||
var selectedStart = nodes[i].selected ? "<span class='"+nodes[i].selected+"'>" : '';
|
||||
var selectedEnd = nodes[i].selected ? '</span>' : '';
|
||||
var nobrStart = this.brOK ? '' : '<nobr>';
|
||||
var nobrEnd = this.brOK ? '' : '</nobr>';
|
||||
|
||||
// cc 2002-11-12 modified
|
||||
output = this.stringFormat('{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}<br></div>',
|
||||
layerTag,
|
||||
nobrStart,
|
||||
prepend,
|
||||
parentLayerID == null && nodes.length == 1 ? '' : imgTag,
|
||||
iconimg,
|
||||
selectedStart, linkStart,
|
||||
nodes[i].title,
|
||||
linkEnd, selectedEnd,
|
||||
nobrEnd);
|
||||
|
||||
/**
|
||||
* Write out the HTML. Uses document.write for speed over layers and
|
||||
* innerHTML. This however means no dynamic adding/removing nodes on
|
||||
* the client side. This could be conditional I guess if dynamic
|
||||
* adding/removing is required.
|
||||
*/
|
||||
document.write(output + "\r\n");
|
||||
|
||||
/**
|
||||
* Traverse sub nodes ?
|
||||
*/
|
||||
if (nodes[i].n.length) {
|
||||
/**
|
||||
* Determine what to prepend. If there is only one root
|
||||
* node then the prepend to pass to children is nothing.
|
||||
* Otherwise it depends on where we are in the tree.
|
||||
*/
|
||||
if (parentLayerID == null && nodes.length == 1) {
|
||||
var newPrepend = '';
|
||||
|
||||
} else if (i < (nodes.length - 1)) {
|
||||
// cc 2002-11-12 Both lines, added image size parameters.
|
||||
var newPrepend = prepend + this.stringFormat('<img src="{0}/line.gif" width="{1}" height="{2}" align="top">', this.iconpath, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
|
||||
|
||||
} else {
|
||||
var newPrepend = prepend + this.stringFormat('<img src="{0}/linebottom.gif" width="{1}" height="{2}" align="top">', this.iconpath, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
|
||||
}
|
||||
|
||||
this.drawMenu(nodes[i].n,
|
||||
level,
|
||||
newPrepend,
|
||||
nodes[i].expanded,
|
||||
expanded ? 'inline' : 'none',
|
||||
layerID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles a branches visible status. Called from resetBranches()
|
||||
* and also when a +/- graphic is clicked.
|
||||
*/
|
||||
TreeMenu.prototype.toggleBranch = function (layerID, updateStatus) // OPTIONAL ARGS: noSave = false
|
||||
{
|
||||
var currentDisplay = this.getLayer(layerID).style.display;
|
||||
var newDisplay = (this.branchStatus[layerID] && currentDisplay == 'inline') ? 'none' : 'inline'
|
||||
|
||||
for (var i=0; i<this.layerRelations[layerID].length; i++) {
|
||||
|
||||
if (this.branchStatus[this.layerRelations[layerID][i]]) {
|
||||
this.toggleBranch(this.layerRelations[layerID][i], false);
|
||||
}
|
||||
|
||||
this.getLayer(this.layerRelations[layerID][i]).style.display = newDisplay;
|
||||
}
|
||||
|
||||
if (updateStatus) {
|
||||
this.branchStatus[layerID] = !this.branchStatus[layerID];
|
||||
|
||||
/**
|
||||
* Persistence
|
||||
*/
|
||||
if (this.doesPersistence() && !arguments[2] && this.usePersistence) {
|
||||
this.setExpandedStatusForCookie(layerID, this.branchStatus[layerID]);
|
||||
}
|
||||
|
||||
// Swap image
|
||||
this.swapImage(layerID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Swaps the plus/minus branch images
|
||||
*/
|
||||
TreeMenu.prototype.swapImage = function (layerID)
|
||||
{
|
||||
imgSrc = document.images['img_' + layerID].src;
|
||||
|
||||
re = /^(.*)(plus|minus)(bottom|top|single)?.gif$/
|
||||
if (matches = imgSrc.match(re)) {
|
||||
|
||||
document.images['img_' + layerID].src = this.stringFormat('{0}{1}{2}{3}',
|
||||
matches[1],
|
||||
matches[2] == 'plus' ? 'minus' : 'plus',
|
||||
matches[3] ? matches[3] : '',
|
||||
'.gif');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the browser handle the dynamic menu?
|
||||
*/
|
||||
TreeMenu.prototype.doesMenu = function ()
|
||||
{
|
||||
return (is_ie4up || is_nav6up || is_gecko);
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the browser handle save the branch status
|
||||
*/
|
||||
TreeMenu.prototype.doesPersistence = function ()
|
||||
{
|
||||
return (is_ie4up || is_gecko || is_nav6up);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the appropriate layer accessor
|
||||
*/
|
||||
TreeMenu.prototype.getLayer = function (layerID)
|
||||
{
|
||||
if (is_ie4) {
|
||||
return document.all(layerID);
|
||||
|
||||
} else if (document.getElementById(layerID)) {
|
||||
return document.getElementById(layerID);
|
||||
|
||||
} else if (document.all(layerID)) {
|
||||
return document.all(layerID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the status of the layer
|
||||
*/
|
||||
TreeMenu.prototype.setExpandedStatusForCookie = function (layerID, expanded)
|
||||
{
|
||||
this.cookieStatuses[layerID] = expanded;
|
||||
this.saveCookie();
|
||||
/*
|
||||
if (is_ie5up) {
|
||||
document.all(layerID).setAttribute("expandedStatus", expanded);
|
||||
document.all(layerID).save(layerID);
|
||||
} else {
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the status of the layer
|
||||
*/
|
||||
TreeMenu.prototype.getExpandedStatusFromCookie = function (layerID)
|
||||
{
|
||||
if (this.cookieStatuses[layerID]) {
|
||||
return this.cookieStatuses[layerID];
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
/* document.all(layerID).load(layerID);
|
||||
if (val = document.all(layerID).getAttribute("expandedStatus")) {
|
||||
return val;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the cookie that holds which branches are expanded.
|
||||
* Only saves the details of the branches which are expanded.
|
||||
*/
|
||||
TreeMenu.prototype.saveCookie = function ()
|
||||
{
|
||||
var cookieString = new Array();
|
||||
|
||||
for (var i in this.cookieStatuses) {
|
||||
if (this.cookieStatuses[i] == true) {
|
||||
cookieString[cookieString.length] = i;
|
||||
}
|
||||
}
|
||||
|
||||
document.cookie = 'TreeMenuBranchStatus=' + cookieString.join(':');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads cookie parses it for status info and
|
||||
* stores that info in the class member.
|
||||
*/
|
||||
TreeMenu.prototype.loadCookie = function ()
|
||||
{
|
||||
var cookie = document.cookie.split('; ');
|
||||
|
||||
for (var i=0; i < cookie.length; i++) {
|
||||
var crumb = cookie[i].split('=');
|
||||
if ('TreeMenuBranchStatus' == crumb[0] && crumb[1]) {
|
||||
var expandedBranches = crumb[1].split(':');
|
||||
for (var j=0; j<expandedBranches.length; j++) {
|
||||
this.cookieStatuses[expandedBranches[j]] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset branch status
|
||||
*/
|
||||
TreeMenu.prototype.resetBranches = function ()
|
||||
{
|
||||
if (!this.doesPersistence()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.loadCookie();
|
||||
|
||||
for (var i=0; i<this.branches.length; i++) {
|
||||
var status = this.getExpandedStatusFromCookie(this.branches[i]);
|
||||
// Only update if it's supposed to be expanded and it's not already
|
||||
if (status == true && this.branchStatus[this.branches[i]] != true) {
|
||||
if (this.checkParentVisibility(this.branches[i])) {
|
||||
this.toggleBranch(this.branches[i], true, true);
|
||||
} else {
|
||||
this.branchStatus[this.branches[i]] = true;
|
||||
this.swapImage(this.branches[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether a branch should be open
|
||||
* or not based on its parents' status
|
||||
*/
|
||||
TreeMenu.prototype.checkParentVisibility = function (layerID)
|
||||
{
|
||||
if (this.in_array(this.childParents[layerID], this.branches)
|
||||
&& this.branchStatus[this.childParents[layerID]]
|
||||
&& this.checkParentVisibility(this.childParents[layerID]) ) {
|
||||
|
||||
return true;
|
||||
|
||||
} else if (this.childParents[layerID] == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* New C# style string formatter
|
||||
*/
|
||||
TreeMenu.prototype.stringFormat = function (strInput)
|
||||
{
|
||||
var idx = 0;
|
||||
|
||||
for (var i=1; i<arguments.length; i++) {
|
||||
while ((idx = strInput.indexOf('{' + (i - 1) + '}', idx)) != -1) { // cc 2002-11-12 fix 10<i<=100
|
||||
strInput = strInput.substring(0, idx) + arguments[i] + strInput.substr(idx + (i<=10?3:4));
|
||||
}
|
||||
}
|
||||
|
||||
return strInput;
|
||||
}
|
||||
|
||||
/**
|
||||
* Also much adored, the PHP implode() function
|
||||
*/
|
||||
TreeMenu.prototype.implode = function (seperator, input)
|
||||
{
|
||||
var output = '';
|
||||
|
||||
for (var i=0; i<input.length; i++) {
|
||||
if (i == 0) {
|
||||
output += input[i];
|
||||
} else {
|
||||
output += seperator + input[i];
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Aah, all the old favourites are coming out...
|
||||
*/
|
||||
TreeMenu.prototype.in_array = function (item, arr)
|
||||
{
|
||||
for (var i=0; i<arr.length; i++) {
|
||||
if (arr[i] == item) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* TreeNode Class
|
||||
*/
|
||||
function TreeNode(title, icon, link, expanded, isDynamic, cssClass)
|
||||
{
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
this.link = link;
|
||||
this.expanded = expanded;
|
||||
this.isDynamic = isDynamic;
|
||||
this.cssClass = cssClass;
|
||||
this.lineImageWidth = 20;
|
||||
this.lineImageHeight= 20;
|
||||
this.iconImageWidth = 20;
|
||||
this.iconImageHeight= 20;
|
||||
this.n = new Array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a node to an already existing node
|
||||
*/
|
||||
TreeNode.prototype.addItem = function (newNode)
|
||||
{
|
||||
newIndex = this.n.length;
|
||||
newNode.iconImageWidth = this.iconImageWidth;
|
||||
newNode.iconImageHeight = this.iconImageHeight;
|
||||
newNode.lineImageWidth = this.lineImageWidth;
|
||||
newNode.lineImageHeight = this.lineImageHeight;
|
||||
this.n[newIndex] = newNode;
|
||||
|
||||
return this.n[newIndex];
|
||||
}
|
||||
|
||||
/**
|
||||
* That's the end of the tree classes. What follows is
|
||||
* the browser detection code.
|
||||
*/
|
||||
|
||||
|
||||
//<!--
|
||||
// Ultimate client-side JavaScript client sniff. Version 3.03
|
||||
// (C) Netscape Communications 1999-2001. Permission granted to reuse and distribute.
|
||||
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below).
|
||||
// Revised 20 Dec 00 to add is_gecko and change is_nav5up to is_nav6up
|
||||
// also added support for IE5.5 Opera4&5 HotJava3 AOLTV
|
||||
// Revised 22 Feb 01 to correct Javascript Detection for IE 5.x, Opera 4,
|
||||
// correct Opera 5 detection
|
||||
// add support for winME and win2k
|
||||
// synch with browser-type-oo.js
|
||||
// Revised 26 Mar 01 to correct Opera detection
|
||||
// Revised 02 Oct 01 to add IE6 detection
|
||||
|
||||
// Everything you always wanted to know about your JavaScript client
|
||||
// but were afraid to ask. Creates "is_" variables indicating:
|
||||
// (1) browser vendor:
|
||||
// is_nav, is_ie, is_opera, is_hotjava, is_webtv, is_TVNavigator, is_AOLTV
|
||||
// (2) browser version number:
|
||||
// is_major (integer indicating major version number: 2, 3, 4 ...)
|
||||
// is_minor (float indicating full version number: 2.02, 3.01, 4.04 ...)
|
||||
// (3) browser vendor AND major version number
|
||||
// is_nav2, is_nav3, is_nav4, is_nav4up, is_nav6, is_nav6up, is_gecko, is_ie3,
|
||||
// is_ie4, is_ie4up, is_ie5, is_ie5up, is_ie5_5, is_ie5_5up, is_ie6, is_ie6up, is_hotjava3, is_hotjava3up,
|
||||
// is_opera2, is_opera3, is_opera4, is_opera5, is_opera5up
|
||||
// (4) JavaScript version number:
|
||||
// is_js (float indicating full JavaScript version number: 1, 1.1, 1.2 ...)
|
||||
// (5) OS platform and version:
|
||||
// is_win, is_win16, is_win32, is_win31, is_win95, is_winnt, is_win98, is_winme, is_win2k
|
||||
// is_os2
|
||||
// is_mac, is_mac68k, is_macppc
|
||||
// is_unix
|
||||
// is_sun, is_sun4, is_sun5, is_suni86
|
||||
// is_irix, is_irix5, is_irix6
|
||||
// is_hpux, is_hpux9, is_hpux10
|
||||
// is_aix, is_aix1, is_aix2, is_aix3, is_aix4
|
||||
// is_linux, is_sco, is_unixware, is_mpras, is_reliant
|
||||
// is_dec, is_sinix, is_freebsd, is_bsd
|
||||
// is_vms
|
||||
//
|
||||
// See http://www.it97.de/JavaScript/JS_tutorial/bstat/navobj.html and
|
||||
// http://www.it97.de/JavaScript/JS_tutorial/bstat/Browseraol.html
|
||||
// for detailed lists of userAgent strings.
|
||||
//
|
||||
// Note: you don't want your Nav4 or IE4 code to "turn off" or
|
||||
// stop working when new versions of browsers are released, so
|
||||
// in conditional code forks, use is_ie5up ("IE 5.0 or greater")
|
||||
// is_opera5up ("Opera 5.0 or greater") instead of is_ie5 or is_opera5
|
||||
// to check version in code which you want to work on future
|
||||
// versions.
|
||||
|
||||
/**
|
||||
* Severly curtailed all this as only certain elements
|
||||
* are required by TreeMenu, specifically:
|
||||
* o is_ie4up
|
||||
* o is_nav6up
|
||||
* o is_gecko
|
||||
*/
|
||||
|
||||
// convert all characters to lowercase to simplify testing
|
||||
var agt=navigator.userAgent.toLowerCase();
|
||||
|
||||
// *** BROWSER VERSION ***
|
||||
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
|
||||
var is_major = parseInt(navigator.appVersion);
|
||||
var is_minor = parseFloat(navigator.appVersion);
|
||||
|
||||
// Note: Opera and WebTV spoof Navigator. We do strict client detection.
|
||||
// If you want to allow spoofing, take out the tests for opera and webtv.
|
||||
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
|
||||
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
|
||||
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
|
||||
var is_nav6up = (is_nav && (is_major >= 5));
|
||||
var is_gecko = (agt.indexOf('gecko') != -1);
|
||||
|
||||
|
||||
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
|
||||
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
|
||||
var is_ie4up = (is_ie && (is_major >= 4));
|
||||
//--> end hide JavaScript
|
||||
@@ -0,0 +1,194 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h2 align="center">Account Details</h2>
|
||||
<hr/>
|
||||
<?
|
||||
my $acct = $request->get("name", "");
|
||||
my $act = $request->get("action", "");
|
||||
if($acct eq "") {
|
||||
print "Missing account name.";
|
||||
} elsif($act eq "move") {
|
||||
my $cid = $request->getInt("charid", 0);
|
||||
my $cname = $request->get("charname", "NONE");
|
||||
if($cid < 1) {
|
||||
print "Missing char ID";
|
||||
} else {
|
||||
print <<"HTML";
|
||||
<form action="?" method="POST">
|
||||
Move $cname to another account...<br>
|
||||
<input type="hidden" name="action" value="move2">
|
||||
<input type="hidden" name="name" value="$acct">
|
||||
<input type="hidden" name="charid" value="$cid">
|
||||
<input type="hidden" name="charname" value="$cname">
|
||||
New Account ID: <input type="text" name="newacct"><br>
|
||||
<input type="submit" value="Move">
|
||||
</form>
|
||||
HTML
|
||||
}
|
||||
} elsif($act eq "move2") {
|
||||
my $cid = $request->getInt("charid", 0);
|
||||
my $na = $request->getInt("newacct", 0);
|
||||
my $cname = $request->get("charname", "NONE");
|
||||
my $acctE = $EQDB->escape_string($acct);
|
||||
if($cid < 1 || $na < 1) {
|
||||
print "Missing char ID";
|
||||
} else {
|
||||
my $q = "SELECT name FROM account WHERE id=$na";
|
||||
my $res=$EQDB->query($q);
|
||||
my $a;
|
||||
if(!$res) {
|
||||
print "Query name error.";
|
||||
} elsif(!($a = $res->fetch_row_hash)) {
|
||||
print "No such account $na.";
|
||||
} else {
|
||||
$an = $a->{name};
|
||||
$q = "UPDATE character_ SET account_id=$na WHERE id=$cid";
|
||||
if($EQDB->query($q)) {
|
||||
print "$cname has been moved to account $an ($na)";
|
||||
print "<br><br><a href='?name=$acct'>Back to $acct...</a>";
|
||||
print "<br><a href='?name=$an'>Go to $an...</a>";
|
||||
} else {
|
||||
print "Update error.";
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif($act eq "listips") {
|
||||
my $ipadd = $request->get("ipaddress", "NONE");
|
||||
my $acctE = $EQDB->escape_string($acct);
|
||||
if($ipadd eq '') {
|
||||
print "Missing IP Address";
|
||||
} else {
|
||||
my $q = "SELECT accid FROM account_ip WHERE ip='$ipadd'";
|
||||
my $res=$EQDB->query($q);
|
||||
if($res) {
|
||||
print <<"HTML";
|
||||
<br>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th align="center">Account ID</th>
|
||||
<th align="center">Account Name</th>
|
||||
<th align="center">IP Address</th>
|
||||
</tr>
|
||||
HTML
|
||||
while(my $row4 = $res->fetch_row_hash) {
|
||||
my $accountid = $row4->{accid};
|
||||
my $q;
|
||||
$q = "SELECT name FROM account WHERE id=$accountid";
|
||||
my $res2=$EQDB->query($q);
|
||||
if ($res2) {
|
||||
my $row5=$res2->fetch_row_hash;
|
||||
print <<"CHAR";
|
||||
<tr>
|
||||
<td align="center">$row4->{accid}</td>
|
||||
<td align="center"><a href="accounts.html?name=$row5->{name}&action=accounts.html&type='account'">$row5->{name}</a></td>
|
||||
<td align="center">$ipadd</td>
|
||||
</tr>
|
||||
CHAR
|
||||
} else {
|
||||
print "Account Name query error.";
|
||||
}
|
||||
}
|
||||
print "</table>";
|
||||
} else {
|
||||
print "IP Address query error.";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
my $acctE = $EQDB->escape_string($acct);
|
||||
my $q;
|
||||
$q="select id,charname,sharedplat,status,revoked from account where name='$acctE'";
|
||||
|
||||
my $res=$EQDB->query($q);
|
||||
if ($res) {
|
||||
my $row=$res->fetch_row_hash;
|
||||
print <<"HTML";
|
||||
<table border="1">
|
||||
<tr><th>Name:</th><td>$acct</td></tr>
|
||||
<tr><th>Account ID:</th><td>$row->{id}</td></tr>
|
||||
<tr><th>Status:</th><td>$row->{status}</td></tr>
|
||||
<tr><th>Revoked:</th><td>$row->{revoked}</td></tr>
|
||||
<tr><th>Last Used Char:</th><td>$row->{charname}</td></tr>
|
||||
<tr><th>Shared Platinum:</th><td>$row->{sharedplat}</td></tr>
|
||||
</table>
|
||||
HTML
|
||||
$q = "SELECT id,name,zonename FROM character_ WHERE account_id=$row->{id}";
|
||||
my $res2 = $EQDB->query($q);
|
||||
if($res2) {
|
||||
print <<"HTML";
|
||||
<br>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th align="center">ID</th>
|
||||
<th align="center">Char Name</th>
|
||||
<th align="center">Current Zone</th>
|
||||
<th align="center">Actions</th>
|
||||
</tr>
|
||||
HTML
|
||||
while(my $row2 = $res2->fetch_row_hash) {
|
||||
print <<"CHAR";
|
||||
<tr>
|
||||
<td align="center">$row2->{id}</td>
|
||||
<td align="center">$row2->{name}</td>
|
||||
<td align="center">$row2->{zonename}</td>
|
||||
<td align="center">
|
||||
delete,
|
||||
<a href="?name=$acct&action=move&charid=$row2->{id}&charname=$row2->{name}">move acct</a>,
|
||||
move zone
|
||||
</td>
|
||||
</tr>
|
||||
CHAR
|
||||
}
|
||||
print "</table>";
|
||||
} else {
|
||||
print "Char query error.";
|
||||
}
|
||||
|
||||
$q="SELECT ip,count FROM account_ip WHERE accid=$row->{id}";
|
||||
my $res3=$EQDB->query($q);
|
||||
if($res3) {
|
||||
print <<"HTML";
|
||||
<br>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th align="center">IPs Used</th>
|
||||
<th align="center">Count</th>
|
||||
</tr>
|
||||
HTML
|
||||
while(my $row3 = $res3->fetch_row_hash) {
|
||||
print <<"CHAR";
|
||||
<tr>
|
||||
<td align="center"><a href="?name=$acct&action=listips&ipaddress=$row3->{ip}">$row3->{ip}</a></td>
|
||||
<td align="center">$row3->{count}</td>
|
||||
</tr>
|
||||
CHAR
|
||||
}
|
||||
print "</table>";
|
||||
} else {
|
||||
print "No IPs associated with this account or IP query error.";
|
||||
}
|
||||
|
||||
print <<"HTML";
|
||||
<hr>
|
||||
<form action="action.html" method="POST">
|
||||
<input type='hidden' name='name' value='$acct'>
|
||||
<input type='hidden' name='action' value='acctpasswd'>
|
||||
Telnet/HTTP Password: <input type="password" name="password"> <input type='submit' value="Change"> (blank=disable)
|
||||
</form>
|
||||
HTML
|
||||
} else {
|
||||
print "Query error.";
|
||||
}
|
||||
|
||||
print "Actions: ban/unban, set status, set world password, delete chars, move chars, delete account and chars";
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Account Management</h2>
|
||||
<hr/>
|
||||
<?
|
||||
$query = $request->get("name", "");
|
||||
$accid = $request->getInt("accountid", 0);
|
||||
$newstatus = $request->getInt("newstatus", 0);
|
||||
$type = $request->get("type", "");
|
||||
?>
|
||||
<form method="get" action="accounts.html">
|
||||
<b>Account Search:</b><br>
|
||||
<input name="type" type="radio" value="account" <?if($type ne "char") { print "checked"; } ?> > Account Name
|
||||
<input name="type" type="radio" value="char" <?if($type eq "char") { print "checked"; } ?> > Character Name
|
||||
<br>
|
||||
<input name="name" type="text" value="<?print $query;?>">
|
||||
<input name="" type="submit" value="Search">
|
||||
</form>
|
||||
<?
|
||||
if($accid > 0) {
|
||||
my $q2 = "UPDATE account SET status=$newstatus WHERE id=$accid";
|
||||
$EQDB->query($q2);
|
||||
print "Status update for Account ID: $accid Completed";
|
||||
}
|
||||
|
||||
if ($query) {
|
||||
$query = $EQDB->escape_string($query);
|
||||
my $q;
|
||||
if($type eq "account") {
|
||||
$q="select id,name,status from account where name rlike '$query'";
|
||||
} else {
|
||||
$q="select b.name as cname,a.id,a.name,a.status from account a, character_ b where b.account_id= a.id and b.name rlike '$query'";
|
||||
}
|
||||
|
||||
my $res=$EQDB->query($q);
|
||||
if ($res) {
|
||||
|
||||
print "<table border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\">\n";
|
||||
print "\t<tr>\n";
|
||||
if ($type eq "char") {
|
||||
printf "\t\t<th scope=\"col\" width=\"150\">Char Name</th>\n";
|
||||
}
|
||||
printf "\t\t<th scope=\"col\" width=\"75\">ID</th>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"150\">Acct Name</th>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"75\">Status</th>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"130\">New Status</th>\n";
|
||||
printf "\t</tr>\n";
|
||||
while(my $row=$res->fetch_row_hash) {
|
||||
print "\t<tr>\n";
|
||||
if ($type eq "char") {
|
||||
printf "\t\t<td>%s</td>\n",$row->{cname};
|
||||
}
|
||||
printf "\t\t<td>%d</td>\n",$row->{id};
|
||||
printf "\t\t<td><a href=\"account.html?name=%s\">%s</a></td>\n",$row->{name},$row->{name};
|
||||
printf "\t\t<td>%d</td>\n",$row->{status};
|
||||
print "<form method=\"get\" action=\"accounts.html\">";
|
||||
printf "\t\t<input type=\"hidden\" name=\"accountid\" value=\"%d\">\n",$row->{id};
|
||||
printf "\t\t<input type=\"hidden\" name=\"name\" value=\"$query\">\n",
|
||||
printf "\t\t<input type=\"hidden\" name=\"type\" value=\"$type\">\n",
|
||||
printf "\t\t<td><input name=\"newstatus\" type=\"text\" size=\"1\" value=\"0\"> <input name=\"\" type=\"submit\" value=\"Set Status\"></td>\n";
|
||||
print "\t</tr>\n";
|
||||
print "</form>";
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?
|
||||
|
||||
#for the most part, every action here should redirect to some other page...
|
||||
$result = ""; #fill this in for non-redirected output.
|
||||
|
||||
my $act = $request->get("action", "NONE");
|
||||
if($act eq "acctpasswd") {
|
||||
my $aname = $request->getEscaped("name", "_");
|
||||
my $apass = $request->getEscaped("password", "");
|
||||
if($aname eq "_") {
|
||||
print "Missing name";
|
||||
} else {
|
||||
my $q;
|
||||
if($apass eq "") {
|
||||
#set the password to something that somebody could not likely guess
|
||||
$q = "UPDATE account SET password=MD5(unix_timestamp()) WHERE name='$aname'";
|
||||
} else {
|
||||
$q = "UPDATE account SET password=MD5('$apass') WHERE name='$aname'";
|
||||
}
|
||||
if(!$EQDB->query($q)) {
|
||||
$result = "Error in query.";
|
||||
} else {
|
||||
$request->redirect("account.html?name=$aname");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Action Taken</h2>
|
||||
<hr/>
|
||||
<? print $result; ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?
|
||||
my $act = $request->get("type");
|
||||
if($act eq "static") {
|
||||
my $z = $request->get("zone");
|
||||
if($z eq "") {
|
||||
print "Invalid zone name.";
|
||||
} else {
|
||||
$EQW->BootStaticZone($z);
|
||||
$request->SetResponseCode(302);
|
||||
$request->header("Location", "zones.html");
|
||||
print "Booting static zone $z...";
|
||||
}
|
||||
print "<hr/>\n";
|
||||
} elsif($act eq "dynamic") {
|
||||
$EQW->BootDynamicZone();
|
||||
$request->SetResponseCode(302);
|
||||
$request->header("Location", "zones.html");
|
||||
print "Booting a dynamic zone...";
|
||||
print "<hr/>\n";
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h2 align="center">Boot A New Zone</h2>
|
||||
<hr/>
|
||||
<form name="form1" method="post" action="?">
|
||||
Zone Type:<br />
|
||||
<input name="type" type="radio" value="dynamic" checked> Dynamic <br/>
|
||||
<input name="type" type="radio" value="static"> Static. Short Name: <input type="text" name="zone"> <br/>
|
||||
<br>
|
||||
<input type="submit" value="Boot">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Bugs</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
<?
|
||||
my $action = $request->get("action", "NONE");
|
||||
if($action eq "resolved") {
|
||||
my $id = $request->get("id", "0");
|
||||
$EQW->ResolveBug($id);
|
||||
}
|
||||
|
||||
$offset = $request->get("offset", "0");
|
||||
$count = $EQW->CountBugs();
|
||||
@bugs = $EQW->ListBugs($offset);
|
||||
# @bugs = (
|
||||
# { who => "Kim", where => "arena (0.0, 4.0, 5.0)", target => "an_arena_fighter000", description => "Wont accept a simple summons item" }
|
||||
# );
|
||||
|
||||
?>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Bug List</h2>
|
||||
<hr/>
|
||||
<div align="center">
|
||||
<?
|
||||
my $sep = ($count / 30);
|
||||
for(my $i = 0; $i < $sep; ++$i) {
|
||||
my $cur = 30 * $i;
|
||||
my $name = $i + 1;
|
||||
print "<a href='bugs.html?offset=$cur'>$name</a> ";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
print "There are $count bugs in the database.";
|
||||
?>
|
||||
<hr/>
|
||||
<table width="100%" border="1" cellspacing="2" cellpadding="3" class="zonelist">
|
||||
<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>
|
||||
<?
|
||||
for my $bugkey (@bugs) {
|
||||
my $bug = $EQW->GetBugDetails($bugkey);
|
||||
if(!$bug) {
|
||||
next;
|
||||
}
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td><a href='bugs.html?action=resolved&id=$bug->{id}&offset=$offset'>Resolved</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>$bug->{bug}</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<div align="center">
|
||||
<?
|
||||
my $sep = ($count / 30);
|
||||
for(my $i = 0; $i < $sep; ++$i) {
|
||||
my $cur = 30 * $i;
|
||||
my $name = $i + 1;
|
||||
print "<a href='bugs.html?offset=$cur'>$name</a> ";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Chat</h2>
|
||||
<hr/>
|
||||
show the last -n- lines of OOC, maybe tells too... have the ability to send world emotes, OOC, etc...
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Command Settings</h2>
|
||||
<hr/>
|
||||
<?
|
||||
my $gets = $request->get_all;
|
||||
my $error=0;
|
||||
if (defined($gets->{"update.x"})) {
|
||||
my $i=0;
|
||||
my $max=$gets->{maxid};
|
||||
$EQDB->query("delete from commands");
|
||||
for(my $i=0;$i<$max;++$i) {
|
||||
my ($command,$access) = ($gets->{"command$i"},$gets->{"access$i"});
|
||||
next if (!$command);
|
||||
$q=sprintf("replace into commands (command,access) values('%s',%s)",$EQDB->escape_string($command),$EQDB->escape_string($access));
|
||||
$EQDB->query($q);
|
||||
if ($EQDB->get_errno) {
|
||||
$error=1;
|
||||
printf("Error adding command %s: %s<br>\n",$command,$EQDB->error);
|
||||
}
|
||||
}
|
||||
if ($error==0) {
|
||||
printf("<h3>Command settings updated, will take affect on zone restart.</h3><br>\n");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form method="get" action="commands.html">
|
||||
<?
|
||||
my $i=0;
|
||||
$q="select * from commands order by command";
|
||||
my $res=$EQDB->query($q);
|
||||
if ($res) {
|
||||
print "<table id=\"cmd_tab\" border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\"><tr>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"150\">Command</th>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"70\">Access</th>\n";
|
||||
printf "\t</tr>\n";
|
||||
|
||||
while(my $row=$res->fetch_row_hash) {
|
||||
printf "\t\t<tr><td>#%s<input id=\"cmd%d\" type=\"hidden\" name=\"command%d\" value=\"%s\"></td>\n",$row->{command},$i,$i,$row->{command};
|
||||
printf "\t\t<td><input size=\"4\" type=\"text\" value=\"%s\" name=\"access%d\"/> <img src=\"delete.gif\" alt=\"delete\" onClick=\"del_row(%d)\"></td>\n",$row->{access},$i,$i;
|
||||
print "\t</tr>\n";
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
printf("<tr><td colspan=\"2\" align=\"center\"><input value=\"Add New Command\" type=button onClick=\"add_row()\"/></td></tr>\n");
|
||||
printf("</table><script language=\"javascript\">var next_field=%d;</script>\n",$i);
|
||||
printf("<input type=\"hidden\" id=\"maxid\" value=\"%d\" name=\"maxid\">\n",$i-1);
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
function add_row() {
|
||||
var tab=document.getElementById('cmd_tab');
|
||||
var row=tab.insertRow(tab.rows.length-1);
|
||||
|
||||
var cell=row.insertCell(0);
|
||||
var textNode = document.createTextNode('#');
|
||||
cell.appendChild(textNode);
|
||||
|
||||
var el=document.createElement('input');
|
||||
el.type='text';
|
||||
el.name='command'+next_field;
|
||||
el.value='NewCommand';
|
||||
el.id='cmd'+next_field;
|
||||
el.size=20;
|
||||
cell.appendChild(el);
|
||||
|
||||
cell=row.insertCell(1);
|
||||
el=document.createElement('input');
|
||||
el.type='text';
|
||||
el.name='access'+next_field;
|
||||
el.value='100';
|
||||
el.size=4;
|
||||
cell.appendChild(el);
|
||||
|
||||
el=document.createElement('img');
|
||||
el.src='delete.gif';
|
||||
el.onclick=new Function('del_row('+next_field+')');
|
||||
cell.appendChild(el);
|
||||
|
||||
++next_field;
|
||||
var inp=document.getElementById('maxid');
|
||||
inp.value=next_field;
|
||||
|
||||
}
|
||||
function del_row(i) {
|
||||
var row=document.getElementById('cmd'+i);
|
||||
row.parentNode.parentNode.parentNode.removeChild(row.parentNode.parentNode);
|
||||
}
|
||||
</script>
|
||||
<p>
|
||||
<input type="image" src="update.png" name="update"/>
|
||||
<input type="image" src="reset.png" name="reset"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Configuration File</h2>
|
||||
<hr/>
|
||||
<p><a href="configdl.html">Download XML Config </a></p>
|
||||
<table bgcolor="#FFFFCC"><tr><td>
|
||||
<font color="#000000">
|
||||
<pre>
|
||||
<?
|
||||
$file = "eqemu_config.xml";
|
||||
if(open(F, "<$file")) {
|
||||
while(<F>) {
|
||||
s/</</g;
|
||||
s/>/>/g;
|
||||
print;
|
||||
}
|
||||
close(F);
|
||||
} else {
|
||||
print "Unable to open $file";
|
||||
}
|
||||
|
||||
?>
|
||||
</pre></font></td></tr></table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?
|
||||
$file = "eqemu_config.xml";
|
||||
if(open(F, "<$file")) {
|
||||
$request->get("Content-type", "text/xml");
|
||||
while(<F>) {
|
||||
print;
|
||||
}
|
||||
close(F);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Database Operations</h2>
|
||||
<hr/>
|
||||
<p>Some basic database operations...</p>
|
||||
<p><a href="accounts.html">Accounts</a> - View and edit characters and accounts</p>
|
||||
<p><a href="variables.html">Variables</a> - View and change in-database variables</p>
|
||||
<p><a href="filters.html">Filters And Bans</a> - View and edit name filters and banned accounts</p>
|
||||
<p><a href="minilogin.html">Mini-login</a> Change Server Type and Settings</p>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 339 B |
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Filter Management</h2>
|
||||
<hr/>
|
||||
view blocked names, add/delete them.<br>
|
||||
list banned accounts, add/delete them.
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Guild Details</h2>
|
||||
<hr/>
|
||||
<?
|
||||
my $gid = $request->getInt("id", 0);
|
||||
if($gid > 0) {
|
||||
my $act = $request->get("action", "");
|
||||
|
||||
#note: delete action should be done on the actions.html page, so we can redirect elsewhere.
|
||||
if($act eq "makeleader") {
|
||||
my $char = $request->getInt("char", 0);
|
||||
if($char > 0) {
|
||||
if(!$EQW->SetGuildLeader($gid, $char)) {
|
||||
print "Failed to change guild leader, check your logs.<hr />";
|
||||
} else {
|
||||
print "Guild leader changed.<hr />";
|
||||
}
|
||||
} else {
|
||||
print "Invalid char in makeleader.<hr/>";
|
||||
}
|
||||
} elsif($act eq "remove") {
|
||||
my $char = $request->getInt("char", 0);
|
||||
if($char > 0) {
|
||||
if(!$EQW->SetGuild($char, -1, 3)) {
|
||||
print "Failed to remove member, check your logs.<hr />";
|
||||
} else {
|
||||
print "Guild member removed.<hr />";
|
||||
}
|
||||
} else {
|
||||
print "Invalid char in remove member.<hr/>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $q = "SELECT g.id,g.name,g.leader,g.motd,g.motd_setter,g.tribute,c.name AS lname FROM guilds AS g LEFT JOIN character_ AS c ON g.leader=c.id WHERE g.id=$gid";
|
||||
my $res=$EQDB->query($q);
|
||||
my $row;
|
||||
if($res && ($row = $res->fetch_row_hash)) {
|
||||
print <<"HTML";
|
||||
<table border="1">
|
||||
<tr><th>Name:</th><td>$row->{name}</td></tr>
|
||||
<tr><th>Leader:</th><td>$row->{lname} ($row->{leader})</td></tr>
|
||||
<tr><th>MOTD:</th><td>$row->{motd_setter} - $row->{motd}</td></tr>
|
||||
<tr><th>Tribute:</th><td>$row->{tribute}</td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<h4>Guild Members</h4>
|
||||
HTML
|
||||
$q = "SELECT g.char_id,c.name,g.rank,gr.title,g.banker,g.public_note,g.tribute_enable,g.total_tribute "
|
||||
."FROM guild_members AS g "
|
||||
."LEFT JOIN character_ AS c ON g.char_id=c.id "
|
||||
."LEFT JOIN guild_ranks AS gr ON g.rank=gr.rank AND g.guild_id=gr.guild_id "
|
||||
."WHERE g.guild_id=$gid";
|
||||
|
||||
my $res2 = $EQDB->query($q);
|
||||
if($res2) {
|
||||
print <<"HTML";
|
||||
<br>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th align="center">Char ID</th>
|
||||
<th align="center">Char Name</th>
|
||||
<th align="center">Rank</th>
|
||||
<th align="center">Tribute</th>
|
||||
<th align="center">Public Note</th>
|
||||
<th align="center">Actions</th>
|
||||
</tr>
|
||||
HTML
|
||||
while(my $row2 = $res2->fetch_row_hash) {
|
||||
my $tline = "Off";
|
||||
if($row2->{tribute_enable}) {
|
||||
$tline = "On";
|
||||
}
|
||||
my $bline = "";
|
||||
if($row2->{banker}) {
|
||||
$bline = "<b>Banker</b>";
|
||||
}
|
||||
print <<"CHAR";
|
||||
<tr>
|
||||
<td align="center">$row2->{char_id}</td>
|
||||
<td align="center">$row2->{name}</td>
|
||||
<td align="center">$row2->{title} ($row2->{rank}) $bline</td>
|
||||
<td align="center">$tline/$row2->{total_tribute}</td>
|
||||
<td align="center">$row2->{public_note}</td>
|
||||
<td align="center">
|
||||
<a href="guild.html?id=$gid&action=remove&char=$row2->{char_id}">Remove</a> -
|
||||
<a href="guild.html?id=$gid&action=makeleader&char=$row2->{char_id}">Make Leader</a></td>
|
||||
</tr>
|
||||
CHAR
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
} else {
|
||||
print "Unable to query guild details.";
|
||||
}
|
||||
} else {
|
||||
print "Invalid guild id.";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
TODO:<br>
|
||||
online status, delete guild, add member, change motd, change public note, set tribute, make banker, rename guild, view/edit custom ranks, view/edit guild relations.
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Create A Guild</h2>
|
||||
<hr/>
|
||||
|
||||
<?
|
||||
$gname = $request->get("name", "");
|
||||
$lname = $request->get("leader", "");
|
||||
|
||||
if($gname ne "" && $lname ne "") {
|
||||
$q="select id from character_ where name='".$EQDB->escape_string($lname)."'";
|
||||
my $res=$EQDB->query($q);
|
||||
if($res) {
|
||||
if(my $row=$res->fetch_row_hash) {
|
||||
my $lid = $row->{id};
|
||||
my $gid = $EQW->CreateGuild($gname, $lid);
|
||||
if($gid > 0 && $gid < 3000) {
|
||||
print "Guild $gname successfully created with ID $gid<br>";
|
||||
} else {
|
||||
print "Error creating guild. Check your logs.<br>";
|
||||
}
|
||||
} else {
|
||||
print "Unable to find '$lname'<br>";
|
||||
}
|
||||
} else {
|
||||
print "Unable to query leader's name.<br>";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form method="POST" action="guildcreate.html">
|
||||
Guild Name: <input name="name" type="text" value="<?print $gname;?>"><br>
|
||||
Leader Char Name: <input name="leader" type="text" value="<?print $lname;?>"><br>
|
||||
<input name="" type="submit" value="Create">
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Guild List</h2>
|
||||
<hr/>
|
||||
<div align="center">
|
||||
<a href="guildcreate.html">Create Guild</a> -
|
||||
<a href="guildsearch.html">Search Guilds</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<?
|
||||
$q="select a.*,b.name as leader_name from guilds a left outer join character_ b on a.leader=b.id";
|
||||
my $res=$EQDB->query($q);
|
||||
if ($res) {
|
||||
print <<"HTML";
|
||||
<table border="1" cellspacing="2" cellpadding="3" class="zonelist">
|
||||
<th scope="col" width="75">ID</th>
|
||||
<th scope="col" width="150">Guild Name</th>
|
||||
<th scope="col" width="150">Leader Name</th>
|
||||
</tr>
|
||||
HTML
|
||||
|
||||
while(my $row=$res->fetch_row_hash) {
|
||||
printf "\t\t<td>%d</td>\n",$row->{id};
|
||||
printf "\t\t<td><a href='guild.html?id=%d'>%s</a></td>\n",$row->{id},$row->{name};
|
||||
printf "\t\t<td>%s</td>\n",$row->{leader_name};
|
||||
print "\t</tr>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Search Guilds</h2>
|
||||
<hr/>
|
||||
<?
|
||||
$query = $request->get("name", "");
|
||||
$type = $request->get("type", "");
|
||||
?>
|
||||
<form method="get" action="guildsearch.html">
|
||||
<b>Guild Search:</b><br>
|
||||
<input name="type" type="radio" value="name" <?if($type ne "leader" && $type ne "member") { print "checked"; } ?> > Guild Name <br>
|
||||
<input name="type" type="radio" value="leader" <?if($type eq "leader") { print "checked"; } ?> > Leader Name <br>
|
||||
<input name="type" type="radio" value="member" <?if($type eq "member") { print "checked"; } ?> > Member Name
|
||||
<br>
|
||||
<input name="name" type="text" value="<?print $query;?>">
|
||||
<input name="" type="submit" value="Search">
|
||||
</form>
|
||||
<?
|
||||
if($query ne "") {
|
||||
if($type eq "name") {
|
||||
print "search for guild by name $query...";
|
||||
} elsif($type eq "leader") {
|
||||
print "search for guild by leader $query...";
|
||||
} elsif($type eq "member") {
|
||||
print "search for guild by member $query...";
|
||||
} else {
|
||||
print "Invalid search type '$type'";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>EQEmulator Management</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
<frameset rows="99,*" cols="*" frameborder="YES" border="1" framespacing="0">
|
||||
<frame src="top.html" name="topFrame" scrolling="NO" noresize >
|
||||
<frameset rows="*" cols="114,*" framespacing="0" frameborder="NO" border="0">
|
||||
<frame src="menu.html" name="leftF" scrolling="NO" noresize>
|
||||
<frame src="status.html" name="main">
|
||||
</frameset>
|
||||
</frameset>
|
||||
<noframes><body>
|
||||
</body></noframes>
|
||||
</html>
|
||||
@@ -0,0 +1,200 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
<?
|
||||
$lname = $request->get("name","ERROR");
|
||||
?>
|
||||
<body>
|
||||
<h2 align="center">Launcher <?print $lname; ?> Details</h2>
|
||||
<hr/>
|
||||
<?
|
||||
|
||||
my $act = $request->get("action", "none");
|
||||
if($act eq "Add") {
|
||||
my $dynamics = $request->getInt("dynamics", "0");
|
||||
if($lname eq "" || $lname eq "ERROR") {
|
||||
print "Missing launcher name in Add action.";
|
||||
} elsif($dynamics < 0) {
|
||||
print "Invalid dynamics count in Add action.";
|
||||
} else {
|
||||
print "Added launcher '$lname' with $dynamics dynamic zones.";
|
||||
$EQW->CreateLauncher($lname, $dynamics);
|
||||
}
|
||||
print "<hr/>";
|
||||
}
|
||||
|
||||
$config = $EQW->GetLauncher($lname);
|
||||
if(!$config) {
|
||||
print "<h2>Unable to find launcher $lname</h2>";
|
||||
}
|
||||
|
||||
|
||||
if($act eq "Boot") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
my $port = $request->getInt("port", 0);
|
||||
if($lname eq "ERROR" || $zone eq "none" || $zone eq "" || $port < 0 || $port > 65535) {
|
||||
print "Invalid zone, port, or launcher name in Boot action.";
|
||||
} else {
|
||||
if(!$config->BootStaticZone($zone, $port)) {
|
||||
print "Failed to boot '$zone' on launcher $lname with port $port. Invalid zone?";
|
||||
} else {
|
||||
print "Booting new zone $zone on launcher $lname with port $port.";
|
||||
}
|
||||
}
|
||||
print "<hr/>";
|
||||
} elsif($act eq "Change") {
|
||||
my $count = $request->getInt("count", 0);
|
||||
if($lname eq "ERROR" || $count < 0) {
|
||||
print "Invalid launcher name or count";
|
||||
} else {
|
||||
$config->SetDynamicCount($count);
|
||||
print "Changed dynamic count to $count. Notifying launcher.";
|
||||
}
|
||||
print "<hr/>";
|
||||
} elsif($act eq "remove") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($lname eq "ERROR" || $zone eq "none" || $zone eq "") {
|
||||
print "Invalid zone or launcher name in $act action.";
|
||||
} else {
|
||||
if(!$config->DeleteStaticZone($zone)) {
|
||||
print "Failed to remove '$zone' on launcher $lname. Invalid zone?";
|
||||
} else {
|
||||
print "Removed $zone from launcher $lname";
|
||||
}
|
||||
}
|
||||
print "<hr/>";
|
||||
} elsif($act eq "restart") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($lname eq "ERROR" || $zone eq "none" || $zone eq "") {
|
||||
print "Invalid zone or launcher name in $act action.";
|
||||
} else {
|
||||
$config->RestartZone($zone);
|
||||
print "Sent restart for $zone to launcher $lname";
|
||||
}
|
||||
print "<hr/>";
|
||||
} elsif($act eq "start") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($lname eq "ERROR" || $zone eq "none" || $zone eq "") {
|
||||
print "Invalid zone or launcher name in $act action.";
|
||||
} else {
|
||||
$config->StartZone($zone);
|
||||
print "Sent start for $zone to launcher $lname";
|
||||
}
|
||||
print "<hr/>";
|
||||
} elsif($act eq "kill") {
|
||||
my $zone = $request->get("zone", "none");
|
||||
if($lname eq "ERROR" || $zone eq "none" || $zone eq "") {
|
||||
print "Invalid zone or launcher name in $act action.";
|
||||
} else {
|
||||
$config->StopZone($zone);
|
||||
print "Sent stop for $zone to launcher $lname";
|
||||
}
|
||||
print "<hr/>";
|
||||
} elsif($act eq "rebootall") {
|
||||
foreach my $z($config->ListZones()) {
|
||||
$config->RestartZone($z);
|
||||
}
|
||||
print "Restarted all zones.\n<hr/>";
|
||||
} elsif($act eq "stopall") {
|
||||
foreach my $z($config->ListZones()) {
|
||||
$config->StopZone($z);
|
||||
}
|
||||
print "Stopped all zones.\n<hr/>";
|
||||
} elsif($act eq "startall") {
|
||||
foreach my $z($config->ListZones()) {
|
||||
$config->StartZone($z);
|
||||
}
|
||||
print "Started all zones.\n<hr/>";
|
||||
}
|
||||
|
||||
?>
|
||||
<div align="center">
|
||||
<a href="?name=<? print $lname; ?>">Reload</a> -
|
||||
<a href="?name=<? print $lname; ?>&action=rebootall">Reboot All Zones</a> -
|
||||
<a href="?name=<? print $lname; ?>&action=stopall">Stop All Zones</a> -
|
||||
<a href="?name=<? print $lname; ?>&action=startall">Start All Zones</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="?" method="POST">
|
||||
<input type='hidden' name='name' value='<?print $lname; ?>'>
|
||||
Add:
|
||||
Zone Short Name: <input type='text' name='zone'>
|
||||
Port: <input type='text' name='port' value='0' size='5'>
|
||||
<input type='submit' name='action' value='Boot'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="launcher.html" method="POST">
|
||||
<input type='hidden' name='name' value='<?print $lname; ?>'>
|
||||
Change Dynamic Count: <input type='text' name='count' value='<? print $config->GetDynamicCount(); ?>' size='5'>
|
||||
<input type='submit' name='action' value='Change'>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
<table width="100%" border="1" cellspacing="2" cellpadding="3" class="zonelist">
|
||||
<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'>UP</font></td>";
|
||||
} else {
|
||||
print "<td><font color='#CC0000'>DOWN</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='?action=restart&name=$lname&zone=$z->{name}'>Restart</a> - ";
|
||||
if($z->{up}) {
|
||||
print "<a href='?action=kill&name=$lname&zone=$z->{name}'>Stop</a>";
|
||||
} else {
|
||||
print "<a href='?action=start&name=$lname&zone=$z->{name}'>Start</a>";
|
||||
}
|
||||
if($z->{name} !~ /dynamic/) {
|
||||
print " - ";
|
||||
}
|
||||
}
|
||||
if($z->{name} !~ /dynamic/) {
|
||||
print "<a href='?action=remove&name=$lname&zone=$z->{name}'>Remove</a>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
<?
|
||||
|
||||
@list = $EQW->ListLaunchers();
|
||||
|
||||
?>
|
||||
<body>
|
||||
<h2 align="center">Launchers</h2>
|
||||
<hr/>
|
||||
<?
|
||||
print "You have ".($#list+1)." launchers. (@list)";
|
||||
?>
|
||||
<hr/>
|
||||
<table width="100%" border="1" cellspacing="2" cellpadding="3" class="zonelist">
|
||||
<tr>
|
||||
<th scope="col">Launcher Name </th>
|
||||
<th scope="col">IP</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) {
|
||||
#$zone->{name} = "ERROR: no launcher";
|
||||
}
|
||||
print "<tr>\n";
|
||||
if($l->IsConnected()) {
|
||||
print "\t<td><a href='launcher.html?name=".$l->GetName()."'>".$l->GetName()."</a></td>";
|
||||
print "<td>_IP_</td>";
|
||||
} else {
|
||||
print "<td><a href='launcher.html?name=".$l->GetName()."'>".$l->GetName()."</a><br><b>Not Connected</b></td>";
|
||||
print "<td> </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='action.html?action=remlauncher&name=".$l->GetName()."'>Remove</a>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<form action="launcher.html" method="POST">
|
||||
Add Launcher: Name: <input type='text' name='name'>
|
||||
Dynamic Count: <input type='text' name='dynamics' size="3">
|
||||
<input type='submit' name='action' value='Add'>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,200 @@
|
||||
body {
|
||||
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size: 13px;
|
||||
text-align: justify;
|
||||
line-height: 20px;
|
||||
background-color: #091315; //#12282D;
|
||||
color: #8EAEB0;
|
||||
}
|
||||
.edgebody {
|
||||
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
|
||||
font-size: 13px;
|
||||
text-align: justify;
|
||||
line-height: 20px;
|
||||
background-color: #091315; //#12282D;
|
||||
color: #8EAEB0;
|
||||
margin: 0px;
|
||||
}
|
||||
.menuborder {
|
||||
background-color: #2B6874;
|
||||
}
|
||||
|
||||
.menu {
|
||||
background-color: #12282D;
|
||||
}
|
||||
img {
|
||||
margin: 0;
|
||||
}
|
||||
a {
|
||||
color: #555599;
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
a:hover {
|
||||
TEXT-DECORATION: underline;
|
||||
}
|
||||
.zonelist {
|
||||
text-align: center;
|
||||
}
|
||||
h1, h2, h3, h4, h5 {
|
||||
color: #CC9900;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
th {
|
||||
margin:2px;
|
||||
padding: 2px;
|
||||
border:1px solid #2b6874;
|
||||
background-color:#2b6874;
|
||||
color:#dddddd;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
td {
|
||||
margin:2px;
|
||||
padding: 2px;
|
||||
border:1px solid #2b6874;
|
||||
background-color:#12282F;
|
||||
color:#aaaaaa;
|
||||
}
|
||||
|
||||
.headtbl {
|
||||
border: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: #091315;
|
||||
}
|
||||
|
||||
/*
|
||||
a.menus {
|
||||
cursor: default;
|
||||
color: #555599; //#6C819E;
|
||||
}
|
||||
a.menus:hover {
|
||||
cursor: default;
|
||||
color: #555599;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a.default {
|
||||
display: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.highres {
|
||||
cursor: default;
|
||||
color: #AAAAAA;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a.highres:hover {
|
||||
cursor: default;
|
||||
color: #AAAAAA;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.copywrite {
|
||||
cursor: pointer;
|
||||
color: #999999;
|
||||
}
|
||||
a.copywrite:hover {
|
||||
cursor: pointer;
|
||||
color: #999999;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.misctext {
|
||||
cursor: pointer;
|
||||
color: #999999;
|
||||
}
|
||||
a.misctext:hover {
|
||||
cursor: pointer;
|
||||
color: #999999;
|
||||
text-decoration: none;
|
||||
}
|
||||
.logo {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 531px;
|
||||
height: 86px;
|
||||
}
|
||||
.logohighres {
|
||||
display: none;
|
||||
}
|
||||
div.menus {
|
||||
float: left;
|
||||
font-size: 11px;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.menu {
|
||||
text-align: left;
|
||||
width: 140px;
|
||||
color: white;
|
||||
padding-bottom: 2px;
|
||||
margin-bottom: 3px;
|
||||
cursor: default;
|
||||
}
|
||||
div.styleswitcher {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #999999;
|
||||
background-color: #333333;
|
||||
width: 10px;
|
||||
padding-bottom: 2px;
|
||||
cursor: default;
|
||||
margin-right: 1px;
|
||||
}
|
||||
.content {
|
||||
color: #8EAEB0;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.news {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.newstitle {
|
||||
font-weight: bold;
|
||||
margin-right: 1px;
|
||||
}
|
||||
.newsdate {
|
||||
font-size: 10px;
|
||||
color: #DDDDDD;
|
||||
}
|
||||
table {
|
||||
font-size: 10px;
|
||||
}
|
||||
.newstext {
|
||||
font-size: 10px;
|
||||
}
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
div.copywrite {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
cursor: default;
|
||||
margin-left: 5%;
|
||||
}
|
||||
.misctext {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
margin-top: 90px;
|
||||
}
|
||||
.tdhilite {
|
||||
background-color: #12282D
|
||||
}
|
||||
.page {
|
||||
color: #8EAEB0;
|
||||
font-size: 13px;
|
||||
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
|
||||
background-color: #091315;
|
||||
padding: 15px;
|
||||
border: 1px inset;
|
||||
border-bottom: none;
|
||||
height: 100%;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<base target="main">
|
||||
<title>Untitled Document</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<script src="TreeMenu.js" language="JavaScript" type="text/javascript"></script>
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
<link rel="stylesheet" title="Default" href="TreeMenu.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body class="edgebody">
|
||||
<table class="menu" border="0" bgcolor="#12282D" cellspacing="0" cellpadding="0" width="100%" height="100%">
|
||||
<tr>
|
||||
<td class="menu" valign="top" align="left" width="100%">
|
||||
<script language="javascript" type="text/javascript">
|
||||
EQLMenu = new TreeMenu("TMimages", "EQLMenu", "_self", "auto", true);
|
||||
EQLMenu.linkTarget = "main";
|
||||
EQLMenu.SetImageSize(20, 20);
|
||||
statusmenu = EQLMenu.addItem(new TreeNode('Status', null, 'status.html', true, false, 'tmenu0text'));
|
||||
statusmenu.addItem(new TreeNode('Players', null, 'players.html', true, false, 'tmenu1text'));
|
||||
statusmenu.addItem(new TreeNode('Petitions', null, 'petitions.html', true, false, 'tmenu1text'));
|
||||
statusmenu.addItem(new TreeNode('Bugs', null, 'bugs.html', true, false, 'tmenu1text'));
|
||||
worldmenu = EQLMenu.addItem(new TreeNode('World', null, 'world.html', true, false, 'tmenu0text'));
|
||||
worldmenu.addItem(new TreeNode('Launchers', null, 'launchers.html', true, false, 'tmenu1text'));
|
||||
worldmenu.addItem(new TreeNode('Chat', null, 'chat.html', true, false, 'tmenu1text'));
|
||||
zonesmenu = EQLMenu.addItem(new TreeNode('Zones', null, 'zones.html', true, false, 'tmenu0text'));
|
||||
guildmenu = EQLMenu.addItem(new TreeNode('Guilds', null, 'guilds.html', true, false, 'tmenu0text'));
|
||||
guildmenu.addItem(new TreeNode('Search', null, 'guildsearch.html', true, false, 'tmenu1text'));
|
||||
guildmenu.addItem(new TreeNode('Create', null, 'guildcreate.html', true, false, 'tmenu1text'));
|
||||
dbmenu = EQLMenu.addItem(new TreeNode('Database', null, 'database.html', true, false, 'tmenu0text'));
|
||||
dbmenu.addItem(new TreeNode('Accounts', null, 'accounts.html', true, false, 'tmenu1text'));
|
||||
dbmenu.addItem(new TreeNode('Variables', null, 'variables.html', true, false, 'tmenu1text'));
|
||||
dbmenu.addItem(new TreeNode('Minilogin', null, 'minilogin.html', true, false, 'tmenu1text'));
|
||||
dbmenu.addItem(new TreeNode('Bans/Filters', null, 'filters.html', true, false, 'tmenu1text'));
|
||||
dbmenu.addItem(new TreeNode('Commands', null, 'commands.html', true, false, 'tmenu1text'));
|
||||
configmenu = EQLMenu.addItem(new TreeNode('Config', null, 'config.html', true, false, 'tmenu0text'));
|
||||
configmenu.addItem(new TreeNode('Rules', null, 'rule.html', true, false, 'tmenu1text'));
|
||||
|
||||
EQLMenu.drawMenu();
|
||||
EQLMenu.resetBranches();
|
||||
</script>
|
||||
<br/>
|
||||
</td>
|
||||
<td class="menuborder" width="1"><img src="spacer.gif"></td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="menuborder" height="1" width="100%"><img src="spacer.gif"></td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Mini-Login Management</h2>
|
||||
<hr/>
|
||||
<form action="action.html" method="get">
|
||||
<b>Minilogin:</b>
|
||||
<input name="minilogin" type="radio" value="1"> Enabled
|
||||
<input name="minilogin" type="radio" value="0" checked> Disabled
|
||||
</form>
|
||||
... change IP addrs and stuff ...
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Petition Management</h2>
|
||||
<hr/>
|
||||
<?
|
||||
$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%\" border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\">\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"
|
||||
}
|
||||
?>
|
||||
Delete petitions
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
<?
|
||||
$zone = $request->get("zone", "");
|
||||
@chars = $EQW->ListPlayers($zone);
|
||||
#(
|
||||
# { 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" }
|
||||
# );
|
||||
?>
|
||||
<body>
|
||||
<h2 align="center">Online Player List</h2>
|
||||
<hr/>
|
||||
<?
|
||||
if($zone eq "") {
|
||||
print "There are ".($#chars+1)." players logged in.";
|
||||
} else {
|
||||
print "There are ".($#chars+1)." players in $zone.";
|
||||
}
|
||||
?>
|
||||
<hr/>
|
||||
<table width="100%" border="1" cellspacing="2" cellpadding="3" class="zonelist">
|
||||
<tr>
|
||||
<th scope="col">Character</th>
|
||||
<th scope="col">Account Name</th>
|
||||
<th scope="col">Location</th>
|
||||
<th scope="col">Actions</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>";
|
||||
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}'>guild #$char->{guild_id}</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 "<td>";
|
||||
print "<a href='char.html?name=$char->{character}&action=kick'>Kick</a>";
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Rules Management</h2>
|
||||
<hr/>
|
||||
<?
|
||||
my $q = "SELECT DISTINCT(rv.ruleset_id), rs.name FROM rule_sets rs RIGHT JOIN rule_values rv ON (rv.ruleset_id = rs.ruleset_id) ORDER BY rv.ruleset_id ASC";
|
||||
my $res = $EQDB->query($q);
|
||||
if ($res) {
|
||||
print "<table align=\"center\" border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\">\n";
|
||||
print "\t<tr>\n";
|
||||
print "\t\t<th width=1 nowrap>Name</th>\n";
|
||||
print "\t\t<th width=1 nowrap>ID</th>\n";
|
||||
print "\t\t<th width=1 nowrap>Rules</th>\n";
|
||||
#print "\t\t<th width=1 nowrap></th>\n"; #delete column
|
||||
print "\t</tr>\n";
|
||||
while (my $row = $res->fetch_row_hash) {
|
||||
print "\t<tr>\n";
|
||||
print "\t\t<td><a href=\"rules.html?ruleset_id=$row->{ruleset_id}\">$row->{name}</a></td>\n";
|
||||
print "\t\t<td><a href=\"rules.html?ruleset_id=$row->{ruleset_id}\">$row->{ruleset_id}</a></td>\n";
|
||||
|
||||
my $q2 = "SELECT COUNT(ruleset_id) AS num_rules FROM rule_values WHERE ruleset_id = '$row->{ruleset_id}'";
|
||||
my $res2 = $EQDB->query($q2);
|
||||
my $row2 = $res2->fetch_row_hash;
|
||||
|
||||
print "\t\t<td>$row2->{num_rules}</td>\n";
|
||||
#print "\t\t<td><input type=\"image\" src=\"delete.gif\" alt=\"Delete\"></td>\n";
|
||||
print "\t</tr>\n";
|
||||
}
|
||||
} else {
|
||||
print "No rule sets";
|
||||
}
|
||||
?>
|
||||
|
||||
Todo: show active rule set, change active rule set
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Rules Management</h2>
|
||||
<hr/>
|
||||
<center>Note: changes won't go into effect until you restart the server.</center>
|
||||
|
||||
<?
|
||||
#before we do anything, we need to submit any changes that were passed via POST (or GET since we don't really check in $request)
|
||||
my $rule_name = $request->get("rule_name");
|
||||
if ($rule_name =~ m/\w+:\w+/i) { #if we have a value matching the pattern "Type:Name", we can assume we want to make the change
|
||||
my $rule_value = $request->get("rule_value"); #not safe from injection, should be able to just escape quotes
|
||||
my $q3 = "UPDATE rule_values SET rule_value = '$rule_value' WHERE rule_name = '$rule_name'";
|
||||
my $res3 = $EQDB->query($q3);
|
||||
print "<center>\n\t";
|
||||
if ($res3) { # && ($EQDB->affected_rows > 0)
|
||||
print "<font color=\"green\">$rule_name successfully changed to '$rule_value'</font><br>\n";
|
||||
} else {
|
||||
my $errno3 = $EQDB->get_errno;
|
||||
my $err3 = $EQDB->error;
|
||||
print "<font color=\"red\">Update of $rule_name to '$rule_value' failed! (Error $errno3: $err3)</font><br>\n";
|
||||
}
|
||||
print "</center>\n";
|
||||
}
|
||||
#for some reason, when we submit a change, we go back to the default view
|
||||
|
||||
my $ruleset_id = $request->get("ruleset_id", 1); #if we don't put a value, this gets defaulted to 0 no matter what we put for the default value using getInt, so we'll just do our own check
|
||||
if ($ruleset_id !~ m/^[0-9]+$/) {$ruleset_id = 1;} #this should default any non-numeric values (particularly blank ones), also making it free from injections
|
||||
my $rule_type = $request->get("rule_type", "All"); #not safe from injection as-is
|
||||
if ($rule_type !~ m/^\w+$/i) {$rule_type = "All";} #this should make it safe from injection, but may cause issues if we start using non-alphanumeric characters in the first part of the rule_name
|
||||
|
||||
#now, we'll put together a list of the rule categories that we can filter by
|
||||
print "<center>\n\t";
|
||||
|
||||
if ($rule_type eq "All") {print "<b>";}
|
||||
print "<a href=\"rules.html?ruleset_id=$ruleset_id&rule_type=All\">All</a>";
|
||||
if ($rule_type eq "All") {print "</b>";}
|
||||
|
||||
my $q = "SELECT DISTINCT(SUBSTRING(rule_name, 1, LOCATE(':', rule_name) - 1)) AS rule_type FROM rule_values WHERE ruleset_id = '$ruleset_id' ORDER BY rule_type ASC";
|
||||
my $res = $EQDB->query($q);
|
||||
if ($res) {
|
||||
while (my $row = $res->fetch_row_hash) {
|
||||
print " | \n\t";
|
||||
if ($rule_type eq $row->{rule_type}) {print "<b>";}
|
||||
print "<a href=\"rules.html?ruleset_id=$ruleset_id&rule_type=$row->{rule_type}\">$row->{rule_type}</a>";
|
||||
if ($rule_type eq $row->{rule_type}) {print "</b>";}
|
||||
}
|
||||
}
|
||||
|
||||
print "\n</center>\n";
|
||||
|
||||
#next, we create the table, including the first line which will let us put in a new rule from scratch (eventually)
|
||||
print "<table align=\"center\" border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\">\n";
|
||||
print "\t<tr>\n";
|
||||
print "\t\t<th width=1 nowrap>Type</th>\n";
|
||||
print "\t\t<th width=1 nowrap>Name</th>\n";
|
||||
print "\t\t<th width=1 nowrap>Value</th>\n";
|
||||
print "\t\t<th width=1 nowrap>Notes</th>\n";
|
||||
print "\t\t<th width=1 nowrap></th>\n";
|
||||
#print "\t\t<th width=1 nowrap></th>\n";
|
||||
print "\t</tr>\n";
|
||||
#print "\t<tr>\n";
|
||||
#print "\t\t<td></td>\n";
|
||||
#print "\t\t<td></td>\n";
|
||||
#print "\t\t<td></td>\n";
|
||||
#print "\t\t<td></td>\n";
|
||||
#print "\t\t<td colspan=\"2\"><button>Add</button></td>\n";
|
||||
#print "\t<tr>\n";
|
||||
|
||||
#lastly, output any matching rules
|
||||
my $w2 = "WHERE ruleset_id = '$ruleset_id'";
|
||||
if ($rule_type ne "All") {
|
||||
$w2 .= " AND rule_name LIKE '$rule_type:%'";
|
||||
}
|
||||
my $q2 = "SELECT ruleset_id, SUBSTRING(rule_name, 1, LOCATE(':', rule_name) - 1) AS rule_type, SUBSTRING(rule_name, LOCATE(':', rule_name) + 1) AS rule_name_short, rule_name, rule_value, notes FROM rule_values $w2 ORDER BY rule_name ASC";
|
||||
my $res2 = $EQDB->query($q2);
|
||||
if ($res) {
|
||||
while (my $row2 = $res2->fetch_row_hash) {
|
||||
print "\t<tr>\n";
|
||||
print "\t\t<form method=\"POST\" action=\"rules.html?ruleset_id=$ruleset_id&rule_type=$rule_type\">\n";
|
||||
print "\t\t<input type=\"hidden\" name=\"ruleset_id\" value=\"$ruleset_id\">\n"; #if we don't pass this in POST, for some reason we don't pick them up from the GET info from the form action
|
||||
print "\t\t<input type=\"hidden\" name=\"rule_type\" value=\"$rule_type\">\n"; #ditto
|
||||
print "\t\t<td align=\"right\"><a href=\"rules.html?ruleset_id=$ruleset_id&rule_type=$row2->{rule_type}\">$row2->{rule_type}</a></td>\n";
|
||||
print "\t\t<td align=\"left\">$row2->{rule_name_short}</td>\n";
|
||||
print "\t\t<input type=\"hidden\" name=\"rule_name\" value=\"$row2->{rule_name}\">\n";
|
||||
print "\t\t<td><input type=\"text\" name=\"rule_value\" size=\"8\" style=\"text-align: right\" value=\"$row2->{rule_value}\" /></td>\n";
|
||||
print "\t\t<td>$row2->{notes}</td>\n";
|
||||
print "\t\t<td><input type=\"image\" src=\"update.png\" alt=\"Update\"></td>\n";
|
||||
#print "\t\t<td><input type=\"image\" src=\"delete.gif\" alt=\"Delete\"></td>\n";
|
||||
print "\t\t</form>\n";
|
||||
print "\t<tr>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Status Overview</h2>
|
||||
<hr/>
|
||||
|
||||
<?do("templates/worldstatus.html");?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>EQEmulator Management</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body class="edgebody">
|
||||
<table width="862" height="100" border="0" cellpadding="0" cellspacing="0" class="headtbl">
|
||||
<tr class="headtbl">
|
||||
<td width="159" height="100" valign="top" class="headtbl">
|
||||
<img src="head_01_nb.jpg" width="159" height="100"></td>
|
||||
<td class="headtbl"><img src="head_02_nb.jpg" width="480" height="100"></td>
|
||||
<td width="178" class="headtbl"><img src="head_03_nb.jpg" width="178" height="100"></td>
|
||||
<td width="113" class="headtbl"><img src="head_04_nb.jpg" width="113" height="100"></td>
|
||||
<td width="100%" class="headtbl"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Variable Settings</h2>
|
||||
<hr/>
|
||||
<?
|
||||
my $gets = $request->get_all;
|
||||
my $error=0;
|
||||
if (defined($gets->{"update.x"})) {
|
||||
$EQDB->query("delete from variables");
|
||||
my $max=$gets->{maxid};
|
||||
for(my $i=0;$i<$max;++$i) {
|
||||
my ($varname,$info,$value) = ($gets->{"variable$i"},$gets->{"info$i"},$gets->{"value$i"});
|
||||
next if (!$varname);
|
||||
$q=sprintf("replace into variables (varname,information,value) values('%s','%s','%s')",$EQDB->escape_string($varname),$EQDB->escape_string($info),$EQDB->escape_string($value));
|
||||
$EQDB->query($q);
|
||||
if ($EQDB->get_errno) {
|
||||
$error=1;
|
||||
printf("Error adding variable %s: %s<br>\n",$varname,$EQDB->error);
|
||||
}
|
||||
}
|
||||
if ($error==0) {
|
||||
printf("<h3>Variable settings updated, will take affect on server restart.</h3><br>\n");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form method="get" action="variables.html">
|
||||
<?
|
||||
my $i=0;
|
||||
$q="select * from variables order by varname";
|
||||
my $res=$EQDB->query($q);
|
||||
if ($res) {
|
||||
print "<table id=\"var_tab\" border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\"><tr>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"150\">Variable</th>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"250\">Description</th>\n";
|
||||
printf "\t\t<th scope=\"col\" width=\"260\">Value</th>\n";
|
||||
printf "\t</tr>\n";
|
||||
|
||||
while(my $row=$res->fetch_row_hash) {
|
||||
printf "\t\t<tr><td>%s<input id=\"var%d\" type=\"hidden\" name=\"variable%d\" value=\"%s\"></td>\n",$row->{varname},$i,$i,$row->{varname};
|
||||
printf "\t\t<td>%s<input type=\"hidden\" name=\"info%d\" value=\"%s\"></td>\n",$row->{information},$i,$row->{information};
|
||||
printf "\t\t<td><textarea cols=\"30\" rows=\"2\" name=\"value%d\">%s</textarea> <img src=\"delete.gif\" alt=\"delete\" onClick=\"del_row(%d)\"></td>\n",$i,$row->{value},$i;
|
||||
print "\t</tr>\n";
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
printf("<tr><td colspan=\"3\" align=\"center\"><input value=\"Add New Variable\" type=button onClick=\"add_row()\"/></td></tr>\n");
|
||||
printf("</table><script language=\"javascript\">var next_field=%d;</script>\n",$i);
|
||||
printf("<input type=\"hidden\" id=\"maxid\" value=\"%d\" name=\"maxid\">\n",$i-1);
|
||||
?>
|
||||
<script language="javascript">
|
||||
function add_row() {
|
||||
var tab=document.getElementById('var_tab');
|
||||
var row=tab.insertRow(tab.rows.length-1);
|
||||
|
||||
var cell=row.insertCell(0);
|
||||
var el=document.createElement('input');
|
||||
el.type='text';
|
||||
el.name='variable'+next_field;
|
||||
el.value='NewVariable';
|
||||
el.id='var'+next_field;
|
||||
el.size=20;
|
||||
cell.appendChild(el);
|
||||
|
||||
cell=row.insertCell(1);
|
||||
el=document.createElement('textarea');
|
||||
el.rows='2';
|
||||
el.cols='30';
|
||||
el.name='info'+next_field;
|
||||
el.text='NewInfo';
|
||||
cell.appendChild(el);
|
||||
|
||||
cell=row.insertCell(2);
|
||||
el=document.createElement('textarea');
|
||||
el.rows='2';
|
||||
el.cols='30';
|
||||
el.name='value'+next_field;
|
||||
el.text='NewValue';
|
||||
cell.appendChild(el);
|
||||
|
||||
el=document.createElement('img');
|
||||
el.src='delete.gif';
|
||||
el.onclick=new Function('del_row('+next_field+')');
|
||||
cell.appendChild(el);
|
||||
|
||||
++next_field;
|
||||
|
||||
var inp=document.getElementById('maxid');
|
||||
inp.value=next_field;
|
||||
|
||||
}
|
||||
function del_row(i) {
|
||||
var row=document.getElementById('var'+i);
|
||||
row.parentNode.parentNode.parentNode.removeChild(row.parentNode.parentNode);
|
||||
}
|
||||
</script>
|
||||
<p>
|
||||
<input type="image" src="update.png" name="update"/>
|
||||
<input type="image" src="reset.png" name="reset"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">World Management</h2>
|
||||
<hr/>
|
||||
<div align="center">
|
||||
<a href="action.html?action=rebootworld">Reboot World</a> -
|
||||
<a href="action.html?action=killworld">Kill World</a>
|
||||
</div>
|
||||
|
||||
<?
|
||||
my $act = $request->get("action", "none");
|
||||
if($act eq "unlock") {
|
||||
$EQW->UnlockWorld();
|
||||
} elsif($act eq "lock") {
|
||||
$EQW->LockWorld();
|
||||
} elsif($act eq "lsreconnect") {
|
||||
$EQW->LSReconnect();
|
||||
}
|
||||
?>
|
||||
<br><br>
|
||||
<?do("templates/worldstatus.html");?>
|
||||
... some world info or something....
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
if($EQW->LSConnected()) {
|
||||
my $ls = $EQW->GetConfig("LoginHost");
|
||||
my $lsp = $EQW->GetConfig("LoginPort");
|
||||
print "World is connected to login server $ls:$lsp.<br>";
|
||||
} else {
|
||||
my $ls = $EQW->GetConfig("LoginHost");
|
||||
my $lsp = $EQW->GetConfig("LoginPort");
|
||||
print "World <b>NOT</b> connected to login server $ls:$lsp. <a href='world.html?action=lsreconnect'>Restart Auto Reconnect</a>.<br>";
|
||||
}
|
||||
|
||||
if($EQW->GetConfig("Locked") eq "true") {
|
||||
print "World is locked. <a href='world.html?action=unlock'>Unlock World</a>.<br>";
|
||||
} else {
|
||||
print "World is NOT locked. <a href='world.html?action=lock'>Lock World</a>.<br>";
|
||||
}
|
||||
|
||||
print "<br>\n";
|
||||
my $zcount = $EQW->CountZones();
|
||||
my $lcount = $EQW->CountLaunchers(1);
|
||||
my $pcount = $EQW->CountPlayers();
|
||||
print "There are <a href='zones.html'>$zcount zones booted</a>, <a href='launchers.html'>$lcount launchers connected</a>, and <a href='players.html'>$pcount players online.</a><br>";
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Zone Server Details</h2>
|
||||
<hr/>
|
||||
zone's IP, build date and version, what launcher is it under,
|
||||
how many players are in the zone, link to player list,
|
||||
does this zone have its map loaded, is perl enabled...
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Untitled Document</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
|
||||
</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>
|
||||
<h2 align="center">Zone List</h2>
|
||||
<hr/>
|
||||
<div align="center">
|
||||
<a href="action.html?action=rebootall">Reboot All Zones</a> -
|
||||
<a href="action.html?action=killall">Kill All Zones</a>
|
||||
</div>
|
||||
<hr/>
|
||||
<?
|
||||
print "You have ".($#zones+1)." zones running.";
|
||||
?>
|
||||
<hr/>
|
||||
<table width="100%" border="1" cellspacing="2" cellpadding="3" class="zonelist">
|
||||
<tr>
|
||||
<th scope="col">Zone Name </th>
|
||||
<th scope="col">Port</th>
|
||||
<th scope="col">Players</th>
|
||||
<th scope="col">Log File </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->{launched_name}:</b> <a href='zone.html?zone=$zone->{short_name}'>Idle</a></td>";
|
||||
} else {
|
||||
print "\t<td><b>$zone->{launched_name}:</b> <a href='zone.html?zone=$zone->{short_name}'>$zone->{long_name}</a> ($zone->{short_name})</td>";
|
||||
}
|
||||
} else {
|
||||
print "<td><a href='zone.html?zone=$zone->{short_name}'>$zone->{long_name}</a> ($zone->{short_name})</td>";
|
||||
}
|
||||
print "<td>$zone->{port}</td>";
|
||||
print "<td><a href='players.html?zone=$zone->{short_name}'>Players</a></td>";
|
||||
print "<td><a href='log.html?zone=$zone->{short_name}'>View Log</a></td>";
|
||||
print "<td>";
|
||||
print "<a href='action.html?zone=$zone->{short_name}&action=restart'>Restart</a> - ";
|
||||
print "<a href='action.html?zone=$zone->{short_name}&action=kill'>Kill</a>";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||