<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wwoss.ru/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>worldwide open-source software</title>
        <description></description>
        <link>https://wwoss.ru/</link>
        <lastBuildDate>Thu, 20 Aug 2026 15:08:49 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://wwoss.ru/lib/exe/fetch.php?media=wiki:logo.png</url>
            <title>worldwide open-source software</title>
            <link>https://wwoss.ru/</link>
        </image>
        <item>
            <title>tmp_template</title>
            <link>https://wwoss.ru/doku.php?id=tmp_template&amp;rev=1785384529</link>
            <description>&lt;div class=&quot;plugin_note noteshadow&quot;&gt;&lt;a href=&quot;https://wwoss.ru/lib/exe/detail.php?id=tmp_template&amp;amp;media=2026-07-29_20-27-20_7886785.png&quot; class=&quot;media&quot; title=&quot;2026-07-29_20-27-20_7886785.png&quot;&gt;&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?media=2026-07-29_20-27-20_7886785.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

&lt;/div&gt;&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_template&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;index.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;!&lt;/span&gt;DOCTYPE html&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;html lang&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ru&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;head&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;meta charset&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;meta name&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;viewport&amp;quot;&lt;/span&gt; content&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;width=device-width, initial-scale=1.0&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;title&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Вики Структура&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;title&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;style&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            box&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;sizing&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;box&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        body &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;family&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; sans&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;serif&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;size&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 13px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            line&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;height&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu19&quot;&gt;1.5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#202122;
&lt;/span&gt;            background&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#f8f9fa;
&lt;/span&gt;            margin&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            padding&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 60px 20px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            min&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tabs&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;container &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            max&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 1100px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            margin&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; auto&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            justify&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;start&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;%;&lt;/span&gt; 
            position&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; relative&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            bottom&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;1px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            z&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;index&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            flex&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;wrap&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; nowrap&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            background&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#f1f3f5;
&lt;/span&gt;            border&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 1px solid &lt;span class=&quot;co2&quot;&gt;#d2d2d2;
&lt;/span&gt;            margin&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;right&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;1px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;top&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;left&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;top&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;right&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bottom&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;left&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bottom&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;right&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            padding&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px 14px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;size&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 12px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#0645ad;
&lt;/span&gt;            cursor&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; pointer&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            text&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;decoration&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            text&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;align&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; left&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
            white&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;space&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; nowrap&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            overflow&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; hidden&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            text&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;overflow&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; ellipsis&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            position&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; relative&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            min&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 30px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;hover &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            background&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#e8eaed;
&lt;/span&gt;        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            background&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#ffffff;
&lt;/span&gt;            color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#202122;
&lt;/span&gt;            font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;weight&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bold&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            cursor&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            z&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;index&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bottom&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 1px solid &lt;span class=&quot;co2&quot;&gt;#ffffff;
&lt;/span&gt;        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* Крайние статичные кнопки */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            flex&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; auto&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
            text&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;align&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; center&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            flex&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; auto&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
            text&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;align&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; center&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            margin&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;right&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* Вкладка Глава */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;chapter &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            flex&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; auto&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* Вкладка Страница */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;page &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            flex&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; auto&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* Элемент для иконки внутри таба (скрыт на десктопе) */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* Декоративные ушки активной вкладки для десктопа */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            position&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            left&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            bottom&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;1px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            height&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            background&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 
                radial&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;circle at top left&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; transparent 5px&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#d2d2d2 5px, #d2d2d2 6px, transparent 6px),
&lt;/span&gt;                radial&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;circle at top left&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; transparent 5px&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#ffffff 5px);
&lt;/span&gt;            z&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;index&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;after&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            position&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            right&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            bottom&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;1px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            height&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            background&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 
                radial&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;circle at top right&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; transparent 5px&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#d2d2d2 5px, #d2d2d2 6px, transparent 6px),
&lt;/span&gt;                radial&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;circle at top right&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; transparent 5px&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#ffffff 5px);
&lt;/span&gt;            z&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;index&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;after&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* ========================================================
           МОБИЛЬНАЯ ВЕРСИЯ (Экран меньше 550px)
           ======================================================== */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;media &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;max&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 550px&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Прячем исходный текст */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;text&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;text &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Включаем отображение иконки */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; inline&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;block&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;size&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 11px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Размеры для кнопок-иконок */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                padding&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 6px &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 34px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                text&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;align&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; center&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;coMULTI&quot;&gt;/* --- Логика треугольников для ОГЛАВЛЕНИЯ --- */&lt;/span&gt;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Неактивная вкладка */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;◀&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#0645ad;
&lt;/span&gt;            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Активная вкладка */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;summary&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;▶&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#202122;
&lt;/span&gt;            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;coMULTI&quot;&gt;/* --- Логика треугольников для СОДЕРЖАНИЯ --- */&lt;/span&gt;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Неактивная вкладка */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;▼&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#0645ad;
&lt;/span&gt;            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Активная вкладка */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                content&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;▲&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#202122;
&lt;/span&gt;            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;coMULTI&quot;&gt;/* Отключаем десктопные ушки на мобильных, чтобы не накладывались на иконки */&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;before&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;item&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active&lt;span class=&quot;sy0&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;me2&quot;&gt;after&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;important&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;coMULTI&quot;&gt;/* Главная белая карточка (Тело контента) */&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;box &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            background&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#ffffff;
&lt;/span&gt;            border&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 1px solid &lt;span class=&quot;co2&quot;&gt;#d2d2d2;
&lt;/span&gt;            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;top&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;left&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;top&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;right&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bottom&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;left&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 4px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            border&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bottom&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;right&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;radius&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 4px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            box&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;shadow&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; 4px 12px rgba&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu19&quot;&gt;0.15&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            padding&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 24px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            max&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 1100px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            margin&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; auto&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            position&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; relative&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            min&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;height&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 250px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            z&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;index&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            width&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;%;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;panel &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;panel&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;content&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;panel&lt;span class=&quot;sy0&quot;&gt;--&lt;/span&gt;active &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; display&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; block&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;page&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;title &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;size&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 24px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; font&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;weight&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bold&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; margin&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; 15px &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#202122; }
&lt;/span&gt;        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;page&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;description &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; margin&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; color&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;co2&quot;&gt;#202122; }
&lt;/span&gt;        &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;wiki&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;a href=&quot;http://www.php.net/list&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;list&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; margin&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; 10px &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; 20px&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; padding&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;style&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;head&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;body&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tabs-container&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;!--&lt;/span&gt; Добавлен тег span с классом tab&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;icon для вывода стрелок &lt;span class=&quot;sy0&quot;&gt;--&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-item tab-item--summary&amp;quot;&lt;/span&gt; data&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;target&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;summary&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;span &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-text&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Оглавление&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;span&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;span &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-icon&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;span&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-item tab-item--chapter tab-item--active&amp;quot;&lt;/span&gt; data&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;target&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;chapter&amp;quot;&lt;/span&gt; title&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Глава 2.0 Жирный слон&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Глава &lt;span class=&quot;nu19&quot;&gt;2.0&lt;/span&gt; Жирный слон&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-item tab-item--page&amp;quot;&lt;/span&gt; data&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;target&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page&amp;quot;&lt;/span&gt; title&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Страница 2.1. Жизнь жирного слона&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Страница &lt;span class=&quot;nu19&quot;&gt;2.1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; Жизнь жирного слона&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-item tab-item--content&amp;quot;&lt;/span&gt; data&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;target&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;span &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-text&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Содержание&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;span&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;span &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;tab-icon&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;span&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;content-box&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div id&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;panel-summary&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;content-panel&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;h1 &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-title&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Оглавление книги&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;p &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-description&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Полная структура всей книги&lt;span class=&quot;sy0&quot;&gt;:&amp;lt;/&lt;/span&gt;p&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;ul &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wiki-list&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Глава &lt;span class=&quot;nu19&quot;&gt;1.0&lt;/span&gt; Начало пути&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;strong&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Глава &lt;span class=&quot;nu19&quot;&gt;2.0&lt;/span&gt; Жирный слон&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;strong&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Глава &lt;span class=&quot;nu19&quot;&gt;3.0&lt;/span&gt; Заключение&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;ul&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div id&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;panel-chapter&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;content-panel content-panel--active&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;h1 &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-title&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Содержание главы &lt;span class=&quot;nu19&quot;&gt;2.0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;p &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-description&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Разделы&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; входящие в текущую главу&lt;span class=&quot;sy0&quot;&gt;:&amp;lt;/&lt;/span&gt;p&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;ul &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wiki-list&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;strong&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Страница &lt;span class=&quot;nu19&quot;&gt;2.1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; Жизнь жирного слона&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;strong&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Страница &lt;span class=&quot;nu19&quot;&gt;2.2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; Среда обитания слонов&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;ul&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div id&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;panel-page&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;content-panel&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;h1 &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-title&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Эта страница ещё не существует&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;p &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-description&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Вы перешли по ссылке на страницу&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; которая ещё не существует&lt;span class=&quot;sy0&quot;&gt;.&amp;lt;/&lt;/span&gt;p&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;div id&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;panel-content&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;content-panel&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;h1 &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-title&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Содержание страницы &lt;span class=&quot;nu19&quot;&gt;2.1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;p &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;page-description&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;Внутреннее оглавление этой конкретной статьи&lt;span class=&quot;sy0&quot;&gt;:&amp;lt;/&lt;/span&gt;p&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;ul &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wiki-list&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; Введение&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; Основные характеристики слона&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; Итоги&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;li&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;ul&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;const&lt;/span&gt; tabs &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;querySelectorAll&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;.tab-item&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw2&quot;&gt;const&lt;/span&gt; panels &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;querySelectorAll&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;.content-panel&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        tabs&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;tab &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            tab&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;addEventListener&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;click&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                tabs&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;t &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; t&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;classList&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;remove&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;tab-item--active&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                tab&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;classList&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;add&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;tab-item--active&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;kw2&quot;&gt;const&lt;/span&gt; targetId &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; tab&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;getAttribute&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;data-target&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                panels&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;panel &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; panel&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;classList&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;remove&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;content-panel--active&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;kw2&quot;&gt;const&lt;/span&gt; targetPanel &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;getElementById&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;panel-&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt; targetId&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;targetPanel&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                    targetPanel&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;classList&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;add&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;content-panel--active&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;body&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;&amp;lt;/&lt;/span&gt;html&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Thu, 30 Jul 2026 04:08:49 +0000</pubDate>
        </item>
        <item>
            <title>2026-07-29_20-27-20_7886785.png - создано</title>
            <link>https://wwoss.ru/doku.php?image=2026-07-29_20-27-20_7886785.png&amp;ns=0&amp;rev=1785355585&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?w=500&amp;amp;h=500&amp;amp;tok=d778be&amp;amp;media=2026-07-29_20-27-20_7886785.png&quot; alt=&quot;2026-07-29_20-27-20_7886785.png&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 20:06:25 +0000</pubDate>
        </item>
        <item>
            <title>fooocus</title>
            <link>https://wwoss.ru/doku.php?id=manual:fooocus_portable:fooocus&amp;rev=1785347230</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;fooocus&quot;&gt;Fooocus&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
Fooocus — это бесплатная программа для генерации изображений с открытым исходным кодом, которая объединяет движок нейросети Stable Diffusion (SDXL) и максимальную простоту использования в стиле Midjourney.
&lt;/p&gt;

&lt;p&gt;
Понятие Fooocus Portable означает автономную версию программы для операционной системы Windows. Она скачивается в виде одного архива, не требует сложной ручной установки библиотек (Python, Git) и работает прямо из папки после распаковки.
&lt;/p&gt;

&lt;p&gt;
Ключевые особенности
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Запуск в один клик: Для старта достаточно запустить один .bat файл.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Автоматизация: Программа сама подбирает оптимальные технические настройки, скрывая от пользователя сложные параметры Stable Diffusion.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Качество Midjourney: Встроенная система стилей позволяет получать фотореалистичные или художественные изображения с помощью простых текстовых запросов.Продвинутые инструменты: Доступны функции Inpaint (изменение деталей на фото), Outpaint (дорисовка краев картинки) и Image Prompt (создание изображений на основе референса).&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Полная приватность: Нейросеть работает локально на вашем компьютере, не требует интернета и не имеет цензуры.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Системные требования
&lt;/p&gt;

&lt;p&gt;
Для комфортной работы портативной версии необходима дискретная видеокарта Nvidia (рекомендуется от 8 ГБ видеопамяти VRAM, минимально — 4 ГБ). На процессоре или видеокартах AMD программа тоже может запуститься, но скорость генерации будет значительно ниже.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Fooocus&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;fooocus&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-2460&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;пример_промпа&quot;&gt;пример промпа&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Vintage scientific illustration of a woolly mammoth with annotations and a pair of tusks; antique ink sketch on yellowed parchment paper; vintage lithograph style; detailed line art with cross-hatching; Leonardo da Vinci-style drawing; historical document aesthetic; monochrome black ink; high contrast; clean background; realistic skeleton.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u043c\u043f\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043f\u0440\u0438\u043c\u0435\u0440_\u043f\u0440\u043e\u043c\u043f\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;2461-2840&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;пример_генерации&quot;&gt;пример генерации&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;div class=&quot;plugin_note noteshadow&quot;&gt;&lt;a href=&quot;https://wwoss.ru/lib/exe/detail.php?id=manual%3Afooocus_portable%3Afooocus&amp;amp;media=manual:fooocus_portable:screenshot_592.png&quot; class=&quot;media&quot; title=&quot;manual:fooocus_portable:screenshot_592.png&quot;&gt;&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:screenshot_592.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043f\u0440\u0438\u043c\u0435\u0440_\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;2841-2956&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;пример_рабочего_окна&quot;&gt;пример рабочего окна&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;http://127.0.0.1:7865/&quot; class=&quot;urlextern&quot; title=&quot;http://127.0.0.1:7865/&quot; rel=&quot;ugc nofollow&quot;&gt;http://127.0.0.1:7865/&lt;/a&gt;
&lt;/p&gt;
&lt;div class=&quot;plugin_note noteshadow&quot;&gt;&lt;a href=&quot;https://wwoss.ru/lib/exe/detail.php?id=manual%3Afooocus_portable%3Afooocus&amp;amp;media=manual:fooocus_portable:screenshot_589.png&quot; class=&quot;media&quot; title=&quot;manual:fooocus_portable:screenshot_589.png&quot;&gt;&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:screenshot_589.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

&lt;/div&gt;
&lt;p&gt;
Текстовый промпт для ввода (Prompt)&lt;br/&gt;

