This commit is contained in:
Ruan 2015-02-18 18:56:50 +02:00
parent 0b614070ab
commit 5e9b22465c
16 changed files with 7209 additions and 5160 deletions

View File

@ -0,0 +1,20 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="FieldMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="InnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="KeySetIterationMayUseEntrySet" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="LengthOneStringInIndexOf" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="LengthOneStringsInConcatenation" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

View File

@ -1,29 +1,28 @@
<?php include 'includes/head.php'; ?> <?php include 'includes/head.php'; ?>
<?php include 'includes/header.php'; ?> <?php include 'includes/header.php'; ?>
<head> <head>
<title>Bans/Tempbans - <?php echo $name; ?></title> <title>Bans/Tempbans - <?php echo $name; ?></title>
</head> </head>
<?php <?php
// <<-----------------mysql Database Connection------------>> // // <<-----------------mysql Database Connection------------>> //
require 'includes/data/database.php'; require 'includes/data/database.php';
$sql = 'SELECT name, reason, banner, time, expires FROM bans ORDER BY time DESC LIMIT 20'; $sql = 'SELECT name, reason, banner, time, expires FROM bans ORDER BY time DESC LIMIT 20';
$retval = mysql_query( $sql, $conn ); $retval = mysql_query($sql, $conn);
if(! $retval ) if (!$retval) {
{ die('Could not get data: ' . mysql_error($sql, $conn));
die('Could not get data: ' . mysql_error( $sql, $conn ));
} }
?> ?>
<body> <body>
<div class="container"> <div class="container">
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header">Bans</h1> <h1 class="page-header">Bans</h1>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="index">Home</a></li> <li><a href="index.php">Home</a></li>
<li class="active">Bans</li> <li class="active">Bans</li>
</ol> </ol>
</div> </div>
@ -34,15 +33,25 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed"> <table class="table table-hover table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
<th><center>Name</center></th> <th>
<th><center>Banned By</center></th> <div style="text-align: center;">Name</div>
<th><center>Reason</center></th> </th>
<th><center>Banned On</center></th> <th>
<th><center>Banned Until</center></th> <div style="text-align: center;">Banned By</div>
</th>
<th>
<div style="text-align: center;">Reason</div>
</th>
<th>
<div style="text-align: center;">Banned On</div>
</th>
<th>
<div style="text-align: center;">Banned Until</div>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php while($row = mysql_fetch_assoc($retval)) { <?php while ($row = mysql_fetch_assoc($retval)) {
// <<-----------------Ban Date Converter------------>> // // <<-----------------Ban Date Converter------------>> //
$timeEpoch = $row['time']; $timeEpoch = $row['time'];
$timeConvert = $timeEpoch / 1000; $timeConvert = $timeEpoch / 1000;
@ -53,22 +62,23 @@ if(! $retval )
$expiresResult = date('F j, Y, g:i a', $expiresConvert); $expiresResult = date('F j, Y, g:i a', $expiresConvert);
?> ?>
<tr> <tr>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner']; ?></td>
<td style="width: 30%;"><?php echo $row['reason'];?></td> <td style="width: 30%;"><?php echo $row['reason']; ?></td>
<td><?php echo $timeResult;?></td> <td><?php echo $timeResult; ?></td>
<td><?php if($row['expires'] == 0) { <td><?php if ($row['expires'] <= 0) {
echo 'Permanent Ban'; echo 'Permanent Ban';
} else { } else {
echo $expiresResult; }?></td> echo $expiresResult;
} ?></td>
</tr> </tr>
<?php } <?php }
mysql_close($conn); mysql_close($conn);
echo "</tbody></table>"; echo "</tbody></table>";
?> ?>
</div> </div>
</div> </div>
<?php <?php
include 'includes/footer.php'; include 'includes/footer.php';
?> ?>
</div> </div>

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,7 @@ $dbhost = 'localhost';
$dbuser = 'root'; $dbuser = 'root';
$dbpass = 'password'; $dbpass = 'password';
$conn = mysql_connect($dbhost, $dbuser, $dbpass); $conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn ) if (!$conn) {
{
die('Could not connect: ' . mysql_error()); die('Could not connect: ' . mysql_error());
} }
mysql_select_db('maxbans'); mysql_select_db('maxbans');

