mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-12 08:55:16 +00:00
Update index.php
This commit is contained in:
parent
524f860b28
commit
2545efa7e2
|
@ -231,9 +231,17 @@ function relay_mysql_query($params, $mysqli) {
|
|||
}
|
||||
|
||||
$data = [];
|
||||
if ($query_type == "select") {
|
||||
switch($query_type) {
|
||||
case "select":
|
||||
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
|
||||
} else {
|
||||
break;
|
||||
|
||||
case "insert":
|
||||
$data[] = $result;
|
||||
$data[] = @mysql_insert_id();
|
||||
break;
|
||||
|
||||
default:
|
||||
$data[] = $result;
|
||||
}
|
||||
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user