mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Admin:
* added pages config and phpinfo * config can also set php-vars (restrictions apply) * commented menu items that will not be implemented in near future Misc: * deleted a greedily grabbed icon, unrealated to aowow
This commit is contained in:
@@ -635,6 +635,83 @@ class AjaxHandler
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function handleAdmin()
|
||||||
|
{
|
||||||
|
if (empty($this->get['action']) || !$this->params)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if ($this->params[0] == 'siteconfig')
|
||||||
|
{
|
||||||
|
if (!User::isInGroup(U_GROUP_DEV | U_GROUP_ADMIN))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
switch ($this->get['action'])
|
||||||
|
{
|
||||||
|
case 'remove':
|
||||||
|
if (empty($this->get['id']))
|
||||||
|
return 'invalid configuration option given';
|
||||||
|
|
||||||
|
if (DB::Aowow()->query('DELETE FROM ?_config WHERE `key` = ? AND (`flags` & ?d) = 0', $this->get['id'], CON_FLAG_PERSISTANT))
|
||||||
|
return '';
|
||||||
|
else
|
||||||
|
return 'option name is either protected or was not found';
|
||||||
|
case 'add':
|
||||||
|
$key = strtolower(trim(@$this->get['id']));
|
||||||
|
$val = trim(@$this->get['val']);
|
||||||
|
|
||||||
|
if (!strlen($key))
|
||||||
|
return 'empty option name given';
|
||||||
|
if (!strlen($val))
|
||||||
|
return 'empty value given';
|
||||||
|
|
||||||
|
if (preg_match('/[^a-z0-9_\.\-]/i', $key, $m))
|
||||||
|
return 'invalid chars in option name: "'.$m[0].'"';
|
||||||
|
|
||||||
|
if (ini_get($key) === false || ini_set($key, $val) === false)
|
||||||
|
return 'this configuration option cannot be set';
|
||||||
|
|
||||||
|
if (DB::Aowow()->selectCell('SELECT 1 FROM ?_config WHERE `flags` & ?d AND `key` = ?', CON_FLAG_PHP, $key))
|
||||||
|
return 'this configuration option is already in use';
|
||||||
|
|
||||||
|
DB::Aowow()->query('INSERT IGNORE INTO ?_config (`key`, `value`, `flags`) VALUES (?, ?, ?d)', $key, $val, CON_FLAG_TYPE_STRING | CON_FLAG_PHP);
|
||||||
|
return '';
|
||||||
|
case 'update':
|
||||||
|
$key = trim(@$this->get['id']);
|
||||||
|
$val = trim(@$this->get['val']);
|
||||||
|
|
||||||
|
if (!strlen($key))
|
||||||
|
return 'empty option name given';
|
||||||
|
if (!strlen($val))
|
||||||
|
return 'empty value given';
|
||||||
|
|
||||||
|
if (substr($key, 0, 4) == 'CFG_')
|
||||||
|
$key = substr($key, 4);
|
||||||
|
|
||||||
|
$flags = DB::Aowow()->selectCell('SELECT `flags` FROM ?_config WHERE `key` = ?', $key);
|
||||||
|
if (!$flags)
|
||||||
|
return 'configuration option not found';
|
||||||
|
|
||||||
|
if (preg_match('/[^a-z0-9_\-]/i', $key, $m))
|
||||||
|
return 'invalid chars in option name: "'.$m[0].'"';
|
||||||
|
|
||||||
|
if ($flags & CON_FLAG_TYPE_INT && !preg_match('/^-?\d+$/i', $val))
|
||||||
|
return "value must be integer";
|
||||||
|
else if ($flags & CON_FLAG_TYPE_FLOAT && !preg_match('/^-?\d*(,|.)?\d+$/i', $val))
|
||||||
|
return "value must be float";
|
||||||
|
else if ($flags & CON_FLAG_TYPE_BOOL)
|
||||||
|
$val = (int)!!$val; // *snort* bwahahaa
|
||||||
|
|
||||||
|
DB::Aowow()->query('UPDATE ?_config SET `value` = ? WHERE `key` = ?', $val, $key);
|
||||||
|
return '';
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********/
|
/**********/
|
||||||
/* Helper */
|
/* Helper */
|
||||||
/**********/
|
/**********/
|
||||||
@@ -996,8 +1073,6 @@ class AjaxHandler
|
|||||||
// hey, still here? you're not a Tauren/Nelf as bear or cat, are you?
|
// hey, still here? you're not a Tauren/Nelf as bear or cat, are you?
|
||||||
return DB::Aowow()->selectCell('SELECT IF(?d == 1, IFNULL(displayIdA, displayIdH), IFNULL(displayIdH, displayIdA)) FROM ?_shapeshiftform WHERE id = ?d', Util::sideByRaceMask(1 << ($char['race'] - 1)), $form);
|
return DB::Aowow()->selectCell('SELECT IF(?d == 1, IFNULL(displayIdA, displayIdH), IFNULL(displayIdH, displayIdA)) FROM ?_shapeshiftform WHERE id = ?d', Util::sideByRaceMask(1 << ($char['race'] - 1)), $form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -83,6 +83,16 @@ define('SITEREP_ACTION_ARTICLE', 16); // Guide approved (a
|
|||||||
define('SITEREP_ACTION_USER_WARNED', 17); // Moderator Warning
|
define('SITEREP_ACTION_USER_WARNED', 17); // Moderator Warning
|
||||||
define('SITEREP_ACTION_USER_SUSPENDED', 18); // Moderator Suspension
|
define('SITEREP_ACTION_USER_SUSPENDED', 18); // Moderator Suspension
|
||||||
|
|
||||||
|
// config flags
|
||||||
|
define('CON_FLAG_TYPE_INT', 0x01); // validate with intVal()
|
||||||
|
define('CON_FLAG_TYPE_FLOAT', 0x02); // validate with floatVal()
|
||||||
|
define('CON_FLAG_TYPE_BOOL', 0x04); // 0 || 1
|
||||||
|
define('CON_FLAG_TYPE_STRING', 0x08); //
|
||||||
|
define('CON_FLAG_OPT_LIST', 0x10); // single option
|
||||||
|
define('CON_FLAG_BITMASK', 0x20); // multiple options
|
||||||
|
define('CON_FLAG_PHP', 0x40); // applied with ini_set() [restrictions apply!]
|
||||||
|
define('CON_FLAG_PERSISTANT', 0x80); // can not be deleted
|
||||||
|
|
||||||
// Auth Result
|
// Auth Result
|
||||||
define('AUTH_OK', 0);
|
define('AUTH_OK', 0);
|
||||||
define('AUTH_WRONGUSER', 1);
|
define('AUTH_WRONGUSER', 1);
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
die('illegal access');
|
die('illegal access');
|
||||||
|
|
||||||
|
|
||||||
ini_set('serialize_precision', 4);
|
|
||||||
|
|
||||||
require 'includes/defines.php';
|
require 'includes/defines.php';
|
||||||
require 'config/config.php';
|
require 'config/config.php';
|
||||||
require 'includes/libs/DbSimple/Generic.php'; // Libraray: http://en.dklab.ru/lib/DbSimple (using variant: https://github.com/ivan1986/DbSimple/tree/master)
|
require 'includes/libs/DbSimple/Generic.php'; // Libraray: http://en.dklab.ru/lib/DbSimple (using variant: https://github.com/ivan1986/DbSimple/tree/master)
|
||||||
@@ -66,9 +64,34 @@ unset($AoWoWconf); // link set up: dele
|
|||||||
|
|
||||||
|
|
||||||
// load config to constants
|
// load config to constants
|
||||||
$sets = DB::Aowow()->select('SELECT `key` AS ARRAY_KEY, intValue as i, strValue as s FROM ?_config');
|
$sets = DB::Aowow()->select('SELECT `key` AS ARRAY_KEY, `value`, `flags` FROM ?_config');
|
||||||
foreach ($sets as $k => $v)
|
foreach ($sets as $k => $v)
|
||||||
define('CFG_'.strtoupper($k), $v['s'] ?: intVal($v['i']));
|
{
|
||||||
|
// this should not have been possible
|
||||||
|
if (!strlen($v['value']))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$php = $v['flags'] & CON_FLAG_PHP;
|
||||||
|
|
||||||
|
if ($v['flags'] & CON_FLAG_TYPE_INT)
|
||||||
|
$val = intVal($v['value']);
|
||||||
|
else if ($v['flags'] & CON_FLAG_TYPE_FLOAT)
|
||||||
|
$val = floatVal($v['value']);
|
||||||
|
else if ($v['flags'] & CON_FLAG_TYPE_BOOL)
|
||||||
|
$val = (bool)$v['value'];
|
||||||
|
else if ($v['flags'] & CON_FLAG_TYPE_STRING)
|
||||||
|
$val = preg_replace('/[^\p{L}0-9\s_\-\'\.,]/ui', '', $v['value']);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Util::addNote(U_GROUP_ADMIN | U_GROUP_DEV, 'Kernel: '.($php ? 'PHP' : 'Aowow').' config value '.($php ? strtolower($k) : 'CFG_'.strtoupper($k)).' has no type set. Value forced to 0!');
|
||||||
|
$val = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($php)
|
||||||
|
ini_set(strtolower($k), $val);
|
||||||
|
else
|
||||||
|
define('CFG_'.strtoupper($k), $val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || CFG_FORCE_SSL;
|
$secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || CFG_FORCE_SSL;
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ switch ($pageCall)
|
|||||||
/* called by user */
|
/* called by user */
|
||||||
case '': // no parameter given -> MainPage
|
case '': // no parameter given -> MainPage
|
||||||
$altClass = 'home';
|
$altClass = 'home';
|
||||||
|
case 'home':
|
||||||
|
case 'admin':
|
||||||
case 'account': // account management [nyi]
|
case 'account': // account management [nyi]
|
||||||
case 'achievement':
|
case 'achievement':
|
||||||
case 'achievements':
|
case 'achievements':
|
||||||
@@ -81,7 +83,7 @@ switch ($pageCall)
|
|||||||
// case 'user': // tool: user profiles [nyi]
|
// case 'user': // tool: user profiles [nyi]
|
||||||
case 'zone':
|
case 'zone':
|
||||||
case 'zones':
|
case 'zones':
|
||||||
if (in_array($pageCall, ['account', 'profile']))
|
if (in_array($pageCall, ['admin', 'account', 'profile']))
|
||||||
{
|
{
|
||||||
if (($_ = (new AjaxHandler($pageParam))->handle($pageCall)) !== null)
|
if (($_ = (new AjaxHandler($pageParam))->handle($pageCall)) !== null)
|
||||||
{
|
{
|
||||||
|
|||||||
502
pages/admin.php
Normal file
502
pages/admin.php
Normal file
@@ -0,0 +1,502 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('AOWOW_REVISION'))
|
||||||
|
die('illegal access');
|
||||||
|
|
||||||
|
|
||||||
|
class AdminPage extends GenericPage
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $tpl = null; // depends on the subject
|
||||||
|
protected $reqUGroup = U_GROUP_NONE; // actual group dependant on the subPage
|
||||||
|
protected $reqAuth = true;
|
||||||
|
protected $path = [4];
|
||||||
|
protected $tabId = 4;
|
||||||
|
|
||||||
|
private $generator = '';
|
||||||
|
|
||||||
|
public function __construct($pageCall, $pageParam)
|
||||||
|
{
|
||||||
|
switch ($pageParam)
|
||||||
|
{
|
||||||
|
case 'phpinfo':
|
||||||
|
$this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV;
|
||||||
|
$this->generator = 'handlePhpInfo';
|
||||||
|
$this->tpl = 'list-page-generic';
|
||||||
|
|
||||||
|
array_push($this->path, 2, 21);
|
||||||
|
$this->name = 'PHP Information';
|
||||||
|
break;
|
||||||
|
case 'siteconfig':
|
||||||
|
$this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV;
|
||||||
|
$this->generator = 'handleConfig';
|
||||||
|
$this->tpl = 'list-page-generic';
|
||||||
|
|
||||||
|
array_push($this->path, 2, 18);
|
||||||
|
$this->name = 'Site Configuration';
|
||||||
|
break;
|
||||||
|
default: // error out through unset template
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::__construct($pageCall, $pageParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function generateContent()
|
||||||
|
{
|
||||||
|
if (!$this->generator || function_exists($this->generator))
|
||||||
|
return;
|
||||||
|
|
||||||
|
$this->{$this->generator}();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function handleConfig()
|
||||||
|
{
|
||||||
|
$this->addCSS(array(
|
||||||
|
['string' => '.grid input[type=\'text\'] { width:250px; }'],
|
||||||
|
['string' => '.grid input[type=\'button\'] { width:65px; padding:2px; }'],
|
||||||
|
['string' => '.disabled { opacity:0.4 !important; }'],
|
||||||
|
['string' => '.grid a.tip { margin:0px 5px; opacity:0.8; }'],
|
||||||
|
['string' => '.grid a.tip:hover { opacity:1; }'],
|
||||||
|
['string' => '.status { position:absolute; right:5px; }'],
|
||||||
|
));
|
||||||
|
|
||||||
|
// well .. fuck!
|
||||||
|
ob_start();
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function createStatusIcon(errTxt)
|
||||||
|
{
|
||||||
|
function fadeout()
|
||||||
|
{
|
||||||
|
$(this).animate({ opacity: '0.0' }, 250, null, function() {
|
||||||
|
$WH.de(this);
|
||||||
|
$WH.Tooltip.hide()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var a = $WH.ce('a');
|
||||||
|
a.style.opacity = 0;
|
||||||
|
a.className = errTxt ? 'icon-report' : 'icon-tick';
|
||||||
|
g_addTooltip(a, errTxt || 'success', 'q');
|
||||||
|
a.onclick = fadeout.bind(a);
|
||||||
|
setTimeout(function () { $(a).animate({ opacity: '1.0' }, 250); }, 50);
|
||||||
|
setTimeout(fadeout.bind(a), 10000);
|
||||||
|
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cfg_add(el)
|
||||||
|
{
|
||||||
|
_self = el.parentNode.parentNode;
|
||||||
|
|
||||||
|
var tr = $WH.ce('tr');
|
||||||
|
|
||||||
|
tr.style.position = 'relative';
|
||||||
|
|
||||||
|
var td = $WH.ce('td'),
|
||||||
|
key = $WH.ce('input');
|
||||||
|
|
||||||
|
key.type = 'text';
|
||||||
|
key.name = 'key';
|
||||||
|
$WH.ae(td, key);
|
||||||
|
$WH.ae(tr, td);
|
||||||
|
|
||||||
|
var td = $WH.ce('td'),
|
||||||
|
val = $WH.ce('input');
|
||||||
|
|
||||||
|
val.type = 'text';
|
||||||
|
val.name = 'value';
|
||||||
|
$WH.ae(td, val);
|
||||||
|
$WH.ae(tr, td);
|
||||||
|
|
||||||
|
var td = $WH.ce('td'),
|
||||||
|
aCancel = $WH.ce('a'),
|
||||||
|
aSubmit = $WH.ce('a'),
|
||||||
|
status = $WH.ce('span');
|
||||||
|
|
||||||
|
aSubmit.className = 'icon-save tip';
|
||||||
|
g_addTooltip(aSubmit, 'Submit Setting', 'q');
|
||||||
|
|
||||||
|
aCancel.className = 'icon-delete tip';
|
||||||
|
g_addTooltip(aCancel, 'Cancel', 'q');
|
||||||
|
|
||||||
|
aSubmit.onclick = cfg_new.bind(aSubmit, key, val);
|
||||||
|
aCancel.onclick = function () {
|
||||||
|
$WH.Tooltip.hide();
|
||||||
|
$WH.de(this.parentNode.parentNode);
|
||||||
|
};
|
||||||
|
|
||||||
|
status.className = 'status';
|
||||||
|
|
||||||
|
$WH.ae(td, aSubmit);
|
||||||
|
$WH.ae(td, $WH.ct('|'));
|
||||||
|
$WH.ae(td, aCancel);
|
||||||
|
$WH.ae(td, status);
|
||||||
|
$WH.ae(tr, td);
|
||||||
|
|
||||||
|
_self.parentNode.insertBefore(tr, _self);
|
||||||
|
key.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function cfg_new(elKey, elVal)
|
||||||
|
{
|
||||||
|
var
|
||||||
|
_td = this.parentNode,
|
||||||
|
_row = this.parentNode.parentNode,
|
||||||
|
_status = $(_td).find('.status')[0];
|
||||||
|
|
||||||
|
// already performing action
|
||||||
|
if (_status.lastChild && _status.lastChild.tagName == 'IMG')
|
||||||
|
return;
|
||||||
|
else if (_status.lastChild && _status.lastChild.tagName == 'A')
|
||||||
|
$WH.ee(_status);
|
||||||
|
|
||||||
|
if (!elKey.value || !elVal.value)
|
||||||
|
{
|
||||||
|
$WH.ae(_status, createStatusIcon('key or value are empty'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var
|
||||||
|
key = elKey.value.toLowerCase().trim(),
|
||||||
|
value = elVal.value.trim();
|
||||||
|
|
||||||
|
$(_status).append(CreateAjaxLoader());
|
||||||
|
|
||||||
|
new Ajax('?admin=siteconfig&action=add&id=' + key + '&val=' + value, {
|
||||||
|
method: 'get',
|
||||||
|
onSuccess: function(xhr) {
|
||||||
|
$WH.ee(_status);
|
||||||
|
|
||||||
|
if (!xhr.responseText) {
|
||||||
|
$WH.ee(_row);
|
||||||
|
$(_row).append($('<td>' + key + '</td>')).append($('<td><input id="' + key + '" type="text" name="' + key + '" value="' + value + '" /></td>'));
|
||||||
|
|
||||||
|
var
|
||||||
|
td = $WH.ce('td'),
|
||||||
|
a = $WH.ce('a'),
|
||||||
|
sp = $WH.ce('span');
|
||||||
|
|
||||||
|
g_addTooltip(a, 'Save Changes', 'q');
|
||||||
|
a.onclick = cfg_submit.bind(a, key);
|
||||||
|
a.className = 'icon-save tip';
|
||||||
|
$WH.ae(td, a);
|
||||||
|
|
||||||
|
a = $WH.ce('a');
|
||||||
|
a.className = 'icon-refresh tip disabled';
|
||||||
|
$WH.ae(td, $WH.ct('|'));
|
||||||
|
$WH.ae(td, a);
|
||||||
|
|
||||||
|
a = $WH.ce('a');
|
||||||
|
g_addTooltip(a, 'Remove Setting', 'q');
|
||||||
|
a.onclick = cfg_remove.bind(a, key);
|
||||||
|
a.className = 'icon-delete tip';
|
||||||
|
$WH.ae(td, $WH.ct('|'));
|
||||||
|
$WH.ae(td, a);
|
||||||
|
|
||||||
|
sp.className = 'status';
|
||||||
|
$WH.ae(sp, createStatusIcon());
|
||||||
|
$WH.ae(td, sp);
|
||||||
|
$WH.ae(_row, td);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$WH.ae(_status, createStatusIcon(xhr.responseText));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function cfg_submit(id)
|
||||||
|
{
|
||||||
|
var
|
||||||
|
node = $WH.ge(id),
|
||||||
|
_td = this.parentNode,
|
||||||
|
_status = $(_td).find('.status')[0];
|
||||||
|
|
||||||
|
if (!node)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var value = 0;
|
||||||
|
|
||||||
|
// already performing action
|
||||||
|
if (_status.lastChild && _status.lastChild.tagName == 'IMG')
|
||||||
|
return;
|
||||||
|
else if (_status.lastChild && _status.lastChild.tagName == 'A')
|
||||||
|
$WH.ee(_status);
|
||||||
|
|
||||||
|
if (node.tagName == 'DIV')
|
||||||
|
{
|
||||||
|
// bitmask
|
||||||
|
$(node).find('input[type="checkbox"]').each(function(idx, opt) {
|
||||||
|
if (opt.checked)
|
||||||
|
value |= (1 << opt.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
// boolean
|
||||||
|
$(node).find('input[type="radio"]').each(function(idx, opt) {
|
||||||
|
if (opt.checked)
|
||||||
|
value = opt.value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (node.tagName == 'SELECT') // opt-list
|
||||||
|
{
|
||||||
|
$(node).find('option').each(function(idx, opt) {
|
||||||
|
if (opt.selected)
|
||||||
|
value = opt.value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (node.tagName == 'INPUT') // string or numeric
|
||||||
|
{
|
||||||
|
if (!node.value.search(/[\d\s\/\*\-\+]/i))
|
||||||
|
node.value = eval(node.value);
|
||||||
|
|
||||||
|
value = node.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = value.toString().trim();
|
||||||
|
|
||||||
|
if (!value.length)
|
||||||
|
{
|
||||||
|
$WH.ae(_status, createStatusIcon('value is empty'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(_status).append(CreateAjaxLoader());
|
||||||
|
|
||||||
|
new Ajax('?admin=siteconfig&action=update&id=' + id + '&val=' + value, {
|
||||||
|
method: 'get',
|
||||||
|
onSuccess: function(xhr) {
|
||||||
|
$WH.ee(_status);
|
||||||
|
$WH.ae(_status, createStatusIcon(xhr.responseText));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function cfg_default(id, val)
|
||||||
|
{
|
||||||
|
var node = $WH.ge(id);
|
||||||
|
if (!node)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (node.tagName == 'DIV')
|
||||||
|
{
|
||||||
|
// bitmask
|
||||||
|
$(node).find('input[type="checkbox"]').each(function(idx, opt) { opt.checked = !!(val & (1 << opt.value)); });
|
||||||
|
|
||||||
|
// boolean
|
||||||
|
$(node).find('input[type="radio"]').each(function(idx, opt) { opt.checked = !!opt.value == !!val; });
|
||||||
|
}
|
||||||
|
else if (node.tagName == 'SELECT') // opt-list
|
||||||
|
$(node).find('option').each(function(idx, opt) { opt.selected = opt.value == val; });
|
||||||
|
else if (node.tagName == 'INPUT') // string or numeric
|
||||||
|
node.value = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cfg_remove(id)
|
||||||
|
{
|
||||||
|
var
|
||||||
|
_td = this.parentNode,
|
||||||
|
_status = $(_td).find('.status')[0];
|
||||||
|
|
||||||
|
// already performing action
|
||||||
|
if (_status.lastChild && _status.lastChild.tagName == 'IMG')
|
||||||
|
return;
|
||||||
|
else if (_status.lastChild && _status.lastChild.tagName == 'A')
|
||||||
|
$WH.ee(_status);
|
||||||
|
|
||||||
|
if (!confirm('Confirm remove'))
|
||||||
|
return;
|
||||||
|
|
||||||
|
$(_status).append(CreateAjaxLoader());
|
||||||
|
|
||||||
|
new Ajax('?admin=siteconfig&action=remove&id=' + id, {
|
||||||
|
method: 'get',
|
||||||
|
onSuccess: function(xhr) {
|
||||||
|
if (!xhr.responseText)
|
||||||
|
$WH.de(_td.parentNode);
|
||||||
|
else {
|
||||||
|
$WH.ee(_status);
|
||||||
|
$WH.ae(_status, createStatusIcon(xhr.responseText));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
$this->extraHTML = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
// eof (end of fuckup)
|
||||||
|
|
||||||
|
$head = '<table class="grid"><tr><th><b>Key</b></th><th><b>Value</b></th><th style="width:150px;"><b>Options</b></th></tr>';
|
||||||
|
|
||||||
|
// for aowow
|
||||||
|
if ($rows = DB::Aowow()->select('SELECT * FROM ?_config WHERE (flags & ?d) = 0 ORDER BY `key` ASC', CON_FLAG_PHP))
|
||||||
|
{
|
||||||
|
$buff = $head;
|
||||||
|
foreach ($rows as $r)
|
||||||
|
$buff .= $this->configAddRow($r);
|
||||||
|
|
||||||
|
$buff .= '</table>';
|
||||||
|
|
||||||
|
$this->lvTabs[] = array(
|
||||||
|
'file' => null,
|
||||||
|
'data' => $buff,
|
||||||
|
'params' => array(
|
||||||
|
'name' => 'Aowow',
|
||||||
|
'id' => 'aowow'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// for php
|
||||||
|
$rows = DB::Aowow()->select('SELECT * FROM ?_config WHERE flags & ?d ORDER BY `key` ASC', CON_FLAG_PHP);
|
||||||
|
$buff = $head;
|
||||||
|
foreach ($rows as $r)
|
||||||
|
$buff .= $this->configAddRow($r);
|
||||||
|
|
||||||
|
$buff .= '<tr><td colspan="3"><a class="icon-add" onclick="cfg_add(this)">new configuration</a></td></tr>';
|
||||||
|
$buff .= '</table>';
|
||||||
|
|
||||||
|
$this->lvTabs[] = array(
|
||||||
|
'file' => null,
|
||||||
|
'data' => $buff,
|
||||||
|
'params' => array(
|
||||||
|
'name' => 'PHP',
|
||||||
|
'id' => 'php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function handlePhpInfo()
|
||||||
|
{
|
||||||
|
$this->addCSS([
|
||||||
|
'string' => "\npre {margin: 0px; font-family: monospace;}\n" .
|
||||||
|
"td, th { border: 1px solid #000000; vertical-align: baseline;}\n" .
|
||||||
|
".p {text-align: left;}\n" .
|
||||||
|
".e {background-color: #ccccff; font-weight: bold; color: #000000;}\n" .
|
||||||
|
".h {background-color: #9999cc; font-weight: bold; color: #000000;}\n" .
|
||||||
|
".v {background-color: #cccccc; color: #000000;}\n" .
|
||||||
|
".vr {background-color: #cccccc; text-align: right; color: #000000;}\n"
|
||||||
|
]);
|
||||||
|
|
||||||
|
$bits = [INFO_GENERAL, INFO_CONFIGURATION, INFO_ENVIRONMENT, INFO_MODULES];
|
||||||
|
$names = ['General', '', '', 'Module'];
|
||||||
|
foreach ($bits as $i => $b)
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
phpinfo($b);
|
||||||
|
$buff = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
$buff = explode('<div class="center">', $buff)[1];
|
||||||
|
$buff = explode('</div>', $buff);
|
||||||
|
array_pop($buff); // remove last from stack
|
||||||
|
$buff = implode('</div>', $buff); // sew it together
|
||||||
|
|
||||||
|
if (strpos($buff, '<h1>'))
|
||||||
|
$buff = explode('</h1>', $buff)[1];
|
||||||
|
|
||||||
|
if (strpos($buff, '<h2>'))
|
||||||
|
{
|
||||||
|
$parts = explode('<h2>', $buff);
|
||||||
|
foreach ($parts as $p)
|
||||||
|
{
|
||||||
|
if (!preg_match('/\w/i', $p))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$p = explode('</h2>', $p);
|
||||||
|
|
||||||
|
$body = substr($p[1], 0, -7); // remove trailing "<br />\n"
|
||||||
|
$name = $names[$i] ? $names[$i].': ' : '';
|
||||||
|
if (preg_match('/<a[^>]*>([\w\s\d]+)<\/a>/i', $p[0], $m))
|
||||||
|
$name .= $m[1];
|
||||||
|
else
|
||||||
|
$name .= $p[0];
|
||||||
|
|
||||||
|
$this->lvTabs[] = array(
|
||||||
|
'file' => null,
|
||||||
|
'data' => $body,
|
||||||
|
'params' => array(
|
||||||
|
'id' => strtolower(strtr($name, [' ' => ''])),
|
||||||
|
'name' => $name
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->lvTabs[] = array(
|
||||||
|
'file' => null,
|
||||||
|
'data' => $buff,
|
||||||
|
'params' => array(
|
||||||
|
'id' => strtolower($names[$i]),
|
||||||
|
'name' => $names[$i]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function configAddRow($r)
|
||||||
|
{
|
||||||
|
$buff = '<tr>';
|
||||||
|
$info = explode(' - ', $r['comment']);
|
||||||
|
$key = $r['flags'] & CON_FLAG_PHP ? strtolower($r['key']) : 'CFG_'.strtoupper($r['key']);
|
||||||
|
|
||||||
|
// name
|
||||||
|
if (!empty($info[1]))
|
||||||
|
$buff .= '<td>'.sprintf(Util::$dfnString, $info[1], $key).'</td>';
|
||||||
|
else
|
||||||
|
$buff .= '<td>'.$key.'</td>';
|
||||||
|
|
||||||
|
// value
|
||||||
|
if ($r['flags'] & CON_FLAG_TYPE_BOOL)
|
||||||
|
$buff .= '<td><div id="'.$key.'"><input id="'.$key.'1" type="radio" name="'.$key.'" value="1" '.($r['value'] ? 'checked' : null).' /><label for="'.$key.'1">Enabled</label> <input id="'.$key.'0" type="radio" name="'.$key.'" value="0" '.($r['value'] ? null : 'checked').' /><label for="'.$key.'0">Disabled</label></div></td>';
|
||||||
|
else if ($r['flags'] & CON_FLAG_OPT_LIST && !empty($info[2]))
|
||||||
|
{
|
||||||
|
$buff .= '<td><select id="'.$key.'" name="'.$key.'">';
|
||||||
|
foreach (explode(', ', $info[2]) as $option)
|
||||||
|
{
|
||||||
|
$opt = explode(':', $option);
|
||||||
|
$buff .= '<option value="'.$opt[0].'"'.($r['value'] == $opt[0] ? ' selected ' : null).'>'.$opt[1].'</option>';
|
||||||
|
}
|
||||||
|
$buff .= '</select></td>';
|
||||||
|
}
|
||||||
|
else if ($r['flags'] & CON_FLAG_BITMASK && !empty($info[2]))
|
||||||
|
{
|
||||||
|
$buff .= '<td><div id="'.$key.'">';
|
||||||
|
foreach (explode(', ', $info[2]) as $option)
|
||||||
|
{
|
||||||
|
$opt = explode(':', $option);
|
||||||
|
$buff .= '<input id="'.$key.$opt[0].'" type="checkbox" name="'.$key.'" value="'.$opt[0].'"'.($r['value'] & (1 << $opt[0]) ? ' checked ' : null).'><label for="'.$key.$opt[0].'">'.$opt[1].'</label>';
|
||||||
|
}
|
||||||
|
$buff .= '</div></td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$buff .= '<td><input id="'.$key.'" type="text" name="'.$key.'" value="'.$r['value'].'" /></td>';
|
||||||
|
|
||||||
|
// actions
|
||||||
|
$buff .= '<td style="position:relative;">';
|
||||||
|
|
||||||
|
$buff .= '<a class="icon-save tip" onclick="cfg_submit.bind(this, \''.$key.'\')()" onmouseover="$WH.Tooltip.showAtCursor(event, \'Save Changes\', 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"></a>';
|
||||||
|
|
||||||
|
if (strstr($info[0], 'default:'))
|
||||||
|
$buff .= '|<a class="icon-refresh tip" onclick="cfg_default(\''.$key.'\', \''.trim(explode('default:', $info[0])[1]).'\')" onmouseover="$WH.Tooltip.showAtCursor(event, \'Restore Default Value\', 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"></a>';
|
||||||
|
else
|
||||||
|
$buff .= '|<a class="icon-refresh tip disabled"></a>';
|
||||||
|
|
||||||
|
if (!($r['flags'] & CON_FLAG_PERSISTANT))
|
||||||
|
$buff .= '|<a class="icon-delete tip" onclick="cfg_remove.bind(this, \''.$key.'\')()" onmouseover="$WH.Tooltip.showAtCursor(event, \'Remove Setting\', 0, 0, \'q\')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"></a>';
|
||||||
|
|
||||||
|
$buff .= '<span class="status"></span></td></tr>';
|
||||||
|
|
||||||
|
return $buff;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function generateTitle() {}
|
||||||
|
protected function generatePath() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -137,7 +137,7 @@ class GenericPage
|
|||||||
|
|
||||||
private function isSaneInclude($path, $file) // "template_exists"
|
private function isSaneInclude($path, $file) // "template_exists"
|
||||||
{
|
{
|
||||||
if (preg_match('/[^\w\-]/i', $file))
|
if (preg_match('/[^\w\-]/i', str_replace('admin/', '', $file)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!is_file($path.$file.'.tpl.php'))
|
if (!is_file($path.$file.'.tpl.php'))
|
||||||
@@ -308,9 +308,9 @@ class GenericPage
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fetch announcements
|
// fetch announcements
|
||||||
if (preg_match('/^([a-z\-]+)=?.*$/i', $_SERVER['QUERY_STRING'], $match))
|
if ($this->pageTemplate['pageName'])
|
||||||
{
|
{
|
||||||
$ann = DB::Aowow()->Select('SELECT ABS(id) AS ARRAY_KEY, a.* FROM ?_announcements a WHERE status = 1 AND (page = ? OR page = "*") AND (groupMask = 0 OR groupMask & ?d)', $match[1], User::$groups);
|
$ann = DB::Aowow()->Select('SELECT ABS(id) AS ARRAY_KEY, a.* FROM ?_announcements a WHERE status = 1 AND (page = ? OR page = "*") AND (groupMask = 0 OR groupMask & ?d)', $this->pageTemplate['pageName'], User::$groups);
|
||||||
foreach ($ann as $k => $v)
|
foreach ($ann as $k => $v)
|
||||||
{
|
{
|
||||||
if ($t = Util::localizedString($v, 'text'))
|
if ($t = Util::localizedString($v, 'text'))
|
||||||
|
|||||||
73
setup/updates/01_config.sql
Normal file
73
setup/updates/01_config.sql
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
-- --------------------------------------------------------
|
||||||
|
-- Host: 127.0.0.1
|
||||||
|
-- Server Version: 5.6.16 - MySQL Community Server (GPL)
|
||||||
|
-- Server Betriebssystem: Win32
|
||||||
|
-- HeidiSQL Version: 8.3.0.4834
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
|
||||||
|
-- Exportiere Struktur von Tabelle world.aowow_config
|
||||||
|
DROP TABLE IF EXISTS `aowow_config`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `aowow_config` (
|
||||||
|
`key` varchar(25) NOT NULL,
|
||||||
|
`value` varchar(255) NOT NULL,
|
||||||
|
`flags` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`comment` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`key`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- Exportiere Daten aus Tabelle world.aowow_config: 44 rows
|
||||||
|
/*!40000 ALTER TABLE `aowow_config` DISABLE KEYS */;
|
||||||
|
INSERT INTO `aowow_config` (`key`, `value`, `flags`, `comment`) VALUES
|
||||||
|
('sql_limit_search', '500', 129, 'default: 500 - max results for search'),
|
||||||
|
('sql_limit_default', '300', 129, 'default: 300 - max results for listviews'),
|
||||||
|
('sql_limit_quicksearch', '10', 129, 'default: 10 - max results for suggestions'),
|
||||||
|
('sql_limit_none', '0', 129, 'default: 0 - unlimited results (i wouldn\'t change that mate)'),
|
||||||
|
('ttl_rss', '60', 129, 'default: 60 - time to live for RSS (in seconds)'),
|
||||||
|
('cache_decay', '25200', 129, 'default: 60 * 60 * 7 - time to keep cache in seconds'),
|
||||||
|
('session_timeout_delay', '3600', 129, 'default: 60 * 60 - non-permanent session times out in time() + X'),
|
||||||
|
('failed_auth_exclusion', '900', 129, 'default: 15 * 60 - how long an account is closed after exceeding failed_auth_count (in seconds)'),
|
||||||
|
('failed_auth_count', '5', 129, 'default: 5 - how often invalid passwords are tolerated'),
|
||||||
|
('name', 'Aowow Database Viewer (ADV)', 136, ' - website title'),
|
||||||
|
('name_short', 'Aowow', 136, ' - feed title'),
|
||||||
|
('board_url', 'http://www.wowhead.com/forums?board=', 136, ' - another halfbaked javascript thing..'),
|
||||||
|
('contact_email', 'feedback@aowow.org', 136, ' - displayed sender for auth-mails, ect'),
|
||||||
|
('battlegroup', 'Pure Pwnage', 136, ' - pretend, we belong to a battlegroup to satisfy profiler-related Jscripts'),
|
||||||
|
('allow_register', '0', 132, 'default: 1 - allow/disallow account creation (requires auth_mode 0)'),
|
||||||
|
('debug', '1', 132, 'default: 0 - disable cache, enable sql-errors, enable error_reporting'),
|
||||||
|
('maintenance', '0', 132, 'default: 0 - display brb gnomes and block access for non-staff'),
|
||||||
|
('auth_mode', '0', 145, 'default: 0 - source to auth against - 0:aowow, 1:TC auth-table, 2:external script'),
|
||||||
|
('rep_req_upvote', '125', 129, 'default: 125 - required reputation to upvote comments'),
|
||||||
|
('rep_req_downvote', '250', 129, 'default: 250 - required reputation to downvote comments'),
|
||||||
|
('rep_req_comment', '75', 129, 'default: 75 - required reputation to write a comment / reply'),
|
||||||
|
('rep_req_supervote', '2500', 129, 'default: 2500 - required reputation for double vote effect'),
|
||||||
|
('rep_req_votemore_base', '2000', 129, 'default: 2000 - gains more votes past this threshold'),
|
||||||
|
('rep_reward_register', '100', 129, 'default: 100 - activated an account'),
|
||||||
|
('rep_reward_upvoted', '5', 129, 'default: 5 - comment received upvote'),
|
||||||
|
('rep_reward_downvoted', '0', 129, 'default: 0 - comment received downvote'),
|
||||||
|
('rep_reward_good_report', '10', 129, 'default: 10 - filed an accepted report'),
|
||||||
|
('rep_reward_bad_report', '0', 129, 'default: 0 - filed a rejected report'),
|
||||||
|
('rep_reward_dailyvisit', '5', 129, 'default: 5 - daily visit'),
|
||||||
|
('rep_reward_user_warned', '-50', 129, 'default: -50 - moderator imposed a warning'),
|
||||||
|
('rep_reward_comment', '1', 129, 'default: 1 - created a comment (not a reply) '),
|
||||||
|
('rep_req_premium', '25000', 129, 'default: 25000 - required reputation for premium status through reputation'),
|
||||||
|
('rep_reward_upload', '10', 129, 'default: 10 - suggested / uploaded video / screenshot was approved'),
|
||||||
|
('rep_reward_article', '100', 129, 'default: 100 - submitted an approved article/guide'),
|
||||||
|
('rep_reward_user_suspended', '-200', 129, 'default: -200 - moderator revoked rights'),
|
||||||
|
('user_max_votes', '50', 129, 'default: 50 - vote limit per day'),
|
||||||
|
('rep_req_votemore_add', '250', 129, 'default: 250 - required reputation per additional vote past threshold'),
|
||||||
|
('force_ssl', '0', 148, 'default: 0 - enforce SSL, if the server is behind a load balancer'),
|
||||||
|
('cache_mode', '1', 161, 'default: 1 - set cache method - 0:filecache, 1:memcached'),
|
||||||
|
('locales', '333', 161, 'default: 0x14D - allowed locales - 0:English, 2:French, 3:German, 6:Spanish, 8:Russian'),
|
||||||
|
('account_create_save_decay', '604800', 129, 'default: 604800 - time in wich an unconfirmed account cannot be overwritten by new registrations'),
|
||||||
|
('account_recovery_decay', '300', 129, 'default: 300 - time to recover your account and new recovery requests are blocked'),
|
||||||
|
('serialize_precision', '4', 65, ' - some derelict code, probably unused'),
|
||||||
|
('screenshot_min_size', '200', 129, 'default: 200 - minimum dimensions of uploaded screenshots in px (yes, it\'s square)');
|
||||||
|
/*!40000 ALTER TABLE `aowow_config` ENABLE KEYS */;
|
||||||
|
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
@@ -129,10 +129,7 @@ h5 a.icontiny span { text-decoration:none !important; }
|
|||||||
|
|
||||||
.quote .quote, .quote .quote .quote .quote { background:#111; }
|
.quote .quote, .quote .quote .quote .quote { background:#111; }
|
||||||
.quote .quote .quote { background:#1b1b1b; }
|
.quote .quote .quote { background:#1b1b1b; }
|
||||||
|
.quote .quote { background:rgba(255,255,255,.065) !important; }
|
||||||
.quote .quote {
|
|
||||||
background:rgba(255,255,255,.065)!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.entryc .quote:after, .comment-body .quote:after,
|
.entryc .quote:after, .comment-body .quote:after,
|
||||||
.text .quote:after, .text blockquote:after,
|
.text .quote:after, .text blockquote:after,
|
||||||
@@ -1101,7 +1098,7 @@ Variations:
|
|||||||
|
|
||||||
.icon-report {
|
.icon-report {
|
||||||
padding-left: 16px !important;
|
padding-left: 16px !important;
|
||||||
background: url(../images/icons/report.gif) 3px center no-repeat;
|
background: url(../images/icons/report.png) no-repeat left center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-return {
|
.icon-return {
|
||||||
@@ -1124,6 +1121,11 @@ Variations:
|
|||||||
background: url(../images/icons/sticky.gif) no-repeat left center;
|
background: url(../images/icons/sticky.gif) no-repeat left center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-tick {
|
||||||
|
padding-left:19px;
|
||||||
|
background: url(../images/icons/tick.png) no-repeat left center;
|
||||||
|
}
|
||||||
|
|
||||||
.icon-twitter {
|
.icon-twitter {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
background: url(../images/icons/twitter.gif) left center no-repeat;
|
background: url(../images/icons/twitter.gif) left center no-repeat;
|
||||||
@@ -3694,7 +3696,7 @@ a#toplinks-language {
|
|||||||
background-repeat: no-repeat, no-repeat;
|
background-repeat: no-repeat, no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the search.css is basicly empty without the styles for googleseach */
|
/* the search.css is basicly empty without the styles for googlesearch */
|
||||||
.search-noresults {
|
.search-noresults {
|
||||||
background:url(../images/search/noresults.jpg) left no-repeat;
|
background:url(../images/search/noresults.jpg) left no-repeat;
|
||||||
width:254px;
|
width:254px;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,69 +1,69 @@
|
|||||||
var mn_content = [
|
var mn_content = [
|
||||||
[22, 'Achievements', '?admin=achievements', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV | U_GROUP_BUREAU}],
|
// [22, 'Achievements', '?admin=achievements', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV | U_GROUP_BUREAU}],
|
||||||
[3, 'Announcements', '?admin=announcements', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
[3, 'Announcements', '?admin=announcements', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
[25, 'Guides Awaiting Approval', '?admin=guides', null, {requiredAccess: U_GROUP_STAFF}],
|
// [25, 'Guides Awaiting Approval', '?admin=guides', null, {requiredAccess: U_GROUP_STAFF}],
|
||||||
[20, 'Global Images & Headers', '?admin=headers', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
// [20, 'Global Images & Headers', '?admin=headers', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
[21, 'Modelviewer', '?admin=modelviewer', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
// [21, 'Modelviewer', '?admin=modelviewer', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
[23, 'Out of Date Comments', '?admin=out-of-date', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_MOD}],
|
[23, 'Out of Date Comments', '?admin=out-of-date', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_MOD}],
|
||||||
[5, 'Screenshots', '?admin=screenshots', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SCREENSHOT}],
|
[5, 'Screenshots', '?admin=screenshots', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SCREENSHOT}],
|
||||||
[18, 'Upload Image', '?npc=15384#submit-a-screenshot', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_EDITOR, rel: 'np'}],
|
// [18, 'Upload Image', '?npc=15384#submit-a-screenshot', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_EDITOR, rel: 'np'}],
|
||||||
[17, 'Videos', '?admin=videos', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO}],
|
[17, 'Videos', '?admin=videos', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO}],
|
||||||
|
|
||||||
[, 'Homepage'],
|
[, 'Homepage'],
|
||||||
[13, 'Featured Box', '?admin=home-featuredbox', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Featured Box'}],
|
[13, 'Featured Box', '?admin=home-featuredbox', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Featured Box'}],
|
||||||
[14, 'Oneliners', '?admin=home-oneliners', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Oneliners'}],
|
// [14, 'Oneliners', '?admin=home-oneliners', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Oneliners'}],
|
||||||
[15, 'Skins', '?admin=home-skins', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT, breadcrumb: 'Homepage Skins'}],
|
// [15, 'Skins', '?admin=home-skins', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT, breadcrumb: 'Homepage Skins'}],
|
||||||
[16, 'Titles', '?admin=home-titles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Titles'}],
|
// [16, 'Titles', '?admin=home-titles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Titles'}],
|
||||||
|
|
||||||
[, 'Articles'],
|
// [, 'Articles'],
|
||||||
[8, 'List', '?admin=articles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_EDITOR | U_GROUP_LOCALIZER, breadcrumb: 'List of Articles'}],
|
// [8, 'List', '?admin=articles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_EDITOR | U_GROUP_LOCALIZER, breadcrumb: 'List of Articles'}],
|
||||||
[9, 'Editors\' Lounge', '?admin=editors-lounge', null, {requiredAccess: U_GROUP_EMPLOYEE | U_GROUP_EDITOR | U_GROUP_LOCALIZER}],
|
// [9, 'Editors\' Lounge', '?admin=editors-lounge', null, {requiredAccess: U_GROUP_EMPLOYEE | U_GROUP_EDITOR | U_GROUP_LOCALIZER}],
|
||||||
[23, 'Related Links', '?admin=related-links', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
// [23, 'Related Links', '?admin=related-links', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
|
|
||||||
[, 'News'],
|
// [, 'News'],
|
||||||
[10, 'New Post', '?edit=news', null, {requiredAccess: U_GROUP_EMPLOYEE | U_GROUP_BLOGGER, breadcrumb: 'News Post'}],
|
// [10, 'New Post', '?edit=news', null, {requiredAccess: U_GROUP_EMPLOYEE | U_GROUP_BLOGGER, breadcrumb: 'News Post'}],
|
||||||
[11, 'Content Corner', '?admin=content-corner', null, {requiredAccess: U_GROUP_EMPLOYEE | U_GROUP_BLOGGER}],
|
// [11, 'Content Corner', '?admin=content-corner', null, {requiredAccess: U_GROUP_EMPLOYEE | U_GROUP_BLOGGER}],
|
||||||
[12, 'Tags', '?admin=newstag', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_BLOGGER, breadcrumb: 'News Tags'}],
|
// [12, 'Tags', '?admin=newstag', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_BLOGGER, breadcrumb: 'News Tags'}],
|
||||||
[24, 'Patch Updates', '?admin=patch-updates', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
// [24, 'Patch Updates', '?admin=patch-updates', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
[26, 'Featured Guides', '?admin=featuredguides', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Featured Guides'}],
|
// [26, 'Featured Guides', '?admin=featuredguides', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Featured Guides'}],
|
||||||
|
|
||||||
[, 'Community'],
|
// [, 'Community'],
|
||||||
[4, 'Contests', '?admin=contests', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT}],
|
// [4, 'Contests', '?admin=contests', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT}],
|
||||||
[27, 'Top User Contest', '?admin=topuser-contest', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT}],
|
// [27, 'Top User Contest', '?admin=topuser-contest', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT}],
|
||||||
[19, 'Forums', '?admin=forums', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
// [19, 'Forums', '?admin=forums', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
[6, 'Profanity Filter', '?admin=profanity', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
// [6, 'Profanity Filter', '?admin=profanity', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}],
|
||||||
|
|
||||||
[, 'Other'],
|
// [, 'Other'],
|
||||||
[7, 'Holiday Gift Guide', '?admin=holidaygift', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}]
|
// [7, 'Holiday Gift Guide', '?admin=holidaygift', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU}]
|
||||||
];
|
];
|
||||||
|
|
||||||
var mn_dev = [
|
var mn_dev = [
|
||||||
[17, 'Cookies', '?admin=cookies', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [17, 'Cookies', '?admin=cookies', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[21, 'PHP Information', '?admin=phpinfo', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
[21, 'PHP Information', '?admin=phpinfo', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[18, 'Site Configuration', '?admin=siteconfig', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
[18, 'Site Configuration', '?admin=siteconfig', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[16, 'Weight Presets', '?admin=weight-presets', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
// [16, 'Weight Presets', '?admin=weight-presets', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
||||||
[22, 'API Keys', '?admin=apikey', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
// [22, 'API Keys', '?admin=apikey', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
||||||
|
|
||||||
[, 'Cache'],
|
// [, 'Cache'],
|
||||||
[2, 'Create Folders', '?admin=cache-folder', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Create Cache Folders'}],
|
// [2, 'Create Folders', '?admin=cache-folder', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Create Cache Folders'}],
|
||||||
[3, 'Expire Range', '?admin=cache-expire', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Expire Cache Range'}],
|
// [3, 'Expire Range', '?admin=cache-expire', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Expire Cache Range'}],
|
||||||
[1, 'Manage', '?admin=cache-manage', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Manage Cache'}],
|
// [1, 'Manage', '?admin=cache-manage', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Manage Cache'}],
|
||||||
[20, 'Memcached', '?admin=memcached', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Manage Memcached'}],
|
// [20, 'Memcached', '?admin=memcached', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Manage Memcached'}],
|
||||||
|
|
||||||
[, 'Database'],
|
// [, 'Database'],
|
||||||
[8, 'Add Fake Item', '?admin=fakeitem', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [8, 'Add Fake Item', '?admin=fakeitem', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[10, 'Add Fake NPC', '?admin=fakenpc', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [10, 'Add Fake NPC', '?admin=fakenpc', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[19, 'Check Consistency', '?admin=db-check-consistency', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Check Database Consistency'}],
|
// [19, 'Check Consistency', '?admin=db-check-consistency', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Check Database Consistency'}],
|
||||||
[4, 'Execute SQL', '?admin=sql', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [4, 'Execute SQL', '?admin=sql', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[9, 'Export Fake Item', '?admin=luaitem', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [9, 'Export Fake Item', '?admin=luaitem', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[26, 'Denormalized Fields Fix', '?admin=denormalized-fix', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [26, 'Denormalized Fields Fix', '?admin=denormalized-fix', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[11, 'Minimum & Maximum Values', '?admin=minmax', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [11, 'Minimum & Maximum Values', '?admin=minmax', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[7, 'SQL Find & Replace', '?admin=sql-replace', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [7, 'SQL Find & Replace', '?admin=sql-replace', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[25, 'Switch Active Database', '?admin=active-db', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
// [25, 'Switch Active Database', '?admin=active-db', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}],
|
||||||
[5, 'Updates', '?admin=db-update', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Database Updates'}],
|
// [5, 'Updates', '?admin=db-update', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV, breadcrumb: 'Database Updates'}],
|
||||||
|
|
||||||
[, 'Generators'],
|
// [, 'Generators'],
|
||||||
[12, 'Talent Calculator Icons', '?admin=talentcalc-icons', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}]
|
// [12, 'Talent Calculator Icons', '?admin=talentcalc-icons', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV}]
|
||||||
];
|
];
|
||||||
|
|
||||||
var mn_localization = [
|
var mn_localization = [
|
||||||
@@ -103,10 +103,10 @@ var mn_users = [
|
|||||||
var mn_staff = [
|
var mn_staff = [
|
||||||
[1, 'Content', null, mn_content],
|
[1, 'Content', null, mn_content],
|
||||||
[2, 'Development', null, mn_dev],
|
[2, 'Development', null, mn_dev],
|
||||||
[3, 'Localization', null, mn_localization],
|
// [3, 'Localization', null, mn_localization],
|
||||||
[7, 'Statistics', null, mn_statistics, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
// [7, 'Statistics', null, mn_statistics, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
||||||
[4, 'Users', null, mn_users],
|
// [4, 'Users', null, mn_users],
|
||||||
[5, 'View Reports', '?admin=reports', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_EDITOR | U_GROUP_MOD | U_GROUP_LOCALIZER | U_GROUP_SCREENSHOT | U_GROUP_VIDEO} ],
|
// [5, 'View Reports', '?admin=reports', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_EDITOR | U_GROUP_MOD | U_GROUP_LOCALIZER | U_GROUP_SCREENSHOT | U_GROUP_VIDEO} ],
|
||||||
|
|
||||||
[, 'Page'],
|
[, 'Page'],
|
||||||
[102, 'Validate', 'http://validator.w3.org/check/referer', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_TESTER}]];
|
[102, 'Validate', 'http://validator.w3.org/check/referer', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_TESTER}]];
|
||||||
@@ -114,42 +114,42 @@ var mn_staff = [
|
|||||||
mn_path.push([4, 'Staff', null, mn_staff]);
|
mn_path.push([4, 'Staff', null, mn_staff]);
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var f = $('div.stafffooter');
|
var footer = $('div.stafffooter');
|
||||||
if (f.length > 0) {
|
if (footer.length > 0) {
|
||||||
var g = $(window).height();
|
var totalHeight = $(window).height();
|
||||||
if (f.offset().top < (g - 100)) {
|
if (footer.offset().top < (totalHeight - 100)) {
|
||||||
var e = f.offset();
|
var offset = footer.offset();
|
||||||
e.top = g - 100;
|
offset.top = totalHeight - 100;
|
||||||
f.offset(e)
|
footer.offset(offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var a = U_GROUP_EMPLOYEE | U_GROUP_EDITOR | (Locale.getId() != LOCALE_ENUS ? U_GROUP_LOCALIZER : 0);
|
var articleAccess = U_GROUP_EMPLOYEE | U_GROUP_EDITOR | (Locale.getId() != LOCALE_ENUS ? U_GROUP_LOCALIZER : 0);
|
||||||
var j = $WH.g_getGets();
|
var urlParams = $WH.g_getGets();
|
||||||
var b;
|
var buff;
|
||||||
var c = {};
|
var refresh = {};
|
||||||
var h = null;
|
var subMenu = null;
|
||||||
if (j.refresh != null) {
|
if (urlParams.refresh != null) {
|
||||||
b = 'See Cached';
|
buff = 'See Cached';
|
||||||
c.refresh = null
|
refresh.refresh = null
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var k = {};
|
var mCached = {};
|
||||||
var i = {};
|
var fiCache = {};
|
||||||
b = 'Refresh';
|
buff = 'Refresh';
|
||||||
if (PageTemplate.get('pageName') == 'home') {
|
if (PageTemplate.get('pageName') == 'home') {
|
||||||
c.home = '';
|
refresh.home = '';
|
||||||
k.home = '';
|
mCached.home = '';
|
||||||
i.home = ''
|
fiCache.home = ''
|
||||||
}
|
}
|
||||||
c.refresh = '';
|
refresh.refresh = '';
|
||||||
k.refresh = 'memcached';
|
mCached.refresh = 'memcached';
|
||||||
i.refresh = 'filecache';
|
fiCache.refresh = 'filecache';
|
||||||
h = [
|
subMenu = [
|
||||||
[1, 'Memcached', g_modifyUrl(location.href, k), null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
[1, 'Memcached', g_modifyUrl(location.href, mCached), null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}],
|
||||||
[2, 'File cache', g_modifyUrl(location.href, i), null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}]
|
[2, 'File cache', g_modifyUrl(location.href, fiCache), null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
mn_staff.push([100, b, g_modifyUrl(location.href, c), h, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}]);
|
mn_staff.push([100, buff, g_modifyUrl(location.href, refresh), subMenu, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV}]);
|
||||||
if (location.href.match(/website-achievement=([0-9]+)(\/.*)?/i)) {
|
if (location.href.match(/website-achievement=([0-9]+)(\/.*)?/i)) {
|
||||||
mn_staff.push([, 'Achievement']);
|
mn_staff.push([, 'Achievement']);
|
||||||
mn_staff.push([200, 'Manage', '?admin=achievements&action=edit&id=' + RegExp.$1, null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV | U_GROUP_BUREAU}])
|
mn_staff.push([200, 'Manage', '?admin=achievements&action=edit&id=' + RegExp.$1, null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_DEV | U_GROUP_BUREAU}])
|
||||||
@@ -170,14 +170,14 @@ $(document).ready(function () {
|
|||||||
if ($WH.isset('g_pageInfo')) {
|
if ($WH.isset('g_pageInfo')) {
|
||||||
if (g_pageInfo.type && g_pageInfo.typeId) {
|
if (g_pageInfo.type && g_pageInfo.typeId) {
|
||||||
mn_staff.push([, 'DB Entry']);
|
mn_staff.push([, 'DB Entry']);
|
||||||
mn_staff.push([1001, 'Edit Article', '?edit=article&type=' + g_pageInfo.type + '&typeid=' + g_pageInfo.typeId, null, {requiredAccess: a}]);
|
// mn_staff.push([1001, 'Edit Article', '?edit=article&type=' + g_pageInfo.type + '&typeid=' + g_pageInfo.typeId, null, {requiredAccess: articleAccess}]);
|
||||||
mn_staff.push([1000, 'Manage Screenshots', '?admin=screenshots&type=' + g_pageInfo.type + '&typeid=' + g_pageInfo.typeId, null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SCREENSHOT}]);
|
mn_staff.push([1000, 'Manage Screenshots', '?admin=screenshots&type=' + g_pageInfo.type + '&typeid=' + g_pageInfo.typeId, null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SCREENSHOT}]);
|
||||||
mn_staff.push([1000, 'Manage Videos', '?admin=videos&type=' + g_pageInfo.type + '&typeid=' + g_pageInfo.typeId, null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO}])
|
mn_staff.push([1000, 'Manage Videos', '?admin=videos&type=' + g_pageInfo.type + '&typeid=' + g_pageInfo.typeId, null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_VIDEO}])
|
||||||
}
|
}
|
||||||
if (g_pageInfo.articleUrl) {
|
if (g_pageInfo.articleUrl) {
|
||||||
mn_staff.push([, 'Article']);
|
mn_staff.push([, 'Article']);
|
||||||
mn_staff.push([1002, 'Edit', '?edit=article&' + g_pageInfo.articleUrl, null, {requiredAccess: (g_pageInfo.editAccess ? g_pageInfo.editAccess: a)}]);
|
mn_staff.push([1002, 'Edit', '?edit=article&' + g_pageInfo.articleUrl, null, {requiredAccess: (g_pageInfo.editAccess ? g_pageInfo.editAccess: articleAccess)}]);
|
||||||
mn_staff.push([1003, 'Options', '?edit=article-options&url=' + g_pageInfo.articleUrl, null, {requiredAccess: a}])
|
mn_staff.push([1003, 'Options', '?edit=article-options&url=' + g_pageInfo.articleUrl, null, {requiredAccess: articleAccess}])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu.sort(mn_staff)
|
Menu.sort(mn_staff)
|
||||||
@@ -293,10 +293,9 @@ var TwigProfiler = new function () {
|
|||||||
for (var i = 0; i < len; ++i) {
|
for (var i = 0; i < len; ++i) {
|
||||||
tbl.append($('<tr/>')
|
tbl.append($('<tr/>')
|
||||||
.append($('<td/>', {css: {'white-space': 'nowrap', 'text-align': 'right'}, 'class': 'q2', text: rows[i].action} ))
|
.append($('<td/>', {css: {'white-space': 'nowrap', 'text-align': 'right'}, 'class': 'q2', text: rows[i].action} ))
|
||||||
.append($('<td/>', { css: { 'white-space': 'nowrap' } })
|
.append($('<td/>', {css: {'white-space': 'nowrap'}} ).append($('<small/>', {text: rows[i].name} )))
|
||||||
.append($('<small/>', { text: rows[i].name }))
|
.append($('<td/>', {css: {'white-space': 'nowrap'}} ).append($('<small/>', {text: rows[i].time} )))
|
||||||
.append($('<td/>', { css: { 'white-space': 'nowrap' } })
|
);
|
||||||
.append($('<small/>', { text: rows[i].time })))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user