{if $access["modules.manage"] || $user.name == 'Demo profile'}
	<script>
		function submitForm(button) {
			button.form.submit(); // Отправляем форму вручную
			button.disabled = true; // Делаем кнопку неактивной
		}
	</script>
	<div class="row">
		{if $adsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/ads.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.ads.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-ads">
										<input type="hidden" name="module" value="ads">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color2);">{$lang.tools.ads_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.ads_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $filesAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/files.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.files.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-files">
										<input type="hidden" name="module" value="files">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color3);">{$lang.tools.files_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.files_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $moviesAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/movies.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.movies.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-movies">
										<input type="hidden" name="module" value="movies">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color4);">{$lang.tools.films_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.films_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $newsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/news.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.news.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-news">
										<input type="hidden" name="module" value="news">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color5);">{$lang.tools.news_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.news_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $productsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/products.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.products.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-products">
										<input type="hidden" name="module" value="products">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color6);">{$lang.tools.products_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.products_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $eventsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/events.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.events.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-events">
										<input type="hidden" name="module" value="events">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color7);">{$lang.tools.events_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.events_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $lotsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/lots.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.lots.used}
									{$lang.tools.active}
									{else}
									{if $access['modules.create']}
									<form method="post" id="install-lots">
										<input type="hidden" name="module" value="lots">
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color7);">{$lang.tools.lots_module}</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.lots_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $auctionsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/auction.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.auctions.used}
									{$lang.tools.active}
								{else}
									{if $access['modules.create']}
										<form method="post" id="install-auctions">
											<input type="hidden" name="module" value="auctions">
											<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
										</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color6);">Модуль Аукциона</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 06.11.2025</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.auctions_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $couponsAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/coupons.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.coupons.used}
									{$lang.tools.active}
								{else}
									{if $access['modules.create']}
										<form method="post" id="install-coupons">
											<input type="hidden" name="module" value="coupons">
											<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
										</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color6);">Модуль Купонов</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 06.11.2025</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.coupons_text}</p>
					</div>
				</div>
			</div>
		{/if}
		{if $shopAvailable}
			<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
				<div class="card mb-3">
					<div class="card-body border-top border-success d-flex align-items-center">
						<img src="{$stheme}/images/modules/onlinecourses.png" class="module-actual-color height-70px" alt="">
						<div class="content w-100 ms-3">
							<div class="float-end form-check mb-2">
								{if $modules.shop.used}
									{$lang.tools.active}
								{else}
									{if $access['modules.create']}
										<form method="post" id="install-shop">
											<input type="hidden" name="module" value="shop">
											<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
										</form>
									{else}
										<button type="submit" class="btn btn-primary btn-sm" onclick="submitForm(this)">{$lang.tools.activate}</button>
									{/if}
								{/if}
							</div>
							<div class="text" style="color: var(--theme-color6);">Модуль Магазинов</div>
							<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 06.11.2025</div>
						</div>
					</div>
					<div class="card-footer py-2">
						<p class="mb-0 fs-7">{$lang.tools.coupons_text}</p>
					</div>
				</div>
			</div>
		{/if}
		<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
			<div class="card mb-3">
				<div class="card-body border-top border-success d-flex align-items-center">
					<img src="{$stheme}/images/modules/realestate.png" class="module-actual-color height-70px" alt="">
					<div class="content w-100 ms-3">
						<div class="float-end form-check mb-2">
							<button class="btn btn-secondary btn-sm">{$lang.tools.dont_ready}</button>
						</div>
						<div class="text" style="color: var(--theme-color9);">{$lang.tools.real_estate_module}</div>
						<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
					</div>
				</div>
				<div class="card-footer py-2">
					<p class="mb-0 fs-7">{$lang.tools.real_estate_text}</p>
				</div>
			</div>
		</div>
		<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
			<div class="card mb-3">
				<div class="card-body border-top border-success d-flex align-items-center">
					<img src="{$stheme}/images/modules/onlinecourses.png" class="module-actual-color height-70px" alt="">
					<div class="content w-100 ms-3">
						<div class="float-end form-check mb-2">
							<button class="btn btn-secondary btn-sm">{$lang.tools.dont_ready}</button>
						</div>
						<div class="text" style="color: var(--theme-color10);">{$lang.tools.online_courses_module}</div>
						<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
					</div>
				</div>
				<div class="card-footer py-2">
					<p class="mb-0 fs-7">{$lang.tools.online_courses_text}</p>
				</div>
			</div>
		</div>
		<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
			<div class="card mb-3">
				<div class="card-body border-top border-success d-flex align-items-center">
					<img src="{$stheme}/images/modules/gallery.png" class="module-actual-color height-70px" alt="">
					<div class="content w-100 ms-3">
						<div class="float-end form-check mb-2">
							<button class="btn btn-secondary btn-sm">{$lang.tools.dont_ready}</button>
						</div>
						<div class="text" style="color: var(--theme-color11);">{$lang.tools.gallery_module}</div>
						<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
					</div>
				</div>
				<div class="card-footer py-2">
					<p class="mb-0 fs-7">{$lang.tools.gallery_text}</p>
				</div>
			</div>
		</div>
		<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
			<div class="card mb-3">
				<div class="card-body border-top border-success d-flex align-items-center">
					<img src="{$stheme}/images/modules/realestate.png" class="module-actual-color height-70px" alt="">
					<div class="content w-100 ms-3">
						<div class="float-end form-check mb-2">
							<button class="btn btn-secondary btn-sm">{$lang.tools.dont_ready}</button>
						</div>
						<div class="text" style="color: var(--theme-color9);">Аудио</div>
						<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
					</div>
				</div>
				<div class="card-footer py-2">
					<p class="mb-0 fs-7">{$lang.tools.real_estate_text}</p>
				</div>
			</div>
		</div>
		<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
			<div class="card mb-3">
				<div class="card-body border-top border-success d-flex align-items-center">
					<img src="{$stheme}/images/modules/realestate.png" class="module-actual-color height-70px" alt="">
					<div class="content w-100 ms-3">
						<div class="float-end form-check mb-2">
							<button class="btn btn-secondary btn-sm">{$lang.tools.dont_ready}</button>
						</div>
						<div class="text" style="color: var(--theme-color9);">Видео</div>
						<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
					</div>
				</div>
				<div class="card-footer py-2">
					<p class="mb-0 fs-7">{$lang.tools.real_estate_text}</p>
				</div>
			</div>
		</div>
		<div class="col-12 col-mb-6 col-xxl-6 col-xxxl-4">
			<div class="card mb-3">
				<div class="card-body border-top border-success d-flex align-items-center">
					<img src="{$stheme}/images/modules/realestate.png" class="module-actual-color height-70px" alt="">
					<div class="content w-100 ms-3">
						<div class="float-end form-check mb-2">
							<button class="btn btn-secondary btn-sm">{$lang.tools.dont_ready}</button>
						</div>
						<div class="text" style="color: var(--theme-color9);">Рынок</div>
						<div class="number d-inline-block">{$lang.tools.version}: 0.0.0.0.0.1 | {$lang.tools.update}: 14.02.2024</div>
					</div>
				</div>
				<div class="card-footer py-2">
					<p class="mb-0 fs-7">{$lang.tools.real_estate_text}</p>
				</div>
			</div>
		</div>
	</div>
	<script>
		var toolsSection = document.getElementById('toolsSection');
		toolsSection.classList.add('active');
		var tools = document.getElementById('tools');
		tools.classList.add('show');
		var currentLink = document.getElementById('modulesLink');
		currentLink.classList.add('active');
	</script>


{else}
	<h3>Доступ запрещен</h3>
{/if}