コード例 #1
0
    function smarty_fun_menu(&$smarty, $params)
    {
        $_fun_tpl_vars = $smarty->_tpl_vars;
        $smarty->assign($params);
        ?>
			<?php 
        $_from = $smarty->_tpl_vars['list'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        if (count($_from)) {
            foreach ($_from as $smarty->_tpl_vars['data']) {
                ?>
			<tr class="<?php 
                echo smarty_function_cycle(array('values' => "row1,row2"), $smarty);
                ?>
">
				<td class="first">
					<?php 
                $smarty->assign('flag', $smarty->_tpl_vars['data']['mlang']);
                ?>
					<?php 
                $smarty->assign('flagpic', "flag_" . $smarty->_tpl_vars['flag'] . ".gif");
                ?>
					<?php 
                if (file_exists($smarty->_tpl_vars['theme_dir'] . "/images/admin/" . $smarty->_tpl_vars['flagpic'])) {
                    ?>
						<img src="<?php 
                    echo $smarty->_tpl_vars['theme_dir'];
                    ?>
/images/admin/<?php 
                    echo $smarty->_tpl_vars['flagpic'];
                    ?>
" alt="<?php 
                    echo $smarty->_tpl_vars['data']['mlang'];
                    ?>
" />
					<?php 
                } else {
                    ?>
						<?php 
                    echo $smarty->_tpl_vars['data']['mlang'];
                    ?>

					<?php 
                }
                ?>
				</td>
				<td><?php 
                echo $smarty->_tpl_vars['data']['mprot'];
                ?>
</td>
				<td>
				<?php 
                if ($smarty->_tpl_vars['data']['mtype'] == 'index') {
                    ?>
					<?php 
                    if ($smarty->_tpl_vars['data']['is_sub'] == '1') {
                        ?>
						<a href="admin.php?p=<?php 
                        echo $smarty->_tpl_vars['self'];
                        ?>
&mid=<?php 
                        echo $smarty->_tpl_vars['data']['menu_id'];
                        ?>
" style="font-size: 14px; font-weight: bold"><img src="<?php 
                        echo $smarty->_tpl_vars['theme_dir'];
                        ?>
/images/admin/arrow_down.gif" border="0" alt=""></a>
					<?php 
                    }
                    ?>
				<?php 
                }
                ?>
				</td>
				<td <?php 
                if ($smarty->_tpl_vars['data']['level'] > 1) {
                    ?>
style="padding-left: <?php 
                    echo $smarty->_tpl_vars['data']['level'] * 10;
                    ?>
px;"<?php 
                }
                ?>
>
					<?php 
                echo $smarty->_tpl_vars['data']['menu_name'];
                ?>

				</td>
				<td>
					<?php 
                if ($smarty->_tpl_vars['data']['moname'] != "") {
                    ?>
						<?php 
                    if ($smarty->_tpl_vars['data']['mtype'] == 'admin') {
                        ?>
							<?php 
                        echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_adminmodule'];
                        ?>

						<?php 
                    } else {
                        ?>
							<?php 
                        echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_indexmodule'];
                        ?>

						<?php 
                    }
                    ?>
						<?php 
                    echo $smarty->_tpl_vars['data']['moname'];
                    ?>

					<?php 
                } elseif ($smarty->_tpl_vars['data']['ctitle'] != "") {
                    ?>
						 <?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_content'];
                    ?>
 <?php 
                    echo $smarty->_tpl_vars['data']['ctitle'];
                    ?>

					<?php 
                } elseif ($smarty->_tpl_vars['data']['catname'] != "") {
                    ?>
						 <?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_category'];
                    ?>
 <?php 
                    echo $smarty->_tpl_vars['data']['catname'];
                    ?>

					<?php 
                } else {
                    ?>
						<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_outerlink'];
                    ?>
 <?php 
                    echo $smarty->_tpl_vars['data']['mlink'];
                    ?>

					<?php 
                }
                ?>
				</td>
				<?php 
                if ($smarty->_tpl_vars['menuType'] == 'index') {
                    ?>
<td><?php 
                    echo $smarty->_tpl_vars['data']['posname'];
                    ?>
</td><?php 
                }
                ?>
				<td class="last">
					<?php 
                if ($smarty->_tpl_vars['data']['isact'] == 1) {
                    ?>
					<a class="action act" href="admin.php?p=<?php 
                    echo $smarty->_tpl_vars['self'];
                    ?>
&amp;act=act&amp;m_id=<?php 
                    echo $smarty->_tpl_vars['data']['menu_id'];
                    ?>
&amp;type=<?php 
                    echo $_GET['type'];
                    ?>
&amp;lang=<?php 
                    echo $_GET['lang'];
                    ?>
&amp;menutype=<?php 
                    echo $smarty->_tpl_vars['menuType'];
                    ?>
&amp;mid=<?php 
                    echo $_GET['mid'];
                    ?>
" title="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_inactivate'];
                    ?>
"></a>
					<?php 
                } else {
                    ?>
					<a class="action inact" href="admin.php?p=<?php 
                    echo $smarty->_tpl_vars['self'];
                    ?>
&amp;act=act&amp;m_id=<?php 
                    echo $smarty->_tpl_vars['data']['menu_id'];
                    ?>
&amp;type=<?php 
                    echo $_GET['type'];
                    ?>
&amp;lang=<?php 
                    echo $_GET['lang'];
                    ?>
&amp;menutype=<?php 
                    echo $smarty->_tpl_vars['menuType'];
                    ?>
&amp;mid=<?php 
                    echo $_GET['mid'];
                    ?>
" title="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_activate'];
                    ?>
"></a>
					<?php 
                }
                ?>
					<a class="action mod" href="admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=mod&amp;m_id=<?php 
                echo $smarty->_tpl_vars['data']['menu_id'];
                ?>
&amp;type=<?php 
                echo $_GET['type'];
                ?>
&amp;lang=<?php 
                echo $_GET['lang'];
                ?>
&amp;menutype=<?php 
                echo $smarty->_tpl_vars['menuType'];
                ?>
&amp;mid=<?php 
                echo $_GET['mid'];
                ?>
" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_modify'];
                ?>
"></a>
					<a class="action del" href="javascript: if (confirm('<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['confirm_del'];
                ?>
')) document.location.href='admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=del&amp;m_id=<?php 
                echo $smarty->_tpl_vars['data']['menu_id'];
                ?>
&amp;type=<?php 
                echo $_GET['type'];
                ?>
&amp;lang=<?php 
                echo $_GET['lang'];
                ?>
&amp;menutype=<?php 
                echo $smarty->_tpl_vars['menuType'];
                ?>
&amp;mid=<?php 
                echo $_GET['mid'];
                ?>
';" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_delete'];
                ?>
"></a>
					<?php 
                if ($smarty->_tpl_vars['menuType'] == 'index') {
                    ?>
					<a href="admin.php?p=<?php 
                    echo $smarty->_tpl_vars['self'];
                    ?>
&amp;act=add&amp;par=<?php 
                    echo $smarty->_tpl_vars['data']['menu_id'];
                    ?>
&amp;pos=<?php 
                    echo $smarty->_tpl_vars['data']['posid'];
                    ?>
&amp;type=<?php 
                    echo $_GET['type'];
                    ?>
&amp;lang=<?php 
                    echo $_GET['lang'];
                    ?>
&amp;menutype=<?php 
                    echo $smarty->_tpl_vars['menuType'];
                    ?>
&amp;mid=<?php 
                    echo $_GET['mid'];
                    ?>
" title="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_submenu'];
                    ?>
">
						<img src="<?php 
                    echo $smarty->_tpl_vars['theme_dir'];
                    ?>
/images/admin/submenu.gif" border="0" alt="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_submenu'];
                    ?>
" />
					</a>
					<?php 
                }
                ?>
					<a href="admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=ord&amp;m_id=<?php 
                echo $smarty->_tpl_vars['data']['menu_id'];
                ?>
&amp;way=up&amp;par=<?php 
                echo $smarty->_tpl_vars['data']['parent'];
                ?>
&amp;type=<?php 
                echo $smarty->_tpl_vars['data']['mtype'];
                ?>
&amp;ordt=<?php 
                echo $_GET['ordt'];
                ?>
&amp;ordl=<?php 
                echo $_GET['ordl'];
                ?>
&amp;menutype=<?php 
                echo $smarty->_tpl_vars['menuType'];
                ?>
&amp;mid=<?php 
                echo $_GET['mid'];
                ?>
" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_wayup'];
                ?>
">
						<img src="<?php 
                echo $smarty->_tpl_vars['theme_dir'];
                ?>
/images/admin/up.gif" border="0" alt="<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_wayup'];
                ?>
" />
					</a>
					<a href="admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=ord&amp;m_id=<?php 
                echo $smarty->_tpl_vars['data']['menu_id'];
                ?>
&amp;way=down&amp;par=<?php 
                echo $smarty->_tpl_vars['data']['parent'];
                ?>
&amp;type=<?php 
                echo $smarty->_tpl_vars['data']['mtype'];
                ?>
&amp;ordt=<?php 
                echo $_GET['ordt'];
                ?>
&amp;ordl=<?php 
                echo $_GET['ordl'];
                ?>
&amp;menutype=<?php 
                echo $smarty->_tpl_vars['menuType'];
                ?>
&amp;mid=<?php 
                echo $_GET['mid'];
                ?>
" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_waydown'];
                ?>
">
						<img src="<?php 
                echo $smarty->_tpl_vars['theme_dir'];
                ?>
/images/admin/down.gif" border="0" alt="<?php 
                echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_waydown'];
                ?>
" />
					</a>
				</td>
			</tr>
			<?php 
                if ($smarty->_tpl_vars['data']['element']) {
                    ?>
				<?php 
                    smarty_fun_menu($smarty, array('list' => $smarty->_tpl_vars['data']['element']));
                    ?>
			<?php 
                }
                ?>
			<?php 
            }
        } else {
            ?>
				<tr>
					<td colspan="<?php 
            if ($smarty->_tpl_vars['menuType'] == 'index') {
                ?>
7<?php 
            } else {
                ?>
6<?php 
            }
            ?>
" class="empty">
						<img src="<?php 
            echo $smarty->_tpl_vars['theme_dir'];
            ?>
/images/admin/error.gif" border="0" alt="<?php 
            echo $smarty->_tpl_vars['locale']['admin_menus']['warning_no_menu'];
            ?>
" />
						<?php 
            echo $smarty->_tpl_vars['locale']['admin_menus']['warning_no_menu'];
            ?>

					</td>
				</tr>
			<?php 
        }
        unset($_from);
        ?>
		<?php 
        $smarty->_tpl_vars = $_fun_tpl_vars;
    }