View File

@ -1,7 +1,7 @@
<?php <?php
$data = json_decode( file_get_contents('http://mcapi.ca/v2/query/info/?ip=' .$serverip ), true); $data = json_decode(file_get_contents('http://mcapi.ca/v2/query/info/?ip=' . $serverip), true);
?> ?>
<div class="navbar navbar-default navbar-fixed-bottom" role="navigation"> <div class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
@ -10,15 +10,18 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<p class="navbar-text" style="font-size:15px;color:white;">&copy; <a href="http://dev.bukkit.org/profiles/netherfoam/" target="_blank">Plugin Creator</a> | <a href="http://dev.bukkit.org/profiles/YiveMe" target="_blank">PHP Script Creator</a></p> <p class="navbar-text" style="font-size:15px;color:white;">&copy; <a
href="http://dev.bukkit.org/profiles/netherfoam/" target="_blank">Plugin Creator</a> | <a
href="http://dev.bukkit.org/profiles/YiveMe" target="_blank">PHP Script Creator</a></p>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<p class="navbar-text" style="color:white;"><?php echo 'Players: ' . $data['players']['online'] . '/' . $data['players']['max']; ?> </p> <p class="navbar-text"
style="color:white;"><?php echo 'Players: ' . $data['players']['online'] . '/' . $data['players']['max']; ?> </p>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" id="about" tabindex="-1" role="dialog" aria-labelledby="aboutlabel" aria-hidden="true"> <div class="modal fade" id="about" tabindex="-1" role="dialog" aria-labelledby="aboutlabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -27,20 +30,25 @@
<h4 class="modal-title" id="aboutlabel">About Script</h4> <h4 class="modal-title" id="aboutlabel">About Script</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="well well-sm"> <div class="well well-sm">
<h4>Credits</h4> <h4>Credits</h4>
<p><a href="http://dev.bukkit.org/profiles/netherfoam/" target="_blank">netherfoam - Plugin Developer</a>
<p><a href="http://dev.bukkit.org/profiles/netherfoam/" target="_blank">netherfoam - Plugin
Developer</a>
<br/> <br/>
<a href="http://twitter.com/ItsYive" target="_blank">Yive - PHP Developer</a> <a href="http://twitter.com/ItsYive" target="_blank">Yive - PHP Developer</a>
<br/> <br/>
<a href="https://twitter.com/boboman_13" target="_blank">boboman_13 - Helped with censoring IPs</a> <a href="https://twitter.com/boboman_13" target="_blank">boboman_13 - Helped with censoring
</div> IPs</a>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div> </div>
</div><!-- /.modal-content --> </div>
</div><!-- /.modal-dialog --> <!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="includes/js/bootstrap.min.js"></script> <script src="includes/js/bootstrap.min.js"></script>

View File

@ -1,7 +1,7 @@
<?php <?php
include 'includes/data/settings.php'; include 'includes/data/settings.php';
?> ?>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content=""> <meta name="description" content="">
@ -10,6 +10,8 @@ include 'includes/data/settings.php';
<link href="includes/css/bootstrap.css" rel="stylesheet"> <link href="includes/css/bootstrap.css" rel="stylesheet">
<link href="includes/css/navbar-fixed-top.css" rel="stylesheet"> <link href="includes/css/navbar-fixed-top.css" rel="stylesheet">
<style> <style>
html { background-image: url('includes/img/377759.png'); } html {
background-image: url('includes/img/377759.png');
}
</style> </style>
</head> </head>

View File

