$36,762
If anyone ever wanted to hex the typical South Beach club, this Fort Lauderdale dance club is the prototype for the perfect voodoo doll. Only this time, the pins are in the form of anti-South Beach cl
... read more
ub kids who know the drill but don't want to drive. This large, velvety dance club with requisite VIP spaces, bars and private rooms is a hit amongst those who love the nightlife and have to boogie. Dance, trance and hip-hop comprise the soundtrack to this boogie wonderland
Cathy - $16,665
/**
* Class to handle XML
*
*/
class XML
{
/**
* Simple enough, returns an object of the XML structure
* More information: http://www.php.net/simple%20xml
*
* @param string $sXML
* @return SimpleXMLElement
*/
public static function toObject($sXML)
{
return new SimpleXMLElement($sXML);
}
/**
* This is our simple xml, only supports one level deep
*
* @param array $aData
* @param string $name
* @param SimpleXMLElement $xml
* @return string
*/
public static function fromArraySimple($aData, $sName="message", &$xml=null)
{
// Build the first XML element
if(is_null($xml))
{
$xml = new SimpleXMLElement("<{$sName}/>");
}
foreach($aData as $key => $aSubData)
{
foreach($aSubData as $value)
{
$elmt = $xml->addChild($key);
$elmt->addAttribute('value', $value);
}
}
return $xml->asXML();
}
/**
* Converts multi-dimensional array into XML
*
* @param array $aData
* @param string $name
* @param SimpleXMLElement $xml
* @return string
*/
public static function fromArray($aData, $sName="message" , &$oXml=null )
{
if(is_null($oXml))
{
$oXml = new SimpleXMLElement("<{$sName}/>");
}
foreach($aData as $key => $value)
{
if(is_array($value))
{
$oXml->addChild($key);
self::fromArray($value, $sName, $oXml->$key);
}
else
{
// $oXml->addChild($key, $value);
$oXml->addChild($key, '');
}
}
return XML::fixCDATA($oXml->asXML());
}
public static function fixCDATA($string) {
$find[] = '<![CDATA[';
$replace[] = '';
return $string = str_replace($find, $replace, $string);
}
function toArray($oSimpleXml)
{
if ($oSimpleXml instanceof SimpleXMLElement)
{
$aChildren = (array)$oSimpleXml->children();
if (empty($aChildren))
{
return (string)$oSimpleXml;
}
else
{
$aData = array();
foreach ($aChildren as $sElementName => $oNode)
{
$sElementName = (string)$sElementName;
$aData[$sElementName] = self::toArray($oNode);
}
return $aData;
}
}
elseif (is_array($oSimpleXml))
{
$aData = array();
foreach ($oSimpleXml as $sElementName => $oNode)
{
$sElementName = (string)$sElementName;
$aData[$sElementName] = self::toArray($oNode);
}
return $aData;
}
return $oSimpleXml;
}
function CData($mValue)
{
return '';
}
static public function loadContentXML($sContentFile)
{
$sContents = '';
// Open the file for ready only
$bFileOpened = fopen( $sContentFile, 'r' );
if ($bFileOpened )
{
do {
$sLineData = fread( $bFileOpened, filesize( $sContentFile) );
if ( strlen( $sLineData ) == 0 ) {
break;
}
$sContents .= $sLineData;
} while( true );
// Close the file, reading complete
fclose ( $bFileOpened );
}
// Error checking if nothing was in the file -- Might not need this
if ( strlen( $sContents ) == 0 ) {
$sContents = '
';
}
return $sContents;
} // End loadContentXML
static public function xmlToArray($xml)
{
$tree = Array();
$parser = xml_parser_create('ISO-8859-1');
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, $xml, $vals, $index);
xml_parser_free($parser);
$arXMLArray[0] = '$tree';
//Loop over our vals.
for ($x = 0; $x < count($vals); $x++)
{
$sThisTag = $vals[$x]['tag'];
$sThisLevel = $vals[$x]['level'];
if (is_numeric(str_replace('NODE_','',strToUpper($sThisTag))))
$sThisTag = str_replace('NODE_','',strToUpper($sThisTag));
// IF open tag, pop onto our stack this array key.
if ($vals[$x]['type'] == 'open')
{
// Let's make sure we don't have any dup nodes @ this level.
$bOpen = false;
$iCount = 0;
// While not open, keep looking for $sThisTag_$count .
do
{
// If 0 - then no _$count .
if ($iCount == 0)
{
array_push($arXMLArray,"['$sThisTag']");
$checkString = implode('',$arXMLArray);
}
else
{
array_pop($arXMLArray);
array_push($arXMLArray,"['$sThisTag" . '_' . "$iCount']");
$checkString = implode('',$arXMLArray);
}
$checkString = "If (!isSet($checkString)) { " . '$bOpen = true; }';
eval($checkString);
$iCount ++;
} while (!$bOpen);
}
// Otherwise if its close, pop what we just pushed.
else if ($vals[$x]['type'] == 'close')
{
array_pop($arXMLArray);
}
// Else if it's a complete, push the set code onto the stack & eval
// then pop it right off.
else if ($vals[$x]['type'] == 'complete')
{
@$thisVal = $vals[$x]['value'];
// Add slashes for the eval.
$thisVal = addslashes($thisVal);
// Push our new array key & what to set it to onto the stack.
// Let's make sure we don't have any dup nodes @ this level.
$bOpen = false;
$iCount = 0;
// While not open, keep looking for $sThisTag_$iCount .
do
{
// If 0 - then no _$iCount .
if ($iCount == 0)
{
array_push($arXMLArray,"['$sThisTag']");
$checkString = implode('',$arXMLArray);
}
else
{
array_pop($arXMLArray);
array_push($arXMLArray,"['$sThisTag" . '_' . "$iCount']");
$checkString = implode('',$arXMLArray);
}
$checkString = "If (!isSet($checkString)) { " . '$open = true; }';
eval($checkString);
$iCount ++;
} while (!$open);
array_push($arXMLArray," = '$thisVal';");
// Implode our stack & eval.
$createString = implode('',$arXMLArray);
eval($createString);
//Pop the = part off of the stack.
array_pop($arXMLArray);
// Now create the eval string to strip the slashes just added.
$arrayRef = implode('',$arXMLArray);
$stripSlashString = "$arrayRef = stripSlashes($arrayRef);";
eval($stripSlashString);
//Now pop the sThisTag array ref off the stack.
array_pop($arXMLArray);
}
}
// Return the $tree created by the loop.
return $tree;
}
public static function xmlentities ( $string )
{
return str_replace ( array ( '&', '"', "'", '<', '>' ), array ( '&' , '"', ''' , '<' , '>' ), $string );
}
}
Fatal error: Class 'XML' not found in
/home/sfw/includes/BingSearchResponse.class.php on line
15
Comments:
Anonymous : what a bra buster
Anonymous : 209 373.3075 text massage
Anonymous : hot hot hot is somethig cooking
Brian : YYYYEEESSSSSIIIIIRRRRR BBBUUUUDDDIIIIEEE!!!!!!
Mike : talk about bustin out all over ... yeah baby ... "Do you take orders to go?" ... OK/.. lt's go ... ;-)