コード例 #2
0
    function smarty_fun_menu(&$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['data']) {
                ?>
				<tr class="<?php 
                echo smarty_function_cycle(array('values' => "row1,row2"), $this);
                ?>
">
					<td class="first">
						<?php 
                $this->assign('flag', $this->_tpl_vars['data']['clang']);
                ?>
						<?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['data']['clang'];
                    ?>
" />
						<?php 
                } else {
                    ?>
							<?php 
                    echo $this->_tpl_vars['data']['clang'];
                    ?>

						<?php 
                }
                ?>
					</td>
					<td>
						<?php 
                if ($this->_tpl_vars['data']['is_sub'] == '1') {
                    ?>
							<a href="admin.php?p=<?php 
                    echo $this->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $this->_tpl_vars['this_page'];
                    ?>
&amp;cid=<?php 
                    echo $this->_tpl_vars['data']['cid'];
                    ?>
" 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['data']['level'] != 0) {
                    ?>
style="padding-left: <?php 
                    echo $this->_tpl_vars['data']['level'] * 10;
                    ?>
px;"<?php 
                }
                ?>
>
						<?php 
                echo $this->_tpl_vars['data']['title'];
                ?>

					</td>
					<td><?php 
                echo $this->_tpl_vars['data']['ausr'];
                ?>
