Файловый менеджер - Редактировать - /var/www/html/photos.zip
Ðазад
PK ! �p�9� � view.html.phpnu �[��� <?php /** * @copyright (C) 2013 iJoomla, Inc. - All rights reserved. * @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) * @author iJoomla.com <webmaster@ijoomla.com> * @url https://www.jomsocial.com/license-agreement * The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 * More info at https://www.jomsocial.com/license-agreement */ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Router\Route; use Joomla\CMS\Table\Table; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Uri\Uri; use Joomla\CMS\Version; // Disallow direct access to this file defined('_JEXEC') or die('Restricted access'); jimport( 'joomla.application.component.view' ); /** * Configuration view for JomSocial */ class CommunityViewPhotos extends HtmlView { /** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display( $tpl = null ) { // Trigger load default library. CAssets::getInstance(); $mainframe = Factory::getApplication(); $jinput = $mainframe->input; $search = $jinput->get('search','','STRING'); // Set the titlebar text ToolbarHelper::title( Text::_('COM_COMMUNITY_PHOTOS'), 'photos' ); // Add the necessary buttons ToolBarHelper::trash('delete', Text::_('COM_COMMUNITY_DELETE')); ToolBarHelper::publishList( 'publish' , Text::_('COM_COMMUNITY_PUBLISH') ); ToolBarHelper::unpublishList( 'unpublish' , Text::_('COM_COMMUNITY_UNPUBLISH') ); $photos = $this->get( 'Photos' ); $pagination = $this->get( 'Pagination' ); foreach($photos as $key=>$val){ $pTable = Table::getInstance('Photo','CTable'); $pTable->load($val->pid); $groupid = (int) $val->groupid; $eventid = (int) $val->eventid; $photos[$key] = $pTable; $photos[$key]->albumName = $val->name; $photos[$key]->url = Route::_(Uri::root() . 'index.php?option=com_community&view=photos&task=photo&albumid=' . $val->albumid . '&photoid=' . $pTable->id . ( $groupid ? '&groupid=' . $groupid : '' ). ( $eventid ? '&eventid=' . $eventid : '' )); } $this->set( 'photos' , $photos ); $this->set( 'pagination' , $pagination ); $this->set( 'search' , $search ); parent::display( $tpl ); } public function getPublish( $row , $type , $ajaxTask ) { $version = new Version(); $currentV = $version->getHelpVersion(); $class = 'jgrid'; $alt = $row->$type ? Text::_('COM_COMMUNITY_PUBLISHED') : Text::_('COM_COMMUNITY_UNPUBLISH'); $state = $row->$type == 1 ? 'publish' : 'unpublish'; $span = '<span class="state '.$state.'"><span class="text">'.$alt.'</span></span></a>'; if($currentV >= '0.30') { $class = $row->$type == 1 ? 'disabled jgrid': ''; $span = '<i class="icon-'.$state.'"></i>'; } if(!isset($row->pid)) { $row->pid = $row->id; } $href = '<a class="'.$class.'" href="javascript:void(0);" onclick="azcommunity.togglePublish(\'' . $ajaxTask . '\',\'' . $row->pid . '\',\'' . $type . '\');">'; $href .= $span; // Check: ACL if (!CFactory::getUser()->authorise('community.photoeditstate', 'com_community')) { return '<i class="icon-'.$state.'"></i>'; } return $href; } public function formatBytes($id) { $photo = Table::getInstance('Photo','CTable'); $photo->load($id); $units = array('B', 'KB', 'MB', 'GB', 'TB'); $precision = 2; $bytes = max($photo->filesize, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); //s3 size can only be retrieved from s3, therefore, we can always use the filesize from the table if($photo->filesize){ return round($bytes, $precision) . ' ' . $units[$pow]; }elseif(is_file(JPATH_ROOT .'/'.$photo->image)){ $size = round(filesize(JPATH_ROOT .'/'.$photo->image)/1048576,2) . ' MB'; } else { $size = round(filesize(JPATH_ROOT .'/'.$photo->original)/1048576,2) . ' MB'; } return $size; } public function _getStatusHTML() { $jinput = Factory::getApplication()->input; // Check if there are any categories selected $status = $jinput->getInt( 'status' , 2 ); $select = '<select class="no-margin" name="status" onchange="Joomla.submitform();">'; $statusArray = array(2=>Text::_('COM_COMMUNITY_ALL_STATE'),0=>Text::_('COM_COMMUNITY_UNPUBLISH'),1=>Text::_('COM_COMMUNITY_PUBLISH')); foreach($statusArray as $key=>$array) { $selected = ($status == $key) ? 'selected="true"' : ''; $select .='<option value="'.$key.'"'.$selected.' >'.Text::_($array).'</option>'; } $select .= '</select>'; return $select; } public function getConnectType( $userId ) { $model = $this->getModel( 'Users' ); $type = $model->getUserConnectType( $userId ); $image = ''; switch( $type ) { case 'facebook': $image = '<img src="' . rtrim( Uri::root() , '/' ) . '/administrator/components/com_community/assets/icons/facebook.gif" />'; break; case 'joomla': default: $image = '<img src="' . rtrim( Uri::root() , '/' ) . '/administrator/components/com_community/assets/icons/joomla-icon.png" />'; break; } return $image; } public function getProfileName($obj) { $profileId = $obj->getProfileType(); $profile = Table::getInstance('MultiProfile', 'CTable'); $profile->load($profileId); return $profile->getName(); } } PK ! �3� index.htmlnu �[��� <html> <body></body> </html>PK ! �3� tmpl/index.htmlnu �[��� <html> <body></body> </html>PK ! � A�� � tmpl/default.phpnu �[��� <?php /** * @copyright (C) 2013 iJoomla, Inc. - All rights reserved. * @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) * @author iJoomla.com <webmaster@ijoomla.com> * @url https://www.jomsocial.com/license-agreement * The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 * More info at https://www.jomsocial.com/license-agreement */ use Joomla\CMS\Date\Date; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; // Disallow direct access to this file defined('_JEXEC') or die('Restricted access'); ?> <script type="text/javascript" language="javascript"> /** * This function needs to be here because, Joomla toolbar calls it **/ Joomla.submitbutton = function(action){ submitbutton( action ); } function submitbutton( action ) { switch( action ) { case 'export': var items = new Array(); joms.jQuery('#adminForm input[name="cid[]"]:checked').each( function(){ items.push( joms.jQuery(this).val() ); }); window.open( 'index.php?option=com_community&view=users&tmpl=component&no_html=1&format=csv&task=export&cid[]=' + items.join('&cid[]=') ); break; default: Joomla.submitform( action ); break; } } </script> <form action="index.php?option=com_community" method="get" name="adminForm" id="adminForm"> <!-- page header --> <div class="js-filter-wrap row-fluid"> <div class="span12"> <input type="text" onchange="document.adminForm.submit();" class="no-margin" value="<?php echo ($this->search) ? $this->escape($this->search) : '';?>" id="search" name="search"/> <div class="btn btn-small btn-primary" onclick="document.adminForm.submit();"> <i class="js-icon-search"></i> <?php echo Text::_('COM_COMMUNITY_SEARCH');?> </div> <div class="pull-right text-right"> <?php echo $this->_getStatusHTML();?> </div> </div> </div> <table class="table table-bordered table-hover"> <thead> <tr class="title"> <th width="10"><?php echo Text::_('COM_COMMUNITY_NUMBER'); ?></th> <th width="10"> <?php echo Text::_('COM_COMMUNITY_ID'); ?> </th> <th width="10"> <input type="checkbox" name="toggle" value="" onclick="Joomla.checkAll(this)" /> <span class="lbl"></span> </th> <th> <?php echo Text::_('COM_COMMUNITY_PHOTO_THUMB') ?> </th> <th> <?php echo Text::_('COM_COMMUNITY_PHOTO_UPLOAD_BY')?> </th> <th> <?php echo Text::_('COM_COMMUNITY_TITLE') ?> </th> <th> <?php echo Text::_('COM_COMMUNITY_PHOTO_ALBUM_NAME'); ?> </th> <th> <?php echo Text::_('COM_COMMUNITY_FILESIZE')?> </th> <th><?php echo Text::_('COM_COMMUNITY_STATUS')?></th> <th><?php echo Text::_('COM_COMMUNITY_EDIT')?></th> <th> <?php echo Text::_('COM_COMMUNITY_DATE'); ?> </th> </tr> </thead> <?php $i = 0; ?> <?php if( $this->photos ) { foreach( $this->photos as $row ) { ?> <tr> <td> <?php echo ( $i + 1 ); ?> </td> <td><?php echo $row->id;?></td> <td> <?php echo HTMLHelper::_('grid.id', $i++, $row->id); ?> <span class="lbl"></span> </td> <td> <a href="<?php echo $row->url ?>" target="_blank"><img src="<?php echo $row->getThumbURI(); ?>" /></a> </td> <td> <?php $user = CFactory::getUser($row->creator);?> <a href="<?php echo Route::_('index.php?option=com_community&view=users&layout=edit&id=' . $user->id ); ?>"> <h5 class="no-margin"><?php echo $user->name; ?></h5> </a> <span class="label label-success"><?php echo $this->getProfileName($user) ?></span> </td> <td> <a href="<?php echo Route::_(Uri::root().'index.php?option=com_community&view=photos&task=photo&albumid='.$row->albumid.'&userid='.$row->creator.'&photoid='.$row->id) ?>" target="_blank"><?php echo $row->caption; ?></a> </td> <td align="center"> <?php echo $row->albumName ?> </td> <td> <?php echo $this->formatBytes($row->id) ?> </td> <td id="published<?php echo $row->id;?>" align="center" class='center'> <?php echo $this->getPublish( $row , 'published' , 'photos,ajaxTogglePublish' );?> </td> <td><a href="javascript:void(0);" onClick="azcommunity.editPhoto(<?php echo $row->id?>)">Edit</a></td> <td> <?php $date = Date::getInstance( $row->created ); $mainframe = Factory::getApplication(); echo $row->created=='0000-00-00 00:00:00'?'0000-00-00 00:00:00':$date->format('Y-m-d H:i:s'); ?> </td> </tr> <?php } } else { ?> <tr> <td colspan="10" align="center"><?php echo Text::_('COM_COMMUNITY_NO_RESULT');?></td> </tr> <?php } ?> </table> <div class="js-limit-wrap"> <?php echo $this->pagination->getListFooter(); ?> <?php echo $this->pagination->getLimitBox(); ?> </div> <input type="hidden" name="view" value="photos" /> <input type="hidden" name="option" value="com_community" /> <input type="hidden" name="task" value="photos" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo HTMLHelper::_( 'form.token' ); ?> </form> PK ! �p�9� � view.html.phpnu �[��� PK ! �3� � index.htmlnu �[��� PK ! �3� A tmpl/index.htmlnu �[��� PK ! � A�� � � tmpl/default.phpnu �[��� PK 6 �-
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка