TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,911
  • Total Topics: 21,307
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 671
  • Total: 671

Gameserver ScreenShot Viewer: Neddie's PBSSView

Started by Hairy, August 29, 2009, 06:38:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hairy

Important: If the viewer does not work it's likley that your webhost has disabled the PHP function fopen()

Test the viewer in action here: http://www.samclan.com/index.php?page=78

About the viewer:
I have done some re-coding so Neddie's PBSSView Version 2.0.5 is able to be used within a TP article and has only been tested using TinyPortal v1.0 beta 4 and SMF 1.1.9

The viewer had been coded for America's Army but it also works for other types of games.

The viewer will show the selected players GUID which is handy for searching anticheat sites.

You can 'examine' each screenshot which will allow you to adjust the brightness/contrast and zoom in/out.

If the stylesheet configuration is not suitable for your site: You can reinstate the following backups included (remove the .bak from the files after renaming the current files) and adjust them yourself:
\css\style.css.bak
\class\htmReader.class.php.bak

Instructions:
Unzip the attached ss.zip then do the following:

Copyright (C) 2004  Niklas HÃ¥kansson <niklas.hk@telia.com>

This script is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public.

************************************************************
* Setup instructions:
************************************************************

* config.php
You can edit this file with i.e Wordpad.

* Clan server/Favorite server:

Is the default server a GOAA server (true/false):
$serverIsGOAA = true;

If the default server is a GOAA server
$serverAddress = "xx.xx.xx.xx";

If the default server isn't a GOAA and not using the GOAA structure
$serverAddress = "myserver.com/myfolder";

It can also be left blank:
$serverAddress = "";

