Viewing file: 3e4cf01bd8dbe65abbcb70c1fb2404eb875f3682.file.poll.tpl.php (8.21 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /* Smarty version Smarty3-RC3, created on 2012-03-12 01:50:26 compiled from "modules/polls/templates/poll.tpl" */ ?> <?php /*%%SmartyHeaderCode:1203062014f5d3a42330b83-68480419%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '3e4cf01bd8dbe65abbcb70c1fb2404eb875f3682' => array ( 0 => 'modules/polls/templates/poll.tpl', 1 => 1331500183, ), ), 'nocache_hash' => '1203062014f5d3a42330b83-68480419', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?> <?php if (!is_callable('smarty_function_html_radios')) include 'modules-alien/smarty/libs/plugins/function.html_radios.php'; ?><form class="editorform" method="post"> <table align="center" class="editor-table admin-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 align="left" valign="middle"> <div class="ukr"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_question'];?> (<img src="/admin/images/ukr30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="3" cols="80" name="poll_question_ukr" id="poll_question_ukr"><?php echo $_smarty_tpl->getVariable('poll_question_ukr')->value;?> </textarea> </div> <div class="rus"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_question'];?> (<img src="/admin/images/rus30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="3" cols="80" name="poll_question_rus" id="poll_question_rus"><?php echo $_smarty_tpl->getVariable('poll_question_rus')->value;?> </textarea> </div> <div class="eng"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_question'];?> (<img src="/admin/images/eng30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="3" cols="80" name="poll_question_eng" id="poll_question_eng"><?php echo $_smarty_tpl->getVariable('poll_question_eng')->value;?> </textarea> </div> <table id="poll-answers"> <tbody> <!--<thead style="display:none">--> <tr valign="top" style="display:none"> <td valign="top"><br /> <a href="#" class="delete">удалить</a></td> <td> <div class="ukr"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_answer'];?> (<img src="/admin/images/ukr30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="2" cols="65" name="poll_answers_ukr[]"></textarea> </div> <div class="rus"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_answer'];?> (<img src="/admin/images/rus30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="2" cols="65" name="poll_answers_rus[]"></textarea> </div> <div class="eng"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_answer'];?> (<img src="/admin/images/eng30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="2" cols="65" name="poll_answers_eng[]"></textarea> </div> </td> <td><span style="float:right"> <br /> <input name="poll_results[]" type="text" value="" size="4" maxlength="4" /> </span></td> </tr> <!-- </thead> <tbody>--> <?php $_smarty_tpl->tpl_vars['poll_answer'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('poll_answers_ukr')->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['poll_answer']->key => $_smarty_tpl->tpl_vars['poll_answer']->value){ $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']++; ?> <tr valign="top"> <td valign="top"><br /> <a href="#" class="delete">удалить</a></td> <td> <div class="ukr"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_answer'];?> (<img src="/admin/images/ukr30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="2" cols="65" name="poll_answers_ukr[]"><?php echo stripslashes($_smarty_tpl->getVariable('poll_answers_ukr')->value[$_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration']]);?> </textarea> </div> <div class="rus"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_answer'];?> (<img src="/admin/images/rus30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="2" cols="65" name="poll_answers_rus[]"><?php echo stripslashes($_smarty_tpl->getVariable('poll_answers_rus')->value[$_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration']]);?> </textarea> </div> <div class="eng"> <?php echo $_smarty_tpl->getVariable('ALANG')->value['Polls_poll_answer'];?> (<img src="/admin/images/eng30x20.gif" align="absmiddle" height="10" />):<br /> <textarea rows="2" cols="65" name="poll_answers_eng[]"><?php echo stripslashes($_smarty_tpl->getVariable('poll_answers_eng')->value[$_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration']]);?> </textarea> </div> </td> <td><span style="float:right"> <br /> <input name="poll_results[]" type="text" id="poll_results[]" value="<?php echo $_smarty_tpl->getVariable('poll_results')->value[$_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration']];?> " size="4" maxlength="4" /> </span></td> </tr> <?php }} ?> </tbody> </table> <br /> <a href="#" id="poll-add">Добавить еще один пункт</a><br /> <br /> <?php echo smarty_function_html_radios(array('name'=>'poll_state','values'=>array('Y','N','H'),'output'=>array($_smarty_tpl->getVariable('ALANG')->value['PollsStateY'],$_smarty_tpl->getVariable('ALANG')->value['PollsStateN'],$_smarty_tpl->getVariable('ALANG')->value['PollsStateH']),'selected'=>$_smarty_tpl->getVariable('poll_state')->value,'separator'=>'<br />'),$_smarty_tpl->smarty,$_smarty_tpl);?> </td> </tr> <tr> <td align="center" valign="middle"><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 type="text/javascript"> $(document).ready(function() { $("#poll-answers").tableDnD({ onDragClass: "selected" }); $(".delete").live("click", function() { if (!confirm("delete_question".l())) return false; $(this).parent().parent().fadeOut(1000, function() { $(this).remove(); }); return false; }); $("#poll-add").click(function() { $("#poll-answers > tbody tr:last").after("<tr>"+$("#poll-answers > tbody tr:eq(0)").html()+"</tr>"); $("#poll-answers").tableDnD({ onDragClass: "selected" }); return false; }); }); </script>
|