<?php
/* Smarty version 4.5.2, created on 2024-08-14 19:14:03
  from '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/contents/article.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.2',
  'unifunc' => 'content_66bd01fbd7ff40_12282614',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'cbdc2f173892231edf1b9c6518b1894807aec03c' => 
    array (
      0 => '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/contents/article.tpl',
      1 => 1719405279,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:components/group-buttons.tpl' => 1,
    'file:components/page-header.tpl' => 1,
    'file:components/fields/select.tpl' => 6,
    'file:components/fields/radio.tpl' => 2,
    'file:components/fields/checkbox.tpl' => 2,
    'file:components/fields/input.tpl' => 2,
    'file:components/fields/textarea.tpl' => 2,
    'file:components/fields/data.tpl' => 2,
    'file:components/image-preview.tpl' => 1,
    'file:tinymce_init.tpl' => 1,
    'file:uploads_init.tpl' => 1,
  ),
),false)) {
function content_66bd01fbd7ff40_12282614 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/composer/vendor/smarty/smarty/libs/plugins/function.html_options.php','function'=>'smarty_function_html_options',),1=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/composer/vendor/smarty/smarty/libs/plugins/modifier.date_format.php','function'=>'smarty_modifier_date_format',),));
?>
<form method="post" enctype="multipart/form-data" id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
">
	<!-- Page header -->
	<?php ob_start();
if (!empty($_smarty_tpl->tpl_vars['page']->value)) {
echo (string)$_smarty_tpl->tpl_vars['page']->value;
}
$_prefixVariable1=ob_get_clean();
$_smarty_tpl->_subTemplateRender("file:components/group-buttons.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('url'=>((string)$_smarty_tpl->tpl_vars['generate_url']->value)."?page=".$_prefixVariable1.((string)$_smarty_tpl->tpl_vars['buildQueryString']->value)), 0, false);
?>

	<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "breadcrumb", null, null);?>
		<a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['generate_url']->value, ENT_QUOTES, 'UTF-8', true);?>
" class="breadcrumb-item"><?php if ((isset($_smarty_tpl->tpl_vars['title']->value))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8', true);
}?></a>
		<span class="breadcrumb-item active">Добавить</span>
	<?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

	<?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "showBy", null, null);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

	<?php $_smarty_tpl->_subTemplateRender("file:components/page-header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('buttons'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'buttons'),'breadcrumb'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'breadcrumb'),'showBy'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'showBy')), 0, false);
?>
	<!-- /page header -->

	<div class="content">

		<div class="row">
			<div class="col-md-8">
								<div class="card border shadow-sm">
					<div class="card-header d-flex flex-wrap">
						<h6 class="mb-0">Основное</h6>
						<div class="d-inline-flex ms-auto">
							<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
						</div>
					</div>
					<div class="collapse show">
						<div class="card-body">
							<div class="row">
								<div class="col-md-12 mb-3">
									<div class="form-group form-group-float">
										<label class="form-label <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['sectionId']))) {?>text-danger<?php }?>">Раздел</label>
										<?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['sections']->value,'name'=>"article[sectionId]",'id'=>"sectionId",'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value['sectionId'] ?? null)===null||$tmp==='' ? 0 ?? null : $tmp),'class'=>"form-control form-control-sm select"),$_smarty_tpl);?>

									</div>
								</div>
								<div class="col-md-6 mb-3">
									<div class="form-group">
										<label class="form-label <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['title']))) {?>text-danger<?php }?>">Заголовок</label>
										<input type="text" class="form-control" id="title" autocomplete="off" name="article[title]" value="<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['title'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
" onblur="proposeFileName('title', 'fileName', '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['module']->value, ENT_QUOTES, 'UTF-8', true);?>
', '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['config']->value['filename_word_separator'], ENT_QUOTES, 'UTF-8', true);?>
', '<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['config']->value['convert_filename_to_lowercase'], ENT_QUOTES, 'UTF-8', true);?>
');">
									</div>
								</div>
								<div class="col-md-6 mb-3">
									<div class="form-group">
										<label class="form-label">Альтернативное имя</label>
										<input type="text" class="form-control" id="alias" autocomplete="off" name="article[alias]" value="<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['alias'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
">
									</div>
								</div>
								<div class="col-md-12 mb-3">
									<div class="form-group">
										<label class="form-label <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['fileName'])) || (isset($_smarty_tpl->tpl_vars['errors']->value['fileNameExists'])) || (isset($_smarty_tpl->tpl_vars['errors']->value['fileNameProhibited'])) || (isset($_smarty_tpl->tpl_vars['errors']->value['fileNameCharacters']))) {?>text-danger<?php }?>">URL</label>
										<input  type="text" class="form-control" id="fileName" autocomplete="off" name="article[fileName]" value="<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['fileName'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
" />
									</div>
								</div>

								<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['fields']->value, 'field');
$_smarty_tpl->tpl_vars['field']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['field']->value) {
$_smarty_tpl->tpl_vars['field']->do_else = false;
if ($_smarty_tpl->tpl_vars['field']->value['position'] == 'M') {?>
									<?php if ($_smarty_tpl->tpl_vars['field']->value['type'] == 'S') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'array'=>$_smarty_tpl->tpl_vars['field']->value['properties'],'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
									<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'M') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."][]",'array'=>$_smarty_tpl->tpl_vars['field']->value['properties'],'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
									<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'R') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/radio.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'array'=>$_smarty_tpl->tpl_vars['field']->value['properties'],'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'group'=>$_smarty_tpl->tpl_vars['field']->value['radio_group_position'],'class'=>"form-group mb-3"), 0, true);
?>
									<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'C') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/checkbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
									<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'I') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/input.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'name'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'value'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp)), 0, true);
?>
									<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'T') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/textarea.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'name'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'value'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp)), 0, true);
?>
									<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'D') {?>
										<?php $_smarty_tpl->_subTemplateRender("file:components/fields/data.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'name'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'value'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? $_smarty_tpl->tpl_vars['adjustedNow']->value ?? null : $tmp)), 0, true);
?>
									<?php }?>
								<?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
							</div>
						</div>
					</div>
				</div>
				
								<div class="collapse <?php if ((isset($_smarty_tpl->tpl_vars['article']->value['enableGallery'])) && $_smarty_tpl->tpl_vars['article']->value['enableGallery'] == 1) {?>show<?php }?>" id="gallery-card">
					<div class="card border shadow-sm">
						<div class="card-header d-flex flex-wrap">
							<h6 class="mb-0">Фотогалерея</h6>
							<div class="d-inline-flex ms-auto">
								<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
							</div>
						</div>
						<div class="collapse show">
							<div class="card-body">
								<div class="row gallery gallery-product gallery-sortable mt-2 sortable" id="fileList">
									<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['gallery']))) {?>
										<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['article']->value['gallery'], 'file');
$_smarty_tpl->tpl_vars['file']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['file']->value) {
$_smarty_tpl->tpl_vars['file']->do_else = false;
?>
											<figure class="gallery-item mb-0" id="gallery-item-<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
" data-id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
">
												<div class="move_zone image">
													<img src="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['medium'], ENT_QUOTES, 'UTF-8', true);?>
" alt="<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['file']->value['title'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
"/>
													<ul class="gallery-item-controls">
														<li><span><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['orderBy'], ENT_QUOTES, 'UTF-8', true);?>
</span></li>
														<li>
		                                                    <span class="edit_image" id="edit_image_<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
"
																  data-title="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
"
																  data-alias="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['alias'], ENT_QUOTES, 'UTF-8', true);?>
"
																  data-description="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['description'], ENT_QUOTES, 'UTF-8', true);?>
"
																  data-link="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['link'], ENT_QUOTES, 'UTF-8', true);?>
"
																  data-position="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['position'], ENT_QUOTES, 'UTF-8', true);?>
"
																  onclick="editPictureInfo(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
, 'Добавить описание к картинке', 'article');"><i class="ph-note-pencil"></i></span>
														</li>
														<li>
															<span onclick="deletePicture(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
, 'article');"><i class="ph-trash"></i></span>
														</li>
													</ul>
												</div>
												<div class="meta" id="meta_image_<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
">
													<span id="im_title" class="fs-sm fw-normal fw-semibold"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
</span>
													<span id="im_alias" class="fs-sm fw-normal"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['alias'], ENT_QUOTES, 'UTF-8', true);?>
</span>
													<span id="im_description" class="fs-sm fw-normal"><?php echo $_smarty_tpl->tpl_vars['file']->value['description'];?>
</span>
													<span id="im_link" class="fs-sm fw-normal"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['link'], ENT_QUOTES, 'UTF-8', true);?>
</span>
													<span id="im_position" class="badge bg-primary text-white fs-sm fw-light"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['position'], ENT_QUOTES, 'UTF-8', true);?>
</span>
												</div>
											</figure>
										<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
									<?php }?>
								</div>
							</div>

							<div class="card-footer bg-white d-sm-flex justify-content-sm-between align-items-sm-center">
								<button type="button" class="btn btn-sm btn-primary btn-upload read-more" data-type="gallery" data-path="/" data-action="read_more"><i class="ph-image me-2"></i> Загрузить файлы </button>
								<button type="button" class="btn btn-sm btn-primary btn-sorting collapse" data-action="sortPictures" data-module="article"><i class="ph-check me-2"></i> Применить</button>
							</div>
						</div>
					</div>
				</div>
				
				<?php if ($_smarty_tpl->tpl_vars['module']->value == 'song') {?>
										<div class="card border shadow-sm">
						<div class="card-header d-flex flex-wrap">
							<h6 class="mb-0">Песни</h6>
							<div class="d-inline-flex ms-auto">
								<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
							</div>
						</div>
						<div class="collapse show">
							<div class="card-body">
								<div class="form-group sortable-songs" id="songs">
									<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['songs']))) {?>
										<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['article']->value['songs'], 'file');
$_smarty_tpl->tpl_vars['file']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['file']->value) {
$_smarty_tpl->tpl_vars['file']->do_else = false;
?>
											<figure class="song mb-2 song-item" id="song-item-<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
" data-id="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
">
												<div class="input-group">
													<span class="input-group-text"><img src="/admin/assets/ico/<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['fileFormat'], ENT_QUOTES, 'UTF-8', true);?>
.svg" width="30"/></span>
													<input type="text" class="form-control song_title" value="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
" placeholder="Название песни" readonly>

													<button class="btn btn-light edit_sons" id="edit_sons_<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
"
															data-title="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
"
															data-alias="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['alias'], ENT_QUOTES, 'UTF-8', true);?>
"
															data-description="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['description'], ENT_QUOTES, 'UTF-8', true);?>
"
															data-link="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['link'], ENT_QUOTES, 'UTF-8', true);?>
"
															data-position="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['position'], ENT_QUOTES, 'UTF-8', true);?>
"
															onclick="editSongInfo(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
, 'Название песни', 'article');" type="button"><i class="ph-note-pencil"></i></button>
													<input type="text" class="form-control" value="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['fileName'], ENT_QUOTES, 'UTF-8', true);?>
" placeholder="" readonly>
													<button type="button" class="btn btn-danger" onclick="deleteSongs(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
, 'article');"><i class="ph-trash"></i></button>
												</div>
											</figure>
										<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
									<?php }?>
								</div>
							</div>
							<div class="card-footer d-sm-flex justify-content-sm-between align-items-sm-center py-sm-2">
								<button type="button" class="btn btn-sm btn-primary btn-upload btn-docs read-more" data-type="docs" data-path="/" data-action="read_more"><i class="ph-file-doc me-2"></i> Загрузить файл </button>
							</div>
						</div>
					</div>
				<?php }?>

								<div class="card border shadow-sm">
					<div class="card-header d-flex flex-wrap">
						<h6 class="mb-0">Описание</h6>
						<div class="d-inline-flex ms-auto">
							<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
						</div>
					</div>
					<div class="collapse show">
						<div class="card-body flex-column flex-md-row m-0 p-0">
							<ul class="nav nav-tabs nav-tabs-overline border-top-0">
								<li class="nav-item"><a href="#summary" class="nav-link active show" data-bs-toggle="tab">Анонс</a></li>
								<li class="nav-item"><a href="#content" class="nav-link" data-bs-toggle="tab">Подробнее</a></li>
							</ul>

							<div class="tab-content border-top-0 rounded-top-0 mb-0">
								<div class="tab-pane fade show active" id="summary">
									<textarea id="description" name="article[summary]" class="description"><?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['summary'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
</textarea>
								</div>

								<div class="tab-pane fade" id="content">
									<textarea id="description" name="article[content]" class="description"><?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['content'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
</textarea>
								</div>
							</div>
						</div>
					</div>
				</div>
				
			</div>

			<div class="col-md-4">

								<div class="card border shadow-sm">
					<div class="card-header d-flex flex-wrap">
						<h6 class="mb-0">Статус и видимость</h6>
						<div class="d-inline-flex ms-auto">
							<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
						</div>
					</div>
					<div class="collapse show">
						<div class="card-body border-top-0">
														<?php $_smarty_tpl->_subTemplateRender("file:components/fields/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('id'=>"status",'title'=>"Статус",'field'=>"article[status]",'array'=>$_smarty_tpl->tpl_vars['statuses']->value,'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value['status'] ?? null)===null||$tmp==='' ? 'visible' ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
							
							<div class="form-check mb-3">
								<input type="checkbox" class="form-check-input" id="enableGallery" name="article[enableGallery]" value="1" <?php if ((isset($_smarty_tpl->tpl_vars['article']->value['enableGallery'])) && $_smarty_tpl->tpl_vars['article']->value['enableGallery'] == 1) {?>checked<?php }?> data-bs-toggle="collapse" data-bs-target="#gallery-card">
								<label class="form-check-label" for="enableGallery">Фотогалерея к этой публикации</label>
							</div>

							<div class="form-group mb-3">
								<label class="form-label">Дата публикации</label>
								<div class="input-group">
									<span class="input-group-text"><i class="ph-calendar"></i></span>
									<input type="text" class="form-control date-range-single" name="article[publishedOn]" value="<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['publishedOn'] ?? null)===null||$tmp==='' ? $_smarty_tpl->tpl_vars['adjustedNow']->value ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
" readonly>
								</div>
							</div>

														<?php $_smarty_tpl->_subTemplateRender("file:components/fields/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('id'=>"isFeatured",'title'=>"Избранная",'field'=>"article[isFeatured]",'array'=>$_smarty_tpl->tpl_vars['paramIsFeatured']->value,'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value['isFeatured'] ?? null)===null||$tmp==='' ? 0 ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
							
														<?php $_smarty_tpl->_subTemplateRender("file:components/fields/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('id'=>"commentsEnabled",'title'=>"Комментарии",'field'=>"article[commentsEnabled]",'array'=>$_smarty_tpl->tpl_vars['paramSettingComments']->value,'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value['commentsEnabled'] ?? null)===null||$tmp==='' ? 0 ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
							
							<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['fields']->value, 'field');
$_smarty_tpl->tpl_vars['field']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['field']->value) {
$_smarty_tpl->tpl_vars['field']->do_else = false;
if ($_smarty_tpl->tpl_vars['field']->value['position'] == 'S') {?>
								<?php if ($_smarty_tpl->tpl_vars['field']->value['type'] == 'S') {?>
									<?php $_smarty_tpl->_subTemplateRender("file:components/fields/select.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"article[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'array'=>$_smarty_tpl->tpl_vars['field']->value['properties'],'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
								<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'R') {?>
									<?php $_smarty_tpl->_subTemplateRender("file:components/fields/radio.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"article[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'array'=>$_smarty_tpl->tpl_vars['field']->value['properties'],'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'group'=>$_smarty_tpl->tpl_vars['field']->value['radio_group_position'],'class'=>"form-group mb-3"), 0, true);
?>
								<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'C') {?>
									<?php $_smarty_tpl->_subTemplateRender("file:components/fields/checkbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'id'=>((string)$_smarty_tpl->tpl_vars['field']->value['fileName']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'field'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'selected'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp),'class'=>"form-group mb-3"), 0, true);
?>
								<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'I') {?>
									<?php $_smarty_tpl->_subTemplateRender("file:components/fields/input.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'name'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'value'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp)), 0, true);
?>
								<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'T') {?>
									<?php $_smarty_tpl->_subTemplateRender("file:components/fields/textarea.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'name'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'value'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? '' ?? null : $tmp)), 0, true);
?>
								<?php } elseif ($_smarty_tpl->tpl_vars['field']->value['type'] == 'D') {?>
									<?php $_smarty_tpl->_subTemplateRender("file:components/fields/data.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('col'=>((string)$_smarty_tpl->tpl_vars['field']->value['wrapper_class']),'title'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']),'name'=>"field[".((string)$_smarty_tpl->tpl_vars['field']->value['fileName'])."]",'value'=>(($tmp = $_smarty_tpl->tpl_vars['article']->value[$_smarty_tpl->tpl_vars['field']->value['fileName']] ?? null)===null||$tmp==='' ? $_smarty_tpl->tpl_vars['adjustedNow']->value ?? null : $tmp)), 0, true);
?>
								<?php }?>
							<?php }
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

						</div>
						<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['addedOn'])) && (isset($_smarty_tpl->tpl_vars['article']->value['modifiedOn']))) {?>
							<div class="card-footer hstack gap-3 justify-content-between">
								<div class="text-muted">
									<ul class="list list-unstyled mb-0 fs-sm">
										<li>Создано</li>
										<li>Изменено</li>
									</ul>
								</div>
								<div class="hstack gap-1">
									<ul class="list list-unstyled mb-0 fs-sm">
										<li><?php echo htmlspecialchars((string)smarty_modifier_date_format($_smarty_tpl->tpl_vars['article']->value['addedOn'],"%d.%m.%Y %H:%M"), ENT_QUOTES, 'UTF-8', true);?>
 (<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['addedBy']['loginName'] ?? null)===null||$tmp==='' ? "Неизвестный пользователь" ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
)</li>
										<li><?php echo htmlspecialchars((string)smarty_modifier_date_format($_smarty_tpl->tpl_vars['article']->value['modifiedOn'],"%d.%m.%Y %H:%M"), ENT_QUOTES, 'UTF-8', true);?>
 (<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['modifiedBy']['loginName'] ?? null)===null||$tmp==='' ? "Неизвестный пользователь" ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
)</li>
									</ul>
								</div>
							</div>
						<?php }?>
					</div>
				</div>
				
								<?php ob_start();
if ((isset($_smarty_tpl->tpl_vars['article']->value['image']))) {
echo (string)$_smarty_tpl->tpl_vars['article']->value['image']['original'];
}
$_prefixVariable2=ob_get_clean();
ob_start();
if ((isset($_smarty_tpl->tpl_vars['article']->value['image']))) {
echo (string)$_smarty_tpl->tpl_vars['article']->value['image']['imageId'];
}
$_prefixVariable3=ob_get_clean();
$_smarty_tpl->_subTemplateRender("file:components/image-preview.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('image'=>$_prefixVariable2,'id'=>$_prefixVariable3,'module'=>'article'), 0, false);
?>
				
								<div class="card border shadow-sm">
					<div class="card-header d-flex flex-wrap">
						<h6 class="mb-0">Брошюра (pdf, word)</h6>
						<div class="d-inline-flex ms-auto">
							<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
						</div>
					</div>
					<div class="collapse show">
						<div class="card-body">
							<div class="form-group" id="pdf_docs">
								<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['docs']))) {?>
									<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['article']->value['docs'], 'file');
$_smarty_tpl->tpl_vars['file']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['file']->value) {
$_smarty_tpl->tpl_vars['file']->do_else = false;
?>
										<figure class="docs mb-2" id="docs-item-<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
">
											<?php if ($_smarty_tpl->tpl_vars['file']->value['fileFormat'] == 'pdf') {?>
												<embed src="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['original'], ENT_QUOTES, 'UTF-8', true);?>
" width="100%" height="100%" class="mb-2" type="application/pdf"/>
											<?php }?>
											<div class="input-group">
												<span class="input-group-text"><img src="/admin/assets/ico/<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['fileFormat'], ENT_QUOTES, 'UTF-8', true);?>
.svg" width="30"/></span>
												<input type="text" class="form-control" value="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['fileName'], ENT_QUOTES, 'UTF-8', true);?>
" placeholder="" readonly>
												<button type="button" class="btn btn-danger" onclick="deleteDocs(<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file']->value['imageId'], ENT_QUOTES, 'UTF-8', true);?>
, 'article');"><i class="ph-trash"></i></button>
											</div>
										</figure>
									<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
								<?php }?>
							</div>
						</div>
						<div class="card-footer d-sm-flex justify-content-sm-between align-items-sm-center py-sm-2">
							<button type="button" class="btn btn-sm btn-primary btn-upload btn-docs read-more" data-type="docs" data-path="/" data-action="read_more"><i class="ph-file-doc me-2"></i> Загрузить файл </button>
						</div>
					</div>
				</div>

								<div class="card border shadow-sm">
					<div class="card-header d-flex flex-wrap">
						<h6 class="mb-0">Seo</h6>
						<div class="d-inline-flex ms-auto">
														<a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
						</div>
					</div>
					<div class="collapse show">
						<div class="card-body flex-column flex-md-row m-0">
							<div class="form-group mb-3">
								<label class="form-label">Ключевые слова (Meta keywords)</label>
								<textarea id="keywords" name="article[keywords]" class="form-control" rows="3"><?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['keywords'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
</textarea>
							</div>
							<div class="form-group">
								<label class="form-label">Описание (Meta description)</label>
								<textarea id="description" name="article[description]" class="form-control" rows="3"><?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['description'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
</textarea>
							</div>
						</div>
					</div>
				</div>
							</div>

			<div class="col-md-12 text-center">
				<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['articleId']))) {?><input type="hidden" class="form-control" id="id" name="id" value="<?php echo htmlspecialchars((string)(($tmp = $_smarty_tpl->tpl_vars['article']->value['articleId'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp), ENT_QUOTES, 'UTF-8', true);?>
"><?php }?>
				<?php echo $_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'buttons');?>

			</div>

		</div>

	</div>

</form>

<?php $_smarty_tpl->_subTemplateRender('file:tinymce_init.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<?php $_smarty_tpl->_subTemplateRender('file:uploads_init.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<?php echo '<script'; ?>
>


	$(document).ready(function () {

		<?php if ((isset($_smarty_tpl->tpl_vars['messages']->value['saved']))) {?> new Noty({ text: 'Контент &laquo;<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
&raquo; сохранен.', type: 'success', timeout: 1500 }).show(); <?php }?>

		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['title']))) {?> new Noty({ text: 'Введите заголовок.', type: 'error', timeout: 2500 }).show();<?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['access_denied']))) {?> new Noty({ text: 'Доступ запрещен.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['sectionId']))) {?> new Noty({ text: 'Выберите раздел.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['not_saved']))) {?> new Noty({ text: 'Контент &laquo;<?php if ((isset($_smarty_tpl->tpl_vars['article']->value['title']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['article']->value['title'], ENT_QUOTES, 'UTF-8', true);
}?>&raquo; НЕ сохранен.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['no_sections']))) {?> new Noty({ text: 'Перед добавлением контент, добавьте хотя бы один раздел.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['image_not_saved']))) {?> new Noty({ text: 'Картинка НЕ сохранена.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['article_not_found']))) {?> new Noty({ text: 'Контент не найден или доступ запрещен.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['fileName']))) {?> new Noty({ text: 'Введите URL.', type: 'error', timeout: 2500 }).show(); <?php }?>
		<?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['fileNameExists']))) {?> new Noty({ text: 'Контент с таким URL уже существует. Введите другой URL.', type: 'error', timeout: 2500 }).show(); <?php }?>

		// сортировать фотогалерею
		$(document).on('click', '.sortable_save_button', function () {
			var ids = new Array();
			$('#fileList figure.gallery-item').each(function () {
				console.log($(this).attr('data-id'))

				ids.push($(this).attr('data-id'));
			})
			$.post( "<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['generate_url']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
?action=sortPictures", { imageIds : ids }, function() {
				$('.sortable_footer_navbar').removeClass('show');
				$("#fileList").load(location.href + " figure.gallery-item");
				new Noty({ text: 'Фотогалерея отсортирована', type: 'success' }).show();
			});
		})
		$(document).on('click', '.sortable_cancel_button', function () {
			$('.sortable_footer_navbar').removeClass('show');
			$("#fileList").load(location.href + " figure.gallery-item");
		})


		// сортировать фотогалерею
		$(document).on('click', '.songs_save_button', function () {
			var fileIds = new Array();
			$('#songs figure.song-item').each(function () {
				console.log($(this).attr('data-id'))

				fileIds.push($(this).attr('data-id'));
			})
			$.post( "<?php echo htmlspecialchars((string)call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'substr' ][ 0 ], array( $_smarty_tpl->tpl_vars['generate_url']->value,0,-1 )), ENT_QUOTES, 'UTF-8', true);?>
?action=sortSongs", { fileIds : fileIds }, function() {
				$('.songs_footer_navbar').removeClass('show');
				$("#songs").load(location.href + " figure.song-item");
				new Noty({ text: 'Альбом отсортирован', type: 'success' }).show();
			});
		})
		$(document).on('click', '.songs_cancel_button', function () {
			$('.songs_footer_navbar').removeClass('show');
			$("#songs").load(location.href + " figure.song-item");
		})


	});


	$(function () {
		function e() {
			keywords_touched || $("#keywords").val(i()),
			description_touched || $("#description").val(t()),
			fileName_touched || $("#fileName").val(n())
		}
		function i() {
			return name = $("#title").val()
		}
		function t() {
			return name = $("#title").val()
		}
		function n() {
			return fileName = $("#title").val(),
					fileName = fileName.replace(/[\s]+/gi, "<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['config']->value['filename_word_separator'], ENT_QUOTES, 'UTF-8', true);?>
"),
					fileName = l(fileName),
					fileName = fileName.replace(/[^0-9a-z_\-]+/gi, "").toLowerCase()
		}
		function l(e) {
			for (var a = "А-а-Б-б-В-в-Ґ-ґ-Г-г-Д-д-Е-е-Ё-ё-Є-є-Ж-ж-З-з-И-и-І-і-Ї-ї-Й-й-К-к-Л-л-М-м-Н-н-О-о-П-п-Р-р-С-с-Т-т-У-у-Ф-ф-Х-х-Ц-ц-Ч-ч-Ш-ш-Щ-щ-Ъ-ъ-Ы-ы-Ь-ь-Э-э-Ю-ю-Я-я".split("-"),
						 i = "A-a-B-b-V-v-G-g-G-g-D-d-E-e-E-e-E-e-ZH-zh-Z-z-I-i-I-i-I-i-J-j-K-k-L-l-M-m-N-n-O-o-P-p-R-r-S-s-T-t-U-u-F-f-H-h-TS-ts-CH-ch-SH-sh-SCH-sch-'-'-Y-y-'-'-E-e-YU-yu-YA-ya".split("-"),
						 t = "", n = 0, l = e.length; l > n; n++) {
				var o = e.charAt(n),c = a.indexOf(o);t += c >= 0 ? i[c] : o
			}
			return t
		}
		keywords_touched = !0, description_touched = !0, fileName_touched = !0,
		($("#keywords").val() == i() || "" == $("#keywords").val()) && (keywords_touched = !1),
		($("#description").val() == t() || "" == $("#description").val()) && (description_touched = !1),
		($("#fileName").val() == n() || "" == $("#fileName").val()) && (fileName_touched = !1),
				$("#keywords").change(function () {
					keywords_touched = !0
				}),
				$("#description").change(function () {
					description_touched = !0
				}),
				$("#fileName").change(function () {
					fileName_touched = !0
				}),
				$("#title").keyup(function () {
					e()
				})
	});

<?php echo '</script'; ?>
>
<?php }
}
