%%FB^FB4^FB45BCA9%%catalogs_years.tpl.php
3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php /* Smarty version 2.6.16, created on 2015-07-13 17:01:46
compiled from catalogs_years.tpl */ ?>
<h3>Ãîäà äëÿ <?php echo $this->_tpl_vars['rubric']['name']; ?>
</h3>
<script language="javascript"><?php echo '
var i = 0;
function deleteAppendChild(obj){
form = document.getElementById(\'form\');
form.removeChild(document.getElementById(\'p_\'+obj));
}
function funAppendChild(){
i++;
var txt = \'Welcome to RoseIndia.net\';
form = document.getElementById(\'form\');
var p = document.createElement(\'p\');
p.setAttribute("id",\'p_\'+i);
form.appendChild(p);
var inp1 = document.createElement(\'input\');
inp1.type = \'text\';
inp1.size = \'50\';
inp1.name = \'filter[]\';
p.appendChild(inp1);
var del = document.createElement(\'input\');
del.type = \'button\';
del.value = \'Óäàëèòü\';
del.setAttribute("onClick",\'deleteAppendChild(\'+i+\');\');
//del.onclick = function () {form.removeChild(document.getElementById(\'p_\'+i)); };
p.appendChild(del);
form.insertBefore(p,myDiv);
}
'; ?>
</script>
<input type="button" value="Ñîçäàòü ãîä" onClick="funAppendChild();" />
<div class="m_form">
<form id="form" method="post" action="<?php echo @URL; ?>
/admin.php?action=catalogs&modAction=years&rubID=<?php echo $this->_tpl_vars['rubric']['id']; ?>
">
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['years']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
$this->_sections['i']['total'] = $this->_sections['i']['loop'];
if ($this->_sections['i']['total'] == 0)
$this->_sections['i']['show'] = false;
} else
$this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):
for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
$this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
$this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first'] = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last'] = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<p id="p_<?php echo $this->_sections['i']['index']+1; ?>
_f"><?php echo $this->_tpl_vars['years'][$this->_sections['i']['index']]['id']; ?>
<input name="filter[]" size="50" type="text" value="<?php echo $this->_tpl_vars['years'][$this->_sections['i']['index']]['name']; ?>
" /><input name="update_id[]" type="hidden" value="<?php echo $this->_tpl_vars['years'][$this->_sections['i']['index']]['id']; ?>
" /><input onClick="del('<?php echo @URL; ?>
admin.php?action=<?php echo $this->_tpl_vars['rules_info_one']['action']; ?>
&modAction=years&rubID=<?php echo $this->_tpl_vars['rubric']['id']; ?>
&deleteID=<?php echo $this->_tpl_vars['years'][$this->_sections['i']['index']]['id']; ?>
')" value="Óäàëèòü" class="submit_red" type="button"></p>
<?php endfor; endif; ?>
<p id="myDiv"><input type="hidden" name="rubric_id" value="<?php echo $this->_tpl_vars['rubric']['id']; ?>
" /><input type="hidden" name="save" /><input type="submit" value=" Ñîõðàíèòü ãîäà " /></p>
</form>
</div>