-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(26/12/14): Version 1.5.0F ----------------------- 01. * Integrated SourceComms 02. * Added TF2 Modern Theme as Default (Made by IceMan) 03. * Integrated SourceBans Checker 04. * Re-made SourceBans FAQ 05. * Added MvM and HL2 Map Pics 06. + Re-arranged/Renamed Tabs 07. + Added More Robust LFI Patch 08. ! Fixed Plugin Pointing to wrong FAQ link 09. ? Optimized and updated IpToCountry.csv
- Loading branch information
Showing
22 changed files
with
1,623 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
<?php | ||
/** | ||
* ============================================================================= | ||
* SourceBans Webkick feature | ||
* | ||
* @author SteamFriends Development Team | ||
* @version 1.0.0 | ||
* @copyright SourceBans (C)2007 SteamFriends.com. All rights reserved. | ||
* @package SourceBans | ||
* @link http://www.sourcebans.net | ||
* | ||
* @version $Id$ | ||
* ============================================================================= | ||
*/ | ||
include_once '../init.php'; | ||
|
||
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN)) | ||
{ | ||
echo "No Access"; | ||
die(); | ||
} | ||
require_once(INCLUDES_PATH . '/xajax.inc.php'); | ||
$xajax = new xajax(); | ||
//$xajax->debugOn(); | ||
$xajax->setRequestURI("./admin.blockit.php"); | ||
$xajax->registerFunction("BlockPlayer"); | ||
$xajax->registerFunction("LoadServers2"); | ||
$xajax->processRequests(); | ||
$username = $userbank->GetProperty("user"); | ||
|
||
function LoadServers2($check, $type, $length) { | ||
$objResponse = new xajaxResponse(); | ||
global $userbank, $username; | ||
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN)) | ||
{ | ||
$objResponse->redirect("index.php?p=login&m=no_access", 0); | ||
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to use blockit, but doesn't have access."); | ||
return $objResponse; | ||
} | ||
$id = 0; | ||
$servers = $GLOBALS['db']->Execute("SELECT sid, rcon FROM ".DB_PREFIX."_servers WHERE enabled = 1 ORDER BY modid, sid;"); | ||
while(!$servers->EOF) { | ||
//search for player | ||
if(!empty($servers->fields["rcon"])) { | ||
$text = '<font size="1">Searching...</font>'; | ||
$objResponse->addScript("xajax_BlockPlayer('".$check."', '".$servers->fields["sid"]."', '".$id."', '".$type."', '".$length."');"); | ||
} | ||
else { //no rcon = servercount + 1 ;) | ||
$text = '<font size="1">No rcon password.</font>'; | ||
$objResponse->addScript('set_counter(1);'); | ||
} | ||
$objResponse->addAssign("srv_".$id, "innerHTML", $text); | ||
$id++; | ||
$servers->MoveNext(); | ||
} | ||
return $objResponse; | ||
} | ||
|
||
function BlockPlayer($check, $sid, $num, $type, $length) { | ||
$objResponse = new xajaxResponse(); | ||
global $userbank, $username; | ||
$sid = (int)$sid; | ||
$length = (int)$length; | ||
|
||
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN)) | ||
{ | ||
$objResponse->redirect("index.php?p=login&m=no_access", 0); | ||
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to process a playerblock, but doesnt have access."); | ||
return $objResponse; | ||
} | ||
|
||
//get the server data | ||
$sdata = $GLOBALS['db']->GetRow("SELECT ip, port, rcon FROM ".DB_PREFIX."_servers WHERE sid = '".$sid."';"); | ||
|
||
//test if server is online | ||
if($test = @fsockopen($sdata['ip'], $sdata['port'], $errno, $errstr, 2)) { | ||
@fclose($test); | ||
require_once(INCLUDES_PATH . "/CServerRcon.php"); | ||
|
||
$r = new CServerRcon($sdata['ip'], $sdata['port'], $sdata['rcon']); | ||
|
||
if(!$r->Auth()) | ||
{ | ||
$GLOBALS['db']->Execute("UPDATE ".DB_PREFIX."_servers SET rcon = '' WHERE sid = '".$sid."' LIMIT 1;"); | ||
$objResponse->addAssign("srv_$num", "innerHTML", "<font color='red' size='1'>Wrong RCON Password, please change!</font>"); | ||
$objResponse->addScript('set_counter(1);'); | ||
return $objResponse; | ||
} | ||
$ret = $r->rconCommand("status"); | ||
|
||
// show hostname instead of the ip, but leave the ip in the title | ||
require_once("../includes/system-functions.php"); | ||
$hostsearch = preg_match_all('/hostname:[ ]*(.+)/',$ret,$hostname,PREG_PATTERN_ORDER); | ||
$hostname = trunc(htmlspecialchars($hostname[1][0]),25,false); | ||
if(!empty($hostname)) | ||
$objResponse->addAssign("srvip_$num", "innerHTML", "<font size='1'><span title='".$sdata['ip'].":".$sdata['port']."'>".$hostname."</span></font>"); | ||
|
||
$gothim = false; | ||
$search = preg_match_all(STATUS_PARSE,$ret,$matches,PREG_PATTERN_ORDER); | ||
//search for the steamid on the server | ||
foreach($matches[3] AS $match) { | ||
if(substr($match, 8) == substr($check, 8)) { | ||
// gotcha!!! kick him! | ||
$gothim = true; | ||
$GLOBALS['db']->Execute("UPDATE `".DB_PREFIX."_comms` SET sid = '".$sid."' WHERE authid = '".$check."' AND RemovedBy IS NULL;"); | ||
$requri = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], "pages/admin.blockit.php")); | ||
$kick = $r->sendCommand("sc_fw_block ".$type." ".$length." ".$match); | ||
$objResponse->addAssign("srv_$num", "innerHTML", "<font color='green' size='1'><b><u>Player Found & blocked!!!</u></b></font>"); | ||
$objResponse->addScript("set_counter('-1');"); | ||
return $objResponse; | ||
} | ||
} | ||
|
||
if(!$gothim) { | ||
$objResponse->addAssign("srv_$num", "innerHTML", "<font size='1'>Player not found.</font>"); | ||
$objResponse->addScript('set_counter(1);'); | ||
return $objResponse; | ||
} | ||
} else { | ||
$objResponse->addAssign("srv_$num", "innerHTML", "<font color='red' size='1'><i>Can't connect to server.</i></font>"); | ||
$objResponse->addScript('set_counter(1);'); | ||
return $objResponse; | ||
} | ||
} | ||
$servers = $GLOBALS['db']->Execute("SELECT ip, port, rcon FROM ".DB_PREFIX."_servers WHERE enabled = 1 ORDER BY modid, sid;"); | ||
$theme->assign('total', $servers->RecordCount()); | ||
$serverlinks = array(); | ||
$num = 0; | ||
while(!$servers->EOF) { | ||
$info = array(); | ||
$info['num'] = $num; | ||
$info['ip'] = $servers->fields["ip"]; | ||
$info['port'] = $servers->fields["port"]; | ||
array_push($serverlinks, $info); | ||
$num++; | ||
$servers->MoveNext(); | ||
} | ||
$theme->assign('servers', $serverlinks); | ||
$theme->assign('xajax_functions', $xajax->printJavascript("../scripts", "xajax.js")); | ||
$theme->assign('check', $_GET["check"]);// steamid or ip address | ||
$theme->assign('type', $_GET['type']); | ||
$theme->assign('length', $_GET['length']); | ||
|
||
$theme->left_delimiter = "-{"; | ||
$theme->right_delimiter = "}-"; | ||
$theme->display('page_blockit.tpl'); | ||
$theme->left_delimiter = "{"; | ||
$theme->right_delimiter = "}"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?php | ||
/** | ||
* ============================================================================= | ||
* Bans page | ||
* | ||
* @author SteamFriends Development Team | ||
* @version 1.0.0 | ||
* @copyright SourceBans (C)2007 SteamFriends.com. All rights reserved. | ||
* @package SourceBans | ||
* @link http://www.sourcebans.net | ||
* | ||
* @version $Id: admin.bans.php 286 2009-07-12 18:49:48Z peace-maker $ | ||
* ============================================================================= | ||
*/ | ||
|
||
global $userbank, $theme; if(!defined("IN_SB")){echo "You should not be here. Only follow links!";die();}if(isset($GLOBALS['IN_ADMIN']))define('CUR_AID', $userbank->GetAid()); | ||
|
||
|
||
if(isset($_GET["rebanid"])) | ||
{ | ||
echo '<script type="text/javascript">xajax_PrepareReblock("'.$_GET["rebanid"].'");</script>'; | ||
}elseif(isset($_GET["blockfromban"])) | ||
{ | ||
echo '<script type="text/javascript">xajax_PrepareBlockFromBan("'.$_GET["blockfromban"].'");</script>'; | ||
}elseif((isset($_GET['action']) && $_GET['action'] == "pasteBan") && isset($_GET['pName']) && isset($_GET['sid'])) { | ||
echo "<script type=\"text/javascript\">ShowBox('Loading..','<b>Loading...</b><br><i>Please Wait!</i>', 'blue', '', true);document.getElementById('dialog-control').setStyle('display', 'none');xajax_PasteBlock('".(int)$_GET['sid']."', '".addslashes($_GET['pName'])."');</script>"; | ||
} | ||
|
||
echo '<div id="admin-page-content">'; | ||
// Add Ban | ||
echo '<div id="0" style="display:none;">'; | ||
$theme->assign('permission_addban', $userbank->HasAccess(ADMIN_OWNER|ADMIN_ADD_BAN)); | ||
$theme->display('page_admin_comms_add.tpl'); | ||
|
||
?> | ||
|
||
<script type="text/javascript"> | ||
function changeReason(szListValue) | ||
{ | ||
$('dreason').style.display = (szListValue == "other" ? "block" : "none"); | ||
} | ||
function ProcessBan() | ||
{ | ||
var err = 0; | ||
var reason = $('listReason')[$('listReason').selectedIndex].value; | ||
|
||
if (reason == "other") | ||
reason = $('txtReason').value; | ||
|
||
if(!$('nickname').value) | ||
{ | ||
$('nick.msg').setHTML('You must enter the nickname of the person you are banning'); | ||
$('nick.msg').setStyle('display', 'block'); | ||
err++; | ||
}else | ||
{ | ||
$('nick.msg').setHTML(''); | ||
$('nick.msg').setStyle('display', 'none'); | ||
} | ||
|
||
if($('steam').value.length < 10) | ||
{ | ||
$('steam.msg').setHTML('You must enter a valid STEAM ID or Community ID'); | ||
$('steam.msg').setStyle('display', 'block'); | ||
err++; | ||
}else | ||
{ | ||
$('steam.msg').setHTML(''); | ||
$('steam.msg').setStyle('display', 'none'); | ||
} | ||
|
||
if(!reason) | ||
{ | ||
$('reason.msg').setHTML('You must select or enter a reason for this block.'); | ||
$('reason.msg').setStyle('display', 'block'); | ||
err++; | ||
}else | ||
{ | ||
$('reason.msg').setHTML(''); | ||
$('reason.msg').setStyle('display', 'none'); | ||
} | ||
|
||
if(err) | ||
return 0; | ||
|
||
xajax_AddBlock($('nickname').value, | ||
$('type').value, | ||
$('steam').value, | ||
$('banlength').value, | ||
reason); | ||
} | ||
</script> | ||
</div> |
Oops, something went wrong.