</td>
					<td><?php 
                echo $this->_tpl_vars['data']['adate'];
                ?>
</td>
					<td><?php 
                echo $this->_tpl_vars['data']['musr'];
                ?>
</td>
					<td><?php 
                echo $this->_tpl_vars['data']['mdate'];
                ?>
</td>
					<td class="last">
						<?php 
                if ($this->_tpl_vars['data']['isact'] == 1) {
                    ?>
							<a class="action act" href="admin.php?p=<?php 
                    echo $this->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $this->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=act&amp;cid=<?php 
                    echo $this->_tpl_vars['data']['cid'];
                    ?>
" title="<?php 
                    echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_inactive'];
                    ?>
"></a>
						<?php 
                } else {
                    ?>
							<a class="action inact" href="admin.php?p=<?php 
                    echo $this->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $this->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=act&amp;cid=<?php 
                    echo $this->_tpl_vars['data']['cid'];
                    ?>
" title="<?php 
                    echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_active'];
                    ?>
"></a>
						<?php 
                }
                ?>
						<a class="action mod" href="admin.php?p=<?php 
                echo $this->_tpl_vars['self'];
                ?>
&amp;act=<?php 
                echo $this->_tpl_vars['this_page'];
                ?>
&amp;sub_act=mod&amp;cid=<?php 
                echo $this->_tpl_vars['data']['cid'];
                ?>