@ -1,4 +1,4 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
@ -25,4 +25,4 @@
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,7 +4,9 @@
* Licensed under http://www.apache.org/licenses/LICENSE-2.0 * Licensed under http://www.apache.org/licenses/LICENSE-2.0
*/ */
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") } if (typeof jQuery === "undefined") {
throw new Error("Bootstrap requires jQuery")
}
/* ======================================================================== /* ========================================================================
* Bootstrap: transition.js v3.0.3 * Bootstrap: transition.js v3.0.3
@ -26,7 +28,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================ // ============================================================
@ -35,15 +38,15 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var el = document.createElement('bootstrap') var el = document.createElement('bootstrap')
var transEndEventNames = { var transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd' 'WebkitTransition': 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend' , 'MozTransition': 'transitionend'
, 'OTransition' : 'oTransitionEnd otransitionend' , 'OTransition': 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend' , 'transition': 'transitionend'
} }
for (var name in transEndEventNames) { for (var name in transEndEventNames) {
if (el.style[name] !== undefined) { if (el.style[name] !== undefined) {
return { end: transEndEventNames[name] } return {end: transEndEventNames[name]}
} }
} }
} }
@ -51,8 +54,12 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
// http://blog.alexmaccaw.com/css-transitions // http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) { $.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this var called = false, $el = this
$(this).one($.support.transition.end, function () { called = true }) $(this).one($.support.transition.end, function () {
var callback = function () { if (!called) $($el).trigger($.support.transition.end) } called = true
})
var callback = function () {
if (!called) $($el).trigger($.support.transition.end)
}
setTimeout(callback, duration) setTimeout(callback, duration)
return this return this
} }
@ -83,7 +90,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// ALERT CLASS DEFINITION // ALERT CLASS DEFINITION
// ====================== // ======================
@ -182,7 +190,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// BUTTON PUBLIC CLASS DEFINITION // BUTTON PUBLIC CLASS DEFINITION
// ============================== // ==============================
@ -298,7 +307,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// CAROUSEL CLASS DEFINITION // CAROUSEL CLASS DEFINITION
// ========================= // =========================
@ -349,7 +359,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (pos > (this.$items.length - 1) || pos < 0) return if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) if (this.sliding) return this.$element.one('slid.bs.carousel', function () {
that.to(pos)
})
if (activeIndex == pos) return this.pause().cycle() if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@ -395,7 +407,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
isCycling && this.pause() isCycling && this.pause()
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) var e = $.Event('slide.bs.carousel', {relatedTarget: $next[0], direction: direction})
if ($next.hasClass('active')) return if ($next.hasClass('active')) return
@ -419,7 +431,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$next.removeClass([type, direction].join(' ')).addClass('active') $next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' ')) $active.removeClass(['active', direction].join(' '))
that.sliding = false that.sliding = false
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) setTimeout(function () {
that.$element.trigger('slid.bs.carousel')
}, 0)
}) })
.emulateTransitionEnd(600) .emulateTransitionEnd(600)
} else { } else {
@ -516,7 +530,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// COLLAPSE PUBLIC CLASS DEFINITION // COLLAPSE PUBLIC CLASS DEFINITION
// ================================ // ================================
@ -696,7 +711,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// DROPDOWN CLASS DEFINITION // DROPDOWN CLASS DEFINITION
// ========================= // =========================
@ -763,7 +779,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (e.keyCode == 38 && index > 0) index-- // up if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index=0 if (!~index) index = 0
$items.eq(index).focus() $items.eq(index).focus()
} }
@ -825,9 +841,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$(document) $(document)
.on('click.bs.dropdown.data-api', clearMenus) .on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.bs.dropdown.data-api', '.dropdown form', function (e) {
.on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle) e.stopPropagation()
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown)
}(jQuery); }(jQuery);
@ -851,7 +869,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// MODAL CLASS DEFINITION // MODAL CLASS DEFINITION
// ====================== // ======================
@ -877,7 +896,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
Modal.prototype.show = function (_relatedTarget) { Modal.prototype.show = function (_relatedTarget) {
var that = this var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) var e = $.Event('show.bs.modal', {relatedTarget: _relatedTarget})
this.$element.trigger(e) this.$element.trigger(e)
@ -908,7 +927,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
that.enforceFocus() that.enforceFocus()
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) var e = $.Event('shown.bs.modal', {relatedTarget: _relatedTarget})
transition ? transition ?
that.$element.find('.modal-dialog') // wait for modal to slide in that.$element.find('.modal-dialog') // wait for modal to slide in
@ -1013,7 +1032,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} else if (!this.isShown && this.$backdrop) { } else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in') this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')? $.support.transition && this.$element.hasClass('fade') ?
this.$backdrop this.$backdrop
.one($.support.transition.end, callback) .one($.support.transition.end, callback)
.emulateTransitionEnd(150) : .emulateTransitionEnd(150) :
@ -1061,7 +1080,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var $this = $(this) var $this = $(this)
var href = $this.attr('href') var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) var option = $target.data('modal') ? 'toggle' : $.extend({remote: !/#/.test(href) && href}, $target.data(), $this.data())
e.preventDefault() e.preventDefault()
@ -1073,8 +1092,12 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
}) })
$(document) $(document)
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') }) .on('show.bs.modal', '.modal', function () {
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') }) $(document.body).addClass('modal-open')
})
.on('hidden.bs.modal', '.modal', function () {
$(document.body).removeClass('modal-open')
})
}(jQuery); }(jQuery);
@ -1099,7 +1122,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// TOOLTIP PUBLIC CLASS DEFINITION // TOOLTIP PUBLIC CLASS DEFINITION
// =============================== // ===============================
@ -1150,7 +1174,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} }
this.options.selector ? this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : (this._options = $.extend({}, this.options, {trigger: 'manual', selector: ''})) :
this.fixTitle() this.fixTitle()
} }
@ -1213,7 +1237,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} }
Tooltip.prototype.show = function () { Tooltip.prototype.show = function () {
var e = $.Event('show.bs.'+ this.type) var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) { if (this.hasContent() && this.enabled) {
this.$element.trigger(e) this.$element.trigger(e)
@ -1236,7 +1260,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$tip $tip
.detach() .detach()
.css({ top: 0, left: 0, display: 'block' }) .css({top: 0, left: 0, display: 'block'})
.addClass(placement) .addClass(placement)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
@ -1272,7 +1296,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} }
} }
Tooltip.prototype.applyPlacement = function(offset, placement) { Tooltip.prototype.applyPlacement = function (offset, placement) {
var replace var replace
var $tip = this.tip() var $tip = this.tip()
var width = $tip[0].offsetWidth var width = $tip[0].offsetWidth
@ -1323,7 +1347,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (replace) $tip.offset(offset) if (replace) $tip.offset(offset)
} }
Tooltip.prototype.replaceArrow = function(delta, dimension, position) { Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
} }
@ -1381,10 +1405,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} }
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : return placement == 'bottom' ? {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} :
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : placement == 'top' ? {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : placement == 'left' ? {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} :
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } /* placement == 'right' */ {
top: pos.top + pos.height / 2 - actualHeight / 2,
left: pos.left + pos.width
}
} }
Tooltip.prototype.getTitle = function () { Tooltip.prototype.getTitle = function () {
@ -1485,7 +1512,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// POPOVER PUBLIC CLASS DEFINITION // POPOVER PUBLIC CLASS DEFINITION
// =============================== // ===============================
@ -1496,11 +1524,14 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, { Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right' placement: 'right'
, trigger: 'click' ,
, content: '' trigger: 'click'
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' ,
content: ''
,
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
}) })
@ -1603,7 +1634,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// SCROLLSPY CLASS DEFINITION // SCROLLSPY CLASS DEFINITION
// ========================== // ==========================
@ -1647,9 +1679,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
return ($href return ($href
&& $href.length && $href.length
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null && [[$href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href]]) || null
})
.sort(function (a, b) {
return a[0] - b[0]
}) })
.sort(function (a, b) { return a[0] - b[0] })
.each(function () { .each(function () {
self.offsets.push(this[0]) self.offsets.push(this[0])
self.targets.push(this[1]) self.targets.push(this[1])
@ -1673,7 +1707,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
activeTarget != targets[i] activeTarget != targets[i]
&& scrollTop >= offsets[i] && scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1]) && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate( targets[i] ) && this.activate(targets[i])
} }
} }
@ -1762,7 +1796,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// TAB CLASS DEFINITION // TAB CLASS DEFINITION
// ==================== // ====================
@ -1846,7 +1881,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var old = $.fn.tab var old = $.fn.tab
$.fn.tab = function ( option ) { $.fn.tab = function (option) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
var data = $this.data('bs.tab') var data = $this.data('bs.tab')
@ -1898,7 +1933,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */ * ======================================================================== */
+function ($) { "use strict"; +function ($) {
"use strict";
// AFFIX CLASS DEFINITION // AFFIX CLASS DEFINITION
// ====================== // ======================
@ -1953,7 +1989,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : '')) this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
if (affix == 'bottom') { if (affix == 'bottom') {
this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() }) this.$element.offset({top: document.body.offsetHeight - offsetBottom - this.$element.height()})
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -1,19 +1,21 @@
<?php include 'includes/head.php'; ?> <?php include 'includes/head.php'; ?>
<?php include 'includes/header.php'; ?> <?php include 'includes/header.php'; ?>
<head> <head>
<title>Index - <?php echo $name; ?></title> <title>Index - <?php echo $name; ?></title>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<!-- Main Page --> <!-- Main Page -->
<div class="jumbotron"> <div class="jumbotron">
<h1>Welcome to <?php echo $name; ?>'s Ban List</h1> <h1>Welcome to <?php echo $name; ?>'s Ban List</h1>
<p>Here is where our Bans, IP-Bans, Mutes &amp; Warnings are listed.</p> <p>Here is where our Bans, IP-Bans, Mutes &amp; Warnings are listed.</p>
</div> </div>
</div> <!-- /container --> </div>
<!-- /container -->
<?php <?php
include 'includes/footer.php'; include 'includes/footer.php';
?> ?>

View File

@ -1,22 +1,21 @@
<?php include 'includes/head.php'; ?> <?php include 'includes/head.php'; ?>
<?php include 'includes/header.php'; ?> <?php include 'includes/header.php'; ?>
<head> <head>
<title>IP Bans - <?php echo $name; ?></title> <title>IP Bans - <?php echo $name; ?></title>
</head> </head>
<?php <?php
// <<-----------------mysql Database Connection------------>> // // <<-----------------mysql Database Connection------------>> //
require 'includes/data/database.php'; require 'includes/data/database.php';
$sql = 'SELECT ip, reason, banner, time, expires FROM ipbans ORDER BY time DESC LIMIT 20'; $sql = 'SELECT ip, reason, banner, time, expires FROM ipbans ORDER BY time DESC LIMIT 20';
$retval = mysql_query( $sql, $conn ); $retval = mysql_query($sql, $conn);
if(! $retval ) if (!$retval) {
{
die('Could not get data: ' . mysql_error()); die('Could not get data: ' . mysql_error());
} }
?> ?>
<body> <body>
<div class="container"> <div class="container">
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
@ -34,15 +33,25 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed"> <table class="table table-hover table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
<th><center>IP</center></th> <th>
<th><center>Banned By</center></th> <center>IP</center>
<th><center>Reason</center></th> </th>
<th><center>Banned On</center></th> <th>
<th><center>Banned Until</center></th> <center>Banned By</center>
</th>
<th>
<center>Reason</center>
</th>
<th>
<center>Banned On</center>
</th>
<th>
<center>Banned Until</center>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php while($row = mysql_fetch_assoc($retval)) { <?php while ($row = mysql_fetch_assoc($retval)) {
// <<-----------------Ban Date Converter------------>> // // <<-----------------Ban Date Converter------------>> //
$timeEpoch = $row['time']; $timeEpoch = $row['time'];
$timeConvert = $timeEpoch / 1000; $timeConvert = $timeEpoch / 1000;
@ -61,28 +70,29 @@ if(! $retval )
$numbers = $array[0] . "." . $array[1] . "." . $array[2]; $numbers = $array[0] . "." . $array[1] . "." . $array[2];
$numbers .= "."; $numbers .= ".";
for($i = 0; $i < strlen($array[3]); $i++) { for ($i = 0; $i < strlen($array[3]); $i++) {
$numbers .= "*"; $numbers .= "*";
} }
echo $numbers; echo $numbers;
?> ?>
</td> </td>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner']; ?></td>
<td style="width: 30%;"><?php echo $row['reason'];?></td> <td style="width: 30%;"><?php echo $row['reason']; ?></td>
<td><?php echo $timeResult;?></td> <td><?php echo $timeResult; ?></td>
<td><?php if($row['expires'] == 0) { <td><?php if ($row['expires'] == 0) {
echo 'Permanent Ban'; echo 'Permanent Ban';
} else { } else {
echo $expiresResult; }?></td> echo $expiresResult;
} ?></td>
</tr> </tr>
<?php } <?php }
mysql_close($conn); mysql_close($conn);
echo "</tbody></table>"; echo "</tbody></table>";
?> ?>
</div> </div>
</div> </div>
<?php <?php
include 'includes/footer.php'; include 'includes/footer.php';
?> ?>
</div> </div>

8
litebans-php.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,22 +1,21 @@
<?php include 'includes/head.php'; ?> <?php include 'includes/head.php'; ?>
<?php include 'includes/header.php'; ?> <?php include 'includes/header.php'; ?>
<head> <head>
<title>Mutes/TempMutes - <?php echo $name; ?></title> <title>Mutes/TempMutes - <?php echo $name; ?></title>
</head> </head>
<?php <?php
// <<-----------------mysql Database Connection------------>> // // <<-----------------mysql Database Connection------------>> //
require 'includes/data/database.php'; require 'includes/data/database.php';
$sql = 'SELECT name, reason, muter, time, expires FROM mutes ORDER BY time DESC LIMIT 20'; $sql = 'SELECT name, reason, muter, time, expires FROM mutes ORDER BY time DESC LIMIT 20';
$retval = mysql_query( $sql, $conn ); $retval = mysql_query($sql, $conn);
if(! $retval ) if (!$retval) {
{
die('Could not get data: ' . mysql_error()); die('Could not get data: ' . mysql_error());
} }
?> ?>
<body> <body>
<div class="container"> <div class="container">
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
@ -34,15 +33,15 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed"> <table class="table table-hover table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
<th><center>Name</center></th> <th style="text-align: center;">Name</th>
<th><center>Muted By</center></th> <th style="text-align: center;">Muted By</th>
<th><center>Reason</center></th> <th style="text-align: center;">Reason</th>
<th><center>Muted On</center></th> <th style="text-align: center;">Muted On</th>
<th><center>Muted Until</center></th> <th style="text-align: center;">Muted Until</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php while($row = mysql_fetch_assoc($retval)) { <?php while ($row = mysql_fetch_assoc($retval)) {
// <<-----------------Ban Date Converter------------>> // // <<-----------------Ban Date Converter------------>> //
$timeEpoch = $row['time']; $timeEpoch = $row['time'];
$timeConvert = $timeEpoch / 1000; $timeConvert = $timeEpoch / 1000;
@ -53,22 +52,23 @@ if(! $retval )
$expiresResult = date('F j, Y, g:i a', $expiresConvert); $expiresResult = date('F j, Y, g:i a', $expiresConvert);
?> ?>
<tr> <tr>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner']; ?></td>
<td style="width: 30%;"><?php echo $row['reason'];?></td> <td style="width: 30%;"><?php echo $row['reason']; ?></td>
<td><?php echo $timeResult;?></td> <td><?php echo $timeResult; ?></td>
<td><?php if($row['expires'] == 0) { <td><?php if ($row['expires'] == 0) {
echo 'Permanent Mute'; echo 'Permanent Mute';
} else { } else {
echo $expiresResult; }?></td> echo $expiresResult;
} ?></td>
</tr> </tr>
<?php } <?php }
mysql_close($conn); mysql_close($conn);
echo "</tbody></table>"; echo "</tbody></table>";
?> ?>
</div> </div>
</div> </div>
<?php <?php
include 'includes/footer.php'; include 'includes/footer.php';
?> ?>
</div> </div>

View File

@ -1,22 +1,21 @@
<?php include 'includes/head.php'; ?> <?php include 'includes/head.php'; ?>
<?php include 'includes/header.php'; ?> <?php include 'includes/header.php'; ?>
<head> <head>
<title>Warnings - <?php echo $name; ?></title> <title>Warnings - <?php echo $name; ?></title>
</head> </head>
<?php <?php
// <<-----------------mysql Database Connection------------>> // // <<-----------------mysql Database Connection------------>> //
require 'includes/data/database.php'; require 'includes/data/database.php';
$sql = 'SELECT name, reason, banner, expires FROM warnings ORDER BY expires DESC LIMIT 20'; $sql = 'SELECT name, reason, banner, expires FROM warnings ORDER BY expires DESC LIMIT 20';
$retval = mysql_query( $sql, $conn ); $retval = mysql_query($sql, $conn);
if(! $retval ) if (!$retval) {
{
die('Could not get data: ' . mysql_error()); die('Could not get data: ' . mysql_error());
} }
?> ?>
<body> <body>
<div class="container"> <div class="container">
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
@ -34,35 +33,44 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed"> <table class="table table-hover table-bordered table-condensed">
<thead> <thead>
<tr> <tr>
<th><center>Name</center></th> <th>
<th><center>Warned By</center></th> <center>Name</center>
<th><center>Reason</center></th> </th>
<th><center>Warned Until</center></th> <th>
<center>Warned By</center>
</th>
<th>
<center>Reason</center>
</th>
<th>
<center>Warned Until</center>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php while($row = mysql_fetch_assoc($retval)) { <?php while ($row = mysql_fetch_assoc($retval)) {
// <<-----------------Expiration Time Converter------------>> // // <<-----------------Expiration Time Converter------------>> //
$expiresEpoch = $row['expires']; $expiresEpoch = $row['expires'];
$expiresConvert = $expiresEpoch / 1000; $expiresConvert = $expiresEpoch / 1000;
$expiresResult = date('F j, Y, g:i a', $expiresConvert); $expiresResult = date('F j, Y, g:i a', $expiresConvert);
?> ?>
<tr> <tr>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td>
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner'];?></td> <td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner']; ?></td>
<td style="width: 30%;"><?php echo $row['reason'];?></td> <td style="width: 30%;"><?php echo $row['reason']; ?></td>
<td><?php if($row['expires'] == 0) { <td><?php if ($row['expires'] == 0) {
echo 'Permanent Warning'; echo 'Permanent Warning';
} else { } else {
echo $expiresResult; }?></td> echo $expiresResult;
} ?></td>
</tr> </tr>
<?php } <?php }
mysql_close($conn); mysql_close($conn);
echo "</tbody></table>"; echo "</tbody></table>";
?> ?>
</div> </div>
</div> </div>
<?php <?php
include 'includes/footer.php'; include 'includes/footer.php';
?> ?>
</div> </div>