function smarty_fun_tree(&$this, $params) { $_fun_tpl_vars = $this->_tpl_vars; $this->assign($params); ?> <?php $_from = $this->_tpl_vars['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } if (count($_from)) { foreach ($_from as $this->_tpl_vars['menu']) { ?> <tr class="<?php echo smarty_function_cycle(array('values' => "row2,row1"), $this); ?> "> <td class="first"> <?php $this->assign('flag', $this->_tpl_vars['menu']['mlang']); ?> <?php $this->assign('flagpic', "flag_" . $this->_tpl_vars['flag'] . ".gif"); ?> <?php if (file_exists($this->_tpl_vars['theme_dir'] . "/images/admin/" . $this->_tpl_vars['flagpic'])) { ?> <img src="<?php echo $this->_tpl_vars['theme_dir']; ?> /images/admin/<?php echo $this->_tpl_vars['flagpic']; ?> " alt="<?php echo $this->_tpl_vars['menu']['mlang']; ?> " /> <?php } else { ?> <?php echo $this->_tpl_vars['menu']['mlang']; ?> <?php } ?> </td> <td> <?php if ($this->_tpl_vars['menu']['is_sub'] == '1') { ?> <a href="admin.php?p=<?php echo $this->_tpl_vars['self']; ?> &mid=<?php echo $this->_tpl_vars['menu']['menu_id']; ?> " style="font-size: 14px; font-weight: bold"><img src="<?php echo $this->_tpl_vars['theme_dir']; ?> /images/admin/arrow_down.gif" border="0" alt=""></a> <?php } ?> </td> <td <?php if ($this->_tpl_vars['menu']['level'] > 1) { ?> style="padding-left: <?php echo $this->_tpl_vars['menu']['level'] * 10; ?> px;"<?php } ?> ><?php echo $this->_tpl_vars['menu']['menu_name']; ?> </td> <td><?php echo $this->_tpl_vars['menu']['add_name']; ?> </td> <td><?php echo $this->_tpl_vars['menu']['add_date']; ?> </td> <td><?php echo $this->_tpl_vars['menu']['mod_name']; ?> </td> <td><?php echo $this->_tpl_vars['menu']['mod_date']; ?> </td> <td class="last"> <a class="action mod" href="admin.php?p=<?php echo $this->_tpl_vars['self']; ?> &act=<?php echo $this->_tpl_vars['this_page']; ?> &sub_act=mod&m_mid=<?php echo $this->_tpl_vars['menu']['menu_id']; ?> " title="<?php echo is_array($_tmp = $this->_tpl_vars['menu']['menu_name']) ? $this->_run_mod_handler('htmlspecialchars', true, $_tmp) : htmlspecialchars($_tmp); ?> "></a> </td> </tr> <?php if ($this->_tpl_vars['menu']['element']) { ?> <?php smarty_fun_tree($this, array('list' => $this->_tpl_vars['menu']['element'])); ?> <?php } ?> <?php } } unset($_from); ?> <?php $this->_tpl_vars = $_fun_tpl_vars; }
function smarty_fun_tree(&$smarty, $params) { $_fun_tpl_vars = $smarty->_tpl_vars; $smarty->assign($params); $smarty->assign('level', $smarty->_tpl_vars['level'] + 1); $_from = $smarty->_tpl_vars['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } if (count($_from)) { foreach ($_from as $smarty->_tpl_vars['element']) { if (is_array($smarty->_tpl_vars['element'])) { ?> <ul<?php if ($smarty->_tpl_vars['level'] == 1) { ?> id="thread-<?php echo $smarty->_tpl_vars['element']['0']; ?> "<?php } elseif ($smarty->_tpl_vars['level'] > 1 && $smarty->_tpl_vars['fold_threads'] == 1) { ?> style="display:none;"<?php } ?> class="<?php if ($smarty->_tpl_vars['level'] == 1) { ?> thread<?php } elseif ($smarty->_tpl_vars['level'] > 1 && $smarty->_tpl_vars['level'] < $smarty->_tpl_vars['settings']['deep_reply']) { ?> reply<?php } elseif ($smarty->_tpl_vars['level'] >= $smarty->_tpl_vars['settings']['deep_reply'] && $smarty->_tpl_vars['level'] < $smarty->_tpl_vars['settings']['very_deep_reply']) { ?> deep-reply<?php } else { ?> very-deep-reply<?php } ?> "><?php smarty_fun_tree($smarty, array('list' => $smarty->_tpl_vars['element'], 'level' => $smarty->_tpl_vars['level'])); ?> </li></ul> <?php } else { ?> <li><?php if ($smarty->_tpl_vars['fold_threads'] == 1 && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0) { ?> <script type="text/javascript">/* <![CDATA[ */ ft(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> ,<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['replies']; ?> ) /* ]]> */</script><?php } ?> <a class="<?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['newtime'] && $smarty->_tpl_vars['newtime'] < $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['last_reply'] || $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['last_visit'] && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['last_reply'] > $smarty->_tpl_vars['last_visit']) { if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['sticky'] == 1) { ?> threadnew-sticky<?php } else { ?> threadnew<?php } } elseif ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0) { if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['sticky'] == 1) { ?> thread-sticky<?php } else { ?> thread<?php } } elseif ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] != 0 && $smarty->_tpl_vars['newtime'] && $smarty->_tpl_vars['newtime'] < $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['time'] || $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] != 0 && $smarty->_tpl_vars['last_visit'] && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['time'] > $smarty->_tpl_vars['last_visit']) { ?> replynew<?php } else { ?> reply<?php } if ($smarty->_tpl_vars['visited'] && in_array($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id'], $smarty->_tpl_vars['visited'])) { ?> visited<?php } ?> " href="index.php?id=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> "<?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['spam'] == 1) { ?> title="<?php echo $smarty->_config[0]['vars']['spam']; ?> "<?php } ?> ><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['spam'] == 1) { ?> <span class="spam"><?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['subject']; ?> </span><?php } else { echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['subject']; } ?> </a><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['no_text']) { ?> <img class="no-text" src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/no_text.png" title="<?php echo $smarty->_config[0]['vars']['no_text_title']; ?> " alt="<?php echo $smarty->_config[0]['vars']['no_text_alt']; ?> " width="11" height="9" /><?php } ?> - <strong><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['user_type'] == 2) { ?> <span class="admin" title="<?php echo $smarty->_config[0]['vars']['administrator_title']; ?> "><?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['name']; ?> </span><?php } elseif ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['user_type'] == 1) { ?> <span class="mod" title="<?php echo $smarty->_config[0]['vars']['moderator_title']; ?> "><?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['name']; ?> </span><?php } else { echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['name']; } ?> </strong>, <?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['formated_time']; ?> <script type="text/javascript">/* <![CDATA[ */ ap(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['locked'] == 1) { ?> ,1<?php } ?> ); /* ]]> */</script><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0) { ?> <a href="index.php?mode=thread&id=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " title="<?php echo $smarty->_config[0]['vars']['open_whole_thread']; ?> "><img src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/complete_thread.png" title="<?php echo $smarty->_config[0]['vars']['open_whole_thread']; ?> " alt="[*]" width="11" height="11" /></a><?php } if ($smarty->_tpl_vars['admin'] || $smarty->_tpl_vars['mod']) { ?> <a id="marklink_<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " href="index.php?mode=posting&mark=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " title="<?php echo $smarty->_config[0]['vars']['mark_linktitle']; ?> " onclick="mk(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> ); return false" onfocus="this.blur()"><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['marked'] == 0) { ?> <img id="markimg_<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/unmarked.png" title="<?php echo $smarty->_config[0]['vars']['mark_linktitle']; ?> " alt="[○]" width="11" height="11" /><?php } else { ?> <img id="markimg_<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/marked.png" title="<?php echo $smarty->_config[0]['vars']['unmark_linktitle']; ?> " alt="[●]" width="11" height="11" title="<?php echo $smarty->_config[0]['vars']['unmark_linktitle']; ?> " /><?php } ?> </a> <a href="index.php?mode=posting&delete_posting=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> &back=index" title="<?php echo $smarty->_config[0]['vars']['delete_posting_title']; ?> " onclick="return dl(this)"><img src="templates/<?php echo $smarty->_tpl_vars['template']; ?> /images/delete_small_2.png" title="<?php echo $smarty->_config[0]['vars']['delete_posting_title']; ?> " alt="[x]" width="9" height="9" /></a><?php } if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['fold_threads'] == 1) { ?> <span class="small" title="<?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['replies'] == 0) { echo $smarty->_config[0]['vars']['no_replies']; } elseif ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['replies'] == 1) { echo $smarty->_config[0]['vars']['one_reply']; } else { echo is_array($_tmp = $smarty->_config[0]['vars']['several_replies']) ? $smarty->_run_mod_handler('replace', true, $_tmp, "[replies]", $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['replies']) : smarty_modifier_replace($_tmp, "[replies]", $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['replies']); } ?> ">(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['replies']; ?> )</span><?php } if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category_name'] && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['category'] == 0) { ?> <a href="index.php?mode=index&category=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category']; ?> " title="<?php echo is_array($_tmp = is_array($_tmp = $smarty->_config[0]['vars']['change_category_link']) ? $smarty->_run_mod_handler('replace', true, $_tmp, "[category]", $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category_name']) : smarty_modifier_replace($_tmp, "[category]", $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category_name'])) ? $smarty->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html'); ?> "><span class="category">(<?php echo is_array($_tmp = $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category_name']) ? $smarty->_run_mod_handler('replace', true, $_tmp, ' ', " ") : smarty_modifier_replace($_tmp, ' ', " "); ?> )</span></a><?php } } } } unset($_from); $smarty->_tpl_vars = $_fun_tpl_vars; }
function smarty_fun_tree(&$smarty, $params) { $_fun_tpl_vars = $smarty->_tpl_vars; $smarty->assign($params); $smarty->assign('level', $smarty->_tpl_vars['level'] + 1); $_from = $smarty->_tpl_vars['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } if (count($_from)) { foreach ($_from as $smarty->_tpl_vars['element']) { if (is_array($smarty->_tpl_vars['element'])) { ?> <ul class="<?php if ($smarty->_tpl_vars['level'] == 1) { ?> complete-thread<?php } elseif ($smarty->_tpl_vars['level'] > 1 && $smarty->_tpl_vars['level'] < $smarty->_tpl_vars['settings']['deep_reply']) { ?> reply<?php } elseif ($smarty->_tpl_vars['level'] >= $smarty->_tpl_vars['settings']['deep_reply'] && $smarty->_tpl_vars['level'] < $smarty->_tpl_vars['settings']['very_deep_reply']) { ?> deep-reply<?php } else { ?> very-deep-reply<?php } ?> "><?php smarty_fun_tree($smarty, array('list' => $smarty->_tpl_vars['element'], 'level' => $smarty->_tpl_vars['level'])); ?> </li></ul> <?php } else { ?> <li><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id'] != $smarty->_tpl_vars['id']) { ?> <a class="<?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['newtime'] && $smarty->_tpl_vars['newtime'] < $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['last_reply'] || $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['last_visit'] && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['last_reply'] > $smarty->_tpl_vars['last_visit']) { ?> threadnew<?php } elseif ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0) { ?> thread<?php } elseif ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] != 0 && $smarty->_tpl_vars['newtime'] && $smarty->_tpl_vars['newtime'] < $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['time'] || $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] != 0 && $smarty->_tpl_vars['last_visit'] && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['time'] > $smarty->_tpl_vars['last_visit']) { ?> replynew<?php } else { ?> reply<?php } if ($smarty->_tpl_vars['visited'] && in_array($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id'], $smarty->_tpl_vars['visited'])) { ?> visited<?php } ?> " href="index.php?id=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> "><?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['subject']; ?> </a><?php } else { ?> <span class="<?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0) { ?> actthread<?php } else { ?> actreply<?php } ?> "><?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['subject']; ?> </span><?php } if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['no_text']) { ?> <img class="no-text" src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/no_text.png" title="<?php echo $smarty->_config[0]['vars']['no_text_title']; ?> " alt="<?php echo $smarty->_config[0]['vars']['no_text_alt']; ?> " width="11" height="9" /><?php } ?> - <strong><?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['name']; ?> </strong>, <?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['formated_time']; if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id'] != $smarty->_tpl_vars['id']) { ?> <a href="#" onclick="ajax_preview(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> ,'<?php echo $smarty->_config[0]['vars']['reply_link']; ?> '); return false" title="<?php echo $smarty->_config[0]['vars']['ajax_preview_title']; ?> "><img src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/ajax_preview.png" title="<?php echo $smarty->_config[0]['vars']['ajax_preview_title']; ?> " alt="[…]" width="11" height="11" /></a><?php } if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0) { ?> <a href="index.php?mode=thread&id=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " title="<?php echo $smarty->_config[0]['vars']['open_whole_thread']; ?> "><img src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/complete_thread.png" title="<?php echo $smarty->_config[0]['vars']['open_whole_thread']; ?> " alt="[*]" width="11" height="11" /></a><?php } if ($smarty->_tpl_vars['admin'] || $smarty->_tpl_vars['mod']) { ?> <a id="marklink_<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " href="index.php?mode=posting&mark=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> &back=<?php echo $smarty->_tpl_vars['id']; ?> " title="<?php echo $smarty->_config[0]['vars']['mark_linktitle']; ?> " onclick="mark(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> ,'templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/marked.png','templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/unmarked.png','templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/mark_process.png','<?php echo $smarty->_config[0]['vars']['mark_linktitle']; ?> ','<?php echo $smarty->_config[0]['vars']['unmark_linktitle']; ?> '); return false"><?php if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['marked'] == 0) { ?> <img id="markimg_<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/unmarked.png" title="<?php echo $smarty->_config[0]['vars']['mark_linktitle']; ?> " alt="[○]" width="11" height="11" /><?php } else { ?> <img id="markimg_<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> " src="templates/<?php echo $smarty->_tpl_vars['settings']['template']; ?> /images/marked.png" title="<?php echo $smarty->_config[0]['vars']['unmark_linktitle']; ?> " alt="[●]" width="11" height="11" title="<?php echo $smarty->_config[0]['vars']['unmark_linktitle']; ?> " /><?php } ?> </a> <a href="index.php?mode=posting&delete_posting=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['id']; ?> &back=entry" title="<?php echo $smarty->_config[0]['vars']['delete_posting_title']; ?> " onclick="return delete_posting_confirm(this, '<?php echo is_array($_tmp = $smarty->_config[0]['vars']['delete_posting_confirm']) ? $smarty->_run_mod_handler('escape', true, $_tmp, 'url') : smarty_modifier_escape($_tmp, 'url'); ?> ')"><img src="templates/<?php echo $smarty->_tpl_vars['template']; ?> /images/delete_small_2.png" alt="[x]" width="9" height="9" /></a><?php } if ($smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category_name'] && $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['pid'] == 0 && $smarty->_tpl_vars['category'] == 0) { ?> <a href="index.php?mode=index&category=<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category']; ?> "><span class="category">(<?php echo $smarty->_tpl_vars['data'][$smarty->_tpl_vars['element']]['category_name']; ?> )</span></a><?php } } } } unset($_from); $smarty->_tpl_vars = $_fun_tpl_vars; }