&amp;par=<?php 
                echo $this->_tpl_vars['data']['cparent'];
                ?>
" title="<?php 
                echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_modify'];
                ?>
"></a>
						<a class="action del" href="javascript: if (confirm('<?php 
                echo $this->_tpl_vars['locale']['admin_shop']['category_confirm_del'];
                ?>
')) document.location.href='admin.php?p=<?php 
                echo $this->_tpl_vars['self'];
                ?>
&amp;act=<?php 
                echo $this->_tpl_vars['this_page'];
                ?>
&amp;sub_act=del&amp;cid=<?php 
                echo $this->_tpl_vars['data']['cid'];
                ?>
';" title="<?php 
                echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_delete'];
                ?>
"></a>
						<?php 
                if ($this->_tpl_vars['add_new']) {
                    ?>
							<a class="action submenu" href="admin.php?p=<?php 
                    echo $this->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $this->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=add&amp;par=<?php 
                    echo $this->_tpl_vars['data']['cid'];
                    ?>
" title="<?php 
                    echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_subcat'];
                    ?>
"></a>
						<?php 
                }
                ?>
						<?php 
                if ($_SESSION['site_shop_ordertype'] == 2) {
                    ?>
						<a class="action up" href="admin.php?p=<?php 
                    echo $this->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $this->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=ord&amp;cid=<?php 
                    echo $this->_tpl_vars['data']['cid'];
                    ?>
&amp;way=up&amp;par=<?php 
                    echo $this->_tpl_vars['data']['cparent'];
                    ?>
" title="<?php 
                    echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_way_up'];
                    ?>
"></a>
						<a class="action down" href="admin.php?p=<?php 
                    echo $this->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $this->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=ord&amp;cid=<?php 
                    echo $this->_tpl_vars['data']['cid'];
                    ?>
&amp;way=down&amp;par=<?php 
                    echo $this->_tpl_vars['data']['cparent'];
                    ?>
" title="<?php 
                    echo $this->_tpl_vars['locale']['admin_shop']['category_field_list_way_down'];
                    ?>
"></a>
						<?php 
                }
                ?>
					</td>
				</tr>
			<?php 
                if ($this->_tpl_vars['data']['element']) {
                    ?>
				<?php 
                    smarty_fun_menu($this, array('list' => $this->_tpl_vars['data']['element']));
                    ?>
			<?php 
                }
                ?>
			<?php 
            }
        } else {
            ?>
				<tr>
					<td colspan="8" class="empty">
						<img src="<?php 
            echo $this->_tpl_vars['theme_dir'];
            ?>
/images/admin/error.gif" border="0" alt="<?php 
            echo $this->_tpl_vars['locale']['admin_shop']['category_warning_empty'];
            ?>
" />
						<?php 
            echo $this->_tpl_vars['locale']['admin_shop']['category_warning_empty'];
            ?>

					</td>
				</tr>
			<?php 
        }
        unset($_from);
        ?>
			<?php 
        $this->_tpl_vars = $_fun_tpl_vars;
    }
