Your IP : 216.73.216.158


Current Path : /home/megadansyp/www/plugins/fwgallerytype/video/layouts/admin/video/
Upload File :
Current File : /home/megadansyp/www/plugins/fwgallerytype/video/layouts/admin/video/list.php

<?php
/**
 * FW Super Gallery 2.4.0
 * @copyright (C) 2020 Fastw3b
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.fastw3b.net/ Official website
 **/

defined( '_JEXEC' ) or die( 'Restricted access' );

$view = $displayData['view'];

if ($view->current_user->authorise('core.create', 'com_fwgallery')) {
	fwgButtonsHelper::addNew();
	fwgButtonsHelper::custom('fal fa-upload', '', 'FWMG_BATCH_UPLOAD', 'import', false);
}
if ($view->current_user->authorise('core.edit', 'com_fwgallery')) {
	fwgButtonsHelper::editList();
}
if ($view->current_user->authorise('core.delete', 'com_fwgallery')) {
	fwgButtonsHelper::deleteList(JText::_('FWMG_ARE_YOU_SURE'));
}
if ($view->current_user->authorise('core.edit', 'com_fwgallery')) {
	fwgButtonsHelper::publish();
	fwgButtonsHelper::unpublish();
	fwgButtonsHelper::custom('fal fa-box-check', '', 'FWMG_BATCH_OPERATIONS', 'batch', true);
}

$view->app->triggerEvent('ongetFilesListingAdditionalTopButtons', array('com_fwgallery'));
?>
<form action="index.php?option=com_fwgallery&amp;view=file&amp;tab=video" id="adminForm" name="adminForm" method="post">
    <div class="fwa-filter-bar fwa-filter-bar-float clearfix">
        <div class="float-left" style="width:30%;">
            <div class="input-group">
                <input class="form-control" placeholder="<?php echo JText::_('FWMG_SEARCH_NAME_OR_ID'); ?>" type="text" name="search" value="<?php echo $view->escape($view->search); ?>"/>
                <span class="input-group-btn">
                    <button class="btn" type="button" onclick="with(this.form){limitstart.value=0;search.value='';submit();}"><i class="fal fa-times"></i></button>
                </span>
                <span class="input-group-btn">
                    <button class="btn btn-primary" type="submit"><i class="fal fa-search"></i></button>
                </span>
            </div>
        </div>
        <div class="float-left ml-3">
            <div class="input-group">
                <?php echo JHTML::_('fwsgCategory.getCategories', 'category', $view->category, 'class="form-control form-control-sm  select-choices" onchange="with(this.form){limitstart.value=0;submit();}"', false, 'FWMG_SELECT_GALLERY'); ?>
            </div>
        </div>
        <div class="float-left ml-3">
            <div class="input-group">
                <?php echo JHTML::_('select.genericlist', array_merge(array(
                    JHTML::_('select.option', '', JText::_('FWMG_SELECT_OWNER'), 'id', 'name')
                ), $view->users), 'user', 'class="form-control form-control-sm select-choices" onchange="with(this.form){limitstart.value=0;submit();}"', 'id', 'name', $view->user); ?>
            </div>
        </div>
    </div>
    <table class="table table-striped fwmg-admin-images">
        <thead>
            <tr>
                <th><input name="toggle" value="" onclick="Joomla.checkAll(this);" type="checkbox"></th>
                <th><?php echo JText::_('FWMG_ID'); ?></th>
                <th><?php echo JText::_('FWMG_PREVIEW'); ?></th>
                <th><?php echo JText::_('FWMG_NAME'); ?></th>
                <th width="25%"><?php echo JText::_('FWMG_DESCRIPTION'); ?></th>
                <th><?php echo JText::_('FWMG_ACCESS'); ?></th>
                <th><?php echo JText::_('FWMG_GALLERY'); ?></th>
<?php
$view->app->triggerEvent('onshowFileListExtraHeaders', array('com_fwgallery', $view));
?>
                <th>
                	<?php echo JText::_('FWMG_ORDERING'); ?>
<?php
if ($view->current_user->authorise('core.edit', 'com_fwgallery')) {
?>
                	<a href="javascript:"  onclick="javascript:saveorder(<?php echo (int)count($view->list)-1; ?>, 'saveorder')"><i class="fa fa-save"></i></a></th>
<?php
}
?>
                <th><?php echo JText::_('FWMG_HITS'); ?></th>
            </tr>
        </thead>
        <tbody>
<?php
if ($view->list) {
    $num = 0;
    foreach ($view->list as $row) {
?>

            <tr>
                <td><?php echo JHTML::_('grid.id', $num, $row->id ); ?></td>
                <td><?php echo $row->id; ?></td>
                <td>
                    <img class="img-thumbnail" src="<?php echo JURI::root(true); ?>/index.php?option=com_fwgallery&amp;view=item&amp;layout=img&amp;format=raw&amp;w=80&amp;h=60&amp;id=<?php echo $row->id; ?>">
<?php
		if ($view->current_user->authorise('core.edit', 'com_fwgallery')) {
?>
                    <div class="input-group input-group-sm mt-1">
                        <span class="input-group-btn">
                            <a href="index.php?option=com_fwgallery&amp;view=file&amp;tab=video&amp;task=<?php if ($row->published) { ?>un<?php } ?>publish&amp;cid[]=<?php echo $row->id.$view->extra_link; ?>" class="btn<?php if ($row->published) { ?> text-success<?php } else { ?> text-danger<?php } ?>"><i class="fas fa-<?php if ($row->published) { ?>check<?php } else { ?>times<?php } ?>"></i></a>
                        </span>
<?php
			$view->app->triggerEvent('ongetFilesListingAdditionalListingButtons', array('com_fwgallery', $row, $view->tab, $view->extra_link));
?>
                   </div>
<?php
		}
?>
                </td>
                <td>
<?php
		if ($view->current_user->authorise('core.edit', 'com_fwgallery')) {
?>
                    <a href="index.php?option=com_fwgallery&amp;view=file&amp;tab=video&amp;task=edit&amp;cid[]=<?php echo $row->id.$view->extra_link; ?>">
                        <?php echo $row->name; ?>
                    </a>
<?php
		} else echo $row->name;
?>
                    <div class="small mt-1"><i class="<?php echo ($row->_video_media == 'mp4') ? 'fal fa-film' : 'fab fa-'.$row->_video_media ; ?> fa-lg text-muted mr-1"></i> <?php echo ($row->_video_media == 'mp4')?$row->_video_filename:$row->_video_code; ?></div>
                    <div class="small">
                        <i class="fal fa-user"></i> <?php echo $row->_user_name ?>
                        <span class="ml-3"></span>
                        <i class="fal fa-calendar-alt"></i> <?php echo JHTML::date($row->created, 'd M y, H:i'); ?>
                    </div>
<?php
		$view->app->triggerEvent('onshowFileListExtraFields', array('com_fwgallery', $row));
?>
                </td>
                <td><?php echo fwgHelper::stripTags($row->descr, 200, $show_counter=true); ?></td>
                <td><?php echo $row->access?$row->_group_name:JText::_('FWMG_PUBLIC'); ?></td>
                <td><?php echo $row->_category_name ?></td>
<?php
		$view->app->triggerEvent('onshowFileListExtraColumns', array('com_fwgallery', $view, $num, $row));
?>
                <td>
                    <?php echo JHTMLfwView::orderingListLinks(array(
                        'num' => $num,
                        'value' => $row->ordering,
                        'display_up' => ($num > 0),
                        'display_down' => (($num + 1) < count($view->list))
                    )); ?>
                </td>
                <td>
<?php
        if ($row->hits) {
?>
					<div><i class="fa-fw fal fa-mouse-pointer"></i> <?php echo $row->hits; ?></div><?php
        }
        if ($row->downloads) {
?>
					<div><i class="fa-fw fal fa-download"></i> <?php echo $row->downloads; ?></div><?php
        }
		$view->app->triggerEvent('onshowFileListHitsExtraFields', array('com_fwgallery', $row, $view->params));
?>
                </td>
            </tr>
<?php
        $num++;
    }
} else {
?>
            <tr>
                <td colspan="8">
<?php
    echo JText::_($view->search?'FWMG_NO_VIDEOS_FOUND':'FWMG_NO_VIDEOS');
?>
                </td>
            </tr>
<?php
}
?>
        </tbody>
    </table>
	<div class="row">
		<div class="col-md-2 mt-4 text-center">
			<?php echo $view->pagination->getResultsCounter(); ?>
		</div>
		<div class="col-md-8">
			<?php echo $view->pagination->getListFooter(); ?>
		</div>
		<div class="col-md-2 mt-4 text-center pagination-limit">
			<div class="d-inline-block mr-3">
				<?php echo $view->pagination->getLimitBox(); ?>
			</div>
		</div>
	</div>
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="boxchecked" value="" />
</form>
<script>
document.addEventListener('DOMContentLoaded', function() {
	(function($) {
    Joomla.submitbutton = function(pressbutton) {
        if (pressbutton == 'import') {
            $('#fwmg-batch-upload').modal('show');
        } else if (pressbutton == 'batch') {
            $('#fwmg-batch-operations').modal('show');
        } else {
            document.adminForm.task.value=pressbutton;
            document.adminForm.submit();
        }
    }
    })(jQuery);
});
</script>
<?php
echo JLayoutHelper::render('utilites.batchoperations', array(
	'view'=>$view
), JPATH_COMPONENT);
echo JLayoutHelper::render('utilites.batchupload', array(
	'allusers'=>$view->allusers,
	'current_user'=>$view->current_user,
	'category'=>$view->category,
	'reload'=>true
), JPATH_COMPONENT);