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

@ -10,8 +10,7 @@ require 'includes/data/database.php';
$sql = 'SELECT name, reason, banner, time, expires FROM bans ORDER BY time DESC LIMIT 20';
$retval = mysql_query($sql, $conn);
if(! $retval )
{
if (!$retval) {
die('Could not get data: ' . mysql_error($sql, $conn));
}
?>
@ -23,7 +22,7 @@ if(! $retval )
<div class="col-lg-12">
<h1 class="page-header">Bans</h1>
<ol class="breadcrumb">
<li><a href="index">Home</a></li>
<li><a href="index.php">Home</a></li>
<li class="active">Bans</li>
</ol>
</div>
@ -34,11 +33,21 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
<th><center>Name</center></th>
<th><center>Banned By</center></th>
<th><center>Reason</center></th>
<th><center>Banned On</center></th>
<th><center>Banned Until</center></th>
<th>
<div style="text-align: center;">Name</div>
</th>
<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>
</thead>
<tbody>
@ -57,10 +66,11 @@ if(! $retval )
<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><?php echo $timeResult; ?></td>
<td><?php if($row['expires'] == 0) {
<td><?php if ($row['expires'] <= 0) {
echo 'Permanent Ban';
} else {
echo $expiresResult; }?></td>
echo $expiresResult;
} ?></td>
</tr>
<?php }
mysql_close($conn);

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -10,11 +10,14 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</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 class="navbar-collapse collapse">
<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>
</div>
</div>
@ -29,18 +32,23 @@
<div class="modal-body">
<div class="well well-sm">
<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/>
<a href="http://twitter.com/ItsYive" target="_blank">Yive - PHP Developer</a>
<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
IPs</a>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div><!-- /.modal -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="includes/js/bootstrap.min.js"></script>

View File

@ -10,6 +10,8 @@ include 'includes/data/settings.php';
<link href="includes/css/bootstrap.css" rel="stylesheet">
<link href="includes/css/navbar-fixed-top.css" rel="stylesheet">
<style>
html { background-image: url('includes/img/377759.png'); }
html {
background-image: url('includes/img/377759.png');
}
</style>
</head>

View File

@ -4,7 +4,9 @@
* 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
@ -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/)
// ============================================================
@ -51,8 +54,12 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this
$(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
$(this).one($.support.transition.end, function () {
called = true
})
var callback = function () {
if (!called) $($el).trigger($.support.transition.end)
}
setTimeout(callback, duration)
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
// ======================
@ -182,7 +190,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
+function ($) { "use strict";
+function ($) {
"use strict";
// 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
// =========================
@ -349,7 +359,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
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()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@ -419,7 +431,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
setTimeout(function () {
that.$element.trigger('slid.bs.carousel')
}, 0)
})
.emulateTransitionEnd(600)
} 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
// ================================
@ -696,7 +711,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
+function ($) { "use strict";
+function ($) {
"use strict";
// DROPDOWN CLASS DEFINITION
// =========================
@ -825,7 +841,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$(document)
.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) {
e.stopPropagation()
})
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown)
@ -851,7 +869,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
+function ($) { "use strict";
+function ($) {
"use strict";
// MODAL CLASS DEFINITION
// ======================
@ -1073,8 +1092,12 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
})
$(document)
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
.on('show.bs.modal', '.modal', function () {
$(document.body).addClass('modal-open')
})
.on('hidden.bs.modal', '.modal', function () {
$(document.body).removeClass('modal-open')
})
}(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
// ===============================
@ -1384,7 +1408,10 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
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 == '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 () {
@ -1485,7 +1512,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
+function ($) { "use strict";
+function ($) {
"use strict";
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
@ -1498,9 +1526,12 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
,
trigger: 'click'
,
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
// ==========================
@ -1649,7 +1681,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
&& $href.length
&& [[$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 () {
self.offsets.push(this[0])
self.targets.push(this[1])
@ -1762,7 +1796,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
+function ($) { "use strict";
+function ($) {
"use strict";
// TAB CLASS DEFINITION
// ====================
@ -1898,7 +1933,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
+function ($) { "use strict";
+function ($) {
"use strict";
// AFFIX CLASS DEFINITION
// ======================

File diff suppressed because one or more lines are too long

View File

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

View File

@ -10,8 +10,7 @@ require 'includes/data/database.php';
$sql = 'SELECT ip, reason, banner, time, expires FROM ipbans ORDER BY time DESC LIMIT 20';
$retval = mysql_query($sql, $conn);
if(! $retval )
{
if (!$retval) {
die('Could not get data: ' . mysql_error());
}
?>
@ -34,11 +33,21 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
<th><center>IP</center></th>
<th><center>Banned By</center></th>
<th><center>Reason</center></th>
<th><center>Banned On</center></th>
<th><center>Banned Until</center></th>
<th>
<center>IP</center>
</th>
<th>
<center>Banned By</center>
</th>
<th>
<center>Reason</center>
</th>
<th>
<center>Banned On</center>
</th>
<th>
<center>Banned Until</center>
</th>
</tr>
</thead>
<tbody>
@ -74,7 +83,8 @@ if(! $retval )
<td><?php if ($row['expires'] == 0) {
echo 'Permanent Ban';
} else {
echo $expiresResult; }?></td>
echo $expiresResult;
} ?></td>
</tr>
<?php }
mysql_close($conn);

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

@ -10,8 +10,7 @@ require 'includes/data/database.php';
$sql = 'SELECT name, reason, muter, time, expires FROM mutes ORDER BY time DESC LIMIT 20';
$retval = mysql_query($sql, $conn);
if(! $retval )
{
if (!$retval) {
die('Could not get data: ' . mysql_error());
}
?>
@ -34,11 +33,11 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
<th><center>Name</center></th>
<th><center>Muted By</center></th>
<th><center>Reason</center></th>
<th><center>Muted On</center></th>
<th><center>Muted Until</center></th>
<th style="text-align: center;">Name</th>
<th style="text-align: center;">Muted By</th>
<th style="text-align: center;">Reason</th>
<th style="text-align: center;">Muted On</th>
<th style="text-align: center;">Muted Until</th>
</tr>
</thead>
<tbody>
@ -60,7 +59,8 @@ if(! $retval )
<td><?php if ($row['expires'] == 0) {
echo 'Permanent Mute';
} else {
echo $expiresResult; }?></td>
echo $expiresResult;
} ?></td>
</tr>
<?php }
mysql_close($conn);

View File

@ -10,8 +10,7 @@ require 'includes/data/database.php';
$sql = 'SELECT name, reason, banner, expires FROM warnings ORDER BY expires DESC LIMIT 20';
$retval = mysql_query($sql, $conn);
if(! $retval )
{
if (!$retval) {
die('Could not get data: ' . mysql_error());
}
?>
@ -34,10 +33,18 @@ if(! $retval )
<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
<th><center>Name</center></th>
<th><center>Warned By</center></th>
<th><center>Reason</center></th>
<th><center>Warned Until</center></th>
<th>
<center>Name</center>
</th>
<th>
<center>Warned By</center>
</th>
<th>
<center>Reason</center>
</th>
<th>
<center>Warned Until</center>
</th>
</tr>
</thead>
<tbody>
@ -54,7 +61,8 @@ if(! $retval )
<td><?php if ($row['expires'] == 0) {
echo 'Permanent Warning';
} else {
echo $expiresResult; }?></td>
echo $expiresResult;
} ?></td>
</tr>
<?php }
mysql_close($conn);