MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 3.140.247.39
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  ]

Current File : /home4/svymadmin/public_html/vivekaexcel.edu.in/bkp/application/views/admin/tables/api_keys.php
<?php

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

$aColumns = [
    'CONCAT(firstname, " ", lastname) as full_name',
    'date_created',
    '`key`',
    ];

$sIndexColumn = 'id';
$sTable       = db_prefix() . config_item('rest_keys_table');
$where        = ['AND level > 0'];
$join         = [
    'JOIN ' . db_prefix() . 'staff ON ' . db_prefix() . 'staff.staffid = ' . db_prefix() . config_item('rest_keys_table') . '.user_id',
];
$result = data_tables_init(
    $aColumns,
    $sIndexColumn,
    $sTable,
    $join,
    $where,
    [
    'id',
    ]
);

$output  = $result['output'];
$rResult = $result['rResult'];

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

    $full_name = $aRow['full_name'];

    $full_name .= '<div class="row-options">';

    $full_name .= '<a href="' . admin_url('api/regenerate_key/' . $aRow['key']) . '" class="_delete">Regenerate</a>';
    $full_name .= ' | <a href="' . admin_url('api/delete_key/' . $aRow['key']) . '" class="text-danger _delete">' . _l('delete') . '</a>';

    $full_name .= '</div>';

    $row[] = $full_name;

    $row[] = _dt(date('Y-m-d H:i:s', $aRow['date_created']));

    $row[] = $aRow['key'];

    $row['DT_RowClass'] = 'has-row-options';

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

MMCT - 2023