Files
fdn2/public/admin/tablesBackends/notizieTableBackend.php
T

53 lines
1.1 KiB
PHP

<?php
/*
Author: Riccardo Di Dato
Creation Date: 14/gen/2016
*/
require_once(dirname(__FILE__)."/../../load.php");
// $ret = new stdClass();
// $ret->draw = $_POST["draw"];
// $arr = array();
// $ele = new stdClass();
// $ele->Sottotitolo = print_r($_POST,true);
// $ele->Titolo = "asd";
// $ele->about = new stdClass();
// $ele->about->autore = "autore";
// $ele->about->data = "data";
// $arr[] = $ele;
// for ($i=0; $i<9; $i++){
// $ele = new stdClass();
// $ele->Sottotitolo = "asd";
// $ele->Titolo = "asd";
// $ele->about = new stdClass();
// $ele->about->autore = "autore";
// $ele->about->data = "data";
// $arr[] = $ele;
// }
// $ret->recordsTotal = 10;
// $ret->recordsFiltered = 10;
// $ret->data = $arr;
// echo json_encode($ret);
// die();
// OK
$useModel = "NotiziaModel";
$permissionFlagRequired = AdminModel::ADMIN_TYPE_EDITORE_SUPERVISOR;
$exposedFields = array(
"titolo"=>null,
"sottotitolo"=>null,
"about"=>array("data"=>null,"author"=>null),
"id"=>null
);
$ret = DatatablesHelper::getResult($useModel, $permissionFlagRequired, $exposedFields);
echo json_encode($ret);
?>