2013-01-30 19:56:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Faut finir de le developper. Se fait appeler avec en POST les infos a stocker dans la variable de session
|
2016-05-23 11:59:16 +00:00
|
|
|
// @TODO: have a whitelist of allowed key/values...
|
2013-01-30 19:56:41 +00:00
|
|
|
// Mis en pause => voir commentaire en bas de la classe m_mem
|
2016-05-23 11:59:16 +00:00
|
|
|
define("NOCSRF","1"); // no csrf for js-posted data
|
2013-01-30 19:56:41 +00:00
|
|
|
require_once("../class/config.php");
|
|
|
|
|
2016-05-23 11:59:16 +00:00
|
|
|
// but (csrf) we check POST, not REQUEST!
|
2013-01-30 19:56:41 +00:00
|
|
|
if ( empty($_POST['key']) || empty($_POST['val']) ) {
|
|
|
|
die('1');
|
|
|
|
}
|
|
|
|
|
|
|
|
$key=$_POST['key'];
|
|
|
|
$val=$_POST['val'];
|
|
|
|
|
|
|
|
if (empty($val)) {
|
|
|
|
die('2');
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( $mem->session_tempo_params_set($key, $val) ) {
|
|
|
|
die('0');
|
|
|
|
}
|
2013-02-14 15:38:11 +00:00
|
|
|
|
2013-01-30 19:56:41 +00:00
|
|
|
die('3');
|
|
|
|
|
|
|
|
|
|
|
|
?>
|