The password and username were sent almost immediately when I requested them but things have changed at Nadeo since then so I cannot say how long it may take. _________________ Cheers,
Resend the request. You should receive a response in minutes not days.
Make sure the response isn't being filtered by a spam filter (does your mail server do spam filtering?). If you don't get a response try emailing support. _________________ In theory there is no difference between theory and practice, but in practice there is.
case 'RATING' : echo "<td>"; $dataFlag = 1; break;
}
}
/*
====================================
close the current element
====================================
*/
function endElement($parser, $name)
{
switch($name)
{
case 'RANKING' :
//This only needs closing if it is after the first usage
if(!$caption)
{
echo "</td>\n";
}
break;
case 'NBPLAYERS' : break;
//not required
case 'PLAYER' : break;
//not required
case 'LOGIN' : break;
case 'NICKNAME' : echo "</td>\n"; break;
//this is catered for when the data is parsed
case 'PATH' : break;
//this is the last segment of a record, close the row.
case 'RATING' : echo "</td>\n</tr>\n"; break;
}
}
//check for quotes and change to HTML entities
$str = htmlspecialchars ($data,ENT_QUOTES);
//formatting present, we want the dollar sign so replace with a comma+dollar
//first, find all string formatting and change to lower case for processing
//also, find any instances of 2 dollar signs together and change to a single "$$"
//remove any leading commas and double commas
$pattern = array('/^,/', '/,,/');
$replace = array ('', ',');
$str = preg_replace($pattern, $replace, $str);
//set the div flag
$divsFlag = 0;
//check for formatting
$pattern0 = '/\$/';
//check to see if any dollar chars are present, indicates formatting
if(preg_match_all($pattern0, $str, $matches))
{
//use the comma to split the string into an array
$arr = explode(',',$str);
$patterns = '/^\$([a-f0-9]{3})/ig';
//run the array
for($i = 0;$i < count($arr);$i++)
{
$arr[$i] = strtolower(preg_replace('/^\$([a-f0-9]{3})/i' , '#'.'$1', $arr[$i])) ;
$arr[$i] = strtolower(preg_replace('/^\$([a-f0-9]{3})/i' , '#'.'$1', $arr[$i])) ;
$arr[$i] = strtolower(preg_replace('/^\$([a-f0-9]{2})/i' , '#'.'$1'.'0' , $arr[$i])) ;
$arr[$i] = strtolower(preg_replace('/^\$([a-f0-9]{1})/i' , '#'.'$1'.'00' , $arr[$i])) ;
$arr[$i] = strtolower(preg_replace('/^(#0oo)/i' , '#f00' , $arr[$i])) ;
$pattern = array('/$,/');
$replace = array ('');
$arr[$i] = preg_replace($pattern, $replace, $arr[$i]);
}
$temp = array();
for($i = 0;$i < count($arr);$i++)
{
if(isset($arr[$i]))
{
array_push($temp,$arr[$i]);
}
}
$arr = $temp;
for($i = 0;$i < count($arr);$i++)
{
//Check for data in the string, if it is there, separate it
// $dat = (strlen($arr[$i])> 2) ? substr($arr[$i], 2, strlen($arr[$i]) - 2) : '';
//Get the formatting section of the string
// $format = substr($arr[$i], 0, 2);
//create an open div with the requisite formatting
switch(str_replace('$','',$arr[$i]))
{
case "i":
//italic
$arr[$i] = str_replace($arr[$i],"<div style=\"display:inline;font-style:italic;\">",$arr[$i]); $divsFlag++; break;
case "w":
//wide spacing
$arr[$i] = str_replace($arr[$i],"<div style=\"display:inline;letter-spacing:3px;\">",$arr[$i]); $divsFlag++; break;
case "n":
//narrow spacing
$arr[$i] = str_replace($arr[$i],"<div style=\"display:inline;letter-spacing:1px;\">",$arr[$i]); $divsFlag++; break;
case "s":
//shadowed
$arr[$i] = str_replace($arr[$i],"<div style=\"display:inline;\">",$arr[$i]); $divsFlag++; break;
case "m":
//normal setting
$arr[$i] = str_replace($arr[$i],"<div style=\"display:inline;letter-spacing:2px\">",$format); $divsFlag++; break;
case "t":
//changes the text to capitals
$arr[$i] = str_replace($format,"<div style=\"display:inline;text-transform:uppercase;\">",$format); $divsFlag++; break;
case "z":
//reset all
$arr[$i] = str_replace($format,"<div style=\"display:inline;letter-spacing:1px;text-transform:uppercase;font-style:normal;color:#000000;\">",$format); $divsFlag++; break;
case "g":
//default color
$arr[$i] = str_replace($format,"<div style=\"display:inline;color:inherit;\">",$format); $divsFlag++; break;
case "$":
//to write a "$"
$arr[$i] = str_replace($arr[$i],"$",$arr[$i]); break;
default :
//if the string is longer than 4 characters, it is colour formatting with, possibly character data attached
// if(strlen($arr[$i]) >= 4)
// {
$temp1 = substr($arr[$i], 1, 3);
//get any data
$temp2 = substr($arr[$i], 4, strlen($arr[$i]) - 4);
//build a string using the split data
if($temp2 == ' ')
{
$arr[$i] = "<div style=\"display:inline;color:#".$temp1."\"> ";
$divsFlag = $divsFlag + 1;
}
else
{
$arr[$i] = "<div style=\"display:inline;color:#".$temp1."\">".$temp2."</div>";
//if any "div's" have been opened, close them at this stage
if($divsFlag > 0)
{
for($j = 0;$j < $divsFlag;$j++) $arr[$i] .= "</div>";
$divsFlag = 0;
}
}
// }
break;
}
}
//write the result to the page
echo implode('',$arr);
}
else //no formatting, just write to the page
{
echo $data;
}
}
Break the location string into
country/region/district and use
to create markup for the flags
============================
*/
function parseLocation($data)
{
global $pathFlag;
//The start of every string is "World|" which is not required so lose it
$temp1 = substr($data, 6);
//The ballance is a string broken with the pipe "|" char, use that as a delimeter to break into an array
$keywords = explode('|',$temp1,3);
//walk the array
for($i = 0;$i < count($keywords);$i++)
{
//take each segment and make a clean copy for use as an image filename
$cleanData = clean($keywords[$i]);
//the table cell is already open so the first run does not require an opening "td" tag
if($i > 0) echo "<td>";
//write the flag/link markup to the page
echo "<a href=\"http://commons.wikimedia.org/wiki/".$keywords[$i]."\" title=\"The flag of ".$keywords[$i]."\"><img src=\"images/flags/".$cleanData.".png\" alt=\"The flag of ".$keywords[$i]."\" /></a></td>\n";
//Some location only have the country, others the country and region only, and empty cells to compensate
if(count($keywords) == 1) echo "<td> </td>\n<td> </td>\n";
function characterData($parser, $data)
{
global $dataFlag;
global $pathFlag;
global $maxNum;
global $maxFlag;
global $nameFlag;
if($dataFlag)
{
if($pathFlag)
{
//break the location string into components
parseLocation($data);
}
else if($maxFlag)
{
//maxNum passes data client-side for scripting purposes.
$maxNum = $data;
$maxFlag = 0;
}
else if($nameFlag)
{
//send the boat name for formatting
parseName($data);
$nameFlag = 0;
}
else
{
echo $data;
}
}
}
function PIHandler($parser, $target, $data)
{
switch (strtolower($target)) {
case "php":
global $parser_file;
// If the parsed document is "trusted", we say it is safe
// to execute PHP code inside it. If not, display the code
// instead.
if (trustedFile($parser_file[$parser])) {
eval($data);
} else {
printf("Untrusted PHP code: <i>%s</i>",
htmlspecialchars($data));
}
break;
}
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum