Beispiel #1
0
                            $url = "Link: " . $crash_url . "admin/crashes.php?bundleidentifier=" . $bundleidentifier . "&version=" . $version . "&groupid=" . $log_groupid . "\n\n";
                        } else {
                            $url = "\n";
                        }
                        $message = "Version " . $version . " has a new type of crash!\n" . $url . "Sent at " . date('H:i:s');
                        mail($notify_emails, $subject, $message, 'From: ' . $mail_from . "\r\n");
                    }
                }
            }
        }
    }
    // now insert the crashlog into the database
    $query = "INSERT INTO " . $dbcrashtable . " (userid, contact, bundleidentifier, applicationname, systemversion, platform, senderversion, version, description, log, groupid, timestamp) values ('" . $userid . "', '" . $contact . "', '" . $bundleidentifier . "', '" . $applicationname . "', '" . $systemversion . "', '" . $platform . "', '" . $senderversion . "', '" . $version . "', '" . $description . "', '" . mysql_real_escape_string($logdata) . "', '" . $log_groupid . "', '" . date("Y-m-d H:i:s") . "')";
    $result = mysql_query($query) or die(xml_for_result(FAILURE_SQL_ADD_CRASHLOG));
    $new_crashid = mysql_insert_id($link);
    // if this crash log has to be manually symbolicated, add a todo entry
    if ($symbolicate) {
        $query = "INSERT INTO " . $dbsymbolicatetable . " (crashid, done) values (" . $new_crashid . ", 0)";
        $result = mysql_query($query) or die(xml_for_result(FAILURE_SQL_ADD_SYMBOLICATE_TODO));
    }
} else {
    if ($acceptlog == false) {
        mysql_close($link);
        die(xml_for_result(FAILURE_INVALID_INCOMING_DATA));
    }
}
/* schliessen der Verbinung */
mysql_close($link);
/* Ausgabe der Ergebnisse in XML */
echo xml_for_result($fix_status);
Beispiel #2
0
                                $url = "Link: " . $crash_url . "admin/crashes.php?bundleidentifier=" . $bundleidentifier . "&version=" . $version . "&groupid=" . $log_groupid . "\n\n";
                            } else {
                                $url = "\n";
                            }
                            $message = "Version " . $version . " has a new type of crash!\n" . $url . "Sent at " . date('H:i:s');
                            mail($notify_emails, $subject, $message, 'From: ' . $mail_from . "\r\n");
                        }
                    }
                }
            }
        }
        // only add the data if the version is not set to discontinued
        if ($version_status != VERSION_STATUS_DISCONTINUED) {
            // now insert the crashlog into the database
            $query = "UPDATE " . $dbcrashtable . " SET groupid=" . $log_groupid . " WHERE id=" . $crashid;
            $result = mysql_query($query) or die(xml_for_result(FAILURE_SQL_ADD_CRASHLOG));
        }
    }
    mysql_free_result($result1);
}
mysql_close($link);
?>
<html>
<head>
    <META http-equiv="refresh" content="0;URL=groups.php?&bundleidentifier=<?php 
echo $bundleidentifier;
?>
&version=<?php 
echo $version;
?>
">
Beispiel #3
0
            // version is not available, so add it with status VERSION_STATUS_AVAILABLE
            $query = 'INSERT INTO ' . $dbversiontable . " (bundleidentifier, version, status, notify) values ('" . $crash['bundleidentifier'] . "', '" . $crash['version'] . "', " . VERSION_STATUS_UNKNOWN . ', ' . $notify_default_version . ')';
            $result = mysql_query($query) or die(xml_for_result(FAILURE_SQL_ADD_VERSION));
        } else {
            $row = mysql_fetch_row($result);
            $crash['version_status'] = $row[1];
            $notify = $row[2];
            mysql_free_result($result);
        }
        if ($crash['version_status'] == VERSION_STATUS_DISCONTINUED) {
            $lastError = FAILURE_VERSION_DISCONTINUED;
            continue;
        }
        $error = groupCrashReport($crash, $link, $notify);
        if ($error != '') {
            die(xml_for_result($error));
        }
        $lastError = 0;
    } elseif ($acceptlog == false) {
        $lastError = FAILURE_INVALID_INCOMING_DATA;
        continue;
    }
}
/* schliessen der Verbinung */
mysql_close($link);
/* Ausgabe der Ergebnisse in XML */
if ($lastError != 0) {
    echo xml_for_result($lastError);
} else {
    echo xml_for_result($best_status);
}
            // update the occurances of this pattern
            $query = "UPDATE " . $dbgrouptable . " SET amount=amount+1, latesttimestamp = " . time() . " WHERE id=" . $log_groupid;
            $result = mysql_query($query) or die(xml_for_result(FAILURE_SQL_UPDATE_PATTERN_OCCURANCES));
            if ($desc != "" && $crash["description"] != "") {
                $desc = str_replace("'", "\\'", $desc);
                if (strpos($desc, $crash["description"]) === false) {
                    $appcrashtext = $desc . "\n-----------------------\n" . $crash["description"];
                    $query = "UPDATE " . $dbgrouptable . " SET description='" . $appcrashtext . "' WHERE id=" . $log_groupid;
                    $result = mysql_query($query) or die(end_with_result('Error in SQL ' . $query));
                }
            }
        } else {
            if ($numrows == 0) {
                // create a new pattern for this bug and set amount of occurrances to 1
                $query = "INSERT INTO " . $dbgrouptable . " (bundleidentifier, affected, pattern, amount, latesttimestamp, description) values ('" . $crash["bundleidentifier"] . "', '" . $crash["version"] . "', '" . $crash_offset . "', 1, " . time() . ", '" . $appcrashtext . "')";
                $result = mysql_query($query) or die(xml_for_result(FAILURE_SQL_ADD_PATTERN));
                $log_groupid = mysql_insert_id($link);
            }
        }
    }
    // now insert the crashlog into the database
    $query = "INSERT INTO " . $dbcrashtable . " (userid, contact, bundleidentifier, applicationname, systemversion, platform, senderversion, version, description, log, groupid, timestamp, jailbreak) values ('" . $crash["userid"] . "', '" . $crash["contact"] . "', '" . $crash["bundleidentifier"] . "', '" . $crash["applicationname"] . "', '" . $crash["systemversion"] . "', '" . $crash["platform"] . "', '" . $crash["version"] . "', '" . $crash["version"] . "', '" . mysql_real_escape_string($crash["description"]) . "', '" . mysql_real_escape_string($crash["logdata"]) . "', '" . $log_groupid . "', '" . $crash['date'] . "', 0)";
    $result = mysql_query($query) or die("Error: " . mysql_error());
    //  print_r($crash);
    /*   error_log("done!\n"); */
}
$folder->close();
mysql_close($link);
if ($included) {
    unlink($crash_folder . '/crash.txt');
    rmdir($crash_folder);