Server IP : 192.185.129.71 / Your IP : 3.17.156.147 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 = [ 'description', 'date', 'staff', 'isnotified', ]; $sIndexColumn = 'id'; $sTable = db_prefix().'reminders'; $where = [ 'AND rel_id=' . $id . ' AND rel_type="' . $rel_type . '"', ]; $join = [ 'JOIN '.db_prefix().'staff ON '.db_prefix().'staff.staffid = '.db_prefix().'reminders.staff', ]; $result = data_tables_init($aColumns, $sIndexColumn, $sTable, $join, $where, [ 'firstname', 'lastname', 'id', 'creator', 'rel_type', ]); $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] == 'staff') { $_data = '<a href="' . admin_url('staff/profile/' . $aRow['staff']) . '">' . staff_profile_image($aRow['staff'], [ 'staff-profile-image-small', ]) . ' ' . $aRow['firstname'] . ' ' . $aRow['lastname'] . '</a>'; } elseif ($aColumns[$i] == 'description') { if ($aRow['creator'] == get_staff_user_id() || is_admin()) { $_data .= '<div class="row-options">'; if ($aRow['isnotified'] == 0) { $_data .= '<a href="#" onclick="edit_reminder(' . $aRow['id'] . ',this); return false;" class="edit-reminder">' . _l('edit') . '</a> | '; } $_data .= '<a href="' . admin_url('misc/delete_reminder/' . $id . '/' . $aRow['id'] . '/' . $aRow['rel_type']) . '" class="text-danger delete-reminder">' . _l('delete') . '</a>'; $_data .= '</div>'; } } elseif ($aColumns[$i] == 'isnotified') { if ($_data == 1) { $_data = _l('reminder_is_notified_boolean_yes'); } else { $_data = _l('reminder_is_notified_boolean_no'); } } elseif ($aColumns[$i] == 'date') { $_data = _dt($_data); } $row[] = $_data; } $row['DT_RowClass'] = 'has-row-options'; $output['aaData'][] = $row; }