コード例 #3
0
    function smarty_fun_menu(&$smarty, $params)
    {
        $_fun_tpl_vars = $smarty->_tpl_vars;
        $smarty->assign($params);
        ?>
			<?php 
        $_from = $smarty->_tpl_vars['list'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        if (count($_from)) {
            foreach ($_from as $smarty->_tpl_vars['data']) {
                ?>
				<tr class="<?php 
                echo smarty_function_cycle(array('values' => "row1,row2"), $smarty);
                ?>
">
					<td class="first" <?php 
                if ($smarty->_tpl_vars['data']['level'] > 1) {
                    ?>
style="padding-left: <?php 
                    echo $smarty->_tpl_vars['data']['level'] * 20;
                    ?>
px;"<?php 
                }
                ?>
><a onmouseover="this.T_WIDTH=180;this.T_BGCOLOR='#99ABB9';this.T_FONTCOLOR='#FFFFFF';this.T_BORDERCOLOR='#B9C7D2';return escape('<u><i><?php 
                echo $smarty->_tpl_vars['locale']['admin_gallery']['list_description'];
                ?>
</i></u><br><?php 
                echo is_array($_tmp = $smarty->_tpl_vars['data']['description']) ? $smarty->_run_mod_handler('escape', true, $_tmp, 'quotes') : smarty_modifier_escape($_tmp, 'quotes');
                ?>
')"><?php 
                echo $smarty->_tpl_vars['data']['name'];
                ?>
</a></td>
					<td><?php 
                echo $smarty->_tpl_vars['data']['add_date'];
                ?>
</td>
					<td class="last">
						<?php 
                if ($smarty->_tpl_vars['data']['is_active']) {
                    ?>
							<a class="action act" href="admin.php?p=<?php 
                    echo $smarty->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $smarty->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=act&amp;gid=<?php 
                    echo $smarty->_tpl_vars['data']['gid'];
                    ?>
" title="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_gallery']['list_inactive'];
                    ?>
"></a>
						<?php 
                } else {
                    ?>
							<a class="action inact" href="admin.php?p=<?php 
                    echo $smarty->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $smarty->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=act&amp;gid=<?php 
                    echo $smarty->_tpl_vars['data']['gid'];
                    ?>
" title="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_gallery']['list_active'];
                    ?>
"></a>
						<?php 
                }
                ?>
						<?php 
                if ($smarty->_tpl_vars['data']['level'] < 3) {
                    ?>
						<a href="admin.php?p=<?php 
                    echo $smarty->_tpl_vars['self'];
                    ?>
&amp;act=<?php 
                    echo $smarty->_tpl_vars['this_page'];
                    ?>
&amp;sub_act=gadd&amp;par=<?php 
                    echo $smarty->_tpl_vars['data']['gid'];
                    ?>
" title="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_submenu'];
                    ?>
">
							<img src="<?php 
                    echo $smarty->_tpl_vars['theme_dir'];
                    ?>
/images/admin/submenu.gif" border="0" alt="<?php 
                    echo $smarty->_tpl_vars['locale']['admin_menus']['field_list_submenu'];
                    ?>
" />
						</a>
						<?php 
                }
                ?>
						<a class="action mod" href="admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=<?php 
                echo $smarty->_tpl_vars['this_page'];
                ?>
&amp;sub_act=gmod&amp;gid=<?php 
                echo $smarty->_tpl_vars['data']['gid'];
                ?>
" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_gallery']['list_modify'];
                ?>
"></a>
						<a class="action" style="background: url(<?php 
                echo $smarty->_tpl_vars['theme_dir'];
                ?>
/images/admin/gallery.gif) no-repeat top left;" href="admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=<?php 
                echo $smarty->_tpl_vars['this_page'];
                ?>
&amp;sub_act=plst&amp;gid=<?php 
                echo $smarty->_tpl_vars['data']['gid'];
                ?>
" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_gallery']['list_gallery'];
                ?>
"></a>
						<a class="action del" href="javascript: if (confirm('<?php 
                echo $smarty->_tpl_vars['locale']['admin_gallery']['confirm_gallery_del'];
                ?>
')) document.location.href='admin.php?p=<?php 
                echo $smarty->_tpl_vars['self'];
                ?>
&amp;act=<?php 
                echo $smarty->_tpl_vars['this_page'];
                ?>
&amp;sub_act=gdel&amp;gid=<?php 
                echo $smarty->_tpl_vars['data']['gid'];
                ?>
';" title="<?php 
                echo $smarty->_tpl_vars['locale']['admin_gallery']['list_delete'];
                ?>
"></a>
					</td>
				</tr>
			<?php 
                if ($smarty->_tpl_vars['data']['element']) {
                    ?>
				<?php 
                    smarty_fun_menu($smarty, array('list' => $smarty->_tpl_vars['data']['element']));
                    ?>
			<?php 
                }
                ?>
			<?php 
            }
        } else {
            ?>
				<tr>
					<td colspan="2" class="empty">
						<img src="<?php 
            echo $smarty->_tpl_vars['theme_dir'];
            ?>
/images/admin/error.gif" border="0" alt="<?php 
            echo $smarty->_tpl_vars['locale']['admin_gallery']['warning_gallery_empty'];
            ?>
" />
						<?php 
            echo $smarty->_tpl_vars['locale']['admin_gallery']['warning_gallery_empty'];
            ?>

					</td>
				</tr>
			<?php 
        }
        unset($_from);
        ?>
			<?php 
        $smarty->_tpl_vars = $_fun_tpl_vars;
    }