* Applet Viewer:
If you want to have the Applet Viewer you must first set the directory applet/pbss to CHMOD 777 (How to -> http://www.zachjorgensen.net/za/chmodtutor.html).
The reason for this is that the image is temporary placed in this directory so the applet can access the image (java.security). This image is by automatic removed
so this directory wont grow with images. All images older then 1 minute is deleted every time some using this viewer.

Set if you want to use the appletViewer: $useAppletViewer = true/false;

Notice: Even if you set $useAppletViewer=true; and the directory applet/pbss is not set to CHMOD 777, the Javascript examine will be shown.

If your webapplication is on a Windows Server platform you should set this variable to true,
this because Windows Server doesn't handles CHMOD. Also make sure to set correct permission in
the applet/pbss folder, either you do it your self or your host is doing it.

$isWinServer = true;


Want to give your users the option the get a stamped image for saving, an image merged to the original pbss i.e a cheat-logo, site logo etc.
It works fine with interlaced images as long as they are in .png
Note: Since PHP 4.3 there is a bundled version of the GD lib.

$useStamp = true;




TinyPortal setup:
Put the following in a PHP article:

/*
Copyright (C) 2005  Niklas HÃ¥kansson <niklas.hk@telia.com>

This script is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public.

*/
include "ss/config.php";
include "ss/class/htmReader.class.php";

$htmReader = new htmReader;

if(isset($_POST['server']) and isset($_POST['players'])) {
if($_POST['servertype']=="goaa") $serverIsGOAA=true;
else $serverIsGOAA=false;
$serverAddress = $_POST['server'];
$serverAddress = str_replace("http://","",$serverAddress);
if(strlen($serverAddress)>0 and substr($serverAddress,strlen($serverAddress)-1,strlen($serverAddress))=="/")
$serverAddress = substr($serverAddress,0,strlen($serverAddress)-1);
$htmReader -> htmRead($serverAddress,$htmName,$serverIsGOAA);

if($_POST['players']!="0")
{
$pCombo = $htmReader -> getPlayersCombo($_POST['players']);
setServerCookie($serverAddress);
if($aasaScan and isset($_POST['assa_guid'])) $privBanResult = $htmReader -> getPrivBanGuid($aPath,$_POST['assa_guid']);
else $displayImages = $htmReader -> getPlayersImg($_POST['players'],$serverAddress,$serverIsGOAA,$appletWidth,$appletHeight,$useStamp,$stampWidth,$stampHeight);
$sButton = "Search";
$disablePlayerCombo = false;
} else {
$displayImages = $htmReader -> getAllPlayersImg($serverAddress,$serverIsGOAA,$appletWidth,$appletHeight,$useStamp,$stampWidth,$stampHeight);
$pCombo = $htmReader -> getPlayersCombo("0");
setServerCookie($serverAddress);
$sButton = "Search";
$disablePlayerCombo = false;
}
} else if(isset($_POST['server']) and !isset($_POST['players'])) {
if($_POST['servertype']=="goaa") $serverIsGOAA=true;
else $serverIsGOAA=false;
$serverAddress = $_POST['server'];
$serverAddress = str_replace("http://","",$serverAddress);
if(strlen($serverAddress)>0 and substr($serverAddress,strlen($serverAddress)-1,strlen($serverAddress))=="/")
$serverAddress = substr($serverAddress,0,strlen($serverAddress)-1);
$htmReader -> htmRead($serverAddress,$htmName,$serverIsGOAA);
$pCombo = $htmReader -> getPlayersCombo("0");
setServerCookie($serverAddress);
$sButton = "Search";
$disablePlayerCombo = false;
} else {
$sButton = "Refresh";
$pCombo = $htmReader -> getPlayersCombo("0");
$disablePlayerCombo = true;
}

function setServerCookie($serverAddress)
{
$cookie_info = array();
$isOK = true;
if (isset($_COOKIE["pbssview"]))
{
$cookie_info = explode("|", $_COOKIE['pbssview']);
for($i=0;$i<count($cookie_info);$i++)
{
if($cookie_info[$i]==$serverAddress)
{
$isOK = false;
break;
}
}
if($isOK) setcookie ("pbssview", "", time() - 3600);
}
  if($isOK)
{
$cookie_data = $serverAddress."|";
if(count($cookie_info)>0) $cookie_data .= $cookie_info[0]."|";
if(count($cookie_info)>1) $cookie_data .= $cookie_info[1]."|";
if(count($cookie_info)>2) $cookie_data .= $cookie_info[2]."|";
if(count($cookie_info)>3) $cookie_data .= $cookie_info[3]."|";
setcookie ("pbssview",$cookie_data, time()+60*60*24*30);
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>.::PBSSView::.</title>
<link rel="STYLESHEET" type="text/css" href="ss/css/style.css">
<script src="ss/js/openWin.js" type="text/javascript"></script>
</head>
<script language="javascript">
guidArray = new Array();
<?$htmReader -> writeGuidArrays();?>
function setGuid()
{
if(document.pbss.players.options.selectedIndex>0) document.pbss.guid.value=guidArray[document.pbss.players.options.selectedIndex-1];
else document.pbss.guid.value="";
}
function setServer()
{
document.pbss.server.value=document.pbss.latest.options[document.pbss.latest.options.selectedIndex].value;
document.pbss.players.disabled=true;
}
</script>
<body>
<table cellpadding="2" cellspacing="2" width="560" align="center" class="mainTable">
<tr>
<td colspan="3" class="headTD">
<table cellpadding="0" cellspacing="0">
<tr>
<td><img src="ss/img/aaIcon.jpg" width="14" height="14" alt="" border="0"></td>
<td class="headTD">  America's Army: PBSSView</td>
</tr>
</table>
</td>
</tr>
<form name="pbss" action="" method="post">
<tr>
<td class="boldbread" valign="top">Server type:</td>
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<?if($serverIsGOAA) {?>
<input type="radio" name="servertype" value="goaa" title="Using a single IP adress" checked>
<?} else {?>
<input type="radio" name="servertype" value="goaa" title="Using a single IP adress">
<?}?>
</td>
<td class="bread">GOAA  </td>
<td>
<?if(!$serverIsGOAA) {?>
<input type="radio" name="servertype" value="other" title="Using a different path then GOAA, i.e: myserver.com/pbss" checked>
<?} else {?>
<input type="radio" name="servertype" value="other" title="Using a different path then GOAA, i.e: myserver.com/pbss">
<?}?>
</td>
<td class="bread">Other</td>
</tr>
</table>
</td>
<td rowspan="4" valign="top">
<table cellpadding="2" cellspacing="0">
<tr>
<td class="boldbread" valign="top">Players:</td>
<td valign="top">
<?if($disablePlayerCombo) {?>
<select name="players" class="input" style="width:180px;" size="7" onChange="setGuid()" disabled>
<?} else {?>
<select name="players" class="input" style="width:180px;" size="7" onChange="setGuid()">
<?}?>
<?=$pCombo?>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="boldbread" valign="top">Current Server:</td>
<td valign="top"><input type="Text" name="server" value="<?=$serverAddress?>" class="input" style="width:160px;" onblur="document.pbss.players.disabled=true;" onfocus="document.pbss.players.disabled=true;" onClick="document.pbss.players.disabled=true;"></td>

</tr>
<tr>
<td class="boldbread" valign="top">Latest Servers:</td>
<td valign="top" colspan="2">
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<select name="latest" class="input" style="width:160px;" size="1">
<?
$latestExist = false;
if (isset($_COOKIE["pbssview"])) {
$latestExist = true;
$cookie_info = explode("|", $_COOKIE['pbssview']);  
for($i=0;$i<count($cookie_info);$i++)
{
if(strlen($cookie_info[$i])>4) echo "<option value=\"".$cookie_info[$i]."\">".$cookie_info[$i]."</option>\n";
}
}
?>
</select>
</td>
<td class="bread">  
<?if($latestExist) {?>
<input type="button" value="Set" class="input" onClick="setServer()">
<?} else {?>
<input type="button" value="Set" class="input" onClick="setServer()" disabled>
<?}?>
</td>
</tr>
</table>

</td>
</tr>
<tr>
<td class="boldbread" valign="top">Guid:</td>
<td valign="top" colspan="2">
<?if(isset($_POST['players']) and $_POST['players']!="0") {?>
<input type="Text" name="guid" value="<?=$_POST['players']?>" class="input2" style="width:220px;" readonly>    
<?} else {?>
<input type="Text" name="guid" value="" class="input2" style="width:220px;" readonly>    
<?}?>
</td>
</tr>
<tr>
<td></td>
<td><input type="reset" value="Reset" class="input">  <input type="submit" value="<?=$sButton?>" class="input"></td>
</tr>
</form>
</table>
<?if(isset($_POST['assa_guid'])) {?>
<br>
<table cellpadding="2" cellspacing="2" width="560" align="center" class="mainTable">
<tr>
<td>
<table cellpadding="2" cellspacing="0" width="550">
<tr>
<td class="headTD" width="47"><img src="img/aasa_icon.gif" width="47" height="16" alt="" border="0"></td>
<td class="headTD">AASA Guid Search</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left">
<table cellpadding="2" cellspacing="0" border="1" width="550">
<?=$privBanResult?>
</table>
</td>
</tr>
</table>
<?} else if($aasaScan and !isset($_POST['assa_guid']) and isset($_POST['players']) and $_POST['players']!="0") {?>
<br>
<table cellpadding="2" cellspacing="2" width="560" align="center" class="mainTable">
<tr>
<td>
<table cellpadding="2" cellspacing="0" width="550">
<tr>
<td class="headTD" width="47"><img src="img/aasa_icon.gif" width="47" height="16" alt="" border="0"></td>
<td class="headTD">AASA Guid Search</td>
</tr>
</table>
</td>
</tr>
<form name="aasa" action="" method="post">
<input type="hidden" name="server" value="<?=$serverAddress?>">
<input type="hidden" name="servertype" value="<?=$_POST['servertype']?>">
<input type="hidden" name="players" value="<?=$_POST['players']?>">
<tr>
<td align="left">
<table cellpadding="2" cellspacing="0">
<tr>
<td class="boldbread">Guid:</td>
<td class="boldbread"><input type="Text" name="assa_guid" value="<?=$_POST['players']?>" class="input2" style="width:220px;" readonly></td>
<td><input type="submit" value="Search" class="input"></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<?}?>
<?if(isset($_POST['server']) and isset($_POST['players'])) {?>
<?if(!isset($_POST['assa_guid'])) {?>
<br>
<table cellpadding="2" cellspacing="2" width="560" align="center" class="mainTable">
<?=$displayImages?>
</table>
<?}
}?>
<br>
<table cellpadding="2" cellspacing="2" width="560" align="center" class="mainTable">
<tr>
<td class="bread" align="center">
<!-- Please leave this as it is, HoOaH? -->
<a href="http://home.pages.at/neddie/" class="breadLnk" target="_blank">Neddie's PBSSView Version 2.0.5</a> Ã,© 2005<br>
Author: Neddie a.k.a Niklas HÃ¥kansson<br>
Modified by <a href="http://www.samclan.com" class="breadLnk" target="_blank">=SAMS=Hairy</a> to work with <a href="http://www.simplemachines.org/" class="breadLnk" target="_blank">SMF</a> and <a href="http://www.tinyportal.net/" class="breadLnk" target="_blank">TinyPortal</a><br>
<!-- Please leave this as it is, HoOaH? -->
</td>

</tr>
</table>
</body>
</html>



Enjoy!  :coolsmiley:

Renegd98

Thanks....  I am also a AA2 & AA3 player and have verified this works...  You do need to remove the <?PHP at the end of the code though....


This website is proudly hosted on Crocweb Cloud Website Hosting.