mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-12 17:05:16 +00:00
Update index.php
This commit is contained in:
parent
524f860b28
commit
2545efa7e2
|
@ -231,10 +231,18 @@ function relay_mysql_query($params, $mysqli) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
if ($query_type == "select") {
|
switch($query_type) {
|
||||||
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
|
case "select":
|
||||||
} else {
|
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
|
||||||
$data[] = $result;
|
break;
|
||||||
|
|
||||||
|
case "insert":
|
||||||
|
$data[] = $result;
|
||||||
|
$data[] = @mysql_insert_id();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[] = $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
@ -253,7 +261,7 @@ function relay_sendmail($params) {
|
||||||
$message = $params['message'];
|
$message = $params['message'];
|
||||||
$headers = 'From: ' . $from . "\r\n" .
|
$headers = 'From: ' . $from . "\r\n" .
|
||||||
'X-Mailer: php-httpproxy/' . PHP_HTTPPROXY_VERSION . ' (Server; PHP ' . phpversion() . ')';
|
'X-Mailer: php-httpproxy/' . PHP_HTTPPROXY_VERSION . ' (Server; PHP ' . phpversion() . ')';
|
||||||
$sent = mail($to, $subject, $message, $headers);
|
$sent = @mail($to, $subject, $message, $headers);
|
||||||
if (!$sent) {
|
if (!$sent) {
|
||||||
$e = error_get_last();
|
$e = error_get_last();
|
||||||
return array(
|
return array(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user