コード例 #4
0
    function smarty_fun_menu(&$this, $params)
    {
        $_fun_tpl_vars = $this->_tpl_vars;
        $this->assign($params);
        ?>
		<ul>
			<?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['menupont']) {
                ?>
				<li>
					<?php 
                if ($this->_tpl_vars['list']['0']['level'] == '1') {
                    ?>
						<div><a href="index.php?mid=<?php 
                    echo $this->_tpl_vars['menupont']['menu_id'];
                    ?>
" title="<?php 
                    echo is_array($_tmp = $this->_tpl_vars['menupont']['menu_name']) ? $this->_run_mod_handler('htmlspecialchars', true, $_tmp) : htmlspecialchars($_tmp);
                    ?>
"><?php 
                    echo is_array($_tmp = $this->_tpl_vars['menupont']['menu_name']) ? $this->_run_mod_handler('htmlspecialchars', true, $_tmp) : htmlspecialchars($_tmp);
                    ?>
</a></div>
					<?php 
                } else {
                    ?>
						<a href="index.php?mid=<?php 
                    echo $this->_tpl_vars['menupont']['menu_id'];
                    ?>
" title="<?php 
                    echo is_array($_tmp = $this->_tpl_vars['menupont']['menu_name']) ? $this->_run_mod_handler('htmlspecialchars', true, $_tmp) : htmlspecialchars($_tmp);
                    ?>
"><?php 
                    echo is_array($_tmp = $this->_tpl_vars['menupont']['menu_name']) ? $this->_run_mod_handler('htmlspecialchars', true, $_tmp) : htmlspecialchars($_tmp);
                    ?>
</a>
					<?php 
                }
                ?>
							
					<?php 
                if ($this->_tpl_vars['menupont']['element']) {
                    ?>
						<?php 
                    smarty_fun_menu($this, array('list' => $this->_tpl_vars['menupont']['element']));
                    ?>
					<?php 
                }
                ?>
				</li>
			<?php 
            }
        }
        unset($_from);
        ?>
		</ul>
	<?php 
        $this->_tpl_vars = $_fun_tpl_vars;
    }