0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: list.php.tar
home/academiac/www/libraries/joomla/html/parameter/element/list.php 0000644 00000004325 15137262466 0021525 0 ustar 00 <?php /** * @package Joomla.Platform * @subpackage HTML * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * Renders a list element * * @package Joomla.Platform * @subpackage Parameter * @since 11.1 * @deprecated Use JFormFieldList instead */ class JElementList extends JElement { /** * Element type * * @var string */ protected $_name = 'List'; /** * Get the options for the element * * @param JXMLElement &$node JXMLElement node object containing the settings for the element * * @return array * * @since 11.1 * * @deprecated 12.1 Use JFormFieldList::getOptions Instead */ protected function _getOptions(&$node) { // Deprecation warning. JLog::add('JElementList::getOptions() is deprecated.', JLog::WARNING, 'deprecated'); $options = array(); foreach ($node->children() as $option) { $val = $option->attributes('value'); $text = $option->data(); $options[] = JHtml::_('select.option', $val, JText::_($text)); } return $options; } /** * Fetch the HTML code for the parameter element. * * @param string $name The field name. * @param mixed $value The value of the field. * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. * @param string $control_name The name of the HTML control. * * @return string * * @deprecated 12.1 * @since 11.1 */ public function fetchElement($name, $value, &$node, $control_name) { $ctrl = $control_name . '[' . $name . ']'; $attribs = ' '; if ($v = $node->attributes('size')) { $attribs .= 'size="' . $v . '"'; } if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= 'multiple="multiple"'; $ctrl .= '[]'; } return JHtml::_( 'select.genericlist', $this->_getOptions($node), $ctrl, array('id' => $control_name . $name, 'list.attr' => $attribs, 'list.select' => $value) ); } } home/academiac/www/libraries/joomla/html/html/list.php 0000644 00000023227 15137264207 0017055 0 ustar 00 <?php /** * @package Joomla.Platform * @subpackage HTML * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * Utility class for creating different select lists * * @package Joomla.Platform * @subpackage HTML * @since 11.1 */ abstract class JHtmlList { /** * Get a grouped list of pre-Joomla 1.6 access levels * * @param object &$row The object (must have an access property). * * @return string * * @since 11.1 * * @deprecated 12.1 Use JHtml::_('access.assetgrouplist', 'access', $selected) instead * @see JHtmlAccess::assetgrouplist */ public static function accesslevel(&$row) { // Deprecation warning. JLog::add('JList::accesslevel is deprecated.', JLog::WARNING, 'deprecated'); return JHtml::_('access.assetgrouplist', 'access', $row->access); } /** * Build the select list to choose an image * * @param string $name The name of the field * @param string $active The selected item * @param string $javascript Alternative javascript * @param string $directory Directory the images are stored in * @param string $extensions Allowed extensions * * @return array Image names * * @since 11.1 */ public static function images($name, $active = null, $javascript = null, $directory = null, $extensions = "bmp|gif|jpg|png") { if (!$directory) { $directory = '/images/'; } if (!$javascript) { $javascript = "onchange=\"if (document.forms.adminForm." . $name . ".options[selectedIndex].value!='') {document.imagelib.src='..$directory' + document.forms.adminForm." . $name . ".options[selectedIndex].value} else {document.imagelib.src='media/system/images/blank.png'}\""; } jimport('joomla.filesystem.folder'); $imageFiles = JFolder::files(JPATH_SITE . '/' . $directory); $images = array(JHtml::_('select.option', '', JText::_('JOPTION_SELECT_IMAGE'))); foreach ($imageFiles as $file) { if (preg_match('#(' . $extensions . ')$#', $file)) { $images[] = JHtml::_('select.option', $file); } } $images = JHtml::_( 'select.genericlist', $images, $name, array( 'list.attr' => 'class="inputbox" size="1" ' . $javascript, 'list.select' => $active ) ); return $images; } /** * Returns an array of options * * @param string $sql SQL with 'ordering' AS value and 'name field' AS text * @param integer $chop The length of the truncated headline * * @return array An array of objects formatted for JHtml list processing * * @since 11.1 */ public static function genericordering($sql, $chop = '30') { $db = JFactory::getDbo(); $options = array(); $db->setQuery($sql); $items = $db->loadObjectList(); // Check for a database error. if ($db->getErrorNum()) { JError::raiseNotice(500, $db->getErrorMsg()); return false; } if (empty($items)) { $options[] = JHtml::_('select.option', 1, JText::_('JOPTION_ORDER_FIRST')); return $options; } $options[] = JHtml::_('select.option', 0, '0 ' . JText::_('JOPTION_ORDER_FIRST')); for ($i = 0, $n = count($items); $i < $n; $i++) { $items[$i]->text = JText::_($items[$i]->text); if (JString::strlen($items[$i]->text) > $chop) { $text = JString::substr($items[$i]->text, 0, $chop) . "..."; } else { $text = $items[$i]->text; } $options[] = JHtml::_('select.option', $items[$i]->value, $items[$i]->value . '. ' . $text); } $options[] = JHtml::_('select.option', $items[$i - 1]->value + 1, ($items[$i - 1]->value + 1) . ' ' . JText::_('JOPTION_ORDER_LAST')); return $options; } /** * Build a select list with a specific ordering * * @param integer $value The scalar value * @param integer $id The id for an existing item in the list * @param string $query The query * @param integer $neworder 1 if new and first, -1 if new and last, * 0 or null if existing item * * @return string Html for the ordered list * * @since 11.1 * * @see JHtmlList::ordering * @deprecated 12.1 Use JHtml::_('list.ordering') instead */ public static function specificordering($value, $id, $query, $neworder = 0) { if (is_object($value)) { $value = $value->ordering; } if ($id) { $neworder = 0; } else { if ($neworder) { $neworder = 1; } else { $neworder = -1; } } return JHtmlList::ordering('ordering', $query, '', $value, $neworder); } /** * Build the select list for Ordering derived from a query * * @param integer $name The scalar value * @param string $query The query * @param string $attribs HTML tag attributes * @param string $selected The selected item * @param integer $neworder 1 if new and first, -1 if new and last, 0 or null if existing item * @param string $chop The length of the truncated headline * * @return string Html for the select list * * @since 11.1 */ public static function ordering($name, $query, $attribs = null, $selected = null, $neworder = null, $chop = null) { if (empty($attribs)) { $attribs = 'class="inputbox" size="1"'; } if (empty($neworder)) { $orders = JHtml::_('list.genericordering', $query); $html = JHtml::_('select.genericlist', $orders, $name, array('list.attr' => $attribs, 'list.select' => (int) $selected)); } else { if ($neworder > 0) { $text = JText::_('JGLOBAL_NEWITEMSLAST_DESC'); } elseif ($neworder <= 0) { $text = JText::_('JGLOBAL_NEWITEMSFIRST_DESC'); } $html = '<input type="hidden" name="' . $name . '" value="' . (int) $selected . '" />' . '<span class="readonly">' . $text . '</span>'; } return $html; } /** * Select list of active users * * @param string $name The name of the field * @param string $active The active user * @param integer $nouser If set include an option to select no user * @param string $javascript Custom javascript * @param string $order Specify a field to order by * @param string $reg Deprecated Excludes users who are explicitly in group 2. * * @return string The HTML for a list of users list of users * * @since 11.1 */ public static function users($name, $active, $nouser = 0, $javascript = null, $order = 'name', $reg = 1) { $db = JFactory::getDbo(); $query = $db->getQuery(true); if ($reg) { // Does not include registered users in the list // @deprecated $query->where('m.group_id != 2'); } $query->select('u.id AS value, u.name AS text'); $query->from('#__users AS u'); $query->join('LEFT', '#__user_usergroup_map AS m ON m.user_id = u.id'); $query->where('u.block = 0'); $query->order($order); $db->setQuery($query); if ($nouser) { $users[] = JHtml::_('select.option', '0', JText::_('JOPTION_NO_USER')); $users = array_merge($users, $db->loadObjectList()); } else { $users = $db->loadObjectList(); } $users = JHtml::_( 'select.genericlist', $users, $name, array( 'list.attr' => 'class="inputbox" size="1" ' . $javascript, 'list.select' => $active ) ); return $users; } /** * Select list of positions - generally used for location of images * * @param string $name Name of the field * @param string $active The active value * @param string $javascript Alternative javascript * @param boolean $none Null if not assigned * @param boolean $center Null if not assigned * @param boolean $left Null if not assigned * @param boolean $right Null if not assigned * @param boolean $id Null if not assigned * * @return array The positions * * @since 11.1 */ public static function positions($name, $active = null, $javascript = null, $none = 1, $center = 1, $left = 1, $right = 1, $id = false) { $pos = array(); if ($none) { $pos[''] = JText::_('JNONE'); } if ($center) { $pos['center'] = JText::_('JGLOBAL_CENTER'); } if ($left) { $pos['left'] = JText::_('JGLOBAL_LEFT'); } if ($right) { $pos['right'] = JText::_('JGLOBAL_RIGHT'); } $positions = JHtml::_( 'select.genericlist', $pos, $name, array( 'id' => $id, 'list.attr' => 'class="inputbox" size="1"' . $javascript, 'list.select' => $active, 'option.key' => null, ) ); return $positions; } /** * Crates a select list of categories * * @param string $name Name of the field * @param string $extension Extension for which the categories will be listed * @param string $selected Selected value * @param string $javascript Custom javascript * @param integer $order Not used. * @param integer $size Size of the field * @param boolean $sel_cat If null do not include a Select Categories row * * @return string * * @deprecated 12.1 Use JHtmlCategory instead * @since 11.1 * @see JHtmlCategory */ public static function category($name, $extension, $selected = null, $javascript = null, $order = null, $size = 1, $sel_cat = 1) { // Deprecation warning. JLog::add('JList::category is deprecated.', JLog::WARNING, 'deprecated'); $categories = JHtml::_('category.options', $extension); if ($sel_cat) { array_unshift($categories, JHtml::_('select.option', '0', JText::_('JOPTION_SELECT_CATEGORY'))); } $category = JHtml::_( 'select.genericlist', $categories, $name, 'class="inputbox" size="' . $size . '" ' . $javascript, 'value', 'text', $selected ); return $category; } } home/academiac/www/libraries/joomla/form/fields/list.php 0000644 00000006104 15137515115 0017346 0 ustar 00 <?php /** * @package Joomla.Platform * @subpackage Form * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * Form Field class for the Joomla Platform. * Supports a generic list of options. * * @package Joomla.Platform * @subpackage Form * @since 11.1 */ class JFormFieldList extends JFormField { /** * The form field type. * * @var string * @since 11.1 */ protected $type = 'List'; /** * Method to get the field input markup for a generic list. * Use the multiple attribute to enable multiselect. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { // Initialize variables. $html = array(); $attr = ''; // Initialize some field attributes. $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; // To avoid user's confusion, readonly="true" should imply disabled="true". if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true') { $attr .= ' disabled="disabled"'; } $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; $attr .= $this->multiple ? ' multiple="multiple"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; // Get the field options. $options = (array) $this->getOptions(); // Create a read-only list (no name) with a hidden input to store the value. if ((string) $this->element['readonly'] == 'true') { $html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id); $html[] = '<input type="hidden" name="' . $this->name . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"/>'; } // Create a regular list. else { $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); } return implode($html); } /** * Method to get the field options. * * @return array The field option objects. * * @since 11.1 */ protected function getOptions() { // Initialize variables. $options = array(); foreach ($this->element->children() as $option) { // Only add <option /> elements. if ($option->getName() != 'option') { continue; } // Create a new option object based on the <option /> element. $tmp = JHtml::_( 'select.option', (string) $option['value'], JText::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)), 'value', 'text', ((string) $option['disabled'] == 'true') ); // Set some option attributes. $tmp->class = (string) $option['class']; // Set some JavaScript option attributes. $tmp->onclick = (string) $option['onclick']; // Add the option object to the result set. $options[] = $tmp; } reset($options); return $options; } } home/academiac/www/administrator/components/com_media/models/list.php 0000644 00000010466 15140221172 0022142 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); /** * Media Component List Model * * @package Joomla.Administrator * @subpackage com_media * @since 1.5 */ class MediaModelList extends JModelLegacy { function getState($property = null, $default = null) { static $set; if (!$set) { $folder = JRequest::getVar('folder', '', '', 'path'); $this->setState('folder', $folder); $parent = str_replace("\\", "/", dirname($folder)); $parent = ($parent == '.') ? null : $parent; $this->setState('parent', $parent); $set = true; } return parent::getState($property, $default); } function getImages() { $list = $this->getList(); return $list['images']; } function getFolders() { $list = $this->getList(); return $list['folders']; } function getDocuments() { $list = $this->getList(); return $list['docs']; } /** * Build imagelist * * @param string $listFolder The image directory to display * @since 1.5 */ function getList() { static $list; // Only process the list once per request if (is_array($list)) { return $list; } // Get current path from request $current = $this->getState('folder'); // If undefined, set to empty if ($current == 'undefined') { $current = ''; } // Initialise variables. if (strlen($current) > 0) { $basePath = COM_MEDIA_BASE.'/'.$current; } else { $basePath = COM_MEDIA_BASE; } $mediaBase = str_replace(DIRECTORY_SEPARATOR, '/', COM_MEDIA_BASE.'/'); $images = array (); $folders = array (); $docs = array (); $fileList = false; $folderList = false; if (file_exists($basePath)) { // Get the list of files and folders from the given folder $fileList = JFolder::files($basePath); $folderList = JFolder::folders($basePath); } // Iterate over the files if they exist if ($fileList !== false) { foreach ($fileList as $file) { if (is_file($basePath.'/'.$file) && substr($file, 0, 1) != '.' && strtolower($file) !== 'index.html') { $tmp = new JObject(); $tmp->name = $file; $tmp->title = $file; $tmp->path = str_replace(DIRECTORY_SEPARATOR, '/', JPath::clean($basePath . '/' . $file)); $tmp->path_relative = str_replace($mediaBase, '', $tmp->path); $tmp->size = filesize($tmp->path); $ext = strtolower(JFile::getExt($file)); switch ($ext) { // Image case 'jpg': case 'png': case 'gif': case 'xcf': case 'odg': case 'bmp': case 'jpeg': case 'ico': $info = @getimagesize($tmp->path); $tmp->width = @$info[0]; $tmp->height = @$info[1]; $tmp->type = @$info[2]; $tmp->mime = @$info['mime']; if (($info[0] > 60) || ($info[1] > 60)) { $dimensions = MediaHelper::imageResize($info[0], $info[1], 60); $tmp->width_60 = $dimensions[0]; $tmp->height_60 = $dimensions[1]; } else { $tmp->width_60 = $tmp->width; $tmp->height_60 = $tmp->height; } if (($info[0] > 16) || ($info[1] > 16)) { $dimensions = MediaHelper::imageResize($info[0], $info[1], 16); $tmp->width_16 = $dimensions[0]; $tmp->height_16 = $dimensions[1]; } else { $tmp->width_16 = $tmp->width; $tmp->height_16 = $tmp->height; } $images[] = $tmp; break; // Non-image document default: $tmp->icon_32 = "media/mime-icon-32/".$ext.".png"; $tmp->icon_16 = "media/mime-icon-16/".$ext.".png"; $docs[] = $tmp; break; } } } } // Iterate over the folders if they exist if ($folderList !== false) { foreach ($folderList as $folder) { $tmp = new JObject(); $tmp->name = basename($folder); $tmp->path = str_replace(DIRECTORY_SEPARATOR, '/', JPath::clean($basePath . '/' . $folder)); $tmp->path_relative = str_replace($mediaBase, '', $tmp->path); $count = MediaHelper::countFiles($tmp->path); $tmp->files = $count[0]; $tmp->folders = $count[1]; $folders[] = $tmp; } } $list = array('folders' => $folders, 'docs' => $docs, 'images' => $images); return $list; } } home/academiac/www/components/com_virtuemart/views/orders/tmpl/list.php 0000604 00000004563 15140260625 0022534 0 ustar 00 <?php /** * * Orderlist * NOTE: This is a copy of the edit_orderlist template from the user-view (which in turn is a slighly * modified copy from the backend) * * @package VirtueMart * @subpackage Orders * @author Oscar van Eijk * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: list.php 5434 2012-02-14 07:59:10Z electrocity $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); ?> <h1><?php echo JText::_('COM_VIRTUEMART_ORDERS_VIEW_DEFAULT_TITLE'); ?></h1> <?php if (count($this->orderlist) == 0) { //echo JText::_('COM_VIRTUEMART_ACC_NO_ORDER'); echo shopFunctionsF::getLoginForm(false,true); } else { ?> <div id="editcell"> <table class="adminlist" width="80%"> <thead> <tr> <th> <?php echo JText::_('COM_VIRTUEMART_ORDER_LIST_ORDER_NUMBER'); ?> </th> <th> <?php echo JText::_('COM_VIRTUEMART_ORDER_LIST_CDATE'); ?> </th> <!--th> <?php //echo JText::_('COM_VIRTUEMART_ORDER_LIST_MDATE'); ?> </th --> <th> <?php echo JText::_('COM_VIRTUEMART_ORDER_LIST_STATUS'); ?> </th> <th> <?php echo JText::_('COM_VIRTUEMART_ORDER_LIST_TOTAL'); ?> </th> </thead> <?php $k = 0; foreach ($this->orderlist as $row) { $editlink = JRoute::_('index.php?option=com_virtuemart&view=orders&layout=details&order_number=' . $row->order_number, FALSE); ?> <tr class="<?php echo "row$k"; ?>"> <td align="left"> <a href="<?php echo $editlink; ?>" rel="nofollow"><?php echo $row->order_number; ?></a> </td> <td align="left"> <?php echo vmJsApi::date($row->created_on,'LC4',true); ?> </td> <!--td align="left"> <?php //echo vmJsApi::date($row->modified_on,'LC3',true); ?> </td --> <td align="left"> <?php echo ShopFunctions::getOrderStatusName($row->order_status); ?> </td> <td align="left"> <?php echo $this->currency->priceDisplay($row->order_total, $row->currency); ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> </div> <?php } ?>
©
2018.