262 lines
9.7 KiB
PHP
262 lines
9.7 KiB
PHP
<?php /* Smarty version Smarty-3.1.13, created on 2022-05-25 14:39:24
|
||
compiled from "tpl/tpl_college_admin.html" */ ?>
|
||
<?php /*%%SmartyHeaderCode:616711263628e156ca24401-61326817%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
'file_dependency' =>
|
||
array (
|
||
'59437af693689a420c7d1a8928e9650aeb1015ce' =>
|
||
array (
|
||
0 => 'tpl/tpl_college_admin.html',
|
||
1 => 1626191289,
|
||
2 => 'file',
|
||
),
|
||
),
|
||
'nocache_hash' => '616711263628e156ca24401-61326817',
|
||
'function' =>
|
||
array (
|
||
),
|
||
'variables' =>
|
||
array (
|
||
'msg' => 0,
|
||
'razdels' => 0,
|
||
'k' => 0,
|
||
'razdel' => 0,
|
||
'treat' => 0,
|
||
'docs' => 0,
|
||
'doc' => 0,
|
||
),
|
||
'has_nocache_code' => false,
|
||
'version' => 'Smarty-3.1.13',
|
||
'unifunc' => 'content_628e156ca7b946_83523541',
|
||
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
<?php if ($_valid && !is_callable('content_628e156ca7b946_83523541')) {function content_628e156ca7b946_83523541($_smarty_tpl) {?><!-- BEGIN PAGE HEADER-->
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<h3 class="page-title">Учительская СПО</h3>
|
||
<ul class="breadcrumb">
|
||
<li class="active"><a href="/college/admin/">Администрирование</a><span class="divider">/</span></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-->
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['razdel'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['razdel']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['razdels']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['razdel']->key => $_smarty_tpl->tpl_vars['razdel']->value){
|
||
$_smarty_tpl->tpl_vars['razdel']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['razdel']->key;
|
||
?>
|
||
<tr>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['razdel']->value['name'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['razdel']->value['category'];?>
|
||
</td>
|
||
<!--td><span data-id="<?php echo $_smarty_tpl->tpl_vars['treat']->value['id_tr'];?>
|
||
" class="badge badge-warning del-treat">Удалить</span></td-->
|
||
</tr>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
|
||
<hr />
|
||
<form name="add_college_razdel" method="post">
|
||
<label>Название: <input type="text" name="name" class="form-control" required /></label>
|
||
<label>Категория:
|
||
<select name="category" class="form-control">
|
||
<option value="1">Учебно-организационный отдел</option>
|
||
<option value="2">Учебно-воспитательный отдел</option>
|
||
<option value="3">Учебно-методический отдел</option>
|
||
<option value="4">Физкультура и спорт</option>
|
||
</select>
|
||
</label>
|
||
<br />
|
||
<input type="submit" name="add_college_razdel" value="Добавить" class="btn btn-success" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!--Договоры на кафедры о практике-->
|
||
<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><i class="icon-bookmark"></i> Раздел</th>
|
||
<!--th><i class="icon-bookmark"></i> Операции</th-->
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['doc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['doc']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['docs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['doc']->key => $_smarty_tpl->tpl_vars['doc']->value){
|
||
$_smarty_tpl->tpl_vars['doc']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['doc']->key;
|
||
?>
|
||
<tr>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['doc']->value['name'];?>
|
||
</td>
|
||
<td><a href="/<?php echo $_smarty_tpl->tpl_vars['doc']->value['link'];?>
|
||
">Посмотреть</a></td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['doc']->value['date_create'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['doc']->value['name_razdel'];?>
|
||
</td>
|
||
<!--td><span data-id="<?php echo $_smarty_tpl->tpl_vars['treat']->value['id_tr'];?>
|
||
" class="badge badge-warning del-treat">Удалить</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">
|
||
<span style="color: red;">Все поля обязательны к заполнению!</span>
|
||
|
||
<form name="add_docs" action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
||
<div class="control-group">
|
||
<label class="control-label" style="min-width: 200px!important;">Раздел</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="id_razdel" class="form-control">
|
||
<?php $_smarty_tpl->tpl_vars['razdel'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['razdel']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['razdels']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['razdel']->key => $_smarty_tpl->tpl_vars['razdel']->value){
|
||
$_smarty_tpl->tpl_vars['razdel']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['razdel']->key;
|
||
?>
|
||
<option value="<?php echo $_smarty_tpl->tpl_vars['razdel']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['razdel']->value['name'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"> Выберите из списка</span>
|
||
</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%;">
|
||
<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" >
|
||
<input type="hidden" name="max_file_size" value="20971520">
|
||
<input type="file" class=" tooltips" data-trigger="hover" data-original-title="Загрузить файл (не более 20 Мб)" name="file" accept=".zip,.rar,.pdf,.doc,.docx,image/jpeg,image/png,image/gif" required />
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<input type="submit" name="add_docs" value="Загрузить" class="btn btn-success" />
|
||
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){
|
||
//удаление договора о практической подготовке
|
||
$(".del-treat").click(function(){
|
||
var id = $(this).data("id");
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=delete_treat&id='+id,
|
||
success: function(data){
|
||
alert('Договор удален!');
|
||
location.href='/kafedra/treaties/';
|
||
}
|
||
});
|
||
|
||
});
|
||
|
||
|
||
});
|
||
</script><?php }} ?>
|