| Current Path : /var/www/iplanru/data/www/i-plan.ru/modules/mod_wfmenu/tmpl/ |
| Current File : /var/www/iplanru/data/www/i-plan.ru/modules/mod_wfmenu/tmpl/default.php |
<?php
// No direct access
defined( '_JEXEC' ) or die;
$db = JFactory::getDbo();
jimport( 'joomla.html.html.tabs' );
$jinput = JFactory::getApplication()->input;
$matid=$jinput->get( 'item_id', 0, 'INT' );
$Itemid=$jinput->get( 'Itemid', 0, 'INT' );
$category_id=$jinput->get( 'category_id', 0, 'INT' );
/*$document =& JFactory::getDocument();*/
$document = JFactory::getDocument();
$document->addScript('/modules/mod_wfmenu/tmpl/code.js');
$document->addStyleSheet('/modules/mod_wfmenu/tmpl/style.css');
//$document->addStyleSheet('http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css');
//$document->addStyleSheet('/modules/mod_wfmenu/tmpl/jquery-ui.css');
?>
<div class="module<?php echo $moduleclass_sfx; ?>">
<?php if ($type==0): ?>
<div class="wfmenu-type0">
<?php
if ($rootid<>'')
{
$m = modWfmenuHelper::getCat($rootid,1 );
echo implode("\r\n",$m);
}
?>
</div>
<?php endif; ?>
<?php if ($type==1): ?>
<div class="wfmenu-type1">
<div class="wftabs" style="height: 316px; overflow: hidden;">
<?php
$document->addScript('http://code.jquery.com/ui/1.10.3/jquery-ui.js');
$document->addStyleSheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css');
?>
<?php echo JHtml::_('tabs.start','wftabs', array('onActive' => 'function(title, description){
description.setStyle("display", "block");
title.addClass("open").removeClass("closed");
}',
'onBackground' => 'function(title, description){
description.setStyle("display", "none");
title.addClass("closed").removeClass("open");
}','useCookie'=>false,'startOffset'=>0));
$list = $db->setQuery(" SELECT id,name
FROM #__zoo_category
where
parent=\"{$rootid}\"
and published=1
order by ordering")->loadAssocList();
if (count($list)<>0)
{
$i=1;
foreach($list as $row)
{
echo JHtml::_('tabs.panel',$row['name'], 'tab'.$i);
echo '<div class="tab-list">';
echo '<div class="tab-caption">
<a href="/index.php?option=com_zoo&category_id='.$row['id'].'&Itemid=117&view=category" >
'.$row['name'].'
</a></div>';
$m = modWfmenuHelper::getCat($row['id'],2 );
echo implode("\r\n",$m);
echo '</div>';
$i++;
}
}
echo JHtml::_('tabs.end');
?>
</div>
</div>
<?php endif; ?>
<?php if ($type==2): ?>
<script>
$(function() {
$( '[id ^= accordion-level]' ).accordion({
heightStyle: "content",
collapsible: true,
active: false
});
/*$("[id ^= accordion-level] h3 a").click(function() {
window.location = $(this).attr('href');
return false;
});*/
/*$( "[id ^= accordion-level]" ).accordion( "option", "active", 2 );*/
$("[id ^= accordion-level]").accordion({active:".active"})
});
</script>
<div class="wfmenu-type2">
<div id="accordion-level1">
<?php
$document->addScript('http://code.jquery.com/jquery-1.10.2.js');
$document->addScript('http://code.jquery.com/ui/1.11.4/jquery-ui.js');
?>
<?php
$m = modWfmenuHelper::getCatAccord($rootid,1,$mymenuitem );
echo implode("\r\n",$m);
?>
</div>
</div>
<?php endif; ?>
<?php if ($type==3): ?>
<div class="wfmenu-type3">
<div id="wfmenu-btn">
<?php
$m = modWfmenuHelper::getCatBtn($rootid,1,$worktype,$mymenuitem );
echo implode("\r\n",$m);
?>
</div>
</div>
<?php endif; ?>
<?php if ($type==4): ?>
<div class="wfmenu-type4">
<?php
$tar='0';
$n=array();
if ($category_id<>0){$tar=$category_id;}
else
{
if($matid)
{
$openedcat = $db->setQuery("SELECT category_id cat
FROM #__zoo_category_item
where item_id={$matid}
and category_id<>0
and category_id>=2376")->loadAssoc();
if ($openedcat){$tar=$openedcat['cat'];}
}
}
if ($tar<>'0')
{
$n=array();
$i=$tar;
$n[]=$i;
do {
$list = $db->setQuery('SELECT id,alias,parent FROM #__zoo_category where id='.$i)->loadAssoc();
if ($list['id']<>'')
{
$i=$list['parent'];
$n[]=$i;
}
} while ($list['parent']<>"0" and $list['parent']<>"2376");
}
$m = modWfmenuHelper::getCatAccord2($rootid,0,$mymenuitem,$n,$tar );
echo implode("\r\n",$m);
?>
</div>
<?php endif; ?>
<?php if ($type==5 and $category_id=="2376"): ?>
<div class="wfmenu-type5">
<?php
$m = modWfmenuHelper::getCat2lvl($mymenuitem);
echo implode("\r\n",$m);
?>
</div>
<?php endif; ?>
</div>