<?php

defined('BASEPATH') or exit('No direct script access allowed');

$aColumns = [
    'name',
    ];

$sIndexColumn = 'id';
$sTable       = 'tblproduct_categ';

$result  = data_tables_init($aColumns, $sIndexColumn, $sTable, [], [], ['id']);
$output  = $result['output'];
$rResult = $result['rResult'];

foreach ($rResult as $aRow) {
    $row = [];

    $row[] = '<a href="' . admin_url('hpyproducts/categorie/' . $aRow['id']) . '" class="mbot10 display-block">' . $aRow['id'] . '</a>';
    $row[] = '<a href="' . admin_url('hpyproducts/categorie/' . $aRow['id']) . '" class="mbot10 display-block">' . $aRow['name'] . '</a>';
    $options = icon_btn('hpyproducts/categorie/' . $aRow['id'], 'pencil-square-o');
    $row[]   = $options .= icon_btn('hpyproducts/sterge_categorie/' . $aRow['id'], 'times', 'btn-danger _delete');

    $output['aaData'][] = $row;
}
