uawdijnntqw1x1x1
IP : 216.73.216.155
Hostname : vm5018.vps.agava.net
Kernel : Linux vm5018.vps.agava.net 3.10.0-1127.8.2.vz7.151.14 #1 SMP Tue Jun 9 12:58:54 MSK 2020 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
var
/
www
/
iplanru
/
data
/
.
/
mod-tmp
/
..
/
www
/
.
/
iplan.5018.vps.agava.net
/
modules
/
mod_agents
/
helper.php
/
/
<?php defined('_JEXEC') or die; class modAgentsHelper { public static function getText() { $lang=JFactory::getLanguage(); $lang=$lang->getTag(); $lang = substr($lang,0,2); if ($lang=="ru") $index=0; if ($lang=="en") $index=1; if (empty($index)) $index=0; $aid=modAgentsHelper::getIDfilter(); if (count($aid)==0) $aid=modAgentsHelper::getIDfull(); shuffle($aid); $sql="SELECT * FROM jos_users where id=".$aid[0]; $db= &JFactory::getDBO(); $count=''; $ret= array(); $db->setQuery($sql, 0, $count); $rows = $db->loadObjectList(); if (count($rows)<>0) foreach ($rows as $row) { $fio=explode("|",$row->fio); $post=explode("|",$row->post); $ret[]="<div id=\"agent-item\">"; if (!empty($row->image)) { //$ret[]=""; $ret[]="<div id=\"agent-image\"> <a class=\"agent-link\" href=\"http://i-plan.ru/index.php?option=com_content&view=article&id=62\"> <img src=\"".JRoute::_($row->image)."\" /> </a> </div>"; //$ret[]=""; } $ret[]="<div id=\"agent-text\">"; if (!empty($row->fio)) $ret[]="<div id=\"agent-fio\">{$fio[$index]}</div>"; if (!empty($row->tel)) $ret[]="<div id=\"agent-tel\">{$row->tel}</div>"; if (!empty($row->post)) $ret[]="<div id=\"agent-post\">{$post[$index]}</div>"; $ret[]="</div>"; $ret[]="</div>"; } return implode("\r\n",$ret); } public static function getIDfilter() { if ($_GET[option]=='com_content') $matid=$_GET[id]; $sql="SELECT u.id as id FROM jos_users u, jos_user_usergroup_map g where u.id=g.user_id and group_id=10 and u.image<>'' and ( (instr(concat(',',fitemid,','),concat(',','{$_GET['Itemid']}',','))<>0) or (instr(concat(',',fitemid,','),concat(',','{$_SERVER['REQUEST_URI']}',','))<>0) or (((instr(concat(',',fmat,','),concat(',','',','))<>0)) and (fmat<>'')) )"; //echo $sql; $db= &JFactory::getDBO(); $count=''; $ret= array(); $db->setQuery($sql, 0, $count); $rows = $db->loadObjectList(); if (count($rows)<>0) foreach ($rows as $row) {$ret[]=$row->id;} return $ret; } public static function getIDfull() { $sql="SELECT u.id as id FROM jos_users u, jos_user_usergroup_map g where u.id=g.user_id and group_id=10 and u.image<>''"; $db= &JFactory::getDBO(); $count=''; $db->setQuery($sql, 0, $count); $rows = $db->loadObjectList(); if (count($rows)<>0) foreach ($rows as $row) {$ret[]=$row->id;} return $ret; } public static function getValue($sql) { $db= &JFactory::getDBO(); $count=''; $ret=''; $field='val'; $db->setQuery($sql, 0, $count); $rows = $db->loadObjectList(); if (count($rows)<>0) foreach ($rows as $row) {$ret=$row->$field;}; return $ret; } }
/var/www/iplanru/data/./mod-tmp/../www/./iplan.5018.vps.agava.net/modules/mod_agents/helper.php