if ($testXmlFile != '') { $xmlStr = file_get_contents($testXmlFile); if (!file_exists($dir . '/' . basename($xmlName[0]))) { touch($dir . '/' . basename($xmlName[0])); $handle = fopen($dir . '/' . basename($xmlName[0]), 'w+'); fwrite($handle, $xmlStr); fclose($handle); } include_once "xml2array.php"; $xml_debugger = new XML2Array(); if ($xmlStr != '') { $xmlStr = preg_replace('/\\<transition(.*?)\\>/', '<transition empty="true"$1>', $xmlStr); } $arrXml = $xml_debugger->parse($xmlStr); if (!is_array($arrXml)) { $xmlStr = cu3er__our_fopen($testXmlFile); if ($xmlStr == false) { echo $cu3er_messages['missingXML']; } else { $xmlStr = preg_replace('/\\<transition(.*?)\\>/', '<transition empty="true"$1>', $xmlStr); $arrXml = $xml_debugger->parse($xmlStr); } } if (!is_array($arrXml)) { echo $cu3er_messages['notXML']; } else { $xml_parse = simplexml_load_string($xmlStr); /*@chmod($testXmlFile, 0777); @chmod($cu3er_pathDir . '/CU3ER.swf', 0777);*/ cu3er__chmodDir($dir, 0777, 0777); $arrXml = cu3er__array_remove_empty($arrXml['data']);
function cu3er__isImage($img) { if ($img != '') { $handle = cu3er__our_fopen($img); if ($handle != '') { return true; } } return false; }