<?php
/* Smarty version 4.5.3, created on 2025-11-28 12:09:22
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/images.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_692966c25b94f9_68906679',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'a66f38f3bef05fb6f5fcf5063d3551a25ebe4bbb' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/images.tpl',
      1 => 1764320960,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_692966c25b94f9_68906679 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_assignInScope('meta_title', 'Изображения' ,false ,8);?>

<div class="container-fluid">

        <div class="nk-block-head nk-block-head-sm">
        <div class="nk-block-between">

                        <div class="nk-block-head-content">
                <h3 class="nk-block-title page-title">
                    Изображения темы <?php echo $_smarty_tpl->tpl_vars['theme']->value;?>

                </h3>
                <div class="nk-block-des text-soft">
                    <p>Управление изображениями установленной темы магазина.</p>
                </div>
            </div>

        </div>
    </div>

        <?php if ($_smarty_tpl->tpl_vars['message_error']->value) {?>
    <div class="pb-2">
        <div class="alert alert-fill alert-danger alert-icon">
            <em class="icon ti ti-circle-x"></em>
            <?php if ($_smarty_tpl->tpl_vars['message_error']->value == 'permissions') {?>
                Установите права на запись для папки <?php echo $_smarty_tpl->tpl_vars['images_dir']->value;?>
.
            <?php } elseif ($_smarty_tpl->tpl_vars['message_error']->value == 'name_exists') {?>
                Файл с таким именем уже существует.
            <?php } elseif ($_smarty_tpl->tpl_vars['message_error']->value == 'theme_locked') {?>
                Текущая тема защищена от изменений. Создайте копию темы.
            <?php } else { ?>
                <?php echo $_smarty_tpl->tpl_vars['message_error']->value;?>
.
            <?php }?>
        </div>
    </div>
    <?php } else { ?>
    <div class="card card-preview mb-3">
        <div class="row card-inner">
            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dirs']->value, 'd');
$_smarty_tpl->tpl_vars['d']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['d']->value) {
$_smarty_tpl->tpl_vars['d']->do_else = false;
?>
            <div class="col-2">
				<a href='<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'ImagesAdmin','dir'=>((string)$_smarty_tpl->tpl_vars['current_dir']->value).((string)$_smarty_tpl->tpl_vars['d']->value)),$_smarty_tpl ) );?>
'>
					<span class="nk-file-icon-type" style="width:30px;">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72">
                            <g><rect x="32" y="16" width="28" height="15" rx="2.5" ry="2.5" style="fill:#f29611"></rect><path d="M59.7778,61H12.2222A6.4215,6.4215,0,0,1,6,54.3962V17.6038A6.4215,6.4215,0,0,1,12.2222,11H30.6977a4.6714,4.6714,0,0,1,4.1128,2.5644L38,24H59.7778A5.91,5.91,0,0,1,66,30V54.3962A6.4215,6.4215,0,0,1,59.7778,61Z" style="fill:#ffb32c"></path><path d="M8.015,59c2.169,2.3827,4.6976,2.0161,6.195,2H58.7806a6.2768,6.2768,0,0,0,5.2061-2Z" style="fill:#f2a222"></path></g>
                        </svg>
					</span>
					<span>
						<?php echo $_smarty_tpl->tpl_vars['d']->value;?>

					</span>
				</a>
			</div>
            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
            <?php if ($_GET['dir']) {?>
            <div class="col-2">
                <a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'ImagesAdmin'),$_smarty_tpl ) );?>
">
                    <span>
                        Назад
                    </span>
                </a>
            </div>
            <?php }?>
		</div>
	</div>

        <div class="nk-block">

                <form method="post" enctype="multipart/form-data">

                        <input type="hidden" name="delete_image" value="">

                        <div class="card card-bordered mb-3">
                <div class="card-inner">
                    <div class="nk-block-head">
                        <h5 class="title">Загрузка изображения</h5>
                    </div>
                    <div class="form-group">
                        <div class="custom-file">
                            <input type="file" name="upload_images[]" class="custom-file-input" id="upload_images">
                            <label class="custom-file-label" for="upload_images">Выберите файл</label>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-7 offset-lg-5">
                            <div class="form-group mt-2">
                                <button type="submit" class="btn btn-success">Сохранить</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

                        <div class="nk-files nk-files-view-grid">
                <div class="nk-files-list">

                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['images']->value, 'image');
$_smarty_tpl->tpl_vars['image']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['image']->value) {
$_smarty_tpl->tpl_vars['image']->do_else = false;
?>
                    <div class="nk-file-item nk-file js-image-item" data-name="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['image']->value->name, ENT_QUOTES, 'UTF-8', true);?>
">
                        <div class="nk-file-info">
                            <div class="nk-file-link">
                                <div class="nk-file-title">

                                                                        <div class="nk-file-icon">
                                        <span class="nk-file-icon-type w-150px h-150px center of-hidden">
                                            <a href="<?php echo $_smarty_tpl->tpl_vars['images_dir']->value;
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['image']->value->name, ENT_QUOTES, 'UTF-8', true);?>
" target="_blank">
                                                <img width=150 src="<?php echo $_smarty_tpl->tpl_vars['images_dir']->value;
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['image']->value->name, ENT_QUOTES, 'UTF-8', true);?>
" class="mh-150px">
                                            </a>
                                        </span>
                                    </div>

                                                                        <div class="nk-file-name">
                                        <div class="nk-file-name-text">
                                            <a href="#" class="title js-image-edit" data-toggle="tooltip" data-placement="top" title="Переименовать"><?php echo $_smarty_tpl->tpl_vars['image']->value->name;?>
</a>
                                        </div>
                                    </div>
                                </div>

                                                                <ul class="nk-file-desc">
                                    <?php if ($_smarty_tpl->tpl_vars['image']->value->width > 0 && $_smarty_tpl->tpl_vars['image']->value->height > 0) {?>
                                    <li>
                                        <?php echo $_smarty_tpl->tpl_vars['image']->value->width;?>
x<?php echo $_smarty_tpl->tpl_vars['image']->value->height;?>
 px
                                    </li>
                                    <?php }?>
                                    <li>
                                        <?php if ($_smarty_tpl->tpl_vars['image']->value->size > 1024*1024) {?>
                                        <?php echo round((float) ($_smarty_tpl->tpl_vars['image']->value->size/1024/1024), (int) 2, (int) 1);?>
 MB
                                        <?php } elseif ($_smarty_tpl->tpl_vars['image']->value->size > 1024) {?>
                                        <?php echo round((float) ($_smarty_tpl->tpl_vars['image']->value->size/1024), (int) 2, (int) 1);?>
 KB
                                        <?php } else { ?>
                                        <?php echo $_smarty_tpl->tpl_vars['image']->value->size;?>
 Байт
                                        <?php }?>
                                    </li>
                                </ul>
                            </div>
                        </div>

                                                <div class="nk-file-actions hideable">
                            <div class="btn btn-sm btn-icon btn-trigger js-image-delete" data-toggle="tooltip" data-placement="top" title="Удалить">
                                <em class="icon ti ti-trash"></em>
                            </div>
                        </div>
                    </div>
                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

                </div>
            </div>

            <div class="row g-3">
                <div class="col-lg-7 offset-lg-5">
                    <div class="form-group mt-2">
                        <button type="submit" class="btn btn-success">Сохранить</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <?php }?>
</div>
<?php }
}