A photorealistic close-up portrait of a young woman, shot from the front. Her expression is animated: raised eyebrows, wide-open eyes, and a slightly parted mouth. The focus is on the makeup—sharp, elongated eyeliner, defined lashes, neat brows, subtle contouring, and nude lipstick. She has long hair with an ombre effect transitioning from dark roots to light blonde; part of the hair is pulled back into a messy half-up style featuring a delicate braid at the crown. She wears a small stud earring and a pastel-colored high-neck top. The lighting is soft, warm, and diffused, free of harsh shadows. The background is a neutral, slightly blurred beige-gray. The image features highly detailed skin and hair textures, as well as visible fabric texture.
&lt;/p&gt;
&lt;div class=&quot;plugin_note noteshadow&quot;&gt;&lt;a href=&quot;https://wwoss.ru/lib/exe/detail.php?id=manual%3Afooocus_portable%3Afooocus&amp;amp;media=manual:fooocus_portable:2026-07-29_20-27-20_7886785.png&quot; class=&quot;media&quot; title=&quot;manual:fooocus_portable:2026-07-29_20-27-20_7886785.png&quot;&gt;&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:2026-07-29_20-27-20_7886785.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043e\u043a\u043d\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043f\u0440\u0438\u043c\u0435\u0440_\u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e_\u043e\u043a\u043d\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;2957-4006&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit5&quot; id=&quot;дополнения_и_файлы&quot;&gt;Дополнения и Файлы&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:fooocus_win64_2-5-0.7z&quot; class=&quot;media mediafile mf_7z&quot; title=&quot;manual:fooocus_portable:fooocus_win64_2-5-0.7z (1.9 GB)&quot;&gt;fooocus_win64_2-5-0.7z&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
C:\Fooocus_Portable\Fooocus\models\loras - путь к моделям &lt;br/&gt;

модели:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:france.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:france.safetensors (89.8 MB)&quot;&gt;france.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:beretmixzit_v50bf16fp8int8.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:beretmixzit_v50bf16fp8int8.safetensors (11.8 GB)&quot;&gt;beretmixzit_v50bf16fp8int8.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:intorealism_zitv80.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:intorealism_zitv80.safetensors (5.7 GB)&quot;&gt;intorealism_zitv80.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:moodykrea2mix_v50.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:moodykrea2mix_v50.safetensors (12.2 GB)&quot;&gt;moodykrea2mix_v50.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:put_loras_here&quot; class=&quot;media mediafile mf_&quot; title=&quot;manual:fooocus_portable:put_loras_here (0 B)&quot;&gt;put_loras_here&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:sd_xl_offset_example-lora_1.0.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:sd_xl_offset_example-lora_1.0.safetensors (47.3 MB)&quot;&gt;sd_xl_offset_example-lora_1.0.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:steamarch_architecture_sdxl_ad.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:steamarch_architecture_sdxl_ad.safetensors (99.7 MB)&quot;&gt;steamarch_architecture_sdxl_ad.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:steampunk_xl_v2.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:steampunk_xl_v2.safetensors (162.6 MB)&quot;&gt;steampunk_xl_v2.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:syberia_style.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:syberia_style.safetensors (1.2 GB)&quot;&gt;syberia_style.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:thelook-krea2turbo.safetensors&quot; class=&quot;media mediafile mf_safetensors&quot; title=&quot;manual:fooocus_portable:thelook-krea2turbo.safetensors (218 MB)&quot;&gt;thelook-krea2turbo.safetensors&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:fooocus_portable:fooocus_portable.rar&quot; class=&quot;media mediafile mf_rar&quot; title=&quot;manual:fooocus_portable:fooocus_portable.rar (36.1 GB)&quot;&gt;fooocus_portable.rar&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0424\u0430\u0439\u043b\u044b&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f_\u0438_\u0444\u0430\u0439\u043b\u044b&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;4007-&amp;quot;} --&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 17:47:10 +0000</pubDate>
        </item>
        <item>
            <title>2026-07-29_20-27-20_7886785.png</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Afooocus_portable%3A2026-07-29_20-27-20_7886785.png&amp;ns=manual%3Afooocus_portable&amp;rev=1785346399&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?w=500&amp;amp;h=500&amp;amp;tok=1a7f0e&amp;amp;media=manual:fooocus_portable:2026-07-29_20-27-20_7886785.png&quot; alt=&quot;2026-07-29_20-27-20_7886785.png&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 17:33:19 +0000</pubDate>
        </item>
        <item>
            <title>fooocus_win64_2-5-0.7z - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Afooocus_portable%3Afooocus_win64_2-5-0.7z&amp;ns=manual%3Afooocus_portable&amp;rev=1785345098&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/images/fileicons/svg/7z.svg&quot; alt=&quot;fooocus_win64_2-5-0.7z&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 17:11:38 +0000</pubDate>
        </item>
        <item>
            <title>screenshot_592.png - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Afooocus_portable%3Ascreenshot_592.png&amp;ns=manual%3Afooocus_portable&amp;rev=1785344142&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?w=500&amp;amp;h=500&amp;amp;tok=e5ccde&amp;amp;media=manual:fooocus_portable:screenshot_592.png&quot; alt=&quot;screenshot_592.png&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 16:55:42 +0000</pubDate>
        </item>
        <item>
            <title>screenshot_589.png - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Afooocus_portable%3Ascreenshot_589.png&amp;ns=manual%3Afooocus_portable&amp;rev=1785328536&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?w=500&amp;amp;h=500&amp;amp;tok=1459c4&amp;amp;media=manual:fooocus_portable:screenshot_589.png&quot; alt=&quot;screenshot_589.png&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 12:35:36 +0000</pubDate>
        </item>
        <item>
            <title>2026-07-29_15-33-49_5508.png - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Afooocus_portable%3A2026-07-29_15-33-49_5508.png&amp;ns=manual%3Afooocus_portable&amp;rev=1785328474&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?w=500&amp;amp;h=500&amp;amp;tok=d079d6&amp;amp;media=manual:fooocus_portable:2026-07-29_15-33-49_5508.png&quot; alt=&quot;2026-07-29_15-33-49_5508.png&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 12:34:34 +0000</pubDate>
        </item>
        <item>
            <title>local_silero_tts - [Введение] </title>
            <link>https://wwoss.ru/doku.php?id=manual:local_voice_ai:local_silero_tts&amp;rev=1785320673</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;local_silero_tts&quot;&gt;local_silero_tts&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;local_silero_tts&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;local_silero_tts&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-31&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;содержание&quot;&gt;Содержание&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/doku.php?id=local_silero_tts:index.html&quot; class=&quot;wikilink1&quot; title=&quot;local_silero_tts:index.html&quot; data-wiki-id=&quot;local_silero_tts:index.html&quot;&gt;index.html&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/doku.php?id=local_silero_tts:server.js&quot; class=&quot;wikilink1&quot; title=&quot;local_silero_tts:server.js&quot; data-wiki-id=&quot;local_silero_tts:server.js&quot;&gt;server.js&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/doku.php?id=local_silero_tts:tts.py&quot; class=&quot;wikilink1&quot; title=&quot;local_silero_tts:tts.py&quot; data-wiki-id=&quot;local_silero_tts:tts.py&quot;&gt;tts.py&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/doku.php?id=local_silero_tts:config.json&quot; class=&quot;wikilink1&quot; title=&quot;local_silero_tts:config.json&quot; data-wiki-id=&quot;local_silero_tts:config.json&quot;&gt;config.json&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;32-244&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;введение&quot;&gt;Введение&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Silero TTS — это современная, быстрая и полностью бесплатная нейросеть для синтеза речи (текст в звук).
&lt;/p&gt;

&lt;p&gt;
Главные особенности Silero TTS
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; 100% Локальность: работает на вашем компьютере без интернета, серверов и отправки данных в облако.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Высокое качество: голоса звучат естественно, умеют правильно расставлять ударения и интонации.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Низкие требования: движок оптимизирован настолько хорошо, что быстро генерирует речь даже на слабых процессорах (без мощной видеокарты).&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Русский язык: изначально создавался с упором на качественную русскую озвучку и имеет множество встроенных голосов (мужских и женских).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;plugin_note noteshadow&quot;&gt;&lt;a href=&quot;https://wwoss.ru/lib/exe/detail.php?id=manual%3Alocal_voice_ai%3Alocal_silero_tts&amp;amp;media=manual:local_voice_ai:local_silero_tts_569.png&quot; class=&quot;media&quot; title=&quot;manual:local_voice_ai:local_silero_tts_569.png&quot;&gt;&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:local_voice_ai:local_silero_tts_569.png&quot; class=&quot;media&quot; loading=&quot;lazy&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;245-1450&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;дополнения_и_файлы&quot;&gt;Дополнения и Файлы&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:local_voice_ai:python-manager-26.3.msi&quot; class=&quot;media mediafile mf_msi&quot; title=&quot;manual:local_voice_ai:python-manager-26.3.msi (9.4 MB)&quot;&gt;python-manager-26.3.msi&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;https://wwoss.ru/lib/exe/fetch.php?media=manual:local_voice_ai:local-voice-ai.rar&quot; class=&quot;media mediafile mf_rar&quot; title=&quot;manual:local_voice_ai:local-voice-ai.rar (119 MB)&quot;&gt;local-voice-ai.rar&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0424\u0430\u0439\u043b\u044b&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f_\u0438_\u0444\u0430\u0439\u043b\u044b&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;1451-&amp;quot;} --&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:24:33 +0000</pubDate>
        </item>
        <item>
            <title>local_silero_tts_569.png - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Alocal_voice_ai%3Alocal_silero_tts_569.png&amp;ns=manual%3Alocal_voice_ai&amp;rev=1785320603&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/exe/fetch.php?w=500&amp;amp;h=500&amp;amp;tok=24c34b&amp;amp;media=manual:local_voice_ai:local_silero_tts_569.png&quot; alt=&quot;local_silero_tts_569.png&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:23:23 +0000</pubDate>
        </item>
        <item>
            <title>tts.py - создано</title>
            <link>https://wwoss.ru/doku.php?id=local_silero_tts:tts.py&amp;rev=1785320465</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;ttspy&quot;&gt;tts.py&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=local_silero_tts:tts.py&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_py&quot;&gt;tts.py&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code py&quot;&gt;import warnings
