!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/phpmyadmin/js/src/designer/   drwxr-xr-x
Free 11.89 GB of 61.93 GB (19.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     database.js (6.23 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
var designerTables = [
    {
        name: 'pdf_pages',
        key: 'pgNr',
        autoIncrement: true
    },
    {
        name: 'table_coords',
        key: 'id',
        autoIncrement: true
    }
];

// eslint-disable-next-line no-unused-vars
var DesignerOfflineDB = (function () {
    var designerDB = {};

    /**
     * @type {IDBDatabase|null}
     */
    var datastore = null;

    /**
     * @param {String} table
     * @return {IDBTransaction}
     */
    designerDB.getTransaction = function (table) {
        return datastore.transaction([table], 'readwrite');
    };

    /**
     * @param {String} table
     * @return {IDBObjectStore}
     */
    designerDB.getObjectStore = function (table) {
        var transaction = designerDB.getTransaction(table);
        var objStore = transaction.objectStore(table);
        return objStore;
    };

    /**
     * @param {IDBTransaction} transaction
     * @param {String} table
     * @return {IDBObjectStore}
     */
    designerDB.getCursorRequest = function (transaction, table) {
        var objStore = transaction.objectStore(table);
        var keyRange = IDBKeyRange.lowerBound(0);
        var cursorRequest = objStore.openCursor(keyRange);
        return cursorRequest;
    };

    /**
     * @param {Function} callback
     * @return {void}
     */
    designerDB.open = function (callback) {
        var version = 1;
        var request = window.indexedDB.open('pma_designer', version);

        request.onupgradeneeded = function (e) {
            var db = e.target.result;
            e.target.transaction.onerror = designerDB.onerror;

            var t;
            for (t in designerTables) {
                if (db.objectStoreNames.contains(designerTables[t].name)) {
                    db.deleteObjectStore(designerTables[t].name);
                }
            }

            for (t in designerTables) {
                db.createObjectStore(designerTables[t].name, {
                    keyPath: designerTables[t].key,
                    autoIncrement: designerTables[t].autoIncrement
                });
            }
        };

        request.onsuccess = function (e) {
            datastore = e.target.result;
            if (typeof callback === 'function') {
                callback(true);
            }
        };

        request.onerror = function () {
            Functions.ajaxShowMessage(Messages.strIndexedDBNotWorking, null, 'error');
        };
    };

    /**
     * @param {String} table
     * @param {String} id
     * @param {Function} callback
     * @return {void}
     */
    designerDB.loadObject = function (table, id, callback) {
        if (datastore === null) {
            Functions.ajaxShowMessage(Messages.strIndexedDBNotWorking, null, 'error');
            return;
        }

        var objStore = designerDB.getObjectStore(table);
        var cursorRequest = objStore.get(parseInt(id));

        cursorRequest.onsuccess = function (e) {
            callback(e.target.result);
        };

        cursorRequest.onerror = designerDB.onerror;
    };

    /**
     * @param {String} table
     * @param {Function} callback
     * @return {void}
     */
    designerDB.loadAllObjects = function (table, callback) {
        if (datastore === null) {
            Functions.ajaxShowMessage(Messages.strIndexedDBNotWorking, null, 'error');
            return;
        }

        var transaction = designerDB.getTransaction(table);
        var cursorRequest = designerDB.getCursorRequest(transaction, table);
        var results = [];

        transaction.oncomplete = function () {
            callback(results);
        };

        cursorRequest.onsuccess = function (e) {
            var result = e.target.result;
            if (Boolean(result) === false) {
                return;
            }
            results.push(result.value);
            result.continue();
        };

        cursorRequest.onerror = designerDB.onerror;
    };

    /**
     * @param {String} table
     * @param {Function} callback
     * @return {void}
     */
    designerDB.loadFirstObject = function (table, callback) {
        if (datastore === null) {
            Functions.ajaxShowMessage(Messages.strIndexedDBNotWorking, null, 'error');
            return;
        }

        var transaction = designerDB.getTransaction(table);
        var cursorRequest = designerDB.getCursorRequest(transaction, table);
        var firstResult = null;

        transaction.oncomplete = function () {
            callback(firstResult);
        };

        cursorRequest.onsuccess = function (e) {
            var result = e.target.result;
            if (Boolean(result) === false) {
                return;
            }
            firstResult = result.value;
        };

        cursorRequest.onerror = designerDB.onerror;
    };

    /**
     * @param {String} table
     * @param {Object} obj
     * @param {Function} callback
     * @return {void}
     */
    designerDB.addObject = function (table, obj, callback) {
        if (datastore === null) {
            Functions.ajaxShowMessage(Messages.strIndexedDBNotWorking, null, 'error');
            return;
        }

        var objStore = designerDB.getObjectStore(table);
        var request = objStore.put(obj);

        request.onsuccess = function (e) {
            if (typeof callback === 'function') {
                callback(e.currentTarget.result);
            }
        };

        request.onerror = designerDB.onerror;
    };

    /**
     * @param {String} table
     * @param {String} id
     * @param {Function} callback
     * @return {void}
     */
    designerDB.deleteObject = function (table, id, callback) {
        if (datastore === null) {
            Functions.ajaxShowMessage(Messages.strIndexedDBNotWorking, null, 'error');
            return;
        }

        var objStore = designerDB.getObjectStore(table);
        var request = objStore.delete(parseInt(id));

        request.onsuccess = function () {
            if (typeof callback === 'function') {
                callback(true);
            }
        };

        request.onerror = designerDB.onerror;
    };

    /**
     * @param {Error} e
     * @return {void}
     */
    designerDB.onerror = function (e) {
        // eslint-disable-next-line no-console
        console.log(e);
    };

    // Export the designerDB object.
    return designerDB;
}());

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.2714 ]--