uawdijnntqw1x1x1
IP : 216.73.216.54
Hostname : neogeopocket.gameplayer.club
Kernel : Linux neogeopocket.gameplayer.club 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
var
/
www
/
html
/
1c732
/
..
/
1c732
/
.
/
..
/
components
/
com_jvld
/
helpers
/
class.sef.php
/
/
<?php /** * @version $Id$ * @package JV-LinkDirectory * @subpackage com_jvld * @copyright Copyright 2008-2013 JV-Extensions. All rights reserved * @license GNU General Public License version 3 or later * @author JV-Extensions * @link http://www.jv-extensions.com */ // No direct access defined('_JEXEC') or die('Restricted access'); define("_JVLD_OLDSEFURL_COMPATIBILITY", 0); // change it to 1, if you were using arts-1 sef url before 4.9 class JvldSEF { protected $in_segments = array(); protected $out_segments = array(); protected $db; function __construct($in_segments) { $this->in_segments = $in_segments; $this->db = JFactory::getDBO(); } public function getSefSegments() { return $this->out_segments; } public function processRawURL() { switch ($this->in_segments['task']) { case 'delbookmark': { $this->out_segments[] = $this->getSEFWord($this->in_segments['task']); $this->out_segments[] = $this->in_segments['bid']; $this->db->setQuery("select lid from #__jvld_bookmarks where id = '".(int)$this->in_segments['bid']."'"); $lid = $this->db->loadResult(); $this->out_segments[] = $this->getLinkSefUrl($lid); break; } case 'emappr': { $this->out_segments[] = $this->getSEFWord($this->in_segments['task']); $this->out_segments[] = ($this->in_segments['aprrej']) ? 'approve' : 'reject'; break; } case 'approvelink': case 'rejectlink': case 'delphoto': case 'delfile': case 'delvideo': case 'dellink': { $this->out_segments[] = $this->getSEFWord($this->in_segments['task']); $this->out_segments[] = $this->in_segments['lid']; break; } case 'downloadfile': case 'delprofile': { $this->out_segments[] = $this->getSEFWord($this->in_segments['task']); $this->out_segments[] = $this->in_segments['id']; break; } case 'quicknav': case 'massmail': case 'linkstats': case 'checkbacklink': { $this->out_segments[] = $this->getSEFWord($this->in_segments['task']); break; } case 'lecs': case 'visit': { $this->out_segments[] = $this->getSEFWord($this->in_segments['task']); $this->out_segments[] = $this->getLinkSefUrl($this->in_segments['lid']); break; } default: break; } switch ($this->in_segments['view']) { case 'checklinkstatus': case 'recommend': case 'suggestcat': case 'csponsor': case 'search': case 'addfeatured': case 'advertise': case 'notify': case 'pendinglinks': case 'addlink': case 'featuredlinks': case 'mypurchases': case 'mylinks': case 'editmyprofile': case 'myfavlinks': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); break; } case 'relatedlinks': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->db->setQuery("select alias from #__jvld_tags where id = ".(int)$this->in_segments['tag']); $this->out_segments[] = $this->db->loadResult(); break; } case 'userprofile': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->out_segments[] = $this->in_segments['id'].'-'.htmlspecialchars($this->getUserDisplayName($this->in_segments['id'])); break; } case 'reportbrokenlink': case 'newtestimonial': case 'tellafriend': case 'setfeatured': case 'claimlink': case 'addbookmark': case 'contact': case 'detail': case 'profiles': case 'photos': case 'videos': case 'files': case 'editphoto': case 'editvideo': case 'editfile': case 'editlink': case 'switchplan': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->out_segments[] = $this->getLinkSefUrl($this->in_segments['lid']); break; } case 'editprofile': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->out_segments[] = $this->getLinkSefUrl($this->in_segments['lid']); $this->out_segments[] = $this->in_segments['id']; } case 'showlinks': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->out_segments[] = $this->in_segments['layout']; break; } case 'thankyou': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->out_segments[] = $this->in_segments['rtype']; break; } case 'alphabar': { $this->out_segments[] = $this->getSEFWord($this->in_segments['view']); $this->out_segments[] = $this->in_segments['alpha']; break; } case 'links': { $this->out_segments[] = $this->getCategorySefUrl($this->in_segments['cid']); break; } default: break; } } function processSEFUrl($arg_list) { $arg0_t = $this->getSEFDefaultWord($arg_list[0]); switch ($arg0_t) { case 'checklinkstatus': case 'recommend': case 'suggestcat': case 'csponsor': case 'search': case 'addfeatured': case 'advertise': case 'notify': case 'pendinglinks': case 'addlink': case 'featuredlinks': case 'mypurchases': case 'mylinks': case 'editmyprofile': case 'myfavlinks': { $tmp = array("view" => $arg0_t); break; } case 'relatedlinks': { $this->db->setQuery("select id from #__jvld_tags where alias = '".$this->db->escape($arg_list[1])."'"); $kid = $this->db->loadResult(); $tmp = array("view" => $arg0_t, "tag" => $kid); break; } case 'reportbrokenlink': case 'newtestimonial': case 'tellafriend': case 'setfeatured': case 'claimlink': case 'addbookmark': case 'contact': case 'detail': case 'profiles': case 'photos': case 'videos': case 'files': case 'editphoto': case 'editvideo': case 'editfile': case 'editlink': case 'switchplan': { $tmp = array("view" => $arg0_t, "lid" => $this->getLinkSefUrl(0, $arg_list[1])); break; } case 'editprofile': { $tmp = array("view" => $arg0_t, "lid" => $this->getLinkSefUrl(0, $arg_list[1]), "id" => $arg_list[2]); break; } case 'showlinks': { $tmp = array("view" => $arg0_t, "layout" => $arg_list[1]); break; } case 'thankyou': { $tmp = array("view" => $arg0_t, "rtype" => $arg_list[1]); break; } case 'alphabar': { $tmp = array("view" => $arg0_t, "alpha" => $arg_list[1]); break; } case 'userprofile': { $user_id = $this->getUserId($arg_list[1]); $tmp = array("view" => $arg0_t, "id" => $user_id); break; } case 'delbookmark': { $tmp = array("task" => $arg0_t, "bid" => $arg_list[1]); break; } case 'emappr': { $tmp = array("task" => $arg0_t, "aprrej" => (($arg_list[1] == 'approve') ? 1 : 0)); break; } case 'approvelink': case 'rejectlink': case 'delphoto': case 'delfile': case 'delvideo': case 'dellink': { $tmp = array("task" => $arg0_t, "lid" => $arg_list[1]); break; } case 'downloadfile': case 'delprofile': { $tmp = array("task" => $arg0_t, "id" => $arg_list[1]); break; } case 'quicknav': { $tmp = array("task" => "quicknav", "tmpl" => "component", "format" => "raw"); break; } case 'massmail': case 'linkstats': case 'checkbacklink': { $tmp = array("task" => "quicknav", "tmpl" => "component"); break; } case 'lecs': case 'visit': { $tmp = array("task" => $arg0_t, "lid" => $this->getLinkSefUrl(0, $arg_list[1])); break; } default: { $bc = 0; if ($arg_list[0] != '') { $sefurl = ''; for ($p=0;$p<10;$p++) { if ($arg_list[$p] == '') break; if (substr($arg_list[$p], 0, 4) == 'page') { $bc = 1; break; } $sefurl .= $arg_list[$p].'/'; } $sefurl = JString::rtrim($sefurl, '/'); if ($bc) { $ps = explode("-", $sefurl); $cid = $ps[_JVLD_OLDSEFURL_COMPATIBILITY]; } else { $cid = $this->getCategorySefUrl(0, $sefurl); } $tmp = array("view" => "links", "cid" => $cid); if ($bc) $tmp['page'] = 1; } else { $tmp = array("view" => "jvld"); } } } $query = array(); $this->setRawValue($query, $tmp); return $query; } private function setRawValue(&$query, $myarr) { foreach ($myarr as $key => $val) $query[$key] = $val; } private function getSEFWord($word) { $words = explode("~", $this->getDbSettingsVal('sef_words')); for ($i=0;$i<count($words);$i++) { if (preg_match("/^".preg_quote($word)."=(.*)=(.*)$/", $words[$i], $matches)) return $matches[2]; } return ''; } private function getSEFDefaultWord($sefword) { $words = explode("~", $this->getDbSettingsVal('sef_words')); for ($i=0;$i<count($words);$i++) { if ((preg_match("/(.*)=(.*)=".preg_quote($sefword)."$/", $words[$i], $matches)) || (preg_match("/(.*)=".preg_quote($sefword)."=(.*)$/", $words[$i], $matches))) return $matches[1]; } return $sefword; } private function getDbSettingsVal($param) { static $config = null; if ($config == null) { require_once(JPATH_ROOT.DIRECTORY_SEPARATOR."plugins".DIRECTORY_SEPARATOR."system".DIRECTORY_SEPARATOR."jvldframework".DIRECTORY_SEPARATOR."library".DIRECTORY_SEPARATOR."class.cfg.php"); $config = JvldCfg::getInstance(); } return $config->get($param); } private function getLinkSefUrl($lid=0, $sefstring='') { static $lsef_info = array(); if (!count($lsef_info)) { $this->db->setQuery("select id, sef_string from #__jvld_links"); $rows = $this->db->loadObjectList(); foreach ($rows as $row) $lsef_info[$row->id] = JString::trim($row->sef_string); } return ($lid) ? $lsef_info[$lid] : array_search($sefstring, $lsef_info); } private function getCategorySefUrl($cid=0, $sefstring='') { static $csef_info = array(); if (!count($csef_info)) { $this->db->setQuery("select id, path from #__categories where extension = 'com_jvld'"); $rows = $this->db->loadObjectList(); foreach ($rows as $row) $csef_info[$row->id] = JString::trim($row->path); } return ($cid) ? $csef_info[$cid] : array_search($sefstring, $csef_info); } private function getUserDisplayName($id) { $this->db->setQuery("select username from #__users where id = ".(int)$id); return $this->db->loadResult(); } private function getUserId($str) { $t = explode("-", $str); return (int)$t[0]; } }
/var/www/html/1c732/../1c732/./../components/com_jvld/helpers/class.sef.php