Server IP : 192.185.129.71 / Your IP : 3.23.85.24 Web Server : Apache System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : svymadmin ( 4072) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/views/admin/tables/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php defined('BASEPATH') or exit('No direct script access allowed'); $aColumns = [ 'name', ]; $sIndexColumn = 'roleid'; $sTable = db_prefix() . 'roles'; $result = data_tables_init($aColumns, $sIndexColumn, $sTable, [], [], ['roleid']); $output = $result['output']; $rResult = $result['rResult']; foreach ($rResult as $aRow) { $row = []; for ($i = 0; $i < count($aColumns); $i++) { $_data = $aRow[$aColumns[$i]]; if ($aColumns[$i] == 'name') { $_data = '<a href="' . admin_url('roles/role/' . $aRow['roleid']) . '" class="mbot10 display-block">' . $_data . '</a>'; $_data .= '<span class="mtop10 display-block">' . _l('roles_total_users') . ' ' . total_rows(db_prefix() . 'staff', [ 'role' => $aRow['roleid'], ]) . '</span>'; } $row[] = $_data; } $options = '<div class="tw-flex tw-items-center tw-space-x-3">'; $options .= '<a href="' . admin_url('roles/role/' . $aRow['roleid']) . '" class="tw-text-neutral-500 hover:tw-text-neutral-700 focus:tw-text-neutral-700"> <i class="fa-regular fa-pen-to-square fa-lg"></i> </a>'; $options .= '<a href="' . admin_url('roles/delete/' . $aRow['roleid']) . '" class="tw-mt-px tw-text-neutral-500 hover:tw-text-neutral-700 focus:tw-text-neutral-700 _delete"> <i class="fa-regular fa-trash-can fa-lg"></i> </a>'; $options .= '</div>'; $row[] = $options; $output['aaData'][] = $row; }