Afternoon, I have tried troubleshooting this issue, I have reviewed your forums and still cant seem to find my error.
I am think it may be a conflict with a linux vs windows server.? not sure.
Below is a link to the tool I am using
http://killersr.us/clanadminbandoc/index.php
Adding and displaying is fine, but when I go to view the "resource" file I get the following error.
Parse error: syntax error, unexpected T_STRING in /usr/local/psa/home/vhosts/killersr.us/httpdocs/clanadminbandoc/resource.php on line 78
However line #78 is my closing php tag.? In the resource.php
Much thanks in advance for any assistance 🙂
<?php
include("dbconnect.php");
$id = $_GET['id'];
$message = $_GET['message'];
if(!isset($_GET['message'])) $message = false;
$query = mysql_query("SELECT * FROM `data` WHERE `id` = '$id'");
$data = mysql_fetch_array($query);
extract($data);
if(strstr($type, "text") || strstr($type, "octet-stream"))
{
echo "<a href='resource.php?id=$id&message=true'> Display Messages Only </a> | <a href='resource.php?id=$id&message=false'> Display All Console Messages </a> <br>";
$data = base64_decode($data);
$ary = explode(chr(10), $data);
for($i = 0; $i < count($ary); $i++)
{
if(strstr($ary[$i], "ScriptLog: Console Message: "))
{
$tmp = explode("ScriptLog: Console Message: ", $ary[$i]);
if($message == "true" && strstr($tmp[1], "message"))
{
echo Color($tmp[1], 1)."<br>";
}
else if($message != "true")
{
echo Color($tmp[1], 1)."<br>";
}
}
}
}
else
{
header("Content-type: $type");
echo base64_decode($data);
}
function Color($tempname,$docolor)
{
$colagain=1;
$maxcols=0;
$data1=$tempname;
while($colagain==1 && $maxcols<=50)
{
if(preg_match("#(.+)(.+)#",$data1,$match))
{
$data1=$match[1];
$data2=$match[2];
$maxcols++;
$snamehex = bin2hex(substr($data2, 0, 1));
$snamehex .= bin2hex(substr($data2, 1, 1));
$snamehex .= bin2hex(substr($data2, 2, 1));
$tempname = str_replace ("$shex1$shex2$shex3", "", substr($data2, 3, 250));
if($docolor==1) $coloredname = "<font color=\"#$snamehex\">$tempname</font>$coloredname";
else $coloredname = "$tempname$coloredname";
$colagain=1;
}
else
{
$firstbyte = substr($data1, 0, 1);
if($firstbyte=="")
{
$snamehex = bin2hex(substr($data1, 1, 1));
$snamehex .=bin2hex(substr($data1, 2, 1));
$snamehex .=bin2hex(substr($data1, 3, 1));
$tempname = str_replace ("$shex1$shex2$shex3", "", substr($data1, 4, 250));
if($docolor==1) $coloredname = "<font color=\"#$snamehex\">$tempname</font>$coloredname";
else $coloredname = "$tempname$coloredname";
}
else
{
$tempname = substr($data1, 0, 250);
$coloredname = "$tempname$coloredname";
}
$colagain=0;
}
}
if($docolor==1) $coloredname = "<b>$coloredname</b>";
return $coloredname;
}
?>LINE 78