Your IP : 216.73.216.190


Current Path : /proc/1908984/root/proc/2603263/cwd/
Upload File :
Current File : //proc/1908984/root/proc/2603263/cwd/analyzer.tar

index.html000064400000000054152353242560006547 0ustar00<html><body bgcolor="#FFFFFF"></body></html>tmpl/default_list.php000064400000020550152377213720010723 0ustar00<?php 
/** 
 * @package JMAP::ANALYZER::administrator::components::com_jmap
 * @subpackage views
 * @subpackage analyzer
 * @subpackage tmpl
 * @author Joomla! Extensions Store
 * @copyright (C) 2021 - Joomla! Extensions Store
 * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html  
 */
defined ( '_JEXEC' ) or die ( 'Restricted access' ); 
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<table class="full headerlist">
		<tr>
			<td id="alert_append" align="left" width="65%">
				<span class="input-group">
				  <span class="input-group-addon"><span class="glyphicon glyphicon-filter"></span> <?php echo JText::_('COM_JMAP_FILTER_ONPAGE' ); ?>:</span>
				  <input type="text" name="searchpage" id="searchpage" value="<?php echo htmlspecialchars($this->searchpageword, ENT_COMPAT, 'UTF-8');?>" class="text_area"/>
				</span>

				<button class="btn btn-primary btn-xs" onclick="this.form.submit();"><?php echo JText::_('COM_JMAP_GO' ); ?></button>
				<button class="btn btn-primary btn-xs" onclick="document.getElementById('searchpage').value='';this.form.submit();"><?php echo JText::_('COM_JMAP_RESET' ); ?></button>
				
				<span class="input-group-addon input-checkbox hasTooltip" title="<?php echo JText::_('COM_JMAP_LINKSANALYZER_EXACT_MATCH');?>">
					<input type="checkbox" id="exactsearchpage" name="exactsearchpage" value="1" <?php echo $this->exactsearchpage;?>/>
  					<label class="input-group" for="exactsearchpage"><?php echo JText::_('COM_JMAP_LINKSANALYZER_EXACT_MATCH_LABEL');?></label>
				</span>
			</td>
			<td>
				<?php
				echo $this->lists['type'];
				echo $this->getLimitBox();
				?>
			</td>
		</tr>
	</table>

	<table class="adminlist analyzerlist table table-striped table-hover">
	<thead>
		<tr>
			<th style="width:1%">
				<?php echo JText::_('COM_JMAP_NUM' ); ?>
			</th>
			<th class="title">
				<?php echo JHtml::_('grid.sort', 'COM_JMAP_ANALYZER_LINK', 'link', @$this->orders['order_Dir'], @$this->orders['order'], 'analyzer.display'); ?>
			</th>
			<th class="title hidden-phone">
				<?php echo JText::_('COM_JMAP_ANALYZER_COMPONENT'); ?>
			</th>
			<th class="title hidden-phone hidden-tablet">
				<?php echo JText::_('COM_JMAP_ANALYZER_MENUTITLE'); ?>
			</th>
			<th class="title hidden-phone hidden-tablet">
				<?php echo JText::_('COM_JMAP_ANALYZER_MENUID'); ?>
			</th>
			<th class="title hidden-phone hidden-tablet">
				<?php echo JText::_('COM_JMAP_ANALYZER_LASTMOD'); ?>
			</th>
			<th class="title hidden-phone">
				<?php echo JText::_('COM_JMAP_ANALYZER_CHANGEFREQ'); ?>
			</th>
			<th class="title hidden-phone">
				<?php echo JText::_('COM_JMAP_ANALYZER_PRIORITY'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('COM_JMAP_ANALYZER_VALID'); ?>
			</th>
			<?php if($this->cparams->get('linksanalyzer_indexing_analysis', 1)):?>
				<th class="title">
					<?php echo JText::_('COM_JMAP_ANALYZER_INDEXED'); ?>
				</th>
			<?php endif;?>
			<?php if($this->cparams->get('linksanalyzer_indexing_analysis', 1) && $this->cparams->get('links_analyzer_pagespeed_insights_analysis', 0)):?>
				<th class="title hidden-phone hidden-tablet">
					<?php echo JText::_('COM_JMAP_ANALYZER_GOOGLE_PAGESPEED_INSIGHTS'); ?>
				</th>
			<?php endif;?>
			<th class="title">
				<?php
					if($this->validationType == 2):
						echo JHtml::_('grid.sort', 'COM_JMAP_ANALYZER_STATUS_CODE', 'httpstatus', @$this->orders['order_Dir'], @$this->orders['order'], 'analyzer.display');
					else:
						echo JText::_('COM_JMAP_ANALYZER_STATUS_CODE');
					endif;
				?>
			</th>
		</tr>
	</thead>
	<?php
	$k = 0;
	foreach ( $this->items as $row ) {
		// Only valid if the validation mode of the Analyzer is the default one
		if(isset($row->httpstatus)) {
			// Apply filtering if any
			if($this->link_type && $row->httpstatus != $this->link_type) {
				continue;
			}
			
			// Manage semaphore icons
			$linkValidation = null;
			switch ((int)$row->httpstatus) {
				case (int)$row->httpstatus > 200 && (int)$row->httpstatus < 400:
					$statusAlt = JText::_('COM_JMAP_ANALYZER_LINKVALID_REDIRECT');
					$valid = JHtml::image('admin/publish_y.png', $statusAlt, 'class="hasTooltip" title="' . $statusAlt . '"', true);
					$linkValidation = false;
					break;
	
				case (int)$row->httpstatus > 400;
					$statusAlt = JText::_('COM_JMAP_ANALYZER_LINK_NOVALID');
					$valid = JHtml::image('admin/publish_x.png', $statusAlt, 'class="hasTooltip" title="' . $statusAlt . '"', true);
					$linkValidation = false;
				break;
	
				case (int)$row->httpstatus == 200:
				default:
					$statusAlt = JText::_('COM_JMAP_ANALYZER_LINKVALID');
					$valid = '<img class="hasTooltip" title="' . $statusAlt . '" alt="' . $statusAlt . '" src="' . JUri::base(true) . '/components/com_jmap/images/icon-16-tick.png" width="16" height="16" border="0" />';
					$linkValidation = true;
				break;
			}
		} else {
			$valid = '<img data-role="validation_status" class="hasTooltip" title="' . JText::_('COM_JMAP_ANALYZER_INDEXING_WAITER') . '" alt="' . JText::_('COM_JMAP_ANALYZER_INDEXING_WAITER') . '" src="' . JUri::base(true) . '/components/com_jmap/images/loading.gif" width="16" height="16" border="0" />';
			$linkValidation = true;
		}

		// Manage waiter for indexing status JS app
		$indexingWaiter = '<img data-role="indexing_status" class="hasTooltip" title="' . JText::_('COM_JMAP_ANALYZER_INDEXING_WAITER') . '" alt="' . JText::_('COM_JMAP_ANALYZER_INDEXING_WAITER') . '" src="' . JUri::base(true) . '/components/com_jmap/images/loading.gif" width="16" height="16" border="0" />';
		$pagespeedWaiter = '<img data-role="pagespeed_status" class="hasTooltip" title="' . JText::_('COM_JMAP_ANALYZER_PAGESPEED_WAITER') . '" alt="' . JText::_('COM_JMAP_ANALYZER_PAGESPEED_WAITER') . '" src="' . JUri::base(true) . '/components/com_jmap/images/loading.gif" width="16" height="16" border="0" />';
		?>
		<tr>
			<td align="center">
				<?php echo $k + 1; ?>
			</td>
			<td>
				<a data-role="<?php echo $linkValidation ? $this->dataRole : 'neutral';?>" href="<?php echo $row->loc; ?>" alt="sitelink" target="_blank">
					<?php echo $row->loc; ?>
					<span class="glyphicon glyphicon-share"></span>
				</a>
			</td>
			<td class="hidden-phone">
				<span class="badge badge-primary"><?php echo str_replace('com_', '', $row->component); ?></span>
			</td>
			<td class="hidden-phone hidden-tablet">
				<?php echo $row->menuTitle; ?>
			</td>
			<td class="hidden-phone hidden-tablet">
				<span class="badge"><?php echo $row->menuId; ?></span>
			</td>
			<td class="hidden-phone hidden-tablet">
				<?php echo isset($row->lastmod) ? $row->lastmod : '-'; ?>
			</td>
			<td class="hidden-phone">
				<span class="badge badge-warning"><?php echo $row->changefreq; ?></span>
			</td>
			<td class="hidden-phone">
				<span class="badge badge-warning"><?php echo (floatval($row->priority) * 100) . '%'; ?></span>
			</td>
			<td>
				<?php echo $valid; ?>
			</td>
			<?php if($this->cparams->get('linksanalyzer_indexing_analysis', 1)):?>
				<td>
					<?php echo $linkValidation ? $indexingWaiter : $valid; ?>
				</td>
			<?php endif; ?>
			<?php if($this->cparams->get('linksanalyzer_indexing_analysis', 1) && $this->cparams->get('links_analyzer_pagespeed_insights_analysis', 0)):?>
				<td class="hidden-phone hidden-tablet">
					<?php echo $linkValidation ? $pagespeedWaiter : $valid; ?>
				</td>
			<?php endif;?>
			<td>
				<span class="badge badge-primary"><?php echo isset($row->httpstatus) ? ($row->httpstatus == '200' ? $row->httpstatus : '<span class="errorcode">' . $row->httpstatus . '</span>') : '<span class="httpcode"></span>'; ?></span>
			</td>
		</tr>
		<?php
		$k++;
	}
	// No links showed
	if($k == 0) {
		$this->app->enqueueMessage ( JText::_('COM_JMAP_ANALYZER_NOLINKS_ONTHISPAGE') );
	}
	?>
	<tfoot>
		<td colspan="100%">
			<?php echo $this->pagination->getListFooter(); ?>
		</td>
	</tfoot>
	</table>

	<input type="hidden" name="section" value="view" />
	<input type="hidden" name="option" value="<?php echo $this->option;?>" />
	<input type="hidden" name="task" value="analyzer.display" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo @$this->orders['order'];?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo @$this->orders['order_Dir'];?>" />
</form>tmpl/index.html000064400000000054152377213720007525 0ustar00<html><body bgcolor="#FFFFFF"></body></html>view.html.php000064400000012334152377213720007206 0ustar00<?php
// namespace administrator\components\com_jmap\views\analyzer;
/**
 * @package JMAP::ANALYZER::administrator::components::com_jmap
 * @subpackage views
 * @subpackage analyzer
 * @author Joomla! Extensions Store
 * @copyright (C) 2021 - Joomla! Extensions Store
 * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html  
 */
defined ( '_JEXEC' ) or die ( 'Restricted access' );
 
/**
 * @package JMAP::ANALYZER::administrator::components::com_jmap
 * @subpackage views
 * @subpackage analyzer
 * @since 2.3.3
 */
class JMapViewAnalyzer extends JMapView {
	// Template view variables
	protected $validationType;
	protected $pagination;
	protected $searchpageword;
	protected $exactsearchpage;
	protected $link_type;
	protected $cparams;
	protected $dataRole;
	protected $lists;
	protected $orders;
	protected $items;
	
	/**
	 * Add the page title and toolbar.
	 *
	 * @since	1.6
	 */
	protected function addDisplayToolbar() {
		$doc = JFactory::getDocument();
		$doc->addStyleDeclaration('.icon-48-jmap{background-image:url("components/com_jmap/images/icon-48-data.png")}');
		JToolBarHelper::title( JText::_( 'COM_JMAP_SITEMAP_ANALYZER' ), 'jmap' );
			
		JToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JMAP_CPANEL', false);
	}
	
	/**
	 * Creates a dropdown box for selecting how many records to show per page with override
	 *
	 * @return  string  The HTML for the limit # input box.
	 */
	protected function getLimitBox() {
		$limits = array();
		$limit = $this->getModel ()->getState ( 'limit' );
	
		// Make the option list.
		for ($i = 5; $i <= 30; $i += 5)
		{
			$limits[] = JHtml::_('select.option', "$i");
		}
	
		$limits[] = JHtml::_('select.option', '50', JText::_('J50'));
		$limits[] = JHtml::_('select.option', '100', JText::_('J100'));
		$limits[] = JHtml::_('select.option', '200', JText::_('J200'));
		$limits[] = JHtml::_('select.option', '500', JText::_('J500'));
		$limits[] = JHtml::_('select.option', '1000', '1000');
		$limits[] = JHtml::_('select.option', '0', JText::_('JALL'));
	
		$selected = $limit == 0 ? 0 : $limit;
	
		// Build the select list.
		$html = JHtml::_(
				'select.genericlist',
				$limits,
				'limit',
				'class="inputbox input-small" size="1" onchange="Joomla.submitform();"',
				'value',
				'text',
				$selected
		);
	
		return $html;
	}
	
	/**
	 * Default display listEntities
	 *        	
	 * @access public
	 * @param string $tpl
	 * @return void
	 */
	public function display($tpl = null) {
		// Get main records
		$rows = $this->get ( 'Data' );
		$lists = $this->get ( 'Filters' );
		$total = $this->get ( 'Total' );
		$this->validationType = (int)($this->getModel()->getComponentParams()->get('linksanalyzer_validation_analysis', 2));
		
		$doc = JFactory::getDocument();
		$this->loadJQuery($doc);
		$this->loadBootstrap($doc);
		$doc->addScript ( JUri::root ( true ) . '/administrator/components/com_jmap/js/analyzer.js' );
		$doc->addScriptDeclaration("var jmap_baseURI='" . JUri::root() . "';");
		$doc->addScriptDeclaration("var jmap_validationAnalysis=" . $this->validationType . ";");
		
		// Inject js translations
		$translations = array (
				'COM_JMAP_ANALYZER_TITLE',
				'COM_JMAP_ANALYZER_PROCESS_RUNNING',
				'COM_JMAP_ANALYZER_STARTED_SITEMAP_GENERATION',
				'COM_JMAP_ANALYZER_ERROR_STORING_FILE',
				'COM_JMAP_ANALYZER_GENERATION_COMPLETE',
				'COM_JMAP_ANALYZER_ANALYZING_LINKS',
				'COM_JMAP_ANALYZER_INDEXED_LINK',
				'COM_JMAP_ANALYZER_NOAVAILABLE_LINK',
				'COM_JMAP_ANALYZER_NOINDEXED_LINK',
				'COM_JMAP_ANALYZER_LINKVALID',
				'COM_JMAP_ANALYZER_LINK_NOVALID',
				'COM_JMAP_ANALYZER_NOINFO',
				'COM_JMAP_ANALYZER_PAGESPEED_LOW',
				'COM_JMAP_ANALYZER_PAGESPEED_AVERAGE',
				'COM_JMAP_ANALYZER_PAGESPEED_HIGH',
				'COM_JMAP_ANALYZER_PAGESPEED_LCP',
				'COM_JMAP_ANALYZER_PAGESPEED_LCP_DESC',
				'COM_JMAP_ANALYZER_PAGESPEED_LCP_DESC_XTD',
				'COM_JMAP_ANALYZER_PAGESPEED_FID',
				'COM_JMAP_ANALYZER_PAGESPEED_FID_DESC',
				'COM_JMAP_ANALYZER_PAGESPEED_FID_DESC_XTD',
				'COM_JMAP_ANALYZER_PAGESPEED_CLS',
				'COM_JMAP_ANALYZER_PAGESPEED_CLS_DESC',
				'COM_JMAP_ANALYZER_PAGESPEED_CLS_DESC_XTD');
		$this->injectJsTranslations($translations, $doc);
						
		$orders = array ();
		$orders ['order'] = $this->getModel ()->getState ( 'order' );
		$orders ['order_Dir'] = $this->getModel ()->getState ( 'order_dir' );
		// Pagination view object model state populated
		$pagination = new JPagination ( $total, $this->getModel ()->getState ( 'limitstart' ), $this->getModel ()->getState ( 'limit' ) );
		
		$this->user = JFactory::getUser ();
		$this->pagination = $pagination;
		$this->searchpageword = $this->getModel ()->getState ( 'searchpageword', '' );
		$this->exactsearchpage = $this->getModel ()->getState ( 'exactsearchpage', null ) ? 'checked' : '';
		$this->link_type = $this->getModel ()->getState ('link_type', null);
		$this->cparams = $this->getModel()->getComponentParams();
		$this->dataRole = $this->cparams->get('linksanalyzer_indexing_analysis', 1) ? 'link' : 'neutral';
		$this->lists = $lists;
		$this->orders = $orders;
		$this->items = $rows;
		
		// Aggiunta toolbar
		$this->addDisplayToolbar();
		
		parent::display ( 'list' );
	}
}