warnings.filterwarnings(&amp;quot;ignore&amp;quot;, category=UserWarning)
&amp;nbsp;
import os
import sys
import torch
from http.server import BaseHTTPRequestHandler, HTTPServer
import json
import re
from num2words import num2words
&amp;nbsp;
language = &#039;ru&#039;
device = torch.device(&#039;cpu&#039;)
model_path = &amp;quot;./v5_ru.pt&amp;quot;
&amp;nbsp;
print(&amp;quot;Инициализация стабильной локальной модели Silero...&amp;quot;)
if not os.path.exists(model_path):
    print(&amp;quot;КРИТИЧЕСКАЯ ОШИБКА: Файл v5_ru.pt не найден!&amp;quot;)
    sys.exit(1)
&amp;nbsp;
model = torch.package.PackageImporter(model_path).load_pickle(&amp;quot;tts_models&amp;quot;, &amp;quot;model&amp;quot;)
model.to(device)
print(&amp;quot;ИИ-процессор звука полностью готов к работе!&amp;quot;)
&amp;nbsp;
# Расширенная база для чтения латиницы
# Умный словарь частых слов (чтобы читались красиво, а не просто побуквенно)
ENG_PHONETIC = {
    &#039;hello&#039;: &#039;хэллоу&#039;, &#039;hi&#039;: &#039;хай&#039;, &#039;ai&#039;: &#039;эай&#039;, &#039;js&#039;: &#039;джей эс&#039;, &#039;php&#039;: &#039;пи эйч пи&#039;,
    &#039;python&#039;: &#039;пайтон&#039;, &#039;google&#039;: &#039;гугл&#039;, &#039;ok&#039;: &#039;окей&#039;, &#039;yes&#039;: &#039;йес&#039;, &#039;no&#039;: &#039;ноу&#039;,
    &#039;javascript&#039;: &#039;джаваскрипт&#039;, &#039;node.js&#039;: &#039;ноуд джей эс&#039;, &#039;node&#039;: &#039;ноуд&#039;,
    &#039;apple&#039;: &#039;эпл&#039;, &#039;microsoft&#039;: &#039;майкрософт&#039;, &#039;windows&#039;: &#039;виндоус&#039;, &#039;server&#039;: &#039;сервер&#039;,
    &#039;code&#039;: &#039;код&#039;, &#039;project&#039;: &#039;проджект&#039;, &#039;file&#039;: &#039;файл&#039;, &#039;text&#039;: &#039;текст&#039;
}
&amp;nbsp;
# Карта перевода отдельных английских букв и буквосочетаний в русские слоги
ENGLISH_TO_RUSSIAN_ABC = {
    &#039;ch&#039;: &#039;ч&#039;, &#039;sh&#039;: &#039;ш&#039;, &#039;th&#039;: &#039;ф&#039;, &#039;ph&#039;: &#039;ф&#039;, &#039;ee&#039;: &#039;и&#039;, &#039;oo&#039;: &#039;у&#039;, &#039;ea&#039;: &#039;и&#039;,
    &#039;a&#039;: &#039;э&#039;, &#039;b&#039;: &#039;б&#039;, &#039;c&#039;: &#039;к&#039;, &#039;d&#039;: &#039;д&#039;, &#039;e&#039;: &#039;е&#039;, &#039;f&#039;: &#039;ф&#039;, &#039;g&#039;: &#039;г&#039;, &#039;h&#039;: &#039;х&#039;,
    &#039;i&#039;: &#039;ай&#039;, &#039;j&#039;: &#039;дж&#039;, &#039;k&#039;: &#039;к&#039;, &#039;l&#039;: &#039;л&#039;, &#039;m&#039;: &#039;м&#039;, &#039;n&#039;: &#039;н&#039;, &#039;o&#039;: &#039;о&#039;, &#039;p&#039;: &#039;п&#039;,
    &#039;q&#039;: &#039;кь&#039;, &#039;r&#039;: &#039;р&#039;, &#039;s&#039;: &#039;с&#039;, &#039;t&#039;: &#039;т&#039;, &#039;u&#039;: &#039;ю&#039;, &#039;v&#039;: &#039;в&#039;, &#039;w&#039;: &#039;в&#039;, &#039;x&#039;: &#039;икс&#039;,
    &#039;y&#039;: &#039;ай&#039;, &#039;z&#039;: &#039;з&#039;
}
&amp;nbsp;
def load_config():
    default_config = {&amp;quot;voice_settings&amp;quot;: {&amp;quot;speaker&amp;quot;: &amp;quot;baya&amp;quot;, &amp;quot;speed&amp;quot;: 1.0}, &amp;quot;word_replacements&amp;quot;: {}}
    if os.path.exists(&#039;config.json&#039;):
        try:
            with open(&#039;config.json&#039;, &#039;r&#039;, encoding=&#039;utf-8&#039;) as f: return json.load(f)
        except: return default_config
    return default_config
&amp;nbsp;
def clean_and_normalize_text(text, config):
    text_clean = text.strip()
&amp;nbsp;
    # 1. Применяем замену пунктуации
    for old_punc, new_punc in config.get(&amp;quot;custom_punctuation&amp;quot;, {}).items():
        text_clean = text_clean.replace(old_punc, new_punc)
&amp;nbsp;
    # 2. Применяем контекстный словарь из config.json (ищем БЕЗ учета регистра)
    replacements = config.get(&amp;quot;word_replacements&amp;quot;, {})
    for phrase in sorted(replacements.keys(), key=len, reverse=True):
        pattern = re.compile(re.escape(phrase.strip()), re.IGNORECASE)
        # Подставляем точную строку из конфига (с сохранением ЗАГЛАВНЫХ букв-ударений)
        text_clean = pattern.sub(replacements[phrase], text_clean)
&amp;nbsp;
    # 3. Перевод цифр в слова
    def replace_num(match):
        try: return num2words(int(match.group()), lang=&#039;ru&#039;)
        except: return match.group()
    text_clean = re.sub(r&#039;\d+&#039;, replace_num, text_clean)
&amp;nbsp;
    # 4. Железный перевод английских слов (игнорируем регистр букв ввода)
    for eng_word, ru_word in ENG_PHONETIC.items():
        pattern = re.compile(r&#039;\b&#039; + re.escape(eng_word) + r&#039;\b&#039;, re.IGNORECASE)
        text_clean = pattern.sub(ru_word, text_clean)
&amp;nbsp;
    # Смываем оставшиеся одиночные английские буквы побуквенно для безопасности ИИ
    def replace_isolated_lat(match):
        char = match.group().lower()
        abc = {&#039;a&#039;:&#039;а&#039;,&#039;b&#039;:&#039;бэ&#039;,&#039;c&#039;:&#039;цэ&#039;,&#039;d&#039;:&#039;дэ&#039;,&#039;e&#039;:&#039;е&#039;,&#039;f&#039;:&#039;эф&#039;,&#039;g&#039;:&#039;джи&#039;,&#039;h&#039;:&#039;эйч&#039;,
               &#039;i&#039;:&#039;ай&#039;,&#039;j&#039;:&#039;джей&#039;,&#039;k&#039;:&#039;кэй&#039;,&#039;l&#039;:&#039;эль&#039;,&#039;m&#039;:&#039;эм&#039;,&#039;n&#039;:&#039;эн&#039;,&#039;o&#039;:&#039;о&#039;,&#039;p&#039;:&#039;пи&#039;,
               &#039;q&#039;:&#039;кью&#039;,&#039;r&#039;:&#039;эр&#039;,&#039;s&#039;:&#039;эс&#039;,&#039;t&#039;:&#039;ти&#039;,&#039;u&#039;:&#039;ю&#039;,&#039;v&#039;:&#039;ви&#039;,&#039;w&#039;:&#039;дабл ю&#039;,&#039;x&#039;:&#039;икс&#039;,&#039;y&#039;:&#039;уай&#039;,&#039;z&#039;:&#039;зет&#039;}
        return abc.get(char, char)
    text_clean = re.sub(r&#039;[a-zA-Z]&#039;, replace_isolated_lat, text_clean)
&amp;nbsp;
    # Убираем лишние пробелы перед отправкой в нейросеть
    text_clean = re.sub(r&#039;\s+&#039;, &#039; &#039;, text_clean)
    return text_clean
&amp;nbsp;
class TTSHandler(BaseHTTPRequestHandler):
    def do_POST(self):
        content_length = int(self.headers[&#039;Content-Length&#039;])
        post_data = json.loads(self.rfile.read(content_length).decode(&#039;utf-8&#039;))
&amp;nbsp;
        raw_text = post_data.get(&#039;text&#039;, &#039;&#039;)
        base_speaker = post_data.get(&#039;speaker&#039;, &#039;baya&#039;)
        if base_speaker not in [&#039;aidar&#039;, &#039;baya&#039;, &#039;kseniya&#039;, &#039;eugene&#039;, &#039;xenia&#039;]:
            base_speaker = &#039;baya&#039;
&amp;nbsp;
        config = load_config()
        txt = clean_and_normalize_text(raw_text, config)
        print(f&amp;quot;[ИИ-Синтез] Итоговый текст для Silero: &#039;{txt}&#039; [Голос: {base_speaker}]&amp;quot;)
&amp;nbsp;
        # Модель читает заглавные русские буквы как жесткие ударения
        model.save_wav(text=txt, speaker=base_speaker, sample_rate=48000, put_accent=True, put_yo=True)
&amp;nbsp;
        self.send_response(200)
        self.send_header(&#039;Content-type&#039;, &#039;application/json&#039;)
        self.end_headers()
        self.wfile.write(json.dumps({&amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;}).encode(&#039;utf-8&#039;))
&amp;nbsp;
if __name__ == &amp;quot;__main__&amp;quot;:
    server = HTTPServer((&#039;127.0.0.1&#039;, 5000), TTSHandler)
    server.serve_forever()&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:21:05 +0000</pubDate>
        </item>
        <item>
            <title>config.json - создано</title>
            <link>https://wwoss.ru/doku.php?id=local_silero_tts:config.json&amp;rev=1785320357</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;configjson&quot;&gt;config.json&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=local_silero_tts:config.json&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_json&quot;&gt;config.json&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code css&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span class=&quot;st0&quot;&gt;&amp;quot;voice_settings&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;speaker&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;baya&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;speed&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;volume_multiplier&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;st0&quot;&gt;&amp;quot;custom_punctuation&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;...&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot; - &amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;!!!&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;!&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;??&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;?&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;st0&quot;&gt;&amp;quot;word_replacements&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;дверной замок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;дверной зам+ок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;каменный замок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;каменный з+амок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;древний замок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;древний з+амок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;веб&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;вэб&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;web&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;вэб&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;замок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;зам+ок&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;на двери&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;на две+ри&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;у двери&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;у дв+ери&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;st0&quot;&gt;&amp;quot;тестирую&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;тэст+ирую&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:19:17 +0000</pubDate>
        </item>
        <item>
            <title>server.js - создано</title>
            <link>https://wwoss.ru/doku.php?id=local_silero_tts:server.js&amp;rev=1785320186</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;serverjs&quot;&gt;server.js&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=local_silero_tts:server.js&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_js&quot;&gt;server.js&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code js&quot;&gt;const express = require(&#039;express&#039;);
const cors = require(&#039;cors&#039;);
const { spawn } = require(&#039;child_process&#039;);
const path = require(&#039;path&#039;);
const fs = require(&#039;fs&#039;);
const axios = require(&#039;axios&#039;);
&amp;nbsp;
const app = express();
app.use(cors());
app.use(express.json());
&amp;nbsp;
app.get(&#039;/&#039;, (req, res) =&amp;gt; {
    res.sendFile(path.join(__dirname, &#039;index.html&#039;));
});
&amp;nbsp;
const pythonProcess = spawn(&#039;python&#039;, [&#039;tts.py&#039;]);
pythonProcess.stdout.on(&#039;data&#039;, (data) =&amp;gt; console.log(`Python: ${data}`));
pythonProcess.stderr.on(&#039;data&#039;, (data) =&amp;gt; console.log(`Python System: ${data}`));
&amp;nbsp;
app.get(&#039;/api/stream-audio&#039;, async (req, res) =&amp;gt; {
    const text = req.query.text || &amp;quot;Привет&amp;quot;;
    const speaker = req.query.speaker || &amp;quot;baya&amp;quot;;
&amp;nbsp;
    try {
        await axios.post(&#039;http://127.0.0.1:5000&#039;, { text, speaker });
        const filePath = path.join(__dirname, &#039;test.wav&#039;);
&amp;nbsp;
        if (fs.existsSync(filePath)) {
            res.set(&#039;Content-Type&#039;, &#039;audio/wav&#039;);
            const stream = fs.createReadStream(filePath);
            stream.pipe(res);
        } else {
            res.status(404).send(&#039;Файл не найден&#039;);
        }
    } catch (error) {
        console.error(error);
        res.status(500).send(&#039;Ошибка генерации&#039;);
    }
});
&amp;nbsp;
app.listen(3000, () =&amp;gt; console.log(&#039;Сервер запущен на http://localhost:3000&#039;));&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:16:26 +0000</pubDate>
        </item>
        <item>
            <title>index.html - создано</title>
            <link>https://wwoss.ru/doku.php?id=local_silero_tts:index.html&amp;rev=1785320124</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;indexhtml&quot;&gt;index.html&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=local_silero_tts:index.html&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_html&quot;&gt;index.html&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code html4strict&quot;&gt;&lt;span class=&quot;sc0&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/html.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;html&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;lang&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ru&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/head.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;head&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/meta.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;meta&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/title.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;title&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;Локальный Silero TTS&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/title.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;title&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/style.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;style&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        body { font-family: Arial, sans-serif; max-width: 600px; margin: 50px auto; padding: 20px; background: #f4f4f9; }
        textarea { width: 100%; height: 250px; padding: 10px; font-size: 16px; border-radius: 5px; border: 1px solid #ccc; box-sizing: border-box; }
        select, button { padding: 10px 20px; font-size: 16px; margin-top: 15px; border-radius: 5px; border: none; cursor: pointer; }
        button { background: #28a745; color: white; font-weight: bold; }
        button:disabled { background: #ccc; }
        #status { margin-top: 15px; color: #555; font-style: italic; }
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/style.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;style&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/head.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;head&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/body.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;body&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/h1.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;h1&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;Локальный русский голос (Silero v5)&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/h1.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;h1&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/textarea.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;textarea&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;text-input&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Привет! На двери висит дверной замок, а в поле стоит каменный замок. Озвучь это.&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/textarea.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;textarea&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/label.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;label&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;speaker-select&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Голос:&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/label.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;label&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/select.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;select&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;speaker-select&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;baya&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Зая (Женский унизительный)&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;kseniya&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Ксения (Женский стандарт)&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;eugene&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Евгений (Мужской диктор)&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;aidar&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Айдар (Мужской мягкий)&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/option.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;option&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/select.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;select&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;say-btn&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Озвучить текст&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/br.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;br&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/br.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;br&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;audio &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;audio-player&amp;quot;&lt;/span&gt; controls &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;width: 100%;&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;audio&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;status&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Готов к работе&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/script.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;script&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        const btn = document.getElementById(&#039;say-btn&#039;);
        const status = document.getElementById(&#039;status&#039;);
        const player = document.getElementById(&#039;audio-player&#039;);
&amp;nbsp;
        btn.addEventListener(&#039;click&#039;, () =&amp;gt; {
            const text = encodeURIComponent(document.getElementById(&#039;text-input&#039;).value);
            const speaker = document.getElementById(&#039;speaker-select&#039;).value;
&amp;nbsp;
            btn.disabled = true;
            status.innerText = &amp;quot;Воспроизведение звука...&amp;quot;;
&amp;nbsp;
            // Прямая трансляция потока байт в плеер без создания файлов на диске!
            player.src = `http://localhost:3000/api/stream-audio?text=${text}&lt;span class=&quot;sc1&quot;&gt;&amp;amp;speaker=${speaker}&amp;amp;t=${Date.now()}`;&lt;/span&gt;
            player.play();
&amp;nbsp;
            player.onended = () =&amp;gt; {
                status.innerText = &amp;quot;Готово!&amp;quot;;
                btn.disabled = false;
            };
        });
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/script.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;script&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/body.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;body&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/html.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;html&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:15:24 +0000</pubDate>
        </item>
        <item>
            <title>local-voice-ai.rar - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Alocal_voice_ai%3Alocal-voice-ai.rar&amp;ns=manual%3Alocal_voice_ai&amp;rev=1785319704&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/images/fileicons/svg/rar.svg&quot; alt=&quot;local-voice-ai.rar&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:08:24 +0000</pubDate>
        </item>
        <item>
            <title>python-manager-26.3.msi - создано</title>
            <link>https://wwoss.ru/doku.php?image=manual%3Alocal_voice_ai%3Apython-manager-26.3.msi&amp;ns=manual%3Alocal_voice_ai&amp;rev=1785319646&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/images/fileicons/svg/file.svg&quot; alt=&quot;python-manager-26.3.msi&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Wed, 29 Jul 2026 10:07:26 +0000</pubDate>
        </item>
        <item>
            <title>tmp_ollama - [Файл edit.php] </title>
            <link>https://wwoss.ru/doku.php?id=tmp_ollama&amp;rev=1785135545</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;редактор_кода_через_qwen_llama&quot;&gt;Редактор кода через Qwen/Llama&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_ollama&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_&quot;&gt;Структура папок&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code html4strict&quot;&gt;📂 ollama/
├── 📂 auploads/                  
├── 📄 edit.php
└── 📄 index.php &lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 Qwen\/Llama&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440_\u043a\u043e\u0434\u0430_\u0447\u0435\u0440\u0435\u0437_qwen_llama&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-219&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;файл_indexphp&quot;&gt;Файл index.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_ollama&amp;amp;codeblock=1&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;index.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * ============================================================================= 
 *  index.php — ОСНОВНЫЙ СКРИПТ ДЛЯ РЕДАКТИРОВАНИЯ ФАЙЛОВ И РАБОТЫ С AI 
 * ============================================================================= 
 *
 *  УЧЕБНОЕ НАЗНАЧЕНИЕ: 
 *  Показывает, как можно загружать файлы на сервер, отображать их содержимое,
 *  и использовать искусственный интеллект для генерации изменений в коде.
 *
 *  КАК ИСПОЛЬЗОВАТЬ: 
 *  1. Откройте в браузере: http://localhost:8800/index.php
 *  2. Загрузите файлы, которые вы хотите редактировать
 *  3. Введите задачу для AI и нажмите &amp;quot;Сгенерировать изменения&amp;quot;
 *  4. Просмотрите предложенные изменения и примите их, если они корректны
 *
 *  ВНИМАНИЕ: этот файл только для обучения. На боевом сервере его нужно защищать.
 * ============================================================================= 
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Определение директории для загрузки файлов&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; __DIR__ &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/uploads&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/mkdir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;mkdir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu8&quot;&gt;0777&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Получение списка файлов для редактирования
 */&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_filter&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_filter&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/scandir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;scandir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/is_file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/pathinfo&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;pathinfo&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; PATHINFO_EXTENSION&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;js&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;json&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;html&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;css&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Обработка загрузки файлов
 */&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_METHOD&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;POST&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; UPLOAD_ERR_OK&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;a href=&quot;http://www.php.net/move_uploaded_file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;move_uploaded_file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;tmp_name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/basename&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;basename&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Location: ./index.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&amp;quot;ru&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;Llama Safe Editor&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
        body { font-family: sans-serif; margin: 30px; background: #f4f6f9; color: #333; }
        .container { display: flex; gap: 20px; }
        .panel { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); flex: 1; }
        textarea { width: 100%; height: 100px; box-sizing: border-box; padding: 10px; margin-bottom: 10px; }
        button { background: #007bff; color: white; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; font-size: 16px; }
        button:hover { background: #0056b3; }
        .btn-success { background: #28a745; display: none; margin-top: 10px; }
        .btn-success:hover { background: #218838; }
        pre { background: #272822; color: #f8f8f2; padding: 15px; border-radius: 5px; overflow-x: auto; max-height: 250px; }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;📂 Безопасный редактор кода через Qwen/Llama&amp;lt;/h1&amp;gt;
    &amp;lt;div class=&amp;quot;container&amp;quot;&amp;gt;
        &amp;lt;!-- Слева: файлы --&amp;gt;
        &amp;lt;div class=&amp;quot;panel&amp;quot; style=&amp;quot;max-width: 280px;&amp;quot;&amp;gt;
            &amp;lt;h3&amp;gt;1. Загрузка исходников&amp;lt;/h3&amp;gt;
            &amp;lt;form method=&amp;quot;post&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;
                &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;files[]&amp;quot; multiple required&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
                &amp;lt;button type=&amp;quot;submit&amp;quot;&amp;gt;Загрузить&amp;lt;/button&amp;gt;
            &amp;lt;/form&amp;gt;
            &amp;lt;h4&amp;gt;Файлы в проекте:&amp;lt;/h4&amp;gt;
            &amp;lt;ul&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;li&amp;gt;📄 &amp;lt;b&amp;gt;&lt;span class=&quot;sy1&quot;&gt;&amp;lt;?=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/b&amp;gt;&amp;lt;/li&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;endforeach&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;li&amp;gt;Нет файлов&amp;lt;/li&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;/ul&amp;gt;
        &amp;lt;/div&amp;gt;
&amp;nbsp;
        &amp;lt;!-- Справа: работа с AI --&amp;gt;
        &amp;lt;div class=&amp;quot;panel&amp;quot;&amp;gt;
            &amp;lt;h3&amp;gt;2. Что нужно сделать?&amp;lt;/h3&amp;gt;
            &amp;lt;textarea id=&amp;quot;prompt&amp;quot; placeholder=&amp;quot;Например: &#039;Добавь валидацию&#039;&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;
            &amp;lt;button onclick=&amp;quot;askLlama()&amp;quot;&amp;gt;Сгенерировать изменения&amp;lt;/button&amp;gt;
&amp;nbsp;
            &amp;lt;div id=&amp;quot;status&amp;quot; style=&amp;quot;margin-top:10px; font-weight:bold;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;nbsp;
            &amp;lt;!-- Блок предпросмотра --&amp;gt;
            &amp;lt;div id=&amp;quot;preview-area&amp;quot; style=&amp;quot;display:none; margin-top:20px;&amp;quot;&amp;gt;
                &amp;lt;h3 style=&amp;quot;color: #007bff;&amp;quot;&amp;gt;👁️ Код от нейросети (Предпросмотр)&amp;lt;/h3&amp;gt;
                &amp;lt;div id=&amp;quot;ai-code-output&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
                &amp;lt;button id=&amp;quot;apply-btn&amp;quot; class=&amp;quot;btn-success&amp;quot; onclick=&amp;quot;applyChanges()&amp;quot;&amp;gt;Применить эти изменения в файлы&amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
&amp;nbsp;
            &amp;lt;h3 style=&amp;quot;margin-top:30px;&amp;quot;&amp;gt;Текущий код на сервере:&amp;lt;/h3&amp;gt;
            &amp;lt;div&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$content&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file_get_contents&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_get_contents&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                    &amp;lt;h5&amp;gt;&lt;span class=&quot;sy1&quot;&gt;&amp;lt;?=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/h5&amp;gt;
                    &amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;&lt;span class=&quot;sy1&quot;&gt;&amp;lt;?=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;
                &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;endforeach&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;nbsp;
    &amp;lt;script&amp;gt;
        let lastAiResult = null;
&amp;nbsp;
        async function askLlama() {
            const prompt = document.getElementById(&#039;prompt&#039;).value;
            const status = document.getElementById(&#039;status&#039;);
            const previewArea = document.getElementById(&#039;preview-area&#039;);
            const aiOutput = document.getElementById(&#039;ai-code-output&#039;);
            const applyBtn = document.getElementById(&#039;apply-btn&#039;);
&amp;nbsp;
            if(!prompt) return alert(&#039;Введите задачу!&#039;);
&amp;nbsp;
            status.style.color = &#039;#28a745&#039;;
            status.innerText = &#039;⏳ Модель думает над кодом... Подождите.&#039;;
            previewArea.style.display = &#039;none&#039;;
            applyBtn.style.display = &#039;none&#039;;
&amp;nbsp;
            try {
                const res = await fetch(&#039;./edit.php&#039;, {
                    method: &#039;POST&#039;,
                    headers: { &#039;Content-Type&#039;: &#039;application/json&#039; },
                    body: JSON.stringify({ action: &#039;ask&#039;, prompt })
                });
&amp;nbsp;
                // Получаем чистый текст ответа бэкенда
                const rawText = await res.text();
&amp;nbsp;
                // Пытаемся распарсить его вручную
                let data;
                try {
                    data = JSON.parse(rawText);
                } catch(jsonErr) {
                    status.style.color = &#039;#dc3545&#039;;
                    status.innerHTML = &#039;❌ Ошибка PHP на сервере:&amp;lt;br&amp;gt;&amp;lt;div style=&amp;quot;text-align:left; background:#fff; padding:10px; border:1px solid #ccc; font-family:monospace; margin-top:10px; color:#000;&amp;quot;&amp;gt;&#039; + rawText + &#039;&amp;lt;/div&amp;gt;&#039;;
                    return;
                }
&amp;nbsp;
                if(data.success &amp;amp;&amp;amp; data.files.length &amp;gt; 0) {
                    status.innerText = &#039;✅ Код сгенерирован! Проверьте его ниже.&#039;;
                    lastAiResult = data.files;
&amp;nbsp;
                    aiOutput.innerHTML = &#039;&#039;;
                    data.files.forEach(f =&amp;gt; {
                        const div = document.createElement(&#039;div&#039;);
                        div.innerHTML = `&amp;lt;h4&amp;gt;Файл: ${f.name}&amp;lt;/h4&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;${f.content.replace(/&amp;amp;/g, &amp;quot;&amp;amp;amp;&amp;quot;).replace(/&amp;lt;/g, &amp;quot;&amp;amp;lt;&amp;quot;).replace(/&amp;gt;/g, &amp;quot;&amp;amp;gt;&amp;quot;)}&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;`;
                        aiOutput.appendChild(div);
                    });
&amp;nbsp;
                    previewArea.style.display = &#039;block&#039;;
                    applyBtn.style.display = &#039;block&#039;;
                } else {
                    status.style.color = &#039;#dc3545&#039;;
                    status.innerText = &#039;❌ Ошибка: &#039; + (data.error || &#039;Модель не выдала разметку файлов.&#039;);
                }
            } catch(e) {
                status.style.color = &#039;#dc3545&#039;;
                status.innerText = &#039;❌ Критическая ошибка сети.&#039;;
                console.error(e);
            }
        }
&amp;nbsp;
        async function applyChanges() {
            if(!lastAiResult) return;
            const status = document.getElementById(&#039;status&#039;);
&amp;nbsp;
            status.innerText = &#039;💾 Записываем файлы...&#039;;
&amp;nbsp;
            try {
                const res = await fetch(&#039;./edit.php&#039;, {
                    method: &#039;POST&#039;,
                    headers: { &#039;Content-Type&#039;: &#039;application/json&#039; },
                    body: JSON.stringify({ action: &#039;save&#039;, files: lastAiResult })
                });
                const data = await res.json();
                if(data.success) {
                    status.innerText = &#039;🎉 Файлы успешно обновлены!&#039;;
                    setTimeout(() =&amp;gt; location.reload(), 1000);
                } else {
                    alert(&#039;Ошибка сохранения: &#039; + data.error);
                }
            } catch(e) {
                alert(&#039;Ошибка при сохранении.&#039;);
            }
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0424\u0430\u0439\u043b index.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0444\u0430\u0439\u043b_indexphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;220-9509&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;файл_editphp&quot;&gt;Файл edit.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_ollama&amp;amp;codeblock=2&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;edit.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * ============================================================================= 
 *  edit.php — ОБРАБОТЧИК ЗАПРОСОВ ДЛЯ РЕДАКТИРОВАНИЯ ФАЙЛОВ И РАБОТЫ С AI 
 * ============================================================================= 
 *
 *  УЧЕБНОЕ НАЗНАЧЕНИЕ: 
 *  Обрабатывает запросы от index.php для генерации изменений в коде с помощью AI
 *  и сохранения обновленных файлов на сервер.
 *
 *  КАК РАБОТАЕТ:
 *  1. Принимает JSON-запросы с действием &#039;ask&#039; или &#039;save&#039;.
 *  2. Для действия &#039;ask&#039;:
 *     - Получает задачу для AI из запроса.
 *     - Собирает содержимое всех файлов в директории uploads.
 *     - Отправляет задачу и контекст файлов на сервер Ollama.
 *     - Парсит ответ от Ollama, разделяя его по маркерам [START_FILE].
 *     - Возвращает обновленные файлы клиенту.
 *  3. Для действия &#039;save&#039;:
 *     - Принимает массив файлов с содержимым из запроса.
 *     - Сохраняет обновленное содержимое каждого файла в директорию uploads.
 *
 *  ВНИМАНИЕ: этот файл только для обучения. На боевом сервере его нужно защищать.
 * ============================================================================= 
 */&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://www.php.net/set_time_limit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;set_time_limit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.php.net/ini_set&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;display_errors&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.php.net/error_reporting&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;error_reporting&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;E_ALL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Content-Type: application/json&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; __DIR__ &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/uploads&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_decode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_decode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_get_contents&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_get_contents&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;php://input&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$action&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;action&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;action&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$action&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ask&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$prompt&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;prompt&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;prompt&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Шаг 1: Папка uploads не найдена&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_filter&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_filter&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/scandir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;scandir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/is_file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$projectContext&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$projectContext&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;=== НАЧАЛО ФАЙЛА: &lt;span class=&quot;es4&quot;&gt;$f&lt;/span&gt; ===&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file_get_contents&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_get_contents&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;=== КОНЕЦ ФАЙЛА: &lt;span class=&quot;es4&quot;&gt;$f&lt;/span&gt; ===&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$systemPrompt&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Ты веб-разработчик. Задача: &lt;span class=&quot;es4&quot;&gt;$prompt&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;Текущие файлы:&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es4&quot;&gt;$projectContext&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;Измени код и верни файлы ПОЛНОСТЬЮ. Строго используй теги:&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;[START_FILE: имя]&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;код&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;[END_FILE: имя]&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$postData&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;model&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;qwen2.5-coder:14b&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;prompt&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$systemPrompt&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;stream&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;options&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;temperature&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;num_ctx&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;8192&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;a href=&quot;http://www.php.net/fsockopen&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fsockopen&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;127.0.0.1&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;11434&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$errno&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$errstr&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Не удалось подключиться к Ollama на 127.0.0.1:11434. Ошибка: &lt;span class=&quot;es4&quot;&gt;$errstr&lt;/span&gt; (&lt;span class=&quot;es4&quot;&gt;$errno&lt;/span&gt;)&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Запрашиваем через HTTP/1.0, чтобы исключить chunked transfer encoding на бэкенде&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;POST /api/generate HTTP/1.0&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Host: 127.0.0.1&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Content-Type: application/json&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Content-Length: &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strlen&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strlen&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$postData&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Connection: close&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$postData&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;a href=&quot;http://www.php.net/fwrite&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fwrite&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$out&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$response&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/feof&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;feof&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$response&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/fgets&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fgets&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4096&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/fclose&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fclose&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fp&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Гарантированно отрезаем заголовки по двойному переносу строки&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$body&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$body&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;// Пробуем отрезать по одиночным \n на случай Unix-формата заголовков сервера&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$body&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Разбор JSON&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$responseData&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_decode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_decode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$body&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$aiText&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$responseData&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;response&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$responseData&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;response&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$aiText&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Шаг 4: Не удалось распарсить JSON от Ollama.&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;st_h&quot;&gt;&#039;debug_raw_body&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$body&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Шаг 5: Парсинг маркеров [START_FILE]&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$parsedFiles&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/preg_match_all&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_match_all&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\[START_FILE:\s*([^\]\s]+)\]([\s\S]*?)\[END_FILE:\s*\1\]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$aiText&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; PREG_SET_ORDER&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$match&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$parsedFiles&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$match&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;content&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$match&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parsedFiles&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; 
            &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Шаг 5: Модель проигнорировала маркеры [START_FILE] и выдала обычный текст.&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;ai_raw_text&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$aiText&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$parsedFiles&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$action&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;save&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$filesToSave&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$input&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;files&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filesToSave&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$fileName&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/basename&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;basename&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/file_put_contents&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_put_contents&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$uploads_dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$fileName&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;content&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Неверное действие&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0424\u0430\u0439\u043b edit.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0444\u0430\u0439\u043b_editphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;9510-&amp;quot;} --&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Mon, 27 Jul 2026 06:59:05 +0000</pubDate>
        </item>
        <item>
            <title>04 - [local.php] </title>
            <link>https://wwoss.ru/doku.php?id=tmp_teh_zadanie_2_23.07.26_18:04&amp;rev=1784821016</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;структуру_каталогов&quot;&gt;структуру каталогов&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=0&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_&quot;&gt;структуру каталогов&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code html4strict&quot;&gt;microwiki/
├── assets/                  # СИСТЕМНЫЕ АССЕТЫ ЯДРА (Неизменяемая логика)
│   └── js/
│       ├── media-modal.js   # AJAX-загрузка картинок из модального окна в редакторе
│       └── toolbar.js       # Хоткеи (Ctrl+B/I/U) и асинхронный движок предпросмотра (Preview)
├── conf/                    # Папка конфигурации движка
│   ├── local.php            # Основные настройки сайта (название, язык)
│   └── users.auth.php       # Плоская база пользователей и хэшей паролей
├── data/                    # Данные (в DokuWiki это папка data/)
│   ├── pages/               # Текстовые страницы (.txt)
│   ├── media/               # Каталог картинок и файлов (.png, .jpg, .pdf)
│   ├── attic/               # Старые ревизии страниц
│   └── meta/                # Метаданные и кеш
├── lib/                     # Системные библиотеки и плагины
│   └── tpl/                 # Папка с шаблонами оформления
│       └── default/         # Текущая тема оформления
│           ├── main.php     # Основной каркас
│           ├── header.php   # Верхняя часть и меню
│           ├── footer.php   # Нижняя часть и подпись
│           └── css/
│               └── style.css # ВСЕ стили сайта, монолитного тулбара и синтаксического кода
├── src/                     # Ядро движка (Core)
│   ├── Action/              # Контроллеры (show, edit, media)
│   ├── Auth.php             # Модуль авторизации, сессий и верификации паролей
│   ├── CodeHighlighter.php  # Универсальный динамический парсер раскраски и нумерации кода
│   ├── MediaManager.php     # Файловый менеджер (загрузка, удаление, просмотр)
│   ├── Parser.php           # Вики-парсер
│   ├── Storage.php          # Работа со страницами и ID (разрешение систем имен `:`)
│   ├── Template.php         # Диспетчер вывода контента (страницы, формы правки, медиаменеджер)
│   └── toolbar.php          # HTML-структура кнопок монолитного тулбара и каркас модалки
└── index.php                # Единая точка входа&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443_\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;1-3095&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;localphp&quot;&gt;local.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=1&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;local.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * MicroWiki Configuration File
 * Глобальные настройки движка
 */&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Наша Учебная Вики&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// Название вашей базы знаний&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;lang&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;ru&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                &lt;span class=&quot;co1&quot;&gt;// Язык интерфейса&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;template&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;           &lt;span class=&quot;co1&quot;&gt;// Используемый шаблон&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Настройки безопасности и пользователей&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;useacl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;                &lt;span class=&quot;co1&quot;&gt;// Включить разграничение прав доступа&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;superuser&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;admin&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;            &lt;span class=&quot;co1&quot;&gt;// Имя главного администратора&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;local.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;localphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;3096-3836&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;mainphp&quot;&gt;main.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=2&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;main.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; 
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Поочередно собираем страницу из изолированных компонентов&lt;/span&gt;
tpl_header&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
tpl_content&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
tpl_footer&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;main.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;mainphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;3837-4154&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit4&quot; id=&quot;headerphp&quot;&gt;header.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=3&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;header.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&amp;quot;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;conf&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;lang&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; tpl_pagetitle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt; - &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;conf&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/title&amp;gt;
&amp;nbsp;
    &amp;lt;!-- Абсолютный веб-путь к файлу стилей, чтобы он никогда не терялся --&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;./lib/tpl/default/css/style.css?v=&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/time&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;time&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;quot;&amp;gt;
    &amp;lt;!-- Подключаем базовую логику редактора --&amp;gt;
&amp;lt;script src=&amp;quot;./assets/js/toolbar.js&amp;quot; defer&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;!-- Подключаем изолированную логику модального окна загрузки картинок --&amp;gt;
&amp;lt;script src=&amp;quot;./assets/js/media-modal.js&amp;quot; defer&amp;gt;&amp;lt;/script&amp;gt;
&amp;nbsp;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div class=&amp;quot;wrapper&amp;quot;&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;div class=&amp;quot;logo&amp;quot;&amp;gt;
            &amp;lt;a href=&amp;quot;?id=start&amp;quot;&amp;gt;📝 &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;conf&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;nav&amp;gt;
            &amp;lt;a href=&amp;quot;?id=&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;ID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;amp;do=show&amp;quot;&amp;gt;Читать&amp;lt;/a&amp;gt;
            &amp;lt;a href=&amp;quot;?id=&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;ID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;amp;do=edit&amp;quot;&amp;gt;Правка&amp;lt;/a&amp;gt;
            &amp;lt;a href=&amp;quot;?id=&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;ID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;amp;do=media&amp;quot;&amp;gt;Медиафайлы&amp;lt;/a&amp;gt;
&amp;nbsp;
            &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;span class=&amp;quot;user-info&amp;quot;&amp;gt;👤 &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$usr&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; auth_get_user&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$usr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/span&amp;gt;
                &amp;lt;a href=&amp;quot;?id=&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;ID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;amp;do=logout&amp;quot; style=&amp;quot;color: #ffb3b3;&amp;quot;&amp;gt;Выйти&amp;lt;/a&amp;gt;
            &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
                &amp;lt;a href=&amp;quot;?id=&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;ID&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;amp;do=login&amp;quot;&amp;gt;Войти&amp;lt;/a&amp;gt;
            &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;endif&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
        &amp;lt;/nav&amp;gt;
    &amp;lt;/header&amp;gt;
    &amp;lt;main&amp;gt;
        &amp;lt;div class=&amp;quot;breadcrumbs&amp;quot;&amp;gt;Вы здесь: &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; tpl_pagetitle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;header.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;headerphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;4155-6092&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit5&quot; id=&quot;footerphp&quot;&gt;footer.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=4&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;footer.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
    &amp;lt;/main&amp;gt;
    &amp;lt;footer&amp;gt;
        &amp;lt;p&amp;gt;&amp;amp;copy; &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/date&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;date&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Y&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;conf&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;. Разработано в учебных целях.&amp;lt;/p&amp;gt;
    &amp;lt;/footer&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;footer.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;footerphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;6093-6411&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit6&quot; id=&quot;stylecss&quot;&gt;style.css&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=5&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_css&quot;&gt;style.css&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code css&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;/* =========================================================================
   1. ГЛОБАЛЬНЫЕ СТИЛИ И КАРКАС ШАБЛОНА САЙТА (MicroWiki Framework)
   ========================================================================= */&lt;/span&gt;
body &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; Arial&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#333&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f4f6f9&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Главная центрирующая обертка сайта */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.wrapper&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1100px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;20px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;min-height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;90vh&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;flex-direction&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; column&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Шапка сайта */&lt;/span&gt;
header &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#2b5e8f&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;25px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;justify-content&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; space-between&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;align-items&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
header &lt;span class=&quot;re1&quot;&gt;.logo&lt;/span&gt; a &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;22px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;bold&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;text-decoration&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Меню навигации в шапке */&lt;/span&gt;
nav a &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;text-decoration&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0.85&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;transition&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; opacity &lt;span class=&quot;re3&quot;&gt;0.2s&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;dashed&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;transparent&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;2px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
nav a&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;hover&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-bottom-style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-bottom-color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Основной блок контента */&lt;/span&gt;
main &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;35px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;flex-grow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Подвал сайта */&lt;/span&gt;
footer &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f8f9fa&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-top&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#e9ecef&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;text-align&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;13px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#6c757d&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Хлебные крошки (Вы здесь) */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.breadcrumbs&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;13px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#6c757d&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;25px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Плашка информации о залогиненном пользователе */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.user-info&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;13px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;4px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;inline-block&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Отрендеренный вики-контент страниц */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.wiki-content&lt;/span&gt; h1 &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#2b5e8f&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;padding-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.wiki-content&lt;/span&gt; h2 &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#333&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;18px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.wiki-content&lt;/span&gt; h3 &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#555&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;6px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* =========================================================================
   2. КОМПОНЕНТ РЕДАКТОРА И МОНОЛИТНОГО ТУЛБАРA DOKUWIKI С ПИKЕРАМИ
   ========================================================================= */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.wiki-editor-container&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;flex-direction&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; column&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-toolbar-container&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fcfcfc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ccc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;5px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;6px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-top-left-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-top-right-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;flex-wrap&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; wrap&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;align-items&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-toolbar-group&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;6px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;2px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-toolbar-group&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;last-child&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-btn-ico&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ffffff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; linear-gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;to &lt;span class=&quot;kw2&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ffffff&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;0%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f3f3f3&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#b8b8b8&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;-1px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;pointer&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;11px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; Arial&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#333&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; inline-flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;align-items&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;justify-content&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;24px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;26px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-toolbar-group&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;.doku-btn-ico&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;last-child&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#b8b8b8&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-btn-ico&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;hover&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; linear-gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;to &lt;span class=&quot;kw2&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ffffff&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;0%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#e2e8f0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#888&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-arrow&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;transparent&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;transparent&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#555&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;transparent&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* -------------------------------------------------------------------------
   НОВЫЕ ГОРИЗОНТАЛЬНЫЕ ВЫПАДАЮЩИЕ ПАНЕЛИ (PICKERS)
   ------------------------------------------------------------------------- */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-dropdown&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;inline-block&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Контейнер подменю: раскрывается горизонтально с тенью */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-dropdown-content&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;25px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ffffff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#b8b8b8&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;0px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;8px&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.12&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;999&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Монолитная флекс-лента внутри подменю */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-sub-toolbar&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;2px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Кнопка внутри выпадающей ленты */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-sub-btn&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ffffff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; linear-gradient&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;to &lt;span class=&quot;kw2&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ffffff&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;0%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f9f9f9&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#c5c5c5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;-1px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;6px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;pointer&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;11px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; inline-flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;align-items&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;justify-content&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;22px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;24px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-sub-toolbar&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;.doku-sub-btn&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;last-child&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#c5c5c5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-sub-btn&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;hover&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#e6effa&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#999&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* КЛАСС КРАСИВЫХ CSS-ИКОНОК ФАЙЛОВ КОДА */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.file-ico&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;7px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Arial Black&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;bold&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;13px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;line-height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;text-align&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.css-html&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#e34c26&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Красный HTML */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.css-php&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#4f5b93&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Синий PHP */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.css-css&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#563d7c&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Фиолетовый CSS */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.css-js&lt;/span&gt;   &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f1e05a&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#333&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Желтый JS */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.css-sql&lt;/span&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#00758f&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Бирюзовый SQL */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.css-bash&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#4eaa25&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Зеленый Bash */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-dropdown-show&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;block&lt;/span&gt; !important&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Текстовое поле */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.wiki-textarea&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;380px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;12px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Courier New&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;monospace&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ccc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-bottom-left-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-bottom-right-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;line-height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1.6&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;resize&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;vertical&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* =========================================================================
   3. КНОПКИ УПРАВЛЕНИЯ СНИЗУ И МЕДИА-МЕНЕДЖЕР
   ========================================================================= */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-btn&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#ccc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;4px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;13px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#333&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;pointer&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-btn&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;kw5&quot;&gt;hover&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* Сетка отображения Медиа-менеджера */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.media-grid&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; grid&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;grid-template-columns&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;repeat&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auto-fill&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;minmax&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re3&quot;&gt;180px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; 1fr&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    gap&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.media-item&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#eee&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;text-align&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;flex-direction&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; column&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;justify-content&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; space-between&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;box-shadow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;2px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;4px&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.02&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* =========================================================================
   4. СИНТАКСИЧЕСКИЙ БЛОК КОДА DOKUWIKI (ОДИНАКОВЫЙ РАЗМЕР ШРИФТА ДЛЯ ЦИФР)
   ========================================================================= */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.doku-code-block&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;15px&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-code-file-label&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; inline-flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;align-items&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;center&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f7f9fa&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#dcdcdc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;4px&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;12px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; Arial&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#2b5e8f&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-top-left-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-top-right-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-code-content-wrapper&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f7f9fa&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#dcdcdc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-code-content&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;8px&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Consolas&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Courier New&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;monospace&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;overflow-x&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#f7f9fa&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;line-height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1.4&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.doku-code-content&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; div &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; flex&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;0px&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;/* ИСПРАВЛЕНО: Размер шрифта номеров строк увеличен до 14px (один в один с кодом) */&lt;/span&gt;
&lt;span class=&quot;re1&quot;&gt;.code-ln&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#666666&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Отменяем жесткий min-width */&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;25px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Минимальный базис для однозначных чисел */&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;text-align&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;padding-left&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Фиксированный зазор до серой линии */&lt;/span&gt;
	&lt;span class=&quot;kw1&quot;&gt;padding-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;coMULTI&quot;&gt;/* Фиксированный зазор до серой линии */&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;margin-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;12px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;coMULTI&quot;&gt;/* Фиксированный зазор от линии до кода */&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;border-right&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#dcdcdc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;inline-block&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    user-select&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;14px&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
    &lt;span class=&quot;kw1&quot;&gt;box-sizing&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;border-box&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.code-txt&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;white-space&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;pre&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#000000&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;inline-block&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re1&quot;&gt;.code-line-active&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;background-color&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;#fff9db&lt;/span&gt; !important&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re3&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;style.css&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;stylecss&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:5,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;6412-16633&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit7&quot; id=&quot;indexphp&quot;&gt;index.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=6&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;index.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * MicroWiki Engine - Главный диспетчер (Точка входа)
 * index.php
 */&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://www.php.net/error_reporting&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;error_reporting&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;E_ALL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;a href=&quot;http://www.php.net/ini_set&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;display_errors&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; __DIR__ &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;conf/local.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;conf/local.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;    &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;title&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ?? &lt;span class=&quot;st_h&quot;&gt;&#039;MicroWiki&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;template&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;template&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ?? &lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;lang&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;lang&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ?? &lt;span class=&quot;st_h&quot;&gt;&#039;ru&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_TPL&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;lib/tpl/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;template&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/Auth.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/Storage.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/MediaManager.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
auth_setup&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Storage&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;data&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; MediaManager&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;data&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;id&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/[^a-zA-Z0-9_\-:]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;id&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;start&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;start&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;do&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/[^a-z_]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;do&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;show&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// 1. АСИНХРОННЫЙ API ЭНДПОИНТ ДЛЯ МОДАЛЬНОГО ОКНА КАРТИНОК&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;api_upload&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_METHOD&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;POST&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Content-Type: application/json&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Необходима авторизация.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;int&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/strrpos&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strrpos&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;upload&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$uploadedName&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/[^a-zA-Z0-9_\-\.]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;uploadfile&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$nsPrefix&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$wikiTag&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;{{:&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$nsPrefix&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$uploadedName&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;|}}&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;tag&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wikiTag&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_encode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_encode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;success&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Ошибка загрузки.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// 2. ИСПРАВЛЕНО: АСИНХРОННЫЙ API ЭНДПОИНТ ДЛЯ ЖИВОГО ПРЕДПРОСМОТРА (В самом верху до фильтрации)&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;api_preview&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_METHOD&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;POST&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Content-Type: text/html; charset=UTF-8&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$textToParse&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;wikitext&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;wikitext&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/Parser.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$parser&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Parser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Отдаем только чистый отрендеренный текст и намертво прерываем выполнение&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$parser&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$textToParse&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// =========================================================================&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Обработка авторизации&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;login&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_METHOD&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;POST&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$username&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;u&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;u&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$password&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;p&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;p&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auth_login&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$username&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$password&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Location: ?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Обработка выхода&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;logout&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    auth_logout&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Location: ?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Сохранение вики-страницы&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;save&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_METHOD&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;POST&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Ошибка доступа.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$textToSave&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_POST&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;wikitext&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; ?? &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$textToSave&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Location: ?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;do=show&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Стандартная загрузка медиафайлов (из вкладки &amp;quot;Медиафайлы&amp;quot;)&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;upload&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SERVER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;REQUEST_METHOD&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;POST&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Ошибка доступа.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;int&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/strrpos&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strrpos&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;upload&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Location: ?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;do=media&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Стандартное удаление медиафайлов&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;delete&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Ошибка доступа.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;int&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/strrpos&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strrpos&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$fileToDelete&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;file&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;file&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fileToDelete&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$fileToDelete&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Location: ?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;do=media&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;// Массив легальных команд (Добавлено действие api_upload)&lt;/span&gt;
&lt;span class=&quot;re0&quot;&gt;$allowed_actions&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;show&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;edit&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;save&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;media&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;upload&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;delete&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;login&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;api_upload&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;api_preview&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$allowed_actions&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;show&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/Template.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_TPL &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;main.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt; WIKI_TPL &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;main.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Критическая ошибка движка: Главный файл шаблона не найден.&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;index.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;indexphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;16634-21762&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit8&quot; id=&quot;templatephp&quot;&gt;template.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=7&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;template.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * Модуль шаблонизации (Аналог inc/template.php в DokuWiki)
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Выводит заголовок текущей страницы для тега &amp;lt;title&amp;gt;
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_pagetitle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039; » &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Подключает верхнюю часть HTML-шаблона (Шапку)
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_header&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_TPL &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;header.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt; WIKI_TPL &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;header.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Подключает нижнюю часть HTML-шаблона (Подвал)
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_footer&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_TPL &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;footer.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt; WIKI_TPL &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;footer.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Системная функция ядра для подключения панели инструментов редактора
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_extensions_toolbar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/toolbar.php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/toolbar.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Главный диспетчер вывода контента в шаблоне
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_content&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;switch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ACT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;login&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;
            tpl_login_form&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;edit&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;
            tpl_edit_form&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;media&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;
            tpl_media_manager&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;show&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt;
            tpl_page_body&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * ВЫВОД СТРАНИЦЫ: Читает файл, рендерит через Parser и выводит живой HTML
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_page_body&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;h1 style=&#039;margin-top:0; color:#2b5e8f;&#039;&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;exists&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$rawText&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/Parser.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$parser&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; Parser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$htmlContent&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$parser&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$rawText&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;div class=&#039;wiki-content&#039; style=&#039;line-height:1.6; font-size:15px;&#039;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$htmlContent&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;div style=&#039;background:#fff9e6; border:1px solid #ffe0b3; padding:15px; color:#b36b00;&#039;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Страницы с именем &amp;lt;strong&amp;gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/strong&amp;gt; еще не существует.&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;p&amp;gt;&amp;lt;a href=&#039;?id=&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;amp;do=edit&#039; style=&#039;display:inline-block; margin-top:15px; padding:8px 15px; background:#2b5e8f; color:#fff; text-decoration:none; border-radius:3px; font-weight:bold;&#039;&amp;gt;Создать эту страницу&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;p style=&#039;font-size:14px; color:#666;&#039;&amp;gt;Войдите в систему, чтобы иметь возможность создать её.&amp;lt;/p&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * ФОРМА РЕДАКТИРОВАНИЯ И ПРЕДПРОСМОТРА СНИЗУ
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_edit_form&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;p style=&#039;color:red; font-weight:bold;&#039;&amp;gt;Ошибка: Только зарегистрированные пользователи могут редактировать страницы.&amp;lt;/p&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$currentText&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$wikiStorage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;div style=&#039;font-size:13px; color:#444; background:#fbfbfb; padding:10px; border:1px solid #ddd; margin-bottom:15px;&#039;&amp;gt;Отредактируйте страницу и нажмите «Сохранить».&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;h1&amp;gt;Правка страницы: &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;form method=&amp;quot;POST&amp;quot; action=&amp;quot;?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;do=save&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div class=&amp;quot;wiki-editor-container&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Системный тулбар кнопок&lt;/span&gt;
    tpl_extensions_toolbar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Поле ввода текста&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;textarea id=&amp;quot;wikiEditor&amp;quot; name=&amp;quot;wikitext&amp;quot; class=&amp;quot;wiki-textarea&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentText&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/textarea&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// Блок нижних кнопок управления движком (В стиле DokuWiki)&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;margin-top:15px; background:#f8f9fa; padding:15px; border:1px solid #ccc; border-radius:4px;&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;div style=&amp;quot;margin-bottom:12px;&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;    &amp;lt;button type=&amp;quot;submit&amp;quot; class=&amp;quot;doku-btn&amp;quot; style=&amp;quot;background:#2b5e8f; color:#fff; font-weight:bold;&amp;quot;&amp;gt;Сохранить&amp;lt;/button&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;    &amp;lt;button type=&amp;quot;button&amp;quot; class=&amp;quot;doku-btn&amp;quot; onclick=&amp;quot;runLivePreview()&amp;quot;&amp;gt;Просмотр&amp;lt;/button&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;    &amp;lt;a href=&amp;quot;?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot; class=&amp;quot;doku-btn&amp;quot; style=&amp;quot;text-decoration:none; display:inline-block; text-align:center; line-height:1.2;&amp;quot;&amp;gt;Отменить&amp;lt;/a&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;    &amp;lt;label style=&amp;quot;display:block; font-size:13px; font-weight:bold; margin-bottom:4px; color:#333;&amp;quot;&amp;gt;Сводка изменений:&amp;lt;/label&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;    &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;summary&amp;quot; style=&amp;quot;width:100%; max-width:500px; padding:6px; border:1px solid #ccc; border-radius:3px; font-size:14px;&amp;quot; placeholder=&amp;quot;Что именно вы изменили...&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/form&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;// БЛОК ДИНАМИЧЕСКОГО ПРЕДПРОСМОТРА СНИЗУ&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div id=&amp;quot;previewBlock&amp;quot; style=&amp;quot;display:none; margin-top:40px; border-top:2px dashed #bbb; padding-top:20px;&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;h2 style=&amp;quot;color:#2b5e8f; margin-top:0;&amp;quot;&amp;gt;Просмотр&amp;lt;/h2&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;p style=&amp;quot;font-size:13px; color:#666; font-style:italic; margin-bottom:15px;&amp;quot;&amp;gt;Здесь показано, как ваш text будет выглядеть. &amp;lt;strong&amp;gt;Внимание: текст ещё не сохранён!&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;  &amp;lt;div id=&amp;quot;previewContent&amp;quot; class=&amp;quot;wiki-content&amp;quot; style=&amp;quot;background:#fff; padding:20px; border:1px solid #ddd; border-radius:4px; min-height:100px; line-height:1.6;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * ИНТЕРФЕЙС АВТОРИЗАЦИИ
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_login_form&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;p&amp;gt;Вы уже успешно авторизованы в системе.&amp;lt;/p&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;login_error&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;div style=&#039;color: #a00; background: #ffebeb; padding: 15px; border: 1px solid #faaaaa; margin-bottom: 15px; font-family:monospace; font-size:13px; line-height:1.4;&#039;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;login_error&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
    &amp;lt;div style=&amp;quot;max-width: 300px; background: #f9f9f9; padding: 25px; border: 1px solid #ddd; border-radius: 4px;&amp;quot;&amp;gt;
        &amp;lt;h3 style=&amp;quot;margin-top:0; margin-bottom:20px;&amp;quot;&amp;gt;Авторизация&amp;lt;/h3&amp;gt;
        &amp;lt;form method=&amp;quot;POST&amp;quot;&amp;gt;
            &amp;lt;label style=&amp;quot;display:block; margin-bottom:5px; font-weight:bold; font-size:14px;&amp;quot;&amp;gt;Логин:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;u&amp;quot; required style=&amp;quot;width:100%; margin-bottom:15px; padding:6px; box-sizing: border-box;&amp;quot;&amp;gt;
&amp;nbsp;
            &amp;lt;label style=&amp;quot;display:block; margin-bottom:5px; font-weight:bold; font-size:14px;&amp;quot;&amp;gt;Пароль:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;password&amp;quot; name=&amp;quot;p&amp;quot; required style=&amp;quot;width:100%; margin-bottom:20px; padding:6px; box-sizing: border-box;&amp;quot;&amp;gt;
&amp;nbsp;
            &amp;lt;button type=&amp;quot;submit&amp;quot; style=&amp;quot;padding: 7px 20px; background:#2b5e8f; color:#fff; border:none; border-radius:3px; cursor:pointer; font-weight:bold;&amp;quot;&amp;gt;Войти&amp;lt;/button&amp;gt;
        &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * ИНТЕРФЕЙС МЕДИАМЕНЕДЖЕРА
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; tpl_media_manager&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;int&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/strrpos&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strrpos&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;h1&amp;gt;Медиа-менеджер для пространства имен: &amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; ?&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;[корень]&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;
        &amp;lt;div style=&amp;quot;background:#f9f9f9; padding:20px; border:1px solid #ddd; border-radius:4px; margin-bottom:30px;&amp;quot;&amp;gt;
            &amp;lt;h3 style=&amp;quot;margin-top:0; margin-bottom:15px; font-size:16px;&amp;quot;&amp;gt;Загрузить файл в этот раздел&amp;lt;/h3&amp;gt;
            &amp;lt;form method=&amp;quot;POST&amp;quot; action=&amp;quot;?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;do=upload&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;
                &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;uploadfile&amp;quot; required&amp;gt;
                &amp;lt;button type=&amp;quot;submit&amp;quot; style=&amp;quot;padding:5px 15px; background:#2b5e8f; color:#fff; border:none; cursor:pointer; font-weight:bold; border-radius:3px;&amp;quot;&amp;gt;Загрузить&amp;lt;/button&amp;gt;
            &amp;lt;/form&amp;gt;
            &amp;lt;small style=&amp;quot;color:#666; display:block; margin-top:5px;&amp;quot;&amp;gt;Разрешены форматы: JPG, PNG, GIF, PDF, TXT&amp;lt;/small&amp;gt;
        &amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$mediaManager&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;getFiles&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;lt;p style=&#039;color:#888; font-style:italic;&#039;&amp;gt;В данном разделе файлов пока нет.&amp;lt;/p&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;display:grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap:20px;&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$webPath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;data/media/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$currentNS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$sizeKb&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/round&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;round&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;size&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1024&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;border:1px solid #eee; padding:10px; border-radius:4px; text-align:center; background:#fff; display:flex; flex-direction:column; justify-content:between; box-shadow: 0 2px 4px rgba(0,0,0,0.02);&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;is_image&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;height:100px; display:flex; align-items:center; justify-content:center; margin-bottom:10px; overflow:hidden; background:#f4f4f4;&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$webPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot; style=&amp;quot;max-width:100%; max-height:100%; object-fit:contain;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;height:100px; display:flex; align-items:center; justify-content:center; margin-bottom:10px; background:#e9ecef; font-size:32px; color:#6c757d; font-weight:bold; text-transform:uppercase;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;ext&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;font-size:13px; font-weight:bold; word-break:break-all; text-align:left; flex-grow:1; margin-bottom:8px;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div style=&amp;quot;font-size:11px; color:#666; text-align:left; margin-bottom:10px;&amp;quot;&amp;gt;Размер: &#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$sizeKb&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039; КБ&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$delUrl&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ID&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;do=delete&amp;amp;file=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;a href=&amp;quot;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$delUrl&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot; onclick=&amp;quot;return confirm(\&#039;Удалить этот файл?\&#039;)&amp;quot; style=&amp;quot;color:#c00; font-size:12px; text-decoration:none; display:block; padding-top:5px; border-top:1px solid #f4f4f4;&amp;quot;&amp;gt;Удалить&amp;lt;/a&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;template.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;templatephp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:7,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;21763-32781&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit9&quot; id=&quot;authphp&quot;&gt;auth.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=8&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;auth.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * Слой аутентификации и работы с сессиями (Аналог inc/auth.php в DokuWiki)
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Инициализация и безопасный старт сессии PHP
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; auth_setup&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/ini_set&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;session.cookie_httponly&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/ini_set&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;session.use_only_cookies&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;1&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;session_status&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; PHP_SESSION_NONE&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;a href=&quot;http://www.php.net/session_start&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;session_start&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Проверка учетных данных пользователя по файлу users.auth.php
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; auth_login&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$user&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$pass&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bool &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;re0&quot;&gt;$auth_file&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;conf/users.auth.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$auth_file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;re0&quot;&gt;$handle&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/fopen&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fopen&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$auth_file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;r&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/fgets&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fgets&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;?php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;#&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/count&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;count&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; 
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$login&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$hash&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$email&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$login&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$user&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;co1&quot;&gt;// Штатная, безопасная проверка пароля по хэшу&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;password_verify&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$pass&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$hash&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;a href=&quot;http://www.php.net/fclose&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fclose&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_status&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;logged_in&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_login&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$login&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_email&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$email&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;a href=&quot;http://www.php.net/fclose&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;fclose&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Выход пользователя из системы (Удаление сессии)
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; auth_logout&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; void &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_status&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_login&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_email&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/session_destroy&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;session_destroy&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Проверка, авторизован ли текущий посетитель
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; auth_is_logged&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bool &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_status&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_status&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;logged_in&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Получение имени текущего авторизованного пользователя
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; auth_get_name&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;Гость&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co4&quot;&gt;/**
 * Возвращает массив данных пользователя для совместимости с шаблоном header.php
 */&lt;/span&gt;
&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; auth_get_user&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;login&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_login&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_login&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; auth_get_name&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;st_h&quot;&gt;&#039;email&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_email&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_SESSION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;auth_email&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;auth.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;authphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:8,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;32782-36081&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit10&quot; id=&quot;usersauthphp&quot;&gt;users.auth.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=9&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;users.auth.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;
# MicroWiki Users Auth File
# users.auth.php
# Формат записи: login:password_hash:real_name:email:groups
admin:$2y$10$csfWQtrGXsmJcNQ3aaERWOJ3Am/ljBh/r/gaG8gJM0ajo41FLH0aK:Администратор:admin@wiki.local:admin,user
editor:$2y$10$7R9rMkGzE8hWd2RjK1l8OuOl/Xp4yq3K9vR8fD7bC0mN5eK6wPy1a:Редактор Вася:vasya@wiki.local:user&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;users.auth.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;usersauthphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:9,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;36082-36514&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit11&quot; id=&quot;hashphp&quot;&gt;hash.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=10&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;hash.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; password_hash&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;admin123&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; PASSWORD_DEFAULT&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;hash.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;hashphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:10,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;36515-36620&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit12&quot; id=&quot;storagephp&quot;&gt;storage.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=11&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;storage.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * Класс управления плоскими файлами страниц (Аналог файлового ядра DokuWiki)
 * storage.php
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Storage &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$baseDir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co4&quot;&gt;/**
     * Конструктор инициализирует базовую директорию для хранения текстов
     */&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; __construct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$baseDataPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;// Гарантируем правильные слеши в путях для Windows/Linux систем&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;baseDir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/rtrim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;rtrim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;\\&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$baseDataPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/pages/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co4&quot;&gt;/**
     * Преобразует Wiki ID (например, &amp;quot;отдел:инструкция&amp;quot;) в абсолютный путь к .txt файлу
     */&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; resolvePath&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;// Безопасность: заменяем любые попытки выйти из папки (файлы вида ../)&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;..&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;\\&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// В DokuWiki двоеточие — это разделитель папок. Меняем &amp;quot;:&amp;quot; на &amp;quot;/&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$relativePath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;baseDir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$relativePath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;.txt&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co4&quot;&gt;/**
     * Проверяет, существует ли физический файл страницы
     */&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; exists&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bool &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;resolvePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co4&quot;&gt;/**
     * Безопасно читает содержимое вики-страницы
     */&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; read&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;resolvePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file_get_contents&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_get_contents&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ?&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co4&quot;&gt;/**
     * Сохраняет текст страницы, автоматически создавая вложенную структуру папок
     */&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; save&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bool &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;resolvePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$dirPath&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/dirname&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;dirname&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Если папки для пространства имен не существуют, рекурсивно создаем их&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dirPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/mkdir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;mkdir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dirPath&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu8&quot;&gt;0755&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dirPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// Не удалось создать папку (проблема прав доступа)&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Записываем данные в файл атомарно&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file_put_contents&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_put_contents&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;storage.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;storagephp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:11,&amp;quot;secid&amp;quot;:12,&amp;quot;range&amp;quot;:&amp;quot;36621-39467&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit13&quot; id=&quot;mediamanagerphp&quot;&gt;MediaManager.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=12&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;MediaManager.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * Класс управления медиафайлами и изображениями (Аналог подсистемы Media в DokuWiki)
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; MediaManager &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$baseMediaDir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$allowedTypes&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; __construct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$baseDataPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;baseMediaDir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/rtrim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;rtrim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;\\&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$baseDataPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/media/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;// Белый список разрешенных расширений файлов&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;allowedTypes&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
            &lt;span class=&quot;st_h&quot;&gt;&#039;jpg&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;jpeg&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;png&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;gif&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;pdf&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;txt&#039;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; resolveDir&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;..&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;\\&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$relativePath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/rtrim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;rtrim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;baseMediaDir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$relativePath&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; getFiles&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;resolveDir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$result&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/scandir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;scandir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$files&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;.&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;..&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$ext&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strtolower&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strtolower&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/pathinfo&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;pathinfo&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; PATHINFO_EXTENSION&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$isImage&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ext&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;jpg&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;jpeg&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;png&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;gif&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;re0&quot;&gt;$result&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;
                    &lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;st_h&quot;&gt;&#039;size&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/filesize&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;filesize&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$dir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;st_h&quot;&gt;&#039;is_image&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$isImage&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;st_h&quot;&gt;&#039;ext&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$ext&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$result&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;co4&quot;&gt;/**
     * Безопасная обработка и загрузка файла из глобального массива $_FILES
     */&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; upload&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bool &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;uploadfile&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$error&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;uploadfile&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;error&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$error&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; UPLOAD_ERR_OK&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;     &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;uploadfile&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$tmp_name&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$_FILES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;uploadfile&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;tmp_name&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Очищаем имя файла от опасных символов&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/[^a-zA-Z0-9_\-\.]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$ext&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strtolower&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strtolower&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/pathinfo&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;pathinfo&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; PATHINFO_EXTENSION&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Жесткая проверка: если расширения нет в белом списке — бракуем загрузку&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ext&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;allowedTypes&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$targetDir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;resolveDir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_dir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_dir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$targetDir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;a href=&quot;http://www.php.net/mkdir&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;mkdir&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$targetDir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu8&quot;&gt;0755&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Переносим файл из временной папки сервера в каталог data/media/&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/move_uploaded_file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;move_uploaded_file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tmp_name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$targetDir&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; delete&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; bool &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/[^a-zA-Z0-9_\-\.]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;resolveDir&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/file_exists&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file_exists&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/is_file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/unlink&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unlink&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;MediaManager.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;mediamanagerphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:12,&amp;quot;secid&amp;quot;:13,&amp;quot;range&amp;quot;:&amp;quot;39468-42945&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit14&quot; id=&quot;parserphp&quot;&gt;Parser.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=13&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;Parser.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * Класс трансляции вики-разметки в HTML (Аналог подсистемы парсера DokuWiki)
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; Parser &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; render&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;require_once&lt;/span&gt; WIKI_ROOT &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;src/CodeHighlighter.php&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$highlighter&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; CodeHighlighter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$codeBlocks&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$blockCount&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 1. Вырезаем блоки &amp;lt;code&amp;gt; в сыром виде ДО какого-либо экранирования кавычек&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/&amp;lt;code(.*?)&amp;gt;(.*?)&amp;lt;\/code&amp;gt;/s&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$codeBlocks&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$blockCount&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$highlighter&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$codeBody&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;// Обрабатываем блок кода в чистом виде&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$renderedBlock&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$highlighter&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;highlight&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$codeBody&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;// Исправлено: Маркер сделан алфавитно-цифровым, чтобы htmlspecialchars его не портил&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$marker&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;DokuCodeBlock&amp;quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$blockCount&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;X&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$codeBlocks&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$marker&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$renderedBlock&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$blockCount&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;++;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$marker&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 2. Безопасность: теперь экранируем ОСТАВШИЙСЯ текст страницы от XSS уязвимостей&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;ENT_QUOTES&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;UTF-8&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 3. Парсим заголовки DokuWiki&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/======\s*(.*?)\s*======/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;h1&amp;gt;$1&amp;lt;/h1&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/=====\s*(.*?)\s*=====/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;h2&amp;gt;$1&amp;lt;/h2&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/====\s*(.*?)\s*====/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;h3&amp;gt;$1&amp;lt;/h3&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 4. Стили форматирования текста&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\*\*(.*?)\*\*/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;strong&amp;gt;$1&amp;lt;/strong&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\/\/(.*?)\/\//&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;em&amp;gt;$1&amp;lt;/em&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/__(.*?)__/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;u&amp;gt;$1&amp;lt;/u&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 5. Парсим ссылки [[page_id]] или [[page_id|Текст]]&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\[\[(.*?)\]\]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$innerContent&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$innerContent&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;|&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;|&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$innerContent&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$pageId&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$label&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$pageId&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$innerContent&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$label&lt;/span&gt;  &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$pageId&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$pageId&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/ltrim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;ltrim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$pageId&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;a href=&amp;quot;?id=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/urlencode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;urlencode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$pageId&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/a&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 6. Парсим медиа-теги изображений {{:картинка.png}}&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\{\{:(.*?)\}\}/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$innerMedia&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$innerMedia&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;|&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$mediaParts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;|&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$innerMedia&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$mediaPath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$mediaParts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$mediaPath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$innerMedia&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$realPath&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;:&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$mediaPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;img src=&amp;quot;data/media/&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$realPath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;quot; style=&amp;quot;max-width:100%; height:auto; margin: 12px 0; display:block; border: 1px solid #ddd; padding: 4px; border-radius: 4px;&amp;quot; alt=&amp;quot;Медиафайл&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 7. Делаем автоматические переносы строк для текста страницы&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/nl2br&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;nl2br&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// Шаг 8. Финал: возвращаем сохраненные блоки кода обратно на свои места в обход nl2br&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$codeBlocks&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$marker&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$renderedHtml&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$marker&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$renderedHtml&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$text&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Parser.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;parserphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:13,&amp;quot;secid&amp;quot;:14,&amp;quot;range&amp;quot;:&amp;quot;42946-47357&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit15&quot; id=&quot;codehighlighterphp&quot;&gt;CodeHighlighter.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=14&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;CodeHighlighter.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code php&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;co4&quot;&gt;/**
 * Системный компонент: Честная динамическая подсветка синтаксиса PHP/JS (стиль DokuWiki)
 */&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;declare&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;strict_types&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;a href=&quot;http://www.php.net/die&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;die&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Прямой доступ к файлу запрещен.&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; CodeHighlighter &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; highlight&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars_decode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars_decode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;ENT_QUOTES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;&lt;span class=&quot;es1&quot;&gt;\r&lt;/span&gt;&lt;span class=&quot;es1&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars_decode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars_decode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;ENT_QUOTES&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039; &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$firstPart&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_shift&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_shift&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$firstPart&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;null&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/strtolower&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strtolower&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$firstPart&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;text&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$highlightLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$startLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;co1&quot;&gt;// ЖЕСТКОЕ ИСПРАВЛЕНО: Используем именованную группу ?P&amp;lt;fname&amp;gt; для 100% изоляции строки от массивов&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/&amp;quot;(?P&amp;lt;fname&amp;gt;[^&amp;quot;]+)&amp;quot;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$fileMatches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fileMatches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;fname&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$fileMatches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;fname&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;// Вырезаем кавычки с файлом из параметров&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/&amp;quot;[^&amp;quot;]+&amp;quot;/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039; &#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$paramLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parts&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;str_contains&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;=&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$kv&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;=&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$key&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$kv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$kv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$kv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$kv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$key&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;highlight&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$highlightLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;int&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$key&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;start&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$startLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;int&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;elseif&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$lines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_split&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_split&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\r\n|\r|\n/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$lines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$lines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$code&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$firstCodeLineIdx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$lines&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$idx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/*&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/**&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$firstCodeLineIdx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$idx&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$htmlLines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$currentLineNum&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$startLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$lines&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$idx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$trimmedLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/trim&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$isCommentStar&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$trimmedLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; str_starts_with&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$trimmedLine&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;*/&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$trimmedLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/**&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$trimmedLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$idx&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$firstCodeLineIdx&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;re0&quot;&gt;$colorLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;colorizeLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$isCommentStar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$highlightClass&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$currentLineNum&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$highlightLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;st_h&quot;&gt;&#039; class=&amp;quot;code-line-active&amp;quot;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;re0&quot;&gt;$htmlLines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$highlightClass&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$htmlLines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span class=&amp;quot;code-ln&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$currentLineNum&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$htmlLines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span class=&amp;quot;code-txt&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$colorLine&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt; ? &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;amp;nbsp;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$colorLine&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$htmlLines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;re0&quot;&gt;$currentLineNum&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;++;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div class=&amp;quot;doku-code-block&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div class=&amp;quot;doku-code-file-label&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;img src=&amp;quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAG9JREFUeNksksENwDAIA02WSboJm6gZun/bZAt6i6pCH8A+YscgInIuOfuS89SIs6vIs8766m6KyvN7S7g7gIio9mZpEXfF3Xg6wF1FfXU36gB3w90g7v6vA+DuZvefOuxwFwN3A7O76wV3A6v7bwwAnwEGADZ0K9776Xm6AAAAAElFTkSuQmCC&amp;quot; style=&amp;quot;margin-right:6px; vertical-align:middle; width:12px; height:12px;&amp;quot;&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$filename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;div class=&amp;quot;doku-code-content-wrapper&amp;quot;&amp;gt;&amp;lt;pre class=&amp;quot;doku-code-content&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$htmlLines&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/div&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$html&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw2&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; colorizeLine&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; string &lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; bool &lt;span class=&quot;re0&quot;&gt;$isCommentStar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
        &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/htmlspecialchars&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;ENT_NOQUOTES&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;UTF-8&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;php&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;javascript&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;js&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$isCommentStar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#408080; font-style:italic;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;re0&quot;&gt;$commentPart&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/(\/\/|#)(.*)$/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$commentPart&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;string&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$matches&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$commentPart&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;%%DOKU_COMMENT_PLACEHOLDER%%&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/(\&#039;.*?\&#039;|&amp;quot;.*?&amp;quot;)/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$lang&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;php&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/(?&amp;lt;!\w)(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#0000cb;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;re0&quot;&gt;$controlKeywords&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;if&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;echo&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;return&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;function&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$controlKeywords&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                    &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\b&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;\b/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#008000;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;re0&quot;&gt;$funcKeywords&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;defined&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;die&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$funcKeywords&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                    &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/\b&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;\b/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#0000cb;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$word&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;co1&quot;&gt;// Обычная замена индексов массивов на безопасный вывод в скобках&lt;/span&gt;
            &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/([()\{\}\[\]])/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; string &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#008000;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;re0&quot;&gt;$m&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$commentPart&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$cleanComment&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strip_tags&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strip_tags&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$commentPart&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$commentHtml&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;span style=&amp;quot;color:#408080; font-style:italic;&amp;quot;&amp;gt;&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$cleanComment&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&amp;lt;/span&amp;gt;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/str_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;str_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;%%DOKU_COMMENT_PLACEHOLDER%%&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$commentHtml&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;CodeHighlighter.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;codehighlighterphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:14,&amp;quot;secid&amp;quot;:15,&amp;quot;range&amp;quot;:&amp;quot;47358-54290&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit16&quot; id=&quot;toolbarphp&quot;&gt;toolbar.php&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;file&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=15&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_php&quot;&gt;toolbar.php&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code file html4strict&quot;&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;**&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt; * Системный компонент редактора: Монолитный Toolbar с горизонтальными пикерами DokuWiki&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt; *&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;if &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;!defined&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;WIKI_ROOT&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; die&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-toolbar-container&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-toolbar-group&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Текст --&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Жирный (Ctrl+B)&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;**&#039;, &#039;**&#039;, &#039;жирный текст&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;B&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Курсив (Ctrl+I)&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;//&#039;, &#039;//&#039;, &#039;курсив&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/em.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;em&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;I&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/em.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;em&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Подчеркнутый (Ctrl+U)&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;__&#039;, &#039;__&#039;, &#039;подчеркнутый текст&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/u.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;u&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;U&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/u.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;u&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Моноширинный&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;\&#039;\&#039;&#039;, &#039;\&#039;\&#039;&#039;, &#039;код&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/small.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;small&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;TT&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/small.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;small&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Зачеркнутый&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;del&amp;gt;&lt;/span&gt;&lt;/span&gt;&#039;, &#039;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/del.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;del&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;зачеркнутый текст&#039;)&amp;quot;&amp;gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/del.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;del&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;S&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/del.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;del&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- ВЫПАДАЮЩЕЕ МЕНЮ ЗАГОЛОВКОВ (ГОРИЗОНТАЛЬНЫЙ ПИКЕР) --&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-toolbar-group&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-dropdown&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;dokuBtnH&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Выбрать заголовок&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;H&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-arrow&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-dropdown-content&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;dokuDropH&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-toolbar&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Ластик / Очистка стиля --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Очистить стиль&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&#039;, &#039;&#039;, &#039;&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;currentColor&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2.5&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;path d&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;polyline points&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3.27 6.96 12 12.01 20.73 6.96&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;22.08&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Кнопки уровней H1-H5 --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Заголовок H1&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;====== &#039;, &#039; ======\n&#039;, &#039;Заголовок 1&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;H₁&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Заголовок H2&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;===== &#039;, &#039; =====\n&#039;, &#039;Заголовок 2&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;H₂&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Заголовок H3&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;==== &#039;, &#039; ====\n&#039;, &#039;Заголовок 3&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;H₃&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Заголовок H4&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;=== &#039;, &#039; ===\n&#039;, &#039;Заголовок 4&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;H₄&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Заголовок H5&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;== &#039;, &#039; ==\n&#039;, &#039;Заголовок 5&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;H₅&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/strong.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;strong&lt;/span&gt;&lt;/a&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-toolbar-group&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Списки и таблицы --&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Маркированный список&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;  * &#039;, &#039;\n&#039;, &#039;Элемент списка&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;currentColor&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;circle cx&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;4&amp;quot;&lt;/span&gt; cy&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;6&amp;quot;&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;9&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;6&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;20&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;6&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;circle cx&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;4&amp;quot;&lt;/span&gt; cy&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;9&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;20&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;circle cx&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;4&amp;quot;&lt;/span&gt; cy&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;9&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;20&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Нумерованный список&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;  - &#039;, &#039;\n&#039;, &#039;Элемент списка&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;currentColor&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2.5&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;6&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;6&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;path d&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;M4 6h1v4M4 10h2M4 14h2v2H4v2h2&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Вставить таблицу&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;^ Заголовок 1 ^ Заголовок 2 ^\n| Элемент 1   | Элемент 2   |\n&#039;, &#039;&#039;, &#039;&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;currentColor&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;rect x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; rx&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;9&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;9&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;15&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;15&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;line x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;12&amp;quot;&lt;/span&gt; y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- ИСПРАВЛЕНО: Кнопка кода теперь обернута в блок dropdown с корректным ID и стрелочкой --&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-dropdown&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;dokuBtnCode&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Вставить блок кода&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc1&quot;&gt;&amp;amp;lt;&amp;amp;gt;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-arrow&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-dropdown-content&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;dokuDropCode&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-toolbar&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Обычный код --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Простой код&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;текст кода&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;11&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;11&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;#444&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2.5&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;polyline points&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;16 18 22 12 16 6&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;polyline points&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;8 6 2 12 8 18&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- HTML --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Code HTML&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code html&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;&lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- HTML код --&amp;gt;&lt;/span&gt;&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file-ico css-html&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;HTM&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- PHP --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Code PHP&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code php&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;// PHP код&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file-ico css-php&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;PHP&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- CSS --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Code CSS&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code css&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;/* CSS стили */&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file-ico css-css&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;CSS&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- JS --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Code JavaScript&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code javascript&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;// JS код&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file-ico css-js&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;JS&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- SQL --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Code SQL&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code sql&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;SELECT * FROM table;&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file-ico css-sql&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;SQL&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- BASH --&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-sub-btn&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Code Bash&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;&amp;lt;code bash&amp;gt;&lt;/span&gt;&lt;/span&gt;\n&#039;, &#039;\n&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/code.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;code&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&#039;, &#039;#!/bin/bash&#039;)&amp;quot;&amp;gt;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file-ico css-bash&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;BSH&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-toolbar-group&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Ссылки --&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Внутренняя ссылка&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;insertTags(&#039;[[:пространство:имя_файла|%sel%&#039;, &#039;]]&#039;, &#039;разметка&#039;)&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;currentColor&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2.5&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;path d&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;path d&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doku-btn-ico&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Вставить изображение&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;openMediaModal()&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;svg &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;14&amp;quot;&lt;/span&gt; viewBox&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0 0 24 24&amp;quot;&lt;/span&gt; fill&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;none&amp;quot;&lt;/span&gt; stroke&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;currentColor&amp;quot;&lt;/span&gt; stroke-&lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;rect x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;3&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;18&amp;quot;&lt;/span&gt; rx&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;circle cx&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;8.5&amp;quot;&lt;/span&gt; cy&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;8.5&amp;quot;&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;1.5&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;polyline points&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;21 15 16 10 5 21&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&amp;gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;svg&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/button.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;button&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc-1&quot;&gt;&amp;lt;!-- Каркас модального окна скрыт ниже, без изменений --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;mediaModal&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;display:none; position:fixed; z-index:9999; left:0; top:0; width:100%; height:100%; background-color:rgba(0,0,0,0.5); align-items:center; justify-content:center;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;background:#fff; padding:25px; border-radius:6px; width:500px; max-width:90%; box-shadow:0 4px 20px rgba(0,0,0,0.2); position:relative;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;closeMediaModal()&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;position:absolute; right:15px; top:10px; font-size:24px; font-weight:bold; cursor:pointer; color:#aaa;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;sc1&quot;&gt;&amp;amp;times;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/h3.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;h3&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;margin-top:0; color:#2b5e8f; margin-bottom:20px; font-family: sans-serif;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Загрузка и вставка изображения&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/h3.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;h3&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;modalUploadContainer&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;border:2px dashed #ccc; padding:30px; text-align:center; background:#fafafa; border-radius:4px; margin-bottom:15px; cursor:pointer; position:relative;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/input.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;input&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;file&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;modalFileInp&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;uploadfile&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;accept&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;image/*&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;position:absolute; left:0; top:0; width:100%; height:100%; opacity:0; cursor:pointer;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;uploadPrompt&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;color:#666; font-size:14px; font-family: sans-serif;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;📄 Кликните сюда для выбора картинки&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;text-align:right; font-family: sans-serif;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;closeMediaModal()&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;display:inline-block; padding:8px 15px; background:#eee; border:1px solid #ccc; border-radius:4px; cursor:pointer; margin-right:10px; font-size:14px; color:#333;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Отмена&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw3&quot;&gt;onclick&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;sendModalFile(event)&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;display:inline-block; padding:8px 20px; background:#2b5e8f; color:#fff; border-radius:4px; cursor:pointer; font-weight:bold; font-size:14px;&amp;quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Загрузить и вставить&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/span.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;span&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;toolbar.php&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;toolbarphp&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:15,&amp;quot;secid&amp;quot;:16,&amp;quot;range&amp;quot;:&amp;quot;54291-64856&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit17&quot; id=&quot;toolbarjs&quot;&gt;toolbar.js&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=16&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_js&quot;&gt;toolbar.js&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code js&quot;&gt;/**
 * Функция вставки вики-тегов в поле редактора
 */
function insertTags(openTag, closeTag, defaultText) {
    var txtarea = document.getElementById(&amp;quot;wikiEditor&amp;quot;);
    if (!txtarea) return;
&amp;nbsp;
    var start = txtarea.selectionStart;
    var end = txtarea.selectionEnd;
    var selText = txtarea.value.substring(start, end);
&amp;nbsp;
    if (!selText) { 
        selText = defaultText; 
    }
&amp;nbsp;
    var replacement = &#039;&#039;;
    var newCursorStart = start;
    var newCursorEnd = end;
&amp;nbsp;
    if (openTag.indexOf(&#039;%sel%&#039;) !== -1) {
        replacement = openTag.replace(&#039;%sel%&#039;, selText) + closeTag;
        txtarea.value = txtarea.value.substring(0, start) + replacement + txtarea.value.substring(end, txtarea.value.length);
        newCursorStart = start + 3; 
        newCursorEnd = start + 3;
    } else {
        replacement = openTag + selText + closeTag;
        txtarea.value = txtarea.value.substring(0, start) + replacement + txtarea.value.substring(end, txtarea.value.length);
        newCursorStart = start;
        newCursorEnd = start + replacement.length;
    }
&amp;nbsp;
    txtarea.focus();
    txtarea.selectionStart = newCursorStart;
    txtarea.selectionEnd = newCursorEnd;
}
&amp;nbsp;
/**
 * Инициализация горячих клавиш
 */
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function() {
    var editor = document.getElementById(&amp;quot;wikiEditor&amp;quot;);
    if (!editor) return;
&amp;nbsp;
    editor.addEventListener(&amp;quot;keydown&amp;quot;, function(e) {
        var isCtrl = e.ctrlKey || e.metaKey;
        if (isCtrl) {
            if (e.key.toLowerCase() === &#039;b&#039;) { e.preventDefault(); insertTags(&#039;**&#039;, &#039;**&#039;, &#039;жирный текст&#039;); }
            if (e.key.toLowerCase() === &#039;i&#039;) { e.preventDefault(); insertTags(&#039;//&#039;, &#039;//&#039;, &#039;курсив&#039;); }
            if (e.key.toLowerCase() === &#039;u&#039;) { e.preventDefault(); insertTags(&#039;__&#039;, &#039;__&#039;, &#039;подчеркнутый текст&#039;); }
        }
    });
});
&amp;nbsp;
/**
 * Асинхронный движок предпросмотра текста в стиле DokuWiki
 */
function runLivePreview() {
    var editor = document.getElementById(&amp;quot;wikiEditor&amp;quot;);
    var previewBlock = document.getElementById(&amp;quot;previewBlock&amp;quot;);
    var previewContent = document.getElementById(&amp;quot;previewContent&amp;quot;);
&amp;nbsp;
    if (!editor || !previewBlock || !previewContent) return;
&amp;nbsp;
    var textValue = editor.value;
&amp;nbsp;
    var formData = new FormData();
    formData.append(&amp;quot;wikitext&amp;quot;, textValue);
&amp;nbsp;
    var urlParams = new URLSearchParams(window.location.search);
    var pageId = urlParams.get(&#039;id&#039;) || &#039;start&#039;;
&amp;nbsp;
    previewContent.innerHTML = &amp;quot;&amp;lt;span style=&#039;color:#666; font-style:italic;&#039;&amp;gt;Генерация предпросмотра...&amp;lt;/span&amp;gt;&amp;quot;;
    previewBlock.style.display = &amp;quot;block&amp;quot;;
&amp;nbsp;
    previewBlock.scrollIntoView({ behavior: &#039;smooth&#039; });
&amp;nbsp;
    // Отправляем запрос на бэкенд
    fetch(&#039;?id=&#039; + encodeURIComponent(pageId) + &#039;&amp;amp;do=api_preview&#039;, {
        method: &#039;POST&#039;,
        body: formData
    })
    .then(function(response) {
        if (!response.ok) {
            throw new Error(&amp;quot;Сервер вернул статус &amp;quot; + response.status);
        }
        // ИСПРАВЛЕНО: Ждем чистый текст/HTML, а не JSON!
        return response.text(); 
    })
    .then(function(htmlResult) {
        // Мгновенно отрисовываем HTML в блоке превью
        previewContent.innerHTML = htmlResult;
    })
    .catch(function(error) {
        console.error(&#039;Preview Error:&#039;, error);
        previewContent.innerHTML = &amp;quot;&amp;lt;span style=&#039;color:red;&#039;&amp;gt;Не удалось загрузить предпросмотр: &amp;quot; + error.message + &amp;quot;&amp;lt;/span&amp;gt;&amp;quot;;
    });
}
&amp;nbsp;
// Добавьте этот код в самый конец файла assets/js/toolbar.js:
&amp;nbsp;
/**
 * Управление выпадающими горизонтальными пикерами Toolbar
 */
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function() {
    var btnH = document.getElementById(&amp;quot;dokuBtnH&amp;quot;);
    var btnCode = document.getElementById(&amp;quot;dokuBtnCode&amp;quot;);
&amp;nbsp;
    var dropH = document.getElementById(&amp;quot;dokuDropH&amp;quot;);
    var dropCode = document.getElementById(&amp;quot;dokuDropCode&amp;quot;);
&amp;nbsp;
    if (btnH &amp;amp;&amp;amp; dropH) {
        btnH.addEventListener(&amp;quot;click&amp;quot;, function(e) {
            e.stopPropagation();
            if (dropCode) dropCode.classList.remove(&amp;quot;doku-dropdown-show&amp;quot;);
            dropH.classList.toggle(&amp;quot;doku-dropdown-show&amp;quot;);
        });
    }
&amp;nbsp;
    if (btnCode &amp;amp;&amp;amp; dropCode) {
        btnCode.addEventListener(&amp;quot;click&amp;quot;, function(e) {
            e.stopPropagation();
            if (dropH) dropH.classList.remove(&amp;quot;doku-dropdown-show&amp;quot;);
            dropCode.classList.toggle(&amp;quot;doku-dropdown-show&amp;quot;);
        });
    }
&amp;nbsp;
    document.addEventListener(&amp;quot;click&amp;quot;, function() {
        if (dropH) dropH.classList.remove(&amp;quot;doku-dropdown-show&amp;quot;);
        if (dropCode) dropCode.classList.remove(&amp;quot;doku-dropdown-show&amp;quot;);
    });
});&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;toolbar.js&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;toolbarjs&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:16,&amp;quot;secid&amp;quot;:17,&amp;quot;range&amp;quot;:&amp;quot;64857-69832&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit18&quot; id=&quot;media-modaljs&quot;&gt;media-modal.js&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;https://wwoss.ru/doku.php?do=export_code&amp;amp;id=tmp_teh_zadanie_2_23.07.26_18:04&amp;amp;codeblock=17&quot; title=&quot;Скачать фрагмент кода&quot; class=&quot;mediafile mf_js&quot;&gt;media-modal.js&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code js&quot;&gt;/**
 * Системный компонент: Управление модальным окном Медиа-менеджера и AJAX загрузкой
 */
&amp;nbsp;
function openMediaModal() {
    var modal = document.getElementById(&amp;quot;mediaModal&amp;quot;);
    if (modal) {
        modal.style.display = &amp;quot;flex&amp;quot;;
        document.getElementById(&amp;quot;uploadPrompt&amp;quot;).innerText = &amp;quot;📄 Кликните сюда для выбора картинки&amp;quot;;
        document.getElementById(&amp;quot;modalFileInp&amp;quot;).value = &amp;quot;&amp;quot;; 
    }
}
&amp;nbsp;
function closeMediaModal() {
    var modal = document.getElementById(&amp;quot;mediaModal&amp;quot;);
    if (modal) modal.style.display = &amp;quot;none&amp;quot;;
}
&amp;nbsp;
/**
 * Асинхронная отправка файла на бэкенд без перезагрузки страницы
 */
function sendModalFile(event) {
    // Жестко глушим любые системные события браузера, чтобы предотвратить submit формы редактора
    if (event) {
        event.preventDefault();
        event.stopPropagation();
    }
&amp;nbsp;
    var fileInp = document.getElementById(&amp;quot;modalFileInp&amp;quot;);
    if (!fileInp || !fileInp.files || fileInp.files.length === 0) {
        alert(&amp;quot;Пожалуйста, выберите файл для загрузки.&amp;quot;);
        return;
    }
&amp;nbsp;
    var urlParams = new URLSearchParams(window.location.search);
    var pageId = urlParams.get(&#039;id&#039;) || &#039;start&#039;;
&amp;nbsp;
    var targetFile = fileInp.files.item(0);
&amp;nbsp;
    var formData = new FormData();
    formData.append(&amp;quot;uploadfile&amp;quot;, targetFile);
&amp;nbsp;
    // Выполняем асинхронный фоновый запрос к бэкенду
    fetch(&#039;?id=&#039; + encodeURIComponent(pageId) + &#039;&amp;amp;do=api_upload&#039;, {
        method: &#039;POST&#039;,
        body: formData
    })
    .then(function(response) {
        if (!response.ok) {
            throw new Error(&amp;quot;Ошибка сети: сервер вернул статус &amp;quot; + response.status);
        }
        return response.json();
    })
    .then(function(data) {
        if (data.success) {
            // Вставляем полученный тег в поле редактора
            insertTags(data.tag, &#039;&#039;, &#039;&#039;);
            closeMediaModal();
        } else {
            alert(&amp;quot;Ошибка сервера: &amp;quot; + data.error);
        }
    })
    .catch(function(error) {
        console.error(&#039;AJAX Error:&#039;, error);
        alert(&amp;quot;Критическая ошибка при фоновой отправке файла: &amp;quot; + error.message);
    });
}
&amp;nbsp;
document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, function() {
    var fileInp = document.getElementById(&amp;quot;modalFileInp&amp;quot;);
    if (fileInp) {
        fileInp.addEventListener(&amp;quot;change&amp;quot;, function() {
            if (this.files &amp;amp;&amp;amp; this.files.length &amp;gt; 0) {
                var currentFile = this.files.item(0);
                document.getElementById(&amp;quot;uploadPrompt&amp;quot;).innerText = &amp;quot;✅ Выбран файл: &amp;quot; + currentFile.name;
            }
        });
    }
});&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;media-modal.js&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;media-modaljs&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:17,&amp;quot;secid&amp;quot;:18,&amp;quot;range&amp;quot;:&amp;quot;69833-&amp;quot;} --&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Thu, 23 Jul 2026 15:36:56 +0000</pubDate>
        </item>
        <item>
            <title>ai_рабочая_07.06.2026.rar - создано</title>
            <link>https://wwoss.ru/doku.php?image=software%3Adevelopment%3Ademo%3Acms%3Aucms%3Aappendix%3Aai_%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B0%D1%8F_07.06.2026.rar&amp;ns=software%3Adevelopment%3Ademo%3Acms%3Aucms%3Aappendix&amp;rev=1780840237&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/images/fileicons/svg/rar.svg&quot; alt=&quot;ai_рабочая_07.06.2026.rar&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Sun, 07 Jun 2026 13:50:37 +0000</pubDate>
        </item>
        <item>
            <title>ai_абочая_с_вики_старая.rar - создано</title>
            <link>https://wwoss.ru/doku.php?image=software%3Adevelopment%3Ademo%3Acms%3Aucms%3Aappendix%3Aai_%D0%B0%D0%B1%D0%BE%D1%87%D0%B0%D1%8F_%D1%81_%D0%B2%D0%B8%D0%BA%D0%B8_%D1%81%D1%82%D0%B0%D1%80%D0%B0%D1%8F.rar&amp;ns=software%3Adevelopment%3Ademo%3Acms%3Aucms%3Aappendix&amp;rev=1780840174&amp;do=media</link>
            <description>&lt;img src=&quot;https://wwoss.ru/lib/images/fileicons/svg/rar.svg&quot; alt=&quot;ai_абочая_с_вики_старая.rar&quot; loading=&quot;lazy&quot; width=&quot;500&quot; height=&quot;500&quot; /&gt;</description>
            <author>vladpolskiy@undisclosed.example.com (VladPolskiy)</author>
            <pubDate>Sun, 07 Jun 2026 13:49:34 +0000</pubDate>
        </item>
    </channel>
</rss>
