163 lines
5.7 KiB
PHP
163 lines
5.7 KiB
PHP
<?php /* Smarty version Smarty-3.1.13, created on 2022-04-27 15:28:45
|
||
compiled from "tpl/tpl_instruction_razdel.html" */ ?>
|
||
<?php /*%%SmartyHeaderCode:1298699140626936fd739177-15808854%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
'file_dependency' =>
|
||
array (
|
||
'a0adb155451b8e18d4a7a685875ef7a04dd8c7b4' =>
|
||
array (
|
||
0 => 'tpl/tpl_instruction_razdel.html',
|
||
1 => 1626426203,
|
||
2 => 'file',
|
||
),
|
||
),
|
||
'nocache_hash' => '1298699140626936fd739177-15808854',
|
||
'function' =>
|
||
array (
|
||
),
|
||
'variables' =>
|
||
array (
|
||
'msg' => 0,
|
||
'categoryAll' => 0,
|
||
'k' => 0,
|
||
'cat' => 0,
|
||
'edu' => 0,
|
||
),
|
||
'has_nocache_code' => false,
|
||
'version' => 'Smarty-3.1.13',
|
||
'unifunc' => 'content_626936fd77bb82_67472757',
|
||
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
<?php if ($_valid && !is_callable('content_626936fd77bb82_67472757')) {function content_626936fd77bb82_67472757($_smarty_tpl) {?><div class="row-fluid">
|
||
<div class="span12">
|
||
<h3 class="page-title">Разделы инструкций</h3>
|
||
<ul class="breadcrumb">
|
||
<li><a href="/">Главная</a><span class="divider">/</span></li>
|
||
<li><a href="/help/">Инструкции</a><span class="divider">/</span></li>
|
||
<li class="active"><a href="/help/razdel/">Разделы</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<?php if (($_smarty_tpl->tpl_vars['msg']->value==1)){?>
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Раздел успешно добавлен</strong>
|
||
</div>
|
||
<?php }?>
|
||
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
<div class="widget green">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> Разделы инструкций</h4>
|
||
<span class="tools">
|
||
<a href="javascript:;" class="icon-chevron-down"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<table class="table table-striped table-bordered table-advance table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th>№</th>
|
||
<th><i class="icon-bullhorn"></i> Название</th>
|
||
<th><i class="icon-bookmark"></i> Родительская</th>
|
||
<th><i class="icon-bookmark"></i> Позиция</th>
|
||
<th>--</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['categoryAll']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
|
||
$_smarty_tpl->tpl_vars['cat']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['cat']->key;
|
||
?>
|
||
<tr>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['cat']->value['name'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['cat']->value['razdel'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['cat']->value['position'];?>
|
||
</td>
|
||
<td><!--span class="btn btn-danger del-education" data-id="<?php echo $_smarty_tpl->tpl_vars['edu']->value['id'];?>
|
||
">Удалить</span--></td>
|
||
</tr>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<!--ДОБАЛЕНИЕ-->
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> Добавление нового раздела</h4>
|
||
<span class="tools">
|
||
<a href="javascript:;" class="icon-chevron-down"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<form name="add_category" action="" class="form-horizontal" method="POST">
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" style="min-width: 200px!important;">Название раздела</label>
|
||
<div class="controls">
|
||
<div class="input-prepend" style="width: 90%;">
|
||
<input type="text" name="name" class="form-control" style="width: 90%;" required />
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" style="min-width: 200px!important;">Родитель</label>
|
||
<div class="controls">
|
||
<div class="input-prepend" style="width: 90%;">
|
||
<select name="id_main" class="form-control">
|
||
<option value="0">нет</option>
|
||
<?php $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cat']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['categoryAll']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value){
|
||
$_smarty_tpl->tpl_vars['cat']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['cat']->key;
|
||
?>
|
||
<option value="<?php echo $_smarty_tpl->tpl_vars['cat']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['cat']->value['name'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<input type="submit" name="add_category" value="Добавить" class="btn btn-success" />
|
||
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php }} ?>
|