Update index.php

This commit is contained in:
Namhyeon Go 2024-02-29 16:36:05 +09:00 committed by GitHub
parent 524f860b28
commit 2545efa7e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -231,10 +231,18 @@ function relay_mysql_query($params, $mysqli) {
}
$data = [];
if ($query_type == "select") {
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
} else {
$data[] = $result;
switch($query_type) {
case "select":
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
break;
case "insert":
$data[] = $result;
$data[] = @mysql_insert_id();
break;
default:
$data[] = $result;
}
return array(
@ -253,7 +261,7 @@ function relay_sendmail($params) {
$message = $params['message'];
$headers = 'From: ' . $from . "\r\n" .
'X-Mailer: php-httpproxy/' . PHP_HTTPPROXY_VERSION . ' (Server; PHP ' . phpversion() . ')';
$sent = mail($to, $subject, $message, $headers);
$sent = @mail($to, $subject, $message, $headers);
if (!$sent) {
$e = error_get_last();
return array(