Exemple #1
0
 $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] . '",';
                 }
             }
         }
Exemple #2
0
 $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] . '",';
                 }
             }
         }
     }