View file Spiderwap.in File Hosting/sys/smarty/templates_c/7c5f9d2683eee3c1f586137d0fc4307b2f6554bf.file.cats.tpl.php

File size: 3.49Kb
<?php /* Smarty version Smarty3-RC3, created on 2010-11-14 12:16:08
         compiled from "/home/elpik209/public_html/sys/smarty/templates/cats.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1152441844cdfa8d82cc722-69291153%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7c5f9d2683eee3c1f586137d0fc4307b2f6554bf' => 
    array (
      0 => '/home/elpik209/public_html/sys/smarty/templates/cats.tpl',
      1 => 1286712346,
    ),
  ),
  'nocache_hash' => '1152441844cdfa8d82cc722-69291153',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_modifier_escape')) include '/home/elpik209/public_html/sys/smarty/plugins/modifier.escape.php';
if (!is_callable('smarty_block_php')) include '/home/elpik209/public_html/sys/smarty/plugins/block.php.php';
?><div class="title"> Категории </div>
<?php  $_smarty_tpl->tpl_vars['cats'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('cat')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['cats']->key => $_smarty_tpl->tpl_vars['cats']->value){
?>
<div class="main">
<img src="/images/obmen.gif" alt="" /> <a href="/cat-<?php echo $_smarty_tpl->tpl_vars['cats']->value['id'];?>
"><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['cats']->value['name'],'html');?>
 (<?php $_smarty_tpl->smarty->_tag_stack[] = array('php', array()); $_block_repeat=true; smarty_block_php(array(), null, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl);while ($_block_repeat) { ob_start();?>

global $sql;
echo $sql->query('SELECT `id` FROM `files` WHERE `cat_id`="<?php echo $_smarty_tpl->tpl_vars['cats']->value['id'];?>
"')->num_rows;
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo smarty_block_php(array(), $_block_content, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
) [<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['cats']->value['ros'],'html');?>
]</a>
<?php ob_start();?><?php echo $_smarty_tpl->getVariable('user')->value['assec'];?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1>1){?>
<br/><a href="adm/act.php?act=delc&amp;id=<?php echo $_smarty_tpl->tpl_vars['cats']->value['id'];?>
">[удал.]</a>
<a href="adm/act.php?act=edic&amp;id=<?php echo $_smarty_tpl->tpl_vars['cats']->value['id'];?>
">[изм.]</a>
<?php }?>
</div>
<?php }} ?>

<?php ob_start();?><?php echo $_smarty_tpl->getVariable('vse')->value;?>
<?php $_tmp2=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->getVariable('one')->value;?>
<?php $_tmp3=ob_get_clean();?><?php if ($_tmp2>$_tmp3){?>
<div class="ads">
<?php ob_start();?><?php echo $_smarty_tpl->getVariable('page')->value;?>
<?php $_tmp4=ob_get_clean();?><?php if ($_tmp4>1){?>
<a href="category.php?page=<?php echo $_smarty_tpl->getVariable('page')->value-1;?>
">Пред.</a>
<?php }?>
<?php ob_start();?><?php echo $_smarty_tpl->getVariable('page')->value;?>
<?php $_tmp5=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->getVariable('all')->value;?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp5<$_tmp6){?>
<a href="category.php?page=<?php echo $_smarty_tpl->getVariable('page')->value+1;?>
">След.</a><br/>
<?php }?>
<form action="category.php" method="get">Стр. <input type="text" size="2" name="page" />
<input type="submit" value="go" /></form>
</div>
<?php }?>