7 $query =&
$app->getQuery();
9 $record_id = $query[
'--record_id'];
10 if ( !$record_id ) trigger_error(
"No record id provided", E_USER_ERROR);
12 $record =& df_get_record_by_id($record_id);
14 $fields =& $record->_table->fields(
false,
true);
16 header(
'Content-type: application/json; charset='.
$app->_conf[
'oe']);
25 if ( !$record->checkPermission(
'view', array(
'field'=>$field[
'name'])) )
continue;
26 if ( $field[
'visibility'][
'browse'] ==
'hidden' )
continue;
27 $val = $record->htmlValue($field[
'name']);
28 if ( @
$app->_conf[
'_prefs'][
'calendar.edit.inline'] and $record->checkPermission(
'edit', array(
'field'=>$field[
'name'])) and in_array($field[
'name'], array_keys($record->_table->fields())) ){
29 $class =
'df__editable_wrapper';
33 $dl[] = array(
'fielddef'=>&$field,
'tdid'=>
'td-'.rand(),
'value'=>$val,
'tdclass'=>$class);
46 df_display(array(
'fields'=>&$dl,
'event'=>&$record),
'Dataface_AjaxEventDetails.html');
47 $out = ob_get_contents();
50 $response = array(
'record_id'=>$record_id,
'details'=>
$out);
52 import(
'Services/JSON.php');
53 $json =
new Services_JSON;
54 echo $json->encode($response);