$sOutput = '{'; // $sOutput .= '"sEcho": '.intval($_GET['sEcho']).', '; $sOutput .= '"sEcho": ' . intval($_POST['sEcho']) . ', '; $sOutput .= '"iTotalRecords": ' . $iTotal . ', '; // $sOutput .= '"iTotalDisplayRecords": '.$iFilteredTotal.', '; $sOutput .= '"iTotalDisplayRecords": ' . $aResultTotal . ', '; $sOutput .= '"aaData": [ '; while ($row = pg_fetch_array($result, NULL, PGSQL_ASSOC)) { $sOutput .= "["; foreach ($aColumns[$onglet] as $key => $value) { /*---------------*/ /*cas paticuliers*/ /*---------------*/ if ($key == 'bouton') { if ($droit['edit_fiche']) { $sOutput .= '"' . bt_edit($row['uid']) . '",'; } elseif ($droit['view_fiche']) { $sOutput .= '"' . bt_view($row['uid']) . '",'; } else { $sOutput .= '"",'; } } else { if ($key == 'checkbox') { $sOutput .= '"<input type=checkbox class=\\"liste-one\\" name=id[] value=\\"' . $row['uid'] . '\\" >",'; } else { if (!empty($ref[$key])) { // if (!empty($ref[$key])) $sOutput .= '"' . $ref[$key][$row[$key]] . '",'; } else { $sOutput .= '"' . $row[$key] . '",'; }
$sOutput = '{'; $sOutput .= '"sEcho": ' . intval($_POST['sEcho']) . ', '; $sOutput .= '"iTotalRecords": ' . $iTotal . ', '; // $sOutput .= '"iTotalDisplayRecords": '.$iFilteredTotal.', '; $sOutput .= '"iTotalDisplayRecords": ' . $aResultTotal . ', '; $sOutput .= '"aaData": [ '; while ($row = pg_fetch_array($result, NULL, PGSQL_ASSOC)) { $sOutput .= "["; foreach ($aColumns[$onglet] as $key => $value) { //echo $row['codeEnregistrementSyntax'] ; /*---------------*/ /*cas paticuliers*/ /*---------------*/ if ($key == 'bouton') { if ($droit['edit_fiche']) { $sOutput .= '"' . bt_edit($row['codeEnregistrementSyntax']) . '",'; } elseif ($droit['view_fiche']) { $sOutput .= '"' . bt_view($row['codeEnregistrementSyntax']) . '",'; } else { $sOutput .= '"",'; } } else { if ($key == 'checkbox') { $sOutput .= '"<input type=checkbox class=\\"liste-one\\" name=id[] value=\\"' . $row['codeEnregistrementSyntax'] . '\\" >",'; } else { if (!empty($ref[$champ_ref[$key]])) { $sOutput .= '"' . $ref[$champ_ref[$key]][$row[$key]] . '",'; } else { $sOutput .= '"' . $row[$key] . '",'; } }