uawdijnntqw1x1x1
IP : 216.73.216.10
Hostname : webm003.cluster107.gra.hosting.ovh.net
Kernel : Linux webm003.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
opticamezl
/
www
/
newok
/
libraries
/
..
/
cli
/
..
/
.
/
api
/
..
/
libraries
/
..
/
com_mtree.tar
/
/
com_mtree.xml000060400000015631151676177250007263 0ustar00<?xml version="1.0" encoding="iso-8859-1"?> <extension type="plugin" group="osmap" version="1.6" method="upgrade"> <name>OSMap - Mosets Tree Plugin</name> <author>Alledia</author> <creationDate>March 10 2016</creationDate> <copyright>Copyright (C) 2016 Open Source Training, LLC. All rights reserved. / Forked from XMap - Guillermo Vargas - guille@vargas.co.cr</copyright> <license>GNU General Public License version 2 or later; see LICENSE.txt</license> <authorEmail>guille@vargas.co.cr</authorEmail> <authorUrl>joomla.vargas.co.cr</authorUrl> <version>3.3.0</version> <description>OSMAP_MTREE_PLUGIN_DESCRIPTION</description> <files> <filename plugin="com_mtree">com_mtree.php</filename> </files> <languages folder="language"> <!-- these files will be installed in the administrator/language folder. --> <language tag="en-GB">en-GB.plg_osmap_com_mtree.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="cats_order" type="list" default="cat_name" label="OSMAP_SETTING_CATEGORIES_ORDER_LABEL" description="OSMAP_SETTING_CATEGORIES_ORDER_DESC"> <option value="ordering">OSMAP_SETTING_OPTION_ORDERING_DEFAULT</option> <option value="cat_name">OSMAP_SETTING_OPTION_ORDERING_NAME</option> <option value="cat_created">OSMAP_SETTING_OPTION_ORDERING_CREATED</option> </field> <field name="cats_orderdir" type="list" default="ASC" label="OSMAP_SETTING_CATEGORIES_ORDER_DIR_LABEL" description="OSMAP_SETTING_CATEGORIES_ORDER_DIR_DESC"> <option value="ASC">OSMAP_SETTING_OPTION_ORDERING_DIR_ASC</option> <option value="DESC">OSMAP_SETTING_OPTION_ORDERING_DIR_DESC</option> </field> <field name="include_links" type="list" default="1" label="OSMAP_SETTING_SHOW_LISTINGS_LABEL" description="OSMAP_SETTING_SHOW_LISTINGS_DESC"> <option value="0">OSMAP_OPTION_NEVER</option> <option value="1">OSMAP_OPTION_ALWAYS</option> <option value="2">OSMAP_OPTION_XML_ONLY</option> <option value="3">OSMAP_OPTION_HTML_ONLY</option> </field> <field name="links_order" type="list" default="ordering" label="OSMAP_SETTING_LISTINGS_ORDER_LABEL" description="OSMAP_SETTING_LISTINGS_ORDER_DESC"> <option value="ordering">OSMAP_SETTING_OPTION_ORDERING_DEFAULT</option> <option value="link_name">OSMAP_SETTING_OPTION_ORDERING_NAME</option> <option value="link_created">OSMAP_SETTING_OPTION_ORDERING_CREATED</option> <option value="link_modified">OSMAP_SETTING_OPTION_ORDERING_MODIFIED</option> <option value="link_hits">OSMAP_SETTING_OPTION_ORDERING_HITS</option> </field> <field name="entries_orderdir" type="list" default="ASC" label="OSMAP_SETTING_LISTINGS_ORDER_DIR_LABEL" description="OSMAP_SETTING_LISTINGS_ORDER_DIR_DESC"> <option value="ASC">OSMAP_SETTING_OPTION_ORDERING_DIR_ASC</option> <option value="DESC">OSMAP_SETTING_OPTION_ORDERING_DIR_DESC</option> </field> <field name="max_links" type="text" default="" label="OSMAP_SETTING_MAX_ENTRIES_LABEL" description="OSMAP_SETTING_MAX_ENTRIES_DESC" /> <field name="max_age" type="text" default="" label="OSMAP_SETTING_LISTINGS_NEWER_THAN_LABEL" description="OSMAP_SETTING_LISTINGS_NEWER_THAN_LABEL" /> </fieldset> <fieldset name="xml"> <field name="cat_priority" type="list" default="0.5" label="OSMAP_MTREE_CATEGORY_PRIORITY_LABEL" description="OSMAP_MTREE_CATEGORY_PRIORITY_DESC"> <option value="-1">OSMAP_OPTION_USE_PARENT_MENU</option> <option value="0.0">0.0</option> <option value="0.1">0.1</option> <option value="0.2">0.2</option> <option value="0.3">0.3</option> <option value="0.4">0.4</option> <option value="0.5">0.5</option> <option value="0.6">0.6</option> <option value="0.7">0.7</option> <option value="0.8">0.8</option> <option value="0.9">0.9</option> <option value="1">1</option> </field> <field name="cat_changefreq" type="list" default="weekly" label="OSMAP_MTREE_CATEGORY_CHANGEFREQ_LABEL" description="OSMAP_MTREE_CATEGORY_CHANGEFREQ_DESC"> <option value="-1">OSMAP_OPTION_USE_PARENT_MENU</option> <option value="always">OSMAP_OPTION_ALWAYS</option> <option value="hourly">OSMAP_OPTION_HOURLY</option> <option value="daily">OSMAP_OPTION_DAILY</option> <option value="weekly">OSMAP_OPTION_WEEKLY</option> <option value="monthly">OSMAP_OPTION_MONTHLY</option> <option value="yearly">OSMAP_OPTION_YEARLY</option> <option value="never">OSMAP_OPTION_NEVER</option> </field> <field name="link_priority" type="list" default="0.5" label="OSMAP_MTREE_LISTING_PRIORITY_LABEL" description="OSMAP_MTREE_LISTING_PRIORITY_DESC"> <option value="-1">OSMAP_OPTION_USE_PARENT_MENU</option> <option value="0.0">0.0</option> <option value="0.1">0.1</option> <option value="0.2">0.2</option> <option value="0.3">0.3</option> <option value="0.4">0.4</option> <option value="0.5">0.5</option> <option value="0.6">0.6</option> <option value="0.7">0.7</option> <option value="0.8">0.8</option> <option value="0.9">0.9</option> <option value="1">1</option> </field> <field name="link_changefreq" type="list" default="weekly" label="OSMAP_MTREE_LISTING_CHANGEFREQ_LABEL" description="OSMAP_MTREE_LISTING_CHANGEFREQ_DESC"> <option value="-1">OSMAP_OPTION_USE_PARENT_MENU</option> <option value="always">OSMAP_OPTION_ALWAYS</option> <option value="hourly">OSMAP_OPTION_HOURLY</option> <option value="daily">OSMAP_OPTION_DAILY</option> <option value="weekly">OSMAP_OPTION_WEEKLY</option> <option value="monthly">OSMAP_OPTION_MONTHLY</option> <option value="yearly">OSMAP_OPTION_YEARLY</option> <option value="never">OSMAP_OPTION_NEVER</option> </field> </fieldset> </fields> </config> </extension> com_mtree.php000060400000016167151676177250007257 0ustar00<?php /** * @package OSMap * @copyright 2007-2014 XMap - Joomla! Vargas. All rights reserved. * @copyright 2016 Open Source Training, LLC. All rights reserved.. * @author Guillermo Vargas <guille@vargas.co.cr> * @author Alledia <support@alledia.com> * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file is part of OSMap. * * OSMap is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * any later version. * * OSMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OSMap. If not, see <http://www.gnu.org/licenses/>. */ defined('_JEXEC') or die('Restricted access'); /** Handles Mosets Tree component */ class osmap_com_mtree { static function getTree( $osmap, $parent, &$params ) { // This component does not provide news content. don't waste time/resources if ($osmap->isNews) { return false; } $db = JFactory::getDbo(); $catid=0; if ( strpos($parent->link, 'task=listcats') ) { $link_query = parse_url( $parent->link ); parse_str( html_entity_decode($link_query['query']), $link_vars); $catid = JArrayHelper::getValue($link_vars,'cat_id',0); } $include_links = JArrayHelper::getValue($params,'include_links',1); $include_links = ( $include_links == 1 || ( $include_links == 2 && $osmap->view == 'xml') || ( $include_links == 3 && $osmap->view == 'html') || $osmap->view == 'navigator'); $params['include_links'] = $include_links; $priority = JArrayHelper::getValue($params,'cat_priority',$parent->priority); $changefreq = JArrayHelper::getValue($params,'cat_changefreq',$parent->changefreq); if ($priority == '-1') $priority = $parent->priority; if ($changefreq == '-1') $changefreq = $parent->changefreq; $params['cat_priority'] = $priority; $params['cat_changefreq'] = $changefreq; $priority = JArrayHelper::getValue($params,'link_priority',$parent->priority); $changefreq = JArrayHelper::getValue($params,'link_changefreq',$parent->changefreq); if ($priority == '-1') $priority = $parent->priority; if ($changefreq == '-1') $changefreq = $parent->changefreq; $params['link_priority'] = $priority; $params['link_changefreq'] = $changefreq; $ordering = JArrayHelper::getValue($params,'cats_order','cat_name'); $orderdir = JArrayHelper::getValue($params,'cats_orderdir','ASC'); if ( !in_array($ordering,array('ordering','cat_name','cat_created')) ) $ordering = 'cat_name'; if ( !in_array($orderdir,array('ASC','DESC')) ){ $orderdir = 'ASC'; } $params['cats_order'] = $db->quoteName($ordering)." $orderdir"; if ( $include_links ) { $ordering = JArrayHelper::getValue($params,'links_order','ordering'); $orderdir = JArrayHelper::getValue($params,'links_orderdir','ASC'); if ( !in_array($ordering,array('ordering','link_name','link_modified','link_created','link_hits')) ) $ordering = 'ordering'; if ( !in_array($orderdir,array('ASC','DESC')) ){ $orderdir = 'ASC'; } $params['links_order'] = $db->quoteName($ordering)." $orderdir"; $params['limit'] = ''; $params['days'] = ''; $limit = JArrayHelper::getValue($params,'max_links',0); if ( intval($limit) ) $params['limit'] = ' LIMIT '.intval($limit); $days = JArrayHelper::getValue($params,'max_age',''); if ( intval($days) ) $params['days'] = ' AND a.link_created >=\''.date('Y-m-d H:i:s',($osmap->now - ($days*86400))) ."' "; } osmap_com_mtree::getMtreeCategory($osmap,$parent,$params,$catid); } /* Returns URLs of all Categories and links in of one category using recursion */ static function getMtreeCategory ($osmap, $parent, &$params, $catid ) { $database = JFactory::getDbo(); $query = "SELECT cat_name, cat_id ". "FROM #__mt_cats WHERE cat_published='1' AND cat_approved='1' AND cat_parent = $catid " . "ORDER BY " . $params['cats_order']; $database->setQuery($query); $rows = $database->loadObjectList(); $osmap->changeLevel(1); foreach($rows as $row) { $node = new stdclass; $node->name = $row->cat_name; $node->link = 'index.php?option=com_mtree&task=listcats&cat_id='.$row->cat_id.'&Itemid='.$parent->id; $node->id = $parent->id; $node->uid = $parent->uid .'c'.$row->cat_id; $node->browserNav = $parent->browserNav; $node->modified = NULL; $node->priority = $params['cat_priority']; $node->changefreq = $params['cat_changefreq']; $node->expandible = true; $node->secure = $parent->secure; if ( $osmap->printNode($node) !== FALSE) { osmap_com_mtree::getMtreeCategory($osmap,$parent,$params,$row->cat_id); } } /* Returns URLs of all listings in the current category */ if ($params['include_links']) { $query = " SELECT a.link_name, a.link_id, a.link_created as created, a.link_modified as modified \n". " FROM #__mt_links AS a, #__mt_cl as b \n". " WHERE a.link_id = b.link_id \n". " AND b.cat_id = $catid " . " AND ( link_published='1' AND link_approved='1' ) " . $params['days'] . " ORDER BY " . $params['links_order'] . $params['limit']; $database->setQuery($query); $rows = $database->loadObjectList(); foreach($rows as $row) { if ( !$row->modified || ($row->modified == $database->getNullDate())) { $row->modified = $row->created; } $node = new stdclass; $node->name = $row->link_name; $node->link = 'index.php?option=com_mtree&task=viewlink&link_id='.$row->link_id.'&Itemid='.$parent->id; $node->id = $parent->id; $node->uid = $parent->uid.'l'.$row->link_id; $node->browserNav = $parent->browserNav; $node->modified = $row->modified; $node->priority = $params['link_priority']; $node->changefreq = $params['link_changefreq']; $node->expandible = false; $node->secure = $parent->secure; $osmap->printNode($node); } } $osmap->changeLevel(-1); } }
/home/opticamezl/www/newok/libraries/../cli/.././api/../libraries/../com_mtree.tar