git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@41 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2016-01-10 22:18:54 +00:00
parent 50c0032f02
commit 4e871bdbd3
25 changed files with 255 additions and 144 deletions
+78 -81
View File
@@ -5,85 +5,82 @@ class MysqlClass
private $nomehost = "localhost";
private $nomeuser = "root";
private $password = "root";
/*
private $nomehost = "sql.gruppolapastamadre.it";
private $nomeuser = "w18092_ricuser";
private $password = "RTvg0o6IESoqQyx8CCJn";
*/
private $mydb = "w18092_ricettario";
// controllo sulle connessioni attive
private $attiva = false;
private $connessione = null;
// funzione per la connessione a MySQL
public function connetti()
{
if(!$this->attiva)
{
$this->connessione = mysql_connect($this->nomehost,$this->nomeuser,$this->password);
if ($this->connessione == FALSE)
die(mysql_error());
mysql_select_db($this->mydb, $this->connessione) or die ("Errore nella selezione del database. Verificare i parametri nel file config.inc.php");
$this->attiva = true;
}
else{
return true;
}
}
public function executeQuery($queryStr)
{
$this->connetti();
if (!$res = mysql_query($queryStr, $this->connessione)) die(mysql_error());
return true;
return false;
}
public function insertRecord($queryStr)
{
$this->connetti();
if (!$res = mysql_query($queryStr, $this->connessione)) die(mysql_error());
return mysql_insert_id();
}
public function queryToObject($queryStr)
{
$this->connetti();
$sth = mysql_query($queryStr, $this->connessione) or die(mysql_error());
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
array_push($rows,array_map('utf8_encode', $r));
}
mysql_free_result($sth);
return $rows;
}
// funzione per la chiusura della connessione
public function disconnetti()
{
if($this->attiva)
{
if(mysql_close($this->connessione))
{
$this->attiva = false;
return true;
}
else
{
return false;
}
}
}
public function __destruct()
{
$this->disconnetti();
}
}
private $mydb = "w18092_ricettario";
/*
private $nomehost = "sql.gruppolapastamadre.it";
private $nomeuser = "w18092_ricuser";
private $password = "RTvg0o6IESoqQyx8CCJn";
private $mydb = "w18092_ricettario";
*/
// controllo sulle connessioni attive
private $attiva = false;
private $connessione = null;
// funzione per la connessione a MySQL
public function connetti() {
if (!$this->attiva) {
$this->connessione = mysqli_connect($this->nomehost, $this->nomeuser, $this->password);
if ($this->connessione == FALSE)
die(mysqli_error());
mysqli_select_db($this->connessione, $this->mydb) or die("Errore nella selezione del database. Verificare i parametri nel file config.inc.php");
$this->attiva = true;
}
else {
return true;
}
}
public function executeQuery($queryStr) {
$this->connetti();
if (!$res = mysqli_query($this->connessione, $queryStr))
die(mysqli_error());
return true;
}
public function insertRecord($queryStr) {
$this->connetti();
if (!$res = mysqli_query($this->connessione, $queryStr))
die(mysqli_error());
return mysqli_insert_id($this->connessione);
}
public function queryToObject($queryStr, $encode = true) {
$this->connetti();
$sth = mysqli_query($this->connessione, $queryStr) or die(mysqli_error());
if($encode){
$rows = array();
while ($r = mysqli_fetch_assoc($sth)) {
array_push($rows, array_map('utf8_encode', $r));
}
mysqli_free_result($sth);
return $rows;
}
else
{
return mysqli_fetch_array($sth);
}
}
// funzione per la chiusura della connessione
public function disconnetti() {
if ($this->attiva) {
if (mysqli_close($this->connessione)) {
$this->attiva = false;
return true;
} else {
return false;
}
}
}
public function __destruct() {
$this->disconnetti();
}
}
?>
+9 -5
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -140,7 +140,10 @@ class Environment implements \ArrayAccess, \IteratorAggregate
$env['SCRIPT_NAME'] = rtrim($physicalPath, '/'); // <-- Remove trailing slashes
// Virtual path
$env['PATH_INFO'] = substr_replace($requestUri, '', 0, strlen($physicalPath)); // <-- Remove physical path
$env['PATH_INFO'] = $requestUri;
if (substr($requestUri, 0, strlen($physicalPath)) == $physicalPath) {
$env['PATH_INFO'] = substr($requestUri, strlen($physicalPath)); // <-- Remove physical path
}
$env['PATH_INFO'] = str_replace('?' . $queryString, '', $env['PATH_INFO']); // <-- Remove query string
$env['PATH_INFO'] = '/' . ltrim($env['PATH_INFO'], '/'); // <-- Ensure leading slash
@@ -151,7 +154,8 @@ class Environment implements \ArrayAccess, \IteratorAggregate
$env['SERVER_NAME'] = $_SERVER['SERVER_NAME'];
//Number of server port that is running the script
$env['SERVER_PORT'] = $_SERVER['SERVER_PORT'];
//Fixes: https://github.com/slimphp/Slim/issues/962
$env['SERVER_PORT'] = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
//HTTP request headers (retains HTTP_ prefix to match $_SERVER)
$headers = \Slim\Http\Headers::extract($_SERVER);
@@ -191,9 +195,9 @@ class Environment implements \ArrayAccess, \IteratorAggregate
{
if (isset($this->properties[$offset])) {
return $this->properties[$offset];
} else {
return null;
}
return null;
}
/**
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+6 -6
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -160,7 +160,7 @@ class Set implements \ArrayAccess, \Countable, \IteratorAggregate
public function __unset($key)
{
return $this->remove($key);
$this->remove($key);
}
/**
@@ -215,8 +215,8 @@ class Set implements \ArrayAccess, \Countable, \IteratorAggregate
/**
* Ensure a value or object will remain globally unique
* @param string $key The value or object name
* @param Closure The closure that defines the object
* @param string $key The value or object name
* @param \Closure $value The closure that defines the object
* @return mixed
*/
public function singleton($key, $value)
@@ -234,8 +234,8 @@ class Set implements \ArrayAccess, \Countable, \IteratorAggregate
/**
* Protect closure from being directly invoked
* @param Closure $callable A closure to keep from being invoked and evaluated
* @return Closure
* @param \Closure $callable A closure to keep from being invoked and evaluated
* @return \Closure
*/
public function protect(\Closure $callable)
{
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+3 -3
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -169,9 +169,9 @@ class Request
return true;
} elseif (isset($this->headers['X_REQUESTED_WITH']) && $this->headers['X_REQUESTED_WITH'] === 'XMLHttpRequest') {
return true;
} else {
return false;
}
return false;
}
/**
+10 -2
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -85,6 +85,7 @@ class Response implements \ArrayAccess, \Countable, \IteratorAggregate
204 => '204 No Content',
205 => '205 Reset Content',
206 => '206 Partial Content',
226 => '226 IM Used',
//Redirection 3xx
300 => '300 Multiple Choices',
301 => '301 Moved Permanently',
@@ -116,13 +117,20 @@ class Response implements \ArrayAccess, \Countable, \IteratorAggregate
418 => '418 I\'m a teapot',
422 => '422 Unprocessable Entity',
423 => '423 Locked',
426 => '426 Upgrade Required',
428 => '428 Precondition Required',
429 => '429 Too Many Requests',
431 => '431 Request Header Fields Too Large',
//Server Error 5xx
500 => '500 Internal Server Error',
501 => '501 Not Implemented',
502 => '502 Bad Gateway',
503 => '503 Service Unavailable',
504 => '504 Gateway Timeout',
505 => '505 HTTP Version Not Supported'
505 => '505 HTTP Version Not Supported',
506 => '506 Variant Also Negotiates',
510 => '510 Not Extended',
511 => '511 Network Authentication Required'
);
/**
+3 -3
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -60,9 +60,9 @@ class Util
$strip = is_null($overrideStripSlashes) ? get_magic_quotes_gpc() : $overrideStripSlashes;
if ($strip) {
return self::stripSlashes($rawData);
} else {
return $rawData;
}
return $rawData;
}
/**
+7 -2
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -306,7 +306,12 @@ class Log
if (!isset(self::$levels[$level])) {
throw new \InvalidArgumentException('Invalid log level supplied to function');
} else if ($this->enabled && $this->writer && $level <= $this->level) {
$message = (string)$object;
if (is_array($object) || (is_object($object) && !method_exists($object, "__toString"))) {
$message = print_r($object, true);
} else {
$message = (string) $object;
}
if (count($context) > 0) {
if (isset($context['exception']) && $context['exception'] instanceof \Exception) {
$message .= ' - ' . $context['exception'];
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+2 -2
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -116,7 +116,7 @@ class ContentTypes extends \Slim\Middleware
{
if (function_exists('json_decode')) {
$result = json_decode($input, true);
if ($result) {
if(json_last_error() === JSON_ERROR_NONE) {
return $result;
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+1 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
+2 -2
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -89,7 +89,7 @@ class PrettyExceptions extends \Slim\Middleware
$message = $exception->getMessage();
$file = $exception->getFile();
$line = $exception->getLine();
$trace = str_replace(array('#', '\n'), array('<div>#', '</div>'), $exception->getTraceAsString());
$trace = str_replace(array('#', "\n"), array('<div>#', '</div>'), $exception->getTraceAsString());
$html = sprintf('<h1>%s</h1>', $title);
$html .= '<p>The application could not run because of the following error:</p>';
$html .= '<h2>Details</h2>';
+4 -9
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -119,15 +119,10 @@ class SessionCookie extends \Slim\Middleware
if (session_id() === '') {
session_start();
}
$value = $this->app->getCookie($this->settings['name']);
if ($value) {
try {
$_SESSION = unserialize($value);
} catch (\Exception $e) {
$this->app->getLog()->error('Error unserializing session cookie value! ' . $e->getMessage());
}
$value = json_decode($value, true);
$_SESSION = is_array($value) ? $value : array();
} else {
$_SESSION = array();
}
@@ -138,7 +133,7 @@ class SessionCookie extends \Slim\Middleware
*/
protected function saveSession()
{
$value = serialize($_SESSION);
$value = json_encode($_SESSION);
if (strlen($value) > 4096) {
$this->app->getLog()->error('WARNING! Slim\Middleware\SessionCookie data size is larger than 4KB. Content save failed.');
+7 -1
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -288,6 +288,9 @@ class Route
public function appendHttpMethods()
{
$args = func_get_args();
if(count($args) && is_array($args[0])){
$args = $args[0];
}
$this->methods = array_merge($this->methods, $args);
}
@@ -298,6 +301,9 @@ class Route
public function via()
{
$args = func_get_args();
if(count($args) && is_array($args[0])){
$args = $args[0];
}
$this->methods = array_merge($this->methods, $args);
return $this;
+3 -3
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -232,9 +232,9 @@ class Router
$this->getNamedRoutes();
if ($this->hasNamedRoute($name)) {
return $this->namedRoutes[(string) $name];
} else {
return null;
}
return null;
}
/**
+43 -11
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -54,7 +54,7 @@ class Slim
/**
* @const string
*/
const VERSION = '2.4.2';
const VERSION = '2.6.1';
/**
* @var \Slim\Helper\Set
@@ -231,22 +231,22 @@ class Slim
public function __get($name)
{
return $this->container[$name];
return $this->container->get($name);
}
public function __set($name, $value)
{
$this->container[$name] = $value;
$this->container->set($name, $value);
}
public function __isset($name)
{
return isset($this->container[$name]);
return $this->container->has($name);
}
public function __unset($name)
{
unset($this->container[$name]);
$this->container->remove($name);
}
/**
@@ -906,7 +906,12 @@ class Slim
}
}
return $value;
/*
* transform $value to @return doc requirement.
* \Slim\Http\Util::decodeSecureCookie - is able
* to return false and we have to cast it to null.
*/
return $value === false ? null : $value;
}
/**
@@ -1100,6 +1105,18 @@ class Slim
$this->halt($status);
}
/**
* RedirectTo
*
* Redirects to a specific named route
*
* @param string $route The route name
* @param array $params Associative array of URL parameters and replacement values
*/
public function redirectTo($route, $params = array(), $status = 302){
$this->redirect($this->urlFor($route, $params), $status);
}
/********************************************************************************
* Flash Messages
*******************************************************************************/
@@ -1138,6 +1155,16 @@ class Slim
}
}
/**
* Get all flash messages
*/
public function flashData()
{
if (isset($this->environment['slim.flash'])) {
return $this->environment['slim.flash']->getMessages();
}
}
/********************************************************************************
* Hooks
*******************************************************************************/
@@ -1160,10 +1187,10 @@ class Slim
/**
* Invoke hook
* @param string $name The hook name
* @param mixed $hookArg (Optional) Argument for hooked functions
* @param string $name The hook name
* @param mixed ... (Optional) Argument(s) for hooked functions, can specify multiple arguments
*/
public function applyHook($name, $hookArg = null)
public function applyHook($name)
{
if (!isset($this->hooks[$name])) {
$this->hooks[$name] = array(array());
@@ -1173,10 +1200,14 @@ class Slim
if (count($this->hooks[$name]) > 1) {
ksort($this->hooks[$name]);
}
$args = func_get_args();
array_shift($args);
foreach ($this->hooks[$name] as $priority) {
if (!empty($priority)) {
foreach ($priority as $callable) {
call_user_func($callable, $hookArg);
call_user_func_array($callable, $args);
}
}
}
@@ -1344,6 +1375,7 @@ class Slim
throw $e;
} else {
try {
$this->response()->write(ob_get_clean());
$this->error($e);
} catch (\Slim\Exception\Stop $e) {
// Do nothing
+4 -4
View File
@@ -6,7 +6,7 @@
* @copyright 2011 Josh Lockhart
* @link http://www.slimframework.com
* @license http://www.slimframework.com/license
* @version 2.4.2
* @version 2.6.1
* @package Slim
*
* MIT LICENSE
@@ -108,7 +108,7 @@ class View
* @param string $key
* @param mixed $value
*/
public function keep($key, Closure $value)
public function keep($key, \Closure $value)
{
$this->data->keep($key, $value);
}
@@ -152,9 +152,9 @@ class View
{
if (!is_null($key)) {
return isset($this->data[$key]) ? $this->data[$key] : null;
} else {
return $this->data->all();
}
return $this->data->all();
}
/**
+1
View File
@@ -2,6 +2,7 @@
$allowedHost = array(
"localhost",
"denisnotebook",
"app.gruppolapastamadre.it",
"dev.gruppolapastamadre.it",
"management.gruppolapastamadre.it"
+36
View File
@@ -161,6 +161,42 @@ $app->get('/ricetta/:itemID/photos', function ($itemID) use ($app) {
" INNER JOIN profilo ON profilo.ProfiloID = immagini.from_profile_id".
" WHERE id_ricette = " . $itemID;
$mysqlconnetion = new MysqlClass;
//$mysqlconnetion->connetti();
$retObj = $mysqlconnetion->queryToObject($query);
$mysqlconnetion->disconnetti();
returnJson($app, $callbackFn, $retObj);
});
$app->get('/statistics/gender', function () use ($app) {
$callbackFn = $app->request()->get('callback');
$query = "SELECT 'Gender' as Type, IF(Gender='', 'Sconosciuto', Gender) as Serie, COUNT(gender) as CountSerie from profilo GROUP BY gender";
$mysqlconnetion = new MysqlClass;
//$mysqlconnetion->connetti();
$retObj = $mysqlconnetion->queryToObject($query);
$mysqlconnetion->disconnetti();
returnJson($app, $callbackFn, $retObj);
});
$app->get('/statistics/typeAccess', function () use ($app) {
$callbackFn = $app->request()->get('callback');
$query = "SELECT 'TipoAccesso' as Type, TipoAccesso as Serie, COUNT(TipoAccesso) as CountSerie from profilo GROUP BY TipoAccesso";
$mysqlconnetion = new MysqlClass;
//$mysqlconnetion->connetti();
$retObj = $mysqlconnetion->queryToObject($query);
$mysqlconnetion->disconnetti();
returnJson($app, $callbackFn, $retObj);
});
$app->get('/statistics/themesUsage', function () use ($app) {
$callbackFn = $app->request()->get('callback');
$query = "SELECT 'TemaUI' as Type, TemaUI as Serie, COUNT(TemaUI) as CountSerie from profilo GROUP BY TemaUI";
$mysqlconnetion = new MysqlClass;
//$mysqlconnetion->connetti();
$retObj = $mysqlconnetion->queryToObject($query);
+29 -2
View File
@@ -81,7 +81,7 @@ $app->get('/profile/:keyStore/ricette', function ($keyStore) use ($app) {
$app->get('/profile/:keyStore', function ($keyStore) use ($app) {
$callbackFn = $app->request()->get('callback');
$mysqlconnetion = new MysqlClass;
$query = "select ProfiloID, TipoAccesso, RisultatiRicerca, TemaUI, Name, Gender, 0 as NumRicette, BloccoNoteUpdated from profilo" .
$query = "SELECT ProfiloID,TipoAccesso,RisultatiRicerca,TemaUI,Name,Gender,0 AS NumRicette,BloccoNoteUpdated,Email,bSpacciatore,bPrivacy,Cap,Comune,Provincia,TipoPM, Latitudine, Longitudine from profilo" .
" where ProfiloID = '" . $keyStore . "'";
$retObj = $mysqlconnetion->queryToObject($query);
@@ -100,11 +100,38 @@ $app->get('/profile/:keyStore', function ($keyStore) use ($app) {
returnJson($app, $callbackFn, $retObj);
});
$app->get('/profile/province(/:iniz)', function ($iniz = "") use ($app) {
$callbackFn = $app->request()->get('callback');
$mysqlconnetion = new MysqlClass;
$where= "";
if($iniz!="")
$where = "WHERE Provincia like '" . $iniz . "%' ";
$query = "select DISTINCT Provincia from comuni " . $where . "ORDER BY Provincia";
$retObj = $mysqlconnetion->queryToObject($query);
$mysqlconnetion->disconnetti();
returnJson($app, $callbackFn, $retObj);
});
$app->get('/profile/comuni/:prov(/:iniz)', function ($prov ,$iniz = "") use ($app) {
$callbackFn = $app->request()->get('callback');
$mysqlconnetion = new MysqlClass;
$where= "";
if($iniz!="")
$where = "AND Comune like '" . $iniz . "%' ";
$query = "select Comune, CAP from comuni where Provincia = '" . $prov . "' " . $where . "ORDER BY Comune";
$retObj = $mysqlconnetion->queryToObject($query);
$mysqlconnetion->disconnetti();
returnJson($app, $callbackFn, $retObj);
});
$app->post('/profile', function () use ($app) {
$callbackFn = $app->request()->get('callback');
$json_data_body = json_decode($app->request()->post('dataPair'));
$mysqlconnetion = new MysqlClass;
$query = "insert into profilo(ProfiloID, Name, Email, Gender, TipoAccesso, RisultatiRicerca, TemaUI, UltimoAccesso, CreatoIl) values ('" . $json_data_body->keyStore . "', '" . str_replace("'", "''",$json_data_body->name) . "', '" . $json_data_body->email . "', '" . $json_data_body->gender . "', '" . $json_data_body->type . "', '" . $json_data_body->risRic . "', '" . $json_data_body->tema . "', NOW(), NOW())";
$query = "insert into profilo(ProfiloID, Name, Email, Gender, TipoAccesso, RisultatiRicerca, TemaUI, UltimoAccesso, CreatoIl) values ('" . $json_data_body->keyStore . "', '" . str_replace("'", "''", htmlentities($json_data_body->name, null, "UTF-8")) . "', '" . $json_data_body->email . "', '" . $json_data_body->gender . "', '" . $json_data_body->type . "', '" . $json_data_body->risRic . "', '" . $json_data_body->tema . "', NOW(), NOW())";
$retNewID = $mysqlconnetion->insertRecord($query);
$mysqlconnetion->disconnetti();