HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/backip-old-files/components/com_jnews/sef_ext.php
<?php
defined('_JEXEC') or die('Restricted access');
### © 2006-2020 Joobi. All rights reserved.
### license GNU GPLv3 , link https://joobi.org

class sef_jnews {

    function create( $string ) {

    	$string = str_replace( '&amp;', '&', preg_replace( '#(index\.php\??)#i', '', $string ) );
		$query = array();
		$stringExploded = explode( '&', $string );
		foreach( $stringExploded as $oneS ) {
			list( $var, $val ) = explode( '=', $oneS );
			$query[$var] = $val;
		}

		$segments = array();
		if ( isset( $query['act'] ) ) {
			$segments[] = $query['act'];
			unset( $query['act'] );
			if ( isset( $query['task'] ) ) {
				$segments[] = $query['task'];
				unset( $query['task'] );
			}
		}
		unset( $query['option'] );
		if( !empty($query) ) {
			foreach($query as $value ) {
				$segments[] = $value;
			}
		}

        return implode('/',$segments);

    }

}