Viewing file: 821fde24c6bbfd9626fea49de71a4c835f478490.file.item.tpl.php (8.01 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /* Smarty version Smarty3-RC3, created on 2020-11-24 22:29:54 compiled from "modules/topmenu/templates/item.tpl" */ ?> <?php /*%%SmartyHeaderCode:9134444865fbd6d420b2c73-70466557%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '821fde24c6bbfd9626fea49de71a4c835f478490' => array ( 0 => 'modules/topmenu/templates/item.tpl', 1 => 1606239473, ), ), 'nocache_hash' => '9134444865fbd6d420b2c73-70466557', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?> <?php if (!is_callable('smarty_function_html_options')) include 'modules-alien/smarty/libs/plugins/function.html_options.php'; ?><form class="editorform" method="post"> <table class="editor-table"> <tr> <th> <div id="current-language"> <?php $_smarty_tpl->tpl_vars['lang'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('languages')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']=0; if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['lang']->key => $_smarty_tpl->tpl_vars['lang']->value){ $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']++; ?> <input type="radio" <?php if ($_smarty_tpl->tpl_vars['lang']->value==$_smarty_tpl->getVariable('alang')->value){?> checked="checked" <?php }?> id="current-language<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration'];?> " name="current-language" value="<?php echo $_smarty_tpl->tpl_vars['lang']->value;?> " /><label for="current-language<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration'];?> "><img src="/admin/images/<?php echo $_smarty_tpl->tpl_vars['lang']->value;?> 30x20.gif" /></label> <?php }} ?> </div> </th> </tr> <tr> <td> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Menu_item_parent_id'];?> :<br /> <select name="item_parent_id" id="item_parent_id"> <?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('items')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){ ?> <option value="<?php echo $_smarty_tpl->tpl_vars['item']->value['item_id'];?> " <?php if ($_smarty_tpl->tpl_vars['item']->value['item_id']==$_smarty_tpl->getVariable('item_parent_id')->value){?> selected="selected" <?php }?>><?php echo $_smarty_tpl->tpl_vars['item']->value['title'];?> </option> <?php }} ?> </select> </td> </tr> <tr> <td> <div class="ukr"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Menu_item_title'];?> (<img src="/admin/images/ukr30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="3" cols="80" name="item_title_ukr" id="item_title_ukr"><?php echo $_smarty_tpl->getVariable('item_title_ukr')->value;?> </textarea> </div> <div class="rus"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Menu_item_title'];?> (<img src="/admin/images/rus30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="3" cols="80" name="item_title_rus" id="item_title_rus"><?php echo $_smarty_tpl->getVariable('item_title_rus')->value;?> </textarea> </div> <div class="eng"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Menu_item_title'];?> (<img src="/admin/images/eng30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="3" cols="80" name="item_title_eng" id="item_title_eng"><?php echo $_smarty_tpl->getVariable('item_title_eng')->value;?> </textarea> </div> </td> </tr> <tr> <td><div id="constructor" style="display:block;"> <table> <tr> <td><?php echo $_smarty_tpl->getVariable('ALANG')->value['Pages_chapter_title'];?> :</td> <td><select name="chapter_id" id="chapters-select"> <option value="0"> </option> <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->getVariable('chapters_ids')->value,'output'=>$_smarty_tpl->getVariable('chapters_names')->value,'selected'=>$_smarty_tpl->getVariable('chapter_id')->value),$_smarty_tpl->smarty,$_smarty_tpl);?>
</select></td> </tr> <tr> <td><?php echo $_smarty_tpl->getVariable('ALANG')->value['Pages_page_title'];?> :</td> <td><select name="page_id" id="pages-select"> </select></td> </tr> </table> </div></td> </tr> <tr> <td><?php echo $_smarty_tpl->getVariable('ALANG')->value['Pages_item_link'];?> :<br /> <input name="item_link" type="text" id="item_link" value="<?php echo $_smarty_tpl->getVariable('item_link')->value;?> " size="80" /></td> </tr> <tr> <td><?php echo $_smarty_tpl->getVariable('ALANG')->value['Pages_item_target'];?> :<br /> <select name="item_target"> <?php echo smarty_function_html_options(array('values'=>array('_self','_blank'),'output'=>array($_smarty_tpl->getVariable('ALANG')->value['MenuItemTargetSelf'],$_smarty_tpl->getVariable('ALANG')->value['MenuItemTargetBlank']),'selected'=>$_smarty_tpl->getVariable('item_target')->value),$_smarty_tpl->smarty,$_smarty_tpl);?> </select> </td> </tr> <tr> <td><input value="<?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreSave'];?> " type="submit" name="submit" id="submit" class="ui-state-default ui-widget ui-corner-all" /></td> </tr> </table> <input type="hidden" name="<?php echo $_smarty_tpl->getVariable('oper')->value;?> " value="yes" /> </form> <script language="javascript"> function update_link() { $.post("/admin-asynch.php?mod=Pages&link&create",{ "page_id" : $('#pages-select').val(), "chapter_id" : $("#chapters-select").val() }, function(data) { $("#item_link").val(data.link); }, 'json'); } $(document).ready(function() { $.post("admin-asynch.php?mod=Pages&link&parse", { "link" : $("#item_link").val() }, function(data1) { if (data1.mod == 'Pages') { $.post("/admin-asynch.php?mod=Pages&get&chapters",{ }, function(data2) { var options = ''; var selected = ''; $(data2).each(function() { selected = ''; if ($(this).attr('id') == data1.chapter_id) selected = 'selected = "selected"'; options += '<option value="' + $(this).attr('id') + '"' + selected + '>' + $(this).attr('title') + '</option>'; }); $('#chapters-select').html(options); $.post("/admin-asynch.php?mod=Pages&get&pages",{ "chapter_id" : data1.chapter_id}, function(data3) { var options = ''; var selected = ''; $(data3).each(function() { selected = ''; if ($(this).attr('id') == data1.page_id) selected = 'selected = "selected"'; options += '<option value="' + $(this).attr('id') + '"' + selected + '>' + $(this).attr('title') + '</option>'; }); $('#pages-select').html(options); update_link(); $('#chapters-select, #pages-select').change(function() { update_link(); }); $('#chapters-select').change(function() { $.post("admin-asynch.php?mod=Pages&get&pages",{ "chapter_id" : $('#chapters-select').val() }, function(data3) { var options = ''; var selected = ''; $(data3).each(function() { selected = ''; if ($(this).attr('id') == data1.page_id) selected = 'selected = "selected"'; options += '<option value="' + $(this).attr('id') + '"' + selected + '>' + $(this).attr('title') + '</option>'; }); $('#pages-select').html(options); update_link(); }, 'json'); }); }, 'json'); }, 'json'); } }, 'json'); }); </script>
|