示例#1
0
     $crashes[$crashIndex]['userid'] = '';
     $crashes[$crashIndex]['username'] = '';
     $crashes[$crashIndex]['contact'] = '';
     $crashes[$crashIndex]['description'] = '';
     $crashes[$crashIndex]['logdata'] = '';
     $crashes[$crashIndex]['appname'] = '';
 } elseif ($reader->name == 'bundleidentifier' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['bundleidentifier'] = mysql_real_escape_string(reading($reader, 'bundleidentifier'));
 } elseif ($reader->name == 'version' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['version'] = mysql_real_escape_string(reading($reader, 'version'));
     if (!ValidateString($crashes[$crashIndex]['version'], array('format' => VALIDATE_NUM . VALIDATE_ALPHA . VALIDATE_SPACE . VALIDATE_PUNCTUATION))) {
         die(xml_for_result(FAILURE_XML_VERSION_NOT_ALLOWED));
     }
 } elseif ($reader->name == 'senderversion' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['senderversion'] = mysql_real_escape_string(reading($reader, 'senderversion'));
     if (!ValidateString($crashes[$crashIndex]['senderversion'], array('format' => VALIDATE_NUM . VALIDATE_ALPHA . VALIDATE_SPACE . VALIDATE_PUNCTUATION))) {
         die(xml_for_result(FAILURE_XML_SENDER_VERSION_NOT_ALLOWED));
     }
 } elseif ($reader->name == 'applicationname' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['applicationname'] = mysql_real_escape_string(reading($reader, 'applicationname'));
 } elseif ($reader->name == 'systemversion' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['systemversion'] = mysql_real_escape_string(reading($reader, 'systemversion'));
 } elseif ($reader->name == 'userid' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['userid'] = mysql_real_escape_string(reading($reader, 'userid'));
 } elseif ($reader->name == 'username' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['username'] = mysql_real_escape_string(reading($reader, 'username'));
 } elseif ($reader->name == 'contact' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['contact'] = mysql_real_escape_string(reading($reader, 'contact'));
 } elseif ($reader->name == 'description' && $reader->nodeType == XMLReader::ELEMENT) {
     $crashes[$crashIndex]['description'] = mysql_real_escape_string(reading($reader, 'description'));
 } elseif ($reader->name == 'log' && $reader->nodeType == XMLReader::ELEMENT) {
示例#2
0
    }
    return true;
}
while ($reader->read()) {
    if ($reader->name == "bundleidentifier" && $reader->nodeType == XMLReader::ELEMENT) {
        $bundleidentifier = mysql_real_escape_string(reading($reader, "bundleidentifier"));
    } else {
        if ($reader->name == "version" && $reader->nodeType == XMLReader::ELEMENT) {
            $version = mysql_real_escape_string(reading($reader, "version"));
            if (!ValidateString($version, array('format' => VALIDATE_NUM . VALIDATE_ALPHA . VALIDATE_SPACE . VALIDATE_PUNCTUATION))) {
                die(xml_for_result(FAILURE_XML_VERSION_NOT_ALLOWED));
            }
        } else {
            if ($reader->name == "senderversion" && $reader->nodeType == XMLReader::ELEMENT) {
                $senderversion = mysql_real_escape_string(reading($reader, "senderversion"));
                if (!ValidateString($senderversion, array('format' => VALIDATE_NUM . VALIDATE_ALPHA . VALIDATE_SPACE . VALIDATE_PUNCTUATION))) {
                    die(xml_for_result(FAILURE_XML_SENDER_VERSION_NOT_ALLOWED));
                }
            } else {
                if ($reader->name == "applicationname" && $reader->nodeType == XMLReader::ELEMENT) {
                    $applicationname = mysql_real_escape_string(reading($reader, "applicationname"));
                } else {
                    if ($reader->name == "systemversion" && $reader->nodeType == XMLReader::ELEMENT) {
                        $systemversion = mysql_real_escape_string(reading($reader, "systemversion"));
                    } else {
                        if ($reader->name == "userid" && $reader->nodeType == XMLReader::ELEMENT) {
                            $userid = mysql_real_escape_string(reading($reader, "userid"));
                        } else {
                            if ($reader->name == "contact" && $reader->nodeType == XMLReader::ELEMENT) {
                                $contact = mysql_real_escape_string(reading($reader, "contact"));
                            } else {
示例#3
0
    }
    return true;
}
while ($reader->read()) {
    if ($reader->name == "crashlog") {
        $log = "";
        $version = "";
        $crashappversion = "";
        $contact = "";
        $startmemory = "";
        $endmemory = "";
        $done = "0";
    } else {
        if ($reader->name == "crashappversion" && $reader->nodeType == XMLReader::ELEMENT) {
            $crashappversion = reading($reader, "crashappversion");
            if (!ValidateString($crashappversion, array('format' => VALIDATE_NUM . VALIDATE_SPACE . VALIDATE_PUNCTUATION))) {
                die("<?xml version=\"1.0\" encoding=\"UTF-8\"?><result>0</result>");
            }
        } else {
            if ($reader->name == "version" && $reader->nodeType == XMLReader::ELEMENT) {
                $version = reading($reader, "version");
            } else {
                if ($reader->name == "startmemory" && $reader->nodeType == XMLReader::ELEMENT) {
                    $startmemory = reading($reader, "startmemory");
                } else {
                    if ($reader->name == "endmemory" && $reader->nodeType == XMLReader::ELEMENT) {
                        $endmemory = reading($reader, "endmemory");
                    } else {
                        if ($reader->name == "contact" && $reader->nodeType == XMLReader::ELEMENT) {
                            $contact = reading($reader, "contact");
                        } else {