Добавляем все файлы
This commit is contained in:
1510
data/Basic_functions.js
Executable file
1510
data/Basic_functions.js
Executable file
File diff suppressed because it is too large
Load Diff
87
data/createSite.page.php
Executable file
87
data/createSite.page.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<page>
|
||||
<general>
|
||||
<!--Kлючевые слова-->
|
||||
<keywords></keywords>
|
||||
</general>
|
||||
<!--Содержание страницы-->
|
||||
<!--Левые блоки-->
|
||||
<lblock>
|
||||
</lblock>
|
||||
<!--Правые блоки-->
|
||||
<rblock>
|
||||
</rblock>
|
||||
<!--Текст страницы-->
|
||||
<content tclass="btitle" bclass="bfloat">
|
||||
<ru><![CDATA[
|
||||
<p><span style="font-size: 28px;"><span style="font-weight: bold;">Добро пожаловать на страницу создания сайта!</span></span></p>
|
||||
<p>Для начала редактирования намите на шестерёнку, чтобы открыть меню:</p>
|
||||
<p><img src="/img/createSite/settings.png" style="width: 250px;"></p>
|
||||
|
||||
<hr>
|
||||
<p>Чтобы редактировать страницу нажмите на <button onclick="basisVis()">Редактор страницы</button>:</p>
|
||||
<p><img src="/img/createSite/editor.png" style="width: 800px;"></p>
|
||||
<p>Для сохранения, открытия и создания новой страницы используйте <button onclick="settingsMain.click()">иконку кассеты</button>.</p>
|
||||
<p>Для создания боковых панелей используйте <button onclick="pluginDropdownContent.focus()">список редактирования плагинов</button>.</p>
|
||||
|
||||
<hr>
|
||||
<p>Чтобы редактировать древо сайта нажмите на <button onclick="basisVisSiteTree()">Древо сайта</button>:</p>
|
||||
<p><img src="/img/createSite/siteTree.png" style="width: 500px;"></p>
|
||||
<p>Чтобы сохранить изменения на странице, используйте кнопку <button onclick="treeSettingsSave.click()">Сохранить</button> на панели древа сайта.</p>
|
||||
<p>Для изменения свойств элемента в древе сайта нажмите на страницу правой кнопкой мыши или зажмите пальцем, выберите <button onclick="treeSettingsProperties.click()">Свойства</button>, внесите нужные изменения и нажмите <button onclick="treePropertiesDivButtonOk.click()">Ок</button>, чтобы сохранить их.</p>
|
||||
|
||||
<hr>
|
||||
<p>Чтобы редактировать файлы нажмите на <button onclick="basisVisManager()">Файловый менеджер</button>:</p>
|
||||
<p><img src="/img/createSite/manager.png" style="width: 500px;"></p>
|
||||
<p>Для открытия папок в файловом менеджере используйте одинарный или двойной клик по папке. Перемещаться по папкам можно также с помощью стрелок истории <button onclick="managerHistoryBackFun.click()">Назад</button> и <button onclick="managerHistoryForwFun.click()">Вперёд</button> или кнопки <button onclick="managerBackFun.click()">назад</button> из папки.</p>
|
||||
<p>Чтобы открыть свойства файла, нажмите или зажмите файл и выберите <button onclick="managerSettingsProperties.click()">Свойства</button>.</p>
|
||||
]]></ru>
|
||||
<en><![CDATA[
|
||||
<p><span style="font-size: 28px;"><span style="font-weight: bold;">Welcome to the site creation page!</span></span></p>
|
||||
<p>To start editing, click the gear to open the menu:</p>
|
||||
<p><img src="/img/createSite/settings.png" style="width: 250px;"></p>
|
||||
|
||||
<hr>
|
||||
<p>To edit the page, click <button onclick="basisVis()">Page Editor</button>:</p>
|
||||
<p><img src="/img/createSite/editor.png" style="width: 800px;"></p>
|
||||
<p>To save, open, or create a new page, use the <button onclick="settingsMain.click()">cassette icon</button>.</p>
|
||||
<p>To create side panels use the <button onclick="pluginDropdownContent.focus()">plugin editing list</button>.</p>
|
||||
|
||||
<hr>
|
||||
<p>To edit the site tree click <button onclick="basisVisSiteTree()">Site Tree</button>:</p>
|
||||
<p><img src="/img/createSite/siteTree.png" style="width: 500px;"></p>
|
||||
<p>To save changes on the page use the <button onclick="treeSettingsSave.click()">Save</button> button on the site tree panel.</p>
|
||||
<p>To change the properties of an element in the site tree, right-click the page or press and hold it, select <button onclick="treeSettingsProperties.click()">Properties</button>, make the changes and click <button onclick="treePropertiesDivButtonOk.click()">Ok</button> to save them.</p>
|
||||
|
||||
<hr>
|
||||
<p>To edit files click <button onclick="basisVisManager()">File Manager</button>:</p>
|
||||
<p><img src="/img/createSite/manager.png" style="width: 500px;"></p>
|
||||
<p>To open folders in the file manager use a single or double click on the folder. You can also navigate folders using the history arrows <button onclick="managerHistoryBackFun.click()">Back</button> and <button onclick="managerHistoryForwFun.click()">Forward</button> or the folder's <button onclick="managerBackFun.click()">Back</button> button.</p>
|
||||
<p>To open file properties, click or press and hold the file and choose <button onclick="managerSettingsProperties.click()">Properties</button>.</p>
|
||||
]]></en>
|
||||
|
||||
<lv><![CDATA[
|
||||
<p><span style="font-size: 28px;"><span style="font-weight: bold;">Laipni lūdzam vietnes izveides lapā!</span></span></p>
|
||||
<p>Lai sāktu rediģēšanu, noklikšķiniet uz zobrata, lai atvērtu izvēlni:</p>
|
||||
<p><img src="/img/createSite/settings.png" style="width: 250px;"></p>
|
||||
|
||||
<hr>
|
||||
<p>Lai rediģētu lapu, noklikšķiniet uz <button onclick="basisVis()">Redaktors</button>:</p>
|
||||
<p><img src="/img/createSite/editor.png" style="width: 800px;"></p>
|
||||
<p>Lai saglabātu, atvērtu vai izveidotu jaunu lapu, izmantojiet <button onclick="settingsMain.click()">kasetes ikonu</button>.</p>
|
||||
<p>Sānu paneļu izveidei izmantojiet <button onclick="pluginDropdownContent.focus()">spraudņu rediģēšanas sarakstu</button>.</p>
|
||||
|
||||
<hr>
|
||||
<p>Lai rediģētu vietnes struktūru, noklikšķiniet uz <button onclick="basisVisSiteTree()">Vietnes koks</button>:</p>
|
||||
<p><img src="/img/createSite/siteTree.png" style="width: 500px;"></p>
|
||||
<p>Lai saglabātu izmaiņas lapā, izmantojiet pogu <button onclick="treeSettingsSave.click()">Saglabāt</button> uz vietnes koka paneļa.</p>
|
||||
<p>Lai mainītu elementa īpašības vietnes kokā, noklikšķiniet uz lapas ar peles labo pogu vai paturiet to nospiestu ar pirkstu, izvēlieties <button onclick="treeSettingsProperties.click()">Īpašības</button>, veiciet izmaiņas un nospiediet <button onclick="treePropertiesDivButtonOk.click()">Labi</button>, lai saglabātu tās.</p>
|
||||
|
||||
<hr>
|
||||
<p>Lai rediģētu failus noklikšķiniet uz <button onclick="basisVisManager()">Failu pārvaldnieks</button>:</p>
|
||||
<p><img src="/img/createSite/manager.png" style="width: 500px;"></p>
|
||||
<p>Lai atvērtu mapes failu pārvaldniekā, izmantojiet vienreizēju vai dubultklikšķi uz mapes. Pārvietoties pa mapēm var arī ar vēstures bultiņām <button onclick="managerHistoryBackFun.click()">Atpakaļ</button> un <button onclick="managerHistoryForwFun.click()">Uz priekšu</button> vai pogu <button onclick="managerBackFun.click()">atpakaļ</button> mapē.</p>
|
||||
<p>Lai atvērtu faila īpašības, noklikšķiniet vai paturiet failu un izvēlieties <button onclick="managerSettingsProperties.click()">Īpašības</button>.</p>
|
||||
]]></lv>
|
||||
</content>
|
||||
</page>
|
||||
9
data/filepath.en.php
Executable file
9
data/filepath.en.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<site>
|
||||
<!-- title -->
|
||||
<sitename>Raspberry Pi</sitename>
|
||||
<!--Слоган-->
|
||||
<slogan>Raspberry Pi</slogan>
|
||||
<index url='content/index' name='Home' title='Main page' template='rpi' PageMenu='0,0' users='' group=''>
|
||||
</index>
|
||||
</site>
|
||||
7
data/filepath.lv.php
Executable file
7
data/filepath.lv.php
Executable file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<site>
|
||||
<sitename>RaspberryqePi</sitename>
|
||||
<slogan>Raspberry Pi</slogan>
|
||||
<index url='content/index' title='Sākuma lapa' name='index' template='rpi' PageMenu='0,1,2' users='' group=''>
|
||||
</index>
|
||||
</site>
|
||||
19
data/filepath.ru.php
Executable file
19
data/filepath.ru.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<site>
|
||||
<sitename>site</sitename>
|
||||
<slogan>site</slogan>
|
||||
<index url="content/index" title="Новый ф6нрцуеыке" name="index" template="start" PageMenu="0,0" users="" group="" news="" plugins="">
|
||||
<page1 url="content/rpi/index" title="Новый ф6нрцуеыкеа" name="page1" template="MedWait" PageMenu="0,1,2" users="" group="" news="" plugins="">
|
||||
<underpage1 url="content/rpi/index" title="Загловок" name="underpage1" template="rpi" PageMenu="0,1,2" users="" group="" news="" plugins="">
|
||||
</underpage1>
|
||||
<underpage2 url="content/rpi/index" title="Загловок" name="underpage2" template="rpi" PageMenu="0,1,2" users="" group="" news="" plugins="SvgEditorM">
|
||||
</underpage2>
|
||||
<createSite url="data/createSite" title="Страница создание нового сайта" name="createSite" template="MedWait" PageMenu="0,1,2" users="" group="" news="" plugins="dgrm">
|
||||
</createSite>
|
||||
</page1>
|
||||
<page2 url="content/index" title="Загловок" name="page2" template="rpi" PageMenu="0,1,2" users="" group="" news="" plugins="dgrm,SvgEditorM">
|
||||
</page2>
|
||||
<uyr url="content/index" title="Новый syu6e5" name="uyr" template="MedWait" PageMenu="0,1,2" users="" group="" news="" plugins="">
|
||||
</uyr>
|
||||
</index>
|
||||
</site>
|
||||
BIN
data/fonts/Lora/Lora-Bold.ttf
Executable file
BIN
data/fonts/Lora/Lora-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Lora/Lora-Italic.ttf
Executable file
BIN
data/fonts/Lora/Lora-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Lora/Lora-Regular.ttf
Executable file
BIN
data/fonts/Lora/Lora-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Merriweather/Merriweather-Bold.ttf
Executable file
BIN
data/fonts/Merriweather/Merriweather-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Merriweather/Merriweather-Italic.ttf
Executable file
BIN
data/fonts/Merriweather/Merriweather-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Merriweather/Merriweather-Regular.ttf
Executable file
BIN
data/fonts/Merriweather/Merriweather-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Montserrat/Montserrat-Bold.ttf
Executable file
BIN
data/fonts/Montserrat/Montserrat-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Montserrat/Montserrat-Italic.ttf
Executable file
BIN
data/fonts/Montserrat/Montserrat-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Montserrat/Montserrat-Regular.ttf
Executable file
BIN
data/fonts/Montserrat/Montserrat-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/OpenSans/OpenSans-Bold.ttf
Executable file
BIN
data/fonts/OpenSans/OpenSans-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/OpenSans/OpenSans-Italic.ttf
Executable file
BIN
data/fonts/OpenSans/OpenSans-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/OpenSans/OpenSans-Regular.ttf
Executable file
BIN
data/fonts/OpenSans/OpenSans-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/PT_Serif/PTSerif-Bold.ttf
Executable file
BIN
data/fonts/PT_Serif/PTSerif-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/PT_Serif/PTSerif-Italic.ttf
Executable file
BIN
data/fonts/PT_Serif/PTSerif-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/PT_Serif/PTSerif-Regular.ttf
Executable file
BIN
data/fonts/PT_Serif/PTSerif-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Playfair_Display/PlayfairDisplay-Bold.ttf
Executable file
BIN
data/fonts/Playfair_Display/PlayfairDisplay-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Playfair_Display/PlayfairDisplay-Italic.ttf
Executable file
BIN
data/fonts/Playfair_Display/PlayfairDisplay-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Playfair_Display/PlayfairDisplay-Regular.ttf
Executable file
BIN
data/fonts/Playfair_Display/PlayfairDisplay-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Roboto/Roboto-Bold.ttf
Executable file
BIN
data/fonts/Roboto/Roboto-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Roboto/Roboto-Italic.ttf
Executable file
BIN
data/fonts/Roboto/Roboto-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Roboto/Roboto-Regular.ttf
Executable file
BIN
data/fonts/Roboto/Roboto-Regular.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Source_Sans_3/SourceSans3-Bold.ttf
Executable file
BIN
data/fonts/Source_Sans_3/SourceSans3-Bold.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Source_Sans_3/SourceSans3-Italic.ttf
Executable file
BIN
data/fonts/Source_Sans_3/SourceSans3-Italic.ttf
Executable file
Binary file not shown.
BIN
data/fonts/Source_Sans_3/SourceSans3-Regular.ttf
Executable file
BIN
data/fonts/Source_Sans_3/SourceSans3-Regular.ttf
Executable file
Binary file not shown.
153
data/fonts/fonts.css
Executable file
153
data/fonts/fonts.css
Executable file
@@ -0,0 +1,153 @@
|
||||
/*Начало шрифты*/
|
||||
@font-face {
|
||||
font-family: 'Lora';
|
||||
src: url('Lora/Lora-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lora';
|
||||
src: url('Lora/Lora-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lora';
|
||||
src: url('Lora/Lora-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Merriweather';
|
||||
src: url('Merriweather/Merriweather-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Merriweather';
|
||||
src: url('Merriweather/Merriweather-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Merriweather';
|
||||
src: url('Merriweather/Merriweather-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Montserrat';
|
||||
src: url('Montserrat/Montserrat-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Montserrat';
|
||||
src: url('Montserrat/Montserrat-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Montserrat';
|
||||
src: url('Montserrat/Montserrat-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'OpenSans';
|
||||
src: url('OpenSans/OpenSans-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'OpenSans';
|
||||
src: url('OpenSans/OpenSans-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'OpenSans';
|
||||
src: url('OpenSans/OpenSans-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Playfair_Display';
|
||||
src: url('Playfair_Display/PlayfairDisplay-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Playfair_Display';
|
||||
src: url('Playfair_Display/PlayfairDisplay-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Playfair_Display';
|
||||
src: url('Playfair_Display/PlayfairDisplay-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'PT_Serif';
|
||||
src: url('PT_Serif/PTSerif-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'PT_Serif';
|
||||
src: url('PT_Serif/PTSerif-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'PT_Serif';
|
||||
src: url('PT_Serif/PTSerif-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('Roboto/Roboto-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('Roboto/Roboto-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('Roboto/Roboto-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Source_Sans_3';
|
||||
src: url('Source_Sans_3/SourceSans3-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Source_Sans_3';
|
||||
src: url('Source_Sans_3/SourceSans3-Bold.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Source_Sans_3';
|
||||
src: url('Source_Sans_3/SourceSans3-Italic.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
/*Конец шрифты*/
|
||||
8
data/foot.php
Executable file
8
data/foot.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<div id="fclear">
|
||||
</div>
|
||||
<div id="footer">
|
||||
Powered by uText CMS<br>
|
||||
2013 © gugudze
|
||||
</div>
|
||||
</div>
|
||||
|
||||
43
data/footer.css.php
Executable file
43
data/footer.css.php
Executable file
@@ -0,0 +1,43 @@
|
||||
#fclear{
|
||||
clear :both;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align :center;
|
||||
position :relative;
|
||||
width :100%;
|
||||
margin :0px auto;
|
||||
/*
|
||||
background :#ffffff;
|
||||
border :1px solid #0ffff0;
|
||||
height :20px;
|
||||
*/
|
||||
}
|
||||
|
||||
.left-footer,
|
||||
.right-footer,
|
||||
.center-footer {
|
||||
position :relative;
|
||||
padding :0px;
|
||||
/*
|
||||
border :1px solid #0ffff0;
|
||||
*/
|
||||
}
|
||||
|
||||
.left-footer {
|
||||
float :left;
|
||||
width :200px;
|
||||
}
|
||||
.right-footer {
|
||||
float :right;
|
||||
width :200px;
|
||||
}
|
||||
|
||||
.center-footer {
|
||||
float :none;
|
||||
width :auto;
|
||||
overflow :hidden;
|
||||
/*
|
||||
text-align :left;
|
||||
*/
|
||||
}
|
||||
790
data/func.php
Executable file
790
data/func.php
Executable file
@@ -0,0 +1,790 @@
|
||||
<?php
|
||||
/**
|
||||
* @file func.php
|
||||
* @brief Основные php функции страницы
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Выполняет действие, переданное через POST-запрос
|
||||
* @param string $handleRequestAction Имя действия для выполнения
|
||||
* @return string JSON-ответ с результатом или ошибкой действия
|
||||
*/
|
||||
function handleRequest($handleRequestAction) {
|
||||
$action = preg_replace('/[^a-zA-Z0-9_]/', '', $handleRequestAction);
|
||||
if (function_exists($action)) {
|
||||
call_user_func($action);
|
||||
} else {
|
||||
echo json_encode([
|
||||
'error' => 'Неизвестное действие',
|
||||
'action' => $handleRequestAction,
|
||||
'post_data' => $_POST,
|
||||
'get_data' => $_GET,
|
||||
'server' => $_SERVER['REQUEST_URI']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Обрабатывает входящий JSON-RPC запрос
|
||||
* @return string JSON-ответ с результатом выполнения метода или ошибкой
|
||||
*/
|
||||
function jsonrpcRequest() {
|
||||
$raw = file_get_contents("php://input");
|
||||
$data = json_decode($raw, true);
|
||||
$id = $data["id"] ?? null;
|
||||
|
||||
try {
|
||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||
throw new Exception("Parse error", -32700);
|
||||
}
|
||||
$method = $data["method"] ?? "";
|
||||
$params = $data["params"] ?? [];
|
||||
if (!function_exists($method)) {
|
||||
throw new Exception("Method not found", -32601);
|
||||
}
|
||||
$result = $method($params);
|
||||
header("Content-Type: application/json");
|
||||
echo json_encode(["jsonrpc" => "2.0", "id" => $id, "result" => $result]);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
header("Content-Type: application/json");
|
||||
echo json_encode(["jsonrpc" => "2.0", "id" => $id, "error" => ["code" => $e->getCode(), "message" => $e->getMessage()]]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Подключает плагин или плагины из директории main_plugin
|
||||
* @param array $params Параметры подключения, ключ 'plugin' содержит имя плагина
|
||||
* @return string HTML-код подключённых плагинов
|
||||
*/
|
||||
function includePlugin($params) {
|
||||
global $path, $config;
|
||||
$html = '';
|
||||
$pluginDir = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'main_plugin' . DIRECTORY_SEPARATOR;
|
||||
|
||||
$requested = isset($params['plugin']) ? trim($params['plugin']) : null;
|
||||
if ($requested !== null && ($requested === '' || strpos($requested, '..') !== false)) {
|
||||
throw new Exception("Invalid plugin name", -32602);
|
||||
}
|
||||
if (!is_dir($pluginDir)) return $html;
|
||||
|
||||
$dirs = $requested ? [$requested] : array_diff(scandir($pluginDir), ['.', '..']);
|
||||
|
||||
foreach ($dirs as $dir) {
|
||||
$dirPath = $pluginDir . $dir;
|
||||
if (!is_dir($dirPath)) continue;
|
||||
|
||||
$file = $dirPath . '/plug.php';
|
||||
if (is_file($file)) {
|
||||
ob_start();
|
||||
include $file;
|
||||
$html .= ob_get_clean();
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Получает список файлов и DOM-элементов плагина
|
||||
* @param array $params Параметры, ключ 'plugin' содержит имя плагина
|
||||
* @return array Массив ссылок на CSS, JS файлы и id элементов плагина
|
||||
*/
|
||||
function removePluginDom($params) {
|
||||
global $path;
|
||||
$plugin = isset($params['plugin']) ? trim($params['plugin']) : null;
|
||||
|
||||
if (!$plugin || strpos($plugin, '..') !== false || !preg_match('/^[A-Za-z0-9_\-]+$/', $plugin) || !is_dir($path . 'main_plugin/' . $plugin)) {
|
||||
throw new Exception("Invalid plugin name");
|
||||
}
|
||||
|
||||
$pluginDir = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'main_plugin' . DIRECTORY_SEPARATOR . $plugin;
|
||||
$plugFile = $pluginDir . '/plug.php';
|
||||
if (!is_file($plugFile)) throw new Exception("plug.php not found");
|
||||
|
||||
ob_start();
|
||||
include $plugFile;
|
||||
$html = ob_get_clean();
|
||||
|
||||
$files = [];
|
||||
if (preg_match_all('/<link[^>]+href=["\']([^"\']+)["\']/i', $html, $m)) $files = array_merge($files, $m[1]);
|
||||
if (preg_match_all('/<script[^>]+src=["\']([^"\']+)["\']/i', $html, $m)) $files = array_merge($files, $m[1]);
|
||||
|
||||
$doc = new DOMDocument();
|
||||
libxml_use_internal_errors(true);
|
||||
$doc->loadHTML('<div id="wrapper">' . $html . '</div>', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||
libxml_clear_errors();
|
||||
|
||||
$wrapper = $doc->getElementById('wrapper');
|
||||
foreach ($wrapper->childNodes as $child) {
|
||||
if ($child instanceof DOMElement && $child->hasAttribute('id')) {
|
||||
$files[] = '#' . $child->getAttribute('id');
|
||||
}
|
||||
}
|
||||
|
||||
return array_values($files);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Подключает все PHP-файлы функций из папки main_plugin
|
||||
* @return int Количество подключённых файлов
|
||||
*/
|
||||
function includePluginsPhp() {
|
||||
global $path;
|
||||
$count = 0;
|
||||
$pluginDir = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'main_plugin' . DIRECTORY_SEPARATOR;
|
||||
if (!is_dir($pluginDir)) return $count;
|
||||
$dirs = array_diff(scandir($pluginDir), ['.', '..']);
|
||||
foreach ($dirs as $dir) {
|
||||
$fullDir = $pluginDir . $dir . DIRECTORY_SEPARATOR;
|
||||
if (!is_dir($fullDir)) continue;
|
||||
foreach (glob($fullDir . 'func.*.php') as $file) {
|
||||
if (is_file($file)) {
|
||||
include_once $file;
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Устанавливает язык пользователя в сессии
|
||||
* @param array $params Параметры, ключ 'lng' содержит код языка
|
||||
* @return string Строка "true" при успешной установке
|
||||
*/
|
||||
function setLng($params) {
|
||||
global $_SESSION;
|
||||
if (!isset($params['lng'])) {
|
||||
throw new Exception("Missing parameter: lng", -32602);
|
||||
}
|
||||
$_SESSION['lng'] = $params['lng'];
|
||||
return "true";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Завершает сессию пользователя
|
||||
* @param array $params Параметры, ключ 'logoff' инициирует выход
|
||||
* @return string Строка "true" при успешной разлогине
|
||||
*/
|
||||
function logoutUser($params) {
|
||||
if (!isset($params['logoff'])) {
|
||||
throw new Exception("Missing parameter: logoff", -32602);
|
||||
}
|
||||
session_destroy();
|
||||
return "true";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Выполняет вход пользователя с проверкой логина и пароля
|
||||
* @param array $params Параметры, ключи 'log', 'login' и 'pass' для авторизации
|
||||
* @return string "true" если вход успешен, "false" если нет
|
||||
*/
|
||||
function loginUser($params) {
|
||||
global $_SESSION;
|
||||
if (!isset($params['log']) || $params['log'] !== "Войти" || !isset($params['login']) || !isset($params['pass'])) {
|
||||
throw new Exception("Missing login action or credentials", -32602);
|
||||
}
|
||||
if (check($params['login'], md5($params['pass']))) {
|
||||
$_SESSION['username'] = $params['login'];
|
||||
$_SESSION['pass'] = $params['pass'];
|
||||
$_SESSION['Login'] = 'true';
|
||||
setcookie('Login', 'true', time() + 2419200, "/");
|
||||
$_SESSION['log_in'] = false;
|
||||
return "true";
|
||||
} else {
|
||||
$_SESSION['Login'] = 'false';
|
||||
setcookie('Login', 'false', time() + 2419200, "/");
|
||||
return "false";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Проверяет соответствие логина и пароля с данными пользователей
|
||||
* @param string $login Имя пользователя
|
||||
* @param string $pass Хеш пароля пользователя
|
||||
* @return bool true если пользователь найден и пароль совпадает, false иначе
|
||||
*/
|
||||
function check($login, $pass) {
|
||||
global $config, $uxml, $path;
|
||||
$xmlstr = simplexml_load_file($path . $config['users']);
|
||||
$result = false;
|
||||
foreach ($xmlstr->users->user as $user) {
|
||||
if ((string)$user['name'] === $login && (string)$user['pass'] === $pass) {
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Загружает конфигурацию сайта из XML и пользователей
|
||||
* @return void Возвращает значения в глобальный массив $config
|
||||
*/
|
||||
function SetConfig()
|
||||
{
|
||||
global $config, $path;
|
||||
$xmlstr = simplexml_load_file($path . 'config/config_site.php');
|
||||
$config['icon'] = $xmlstr->general->icon;
|
||||
$config['encoding'] = $xmlstr->general->encoding;
|
||||
$config['users'] = $xmlstr->general->users;
|
||||
$config['usersRequest'] = $xmlstr->general->usersrequest;
|
||||
|
||||
$xmlstr = simplexml_load_file($path . 'data/users.php');
|
||||
$config['emailAdmin'] = '';
|
||||
foreach ($xmlstr->users->user as $user) {
|
||||
$access = explode(',', (string)$user['access']);
|
||||
$access = array_map('trim', $access);
|
||||
if (in_array('creatingAccounts', $access)) {
|
||||
$config['emailAdmin'] = (string)$user['email'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Получает список пользователей с правами администратора
|
||||
* @return array Массив имён пользователей с правами Admin
|
||||
*/
|
||||
function adminsConfig() {
|
||||
global $path;
|
||||
$xml = simplexml_load_file($path . 'data/users.php');
|
||||
|
||||
$admins = [];
|
||||
foreach ($xml->users->user as $user) {
|
||||
$accessList = array_map('trim', explode(', ', (string)$user['access']));
|
||||
|
||||
if (in_array('Admin', $accessList, true)) {
|
||||
$admins[] = (string)$user['name'];
|
||||
}
|
||||
}
|
||||
|
||||
return $admins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Генерирует HTML-ссылки для меню
|
||||
* @param array $menuVar Массив пунктов меню с ключами 'url', 'title', 'name'
|
||||
* @return string Сформированные HTML-ссылки для меню
|
||||
*/
|
||||
function GetMenuItems($menuVar){
|
||||
global $config;
|
||||
$menu = '';
|
||||
for ($i = 0; $i <= count($menuVar)-1; $i+=1)
|
||||
{
|
||||
$menu.= '<a href="'.$config['server'].$menuVar[$i]['url'].'.html" title="'.$menuVar[$i]['title'].'">'.$menuVar[$i]['name'] . '</a> ';
|
||||
if ($i <= count($menuVar)-2)
|
||||
{
|
||||
$menu.= ':: ';
|
||||
}
|
||||
}
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Формирует HTML-блоки для отображения на странице
|
||||
* @param array $BlockVar Массив блоков с ключами 'url', 'title', 'tclass', 'bclass'
|
||||
* @param string $side Сторона или тип блока
|
||||
* @return string Сформированные HTML-блоки
|
||||
*/
|
||||
function GetBlock ($BlockVar, $side) {
|
||||
global $path, $ansv, $REQUEST_URI,$menu, $config, $EditPage;
|
||||
$Block = '';
|
||||
if (is_countable($BlockVar) && count($BlockVar) > 0){
|
||||
for ($i = 0; $i <= count($BlockVar)-1; $i+=1){
|
||||
ob_start();
|
||||
include $path . $BlockVar[$i]['url'].'plug.php';
|
||||
$Xblock = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$Block.='<div plugin-url="'.$BlockVar[$i]['url'].'">';
|
||||
if ($BlockVar[$i]['title']!=''){
|
||||
$Block.='<div plugin-title="pluginTitle" tclass="tclass" class="'.$BlockVar[$i]['tclass'].'">'.$BlockVar[$i]['title'].'</div>';
|
||||
}
|
||||
$Block.='<div bclass="bclass" class="'.$BlockVar[$i]['bclass'].'"><div class="bcont">'.$Xblock.'</div></div>';
|
||||
$Block.= '</br> ';
|
||||
$Block.='</div>';
|
||||
|
||||
}
|
||||
}
|
||||
return $Block;
|
||||
|
||||
// $Block.='<div class="'.$BlockVar[$i]['bclass'].'"><div class="bcont">ku ku</div></div>';
|
||||
/*is_countable($$BlockVar) && count($BlockVar)
|
||||
$Block = "";
|
||||
if (is_countable($$BlockVar) && count($BlockVar) > 0){
|
||||
$Block = "true";
|
||||
}
|
||||
else{
|
||||
$Block = "false";
|
||||
}
|
||||
$Block = count($BlockVar);*/
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Обрабатывает ошибку 404 и выводит страницу ошибки
|
||||
* @param bool $pageout Если true, выводит содержимое файла 404.shtml
|
||||
* @param string $encoding Кодировка страницы
|
||||
* @return void Завершает выполнение скрипта
|
||||
*/
|
||||
function error404($pageout = false, $encoding = 'utf-8')
|
||||
{
|
||||
header('Cache-Control: no-cache, no-store');
|
||||
header('Content-Type: text/html; charset=' . $encoding);
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
|
||||
if ($pageout)
|
||||
readfile('404.shtml');
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Обрабатывает ошибку 405 и выводит страницу ошибки
|
||||
* @param bool $pageout Если true, выводит содержимое файла 405.shtml
|
||||
* @param string $encoding Кодировка страницы
|
||||
* @return void Завершает выполнение скрипта
|
||||
*/
|
||||
function error405($pageout = false, $encoding = 'utf-8')
|
||||
{
|
||||
header('Cache-Control: no-cache, no-store');
|
||||
header('Content-Type: text/html; charset=' . $encoding);
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 405 Not Found');
|
||||
if ($pageout)
|
||||
readfile('405.shtml');
|
||||
die;
|
||||
}
|
||||
|
||||
# Функция HTTP авторизации. Логин и пароль задаются в файле users.xml
|
||||
# Форма авторизации
|
||||
/* function Log_Form($Vector,$act) {
|
||||
if ($Vector=='h') $sep = ' ';
|
||||
else $sep = '<br/>';
|
||||
$string = '<form action="'.$_SERVER["REQUEST_URI"].'" method="post">';
|
||||
$string .= '<input type="hidden" name="handleRequestAction" value="API">';
|
||||
switch ($act){
|
||||
case 'log_on':{
|
||||
$string .= '<label>Логин: </label>';
|
||||
$string .= $sep;
|
||||
$string .= '<input type = "text" name = "login">';
|
||||
$string .= $sep;
|
||||
$string .= '<label>Пароль: </label>';
|
||||
$string .= $sep;
|
||||
$string .= '<input type = "password" name = "pass" autocomplete>';
|
||||
$string .= $sep;
|
||||
$string .= '<form method="post"><input type="hidden" name="handleRequestAction" value="API">
|
||||
<input type="submit" name="log" value="Войти"></form>';
|
||||
break;
|
||||
}
|
||||
case 'log_off':{
|
||||
$string .= '<form method="post"><input type="hidden" name="handleRequestAction" value="API">
|
||||
<input type="submit" name="logoff" value="Выйти"></form>';
|
||||
break;
|
||||
}
|
||||
case 'log_err':{
|
||||
$string .= '<label>Фигню написал, батинька!!! </label>';
|
||||
$string .= $sep;
|
||||
$string .= '<form method="post"><input type="hidden" name="handleRequestAction" value="API">
|
||||
<input type="submit" name="LogPage" value="Попробуйте ещё раз"></form>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$string .= '</form>';
|
||||
$_SESSION['Login'] ='';
|
||||
|
||||
return $string;
|
||||
} */
|
||||
|
||||
/**
|
||||
* @brief Генерирует HTML-меню для выбора языка с кнопками для каждого доступного языка
|
||||
* @return string Сформированный HTML-код меню выбора языка с встроенным скриптом для отправки запроса
|
||||
*/
|
||||
function LngMenu() {
|
||||
$s = '<ul><li>' . $_SESSION['lng'] . '<ul><span id="f">';
|
||||
|
||||
if ($_SESSION['lng'] != 'lv') {
|
||||
$s .= '<button id="lng_lv" onclick="sendLanguageRequest(\'lv\')" type="button" title="Latviski" value="lv"><span>LV</span></button><br>';
|
||||
}
|
||||
if ($_SESSION['lng'] != 'en') {
|
||||
$s .= '<button id="lng_en" onclick="sendLanguageRequest(\'en\')" type="button" title="English" value="en"><span>EN</span></button><br>';
|
||||
}
|
||||
if ($_SESSION['lng'] != 'ru') {
|
||||
$s .= '<button id="lng_ru" onclick="sendLanguageRequest(\'ru\')" type="button" title="По русски" value="ru"><span>RU</span></button><br>';
|
||||
}
|
||||
|
||||
$s .= '</span></ul></li></ul>';
|
||||
|
||||
$s .= '
|
||||
<script>
|
||||
async function sendLanguageRequest(language) {
|
||||
if (document.getElementById("basis3")?.style.visibility === "visible" && window.contentIsEdit) {
|
||||
messageQueue.push("Сохранить данные?");
|
||||
try {
|
||||
const confirmed = await messageCreateQuestion();
|
||||
if (confirmed) {
|
||||
if (window.newPageFunValue === "newPage") {
|
||||
document.getElementById("saveHow").click();
|
||||
messageFunction("Сохраните новую страницу!");
|
||||
return;
|
||||
} else {
|
||||
await saveChanges();
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Ошибка:", e);
|
||||
}
|
||||
}
|
||||
jsonrpcRequest("setLng", { lng: language })
|
||||
.then(r => {
|
||||
if (r === "true") {
|
||||
location.reload();
|
||||
} else {
|
||||
messageFunction("{{language_change_error}}");
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
messageFunction("{{language_change_error}}");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
';
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Определяет текущий язык пользователя и сохраняет его в сессии
|
||||
* @return string Текущий язык (например, 'en', 'ru', 'lv')
|
||||
*/
|
||||
function SetLanguage(){
|
||||
global $_SESSION, $path;
|
||||
if (isset($_POST['lng']) && $_POST['lng'] != '')
|
||||
$_SESSION['lng'] = $_POST['lng'];
|
||||
if (empty($_SESSION['lng'])){
|
||||
$s = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
$a = explode('-', $s[0]);
|
||||
$_SESSION['lng'] = $a[0];
|
||||
}
|
||||
return $_SESSION['lng'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Разбирает URL запроса и определяет действие и путь к странице
|
||||
* @param string $URL URL запроса
|
||||
* @return array Массив с ключами 'act' и 'str', где 'act' — действие, 'str' — путь к странице
|
||||
*/
|
||||
function GetRequestURL($URL){
|
||||
$c=explode('.',$URL);
|
||||
if ($c[1]=='html'&&count($c)!=1){
|
||||
$mURL['act'] ='view';
|
||||
$mURL['str'] = explode('/',$c[0]);
|
||||
$mURL['str'][0]="index";
|
||||
if ($mURL['str'][1]=='index'){
|
||||
$mURL['str'][1]='';
|
||||
}
|
||||
if ($mURL['str'][count($mURL['str'])-1]==''){
|
||||
array_pop($mURL['str']);
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ($c[1]=='xml'&&count($c)!=1){
|
||||
$mURL['act'] ='edit';
|
||||
$mURL['str'] = explode('/',$c[0]);
|
||||
$mURL['str'][0]="index";
|
||||
}
|
||||
else{
|
||||
$mURL['str']='error';
|
||||
}
|
||||
}
|
||||
return $mURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Получает новости из XML-файла и формирует HTML-блоки для отображения
|
||||
* @param array $BlockVar Массив блоков с настройками отображения
|
||||
* @param string $side Сторона страницы, для которой формируются новости
|
||||
* @return string Сформированные HTML-блоки с новостями
|
||||
*/
|
||||
function getNews($BlockVar, $side) {
|
||||
global $path, $_SESSION;
|
||||
|
||||
$lng = $_SESSION['lng'] ?? 'en';
|
||||
$file = $path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'filepath.' . $lng . '.php';
|
||||
$content = @file_get_contents($file);
|
||||
if (!$content) $content = '';
|
||||
$content = preg_replace('/^\s*<\?php.*?\?>\s*/s', '', $content);
|
||||
$xml = @simplexml_load_string($content);
|
||||
$rootReal = realpath(rtrim($path, DIRECTORY_SEPARATOR));
|
||||
$html = '';
|
||||
$tplClass = isset($BlockVar[0]['tclass']) ? $BlockVar[0]['tclass'] : 'btitle';
|
||||
$bclass = isset($BlockVar[0]['bclass']) ? $BlockVar[0]['bclass'] : 'bfloat';
|
||||
$now = new DateTime();
|
||||
|
||||
$walk = function($node) use (&$walk, &$html, $path, $side, $lng, $rootReal, $tplClass, $bclass, $now) {
|
||||
$newsAttr = trim((string)$node['news']);
|
||||
if ($newsAttr === '') {
|
||||
foreach ($node->children() as $child) $walk($child);
|
||||
return;
|
||||
}
|
||||
$parts = explode(',', $newsAttr);
|
||||
if (count($parts) === 0) {
|
||||
foreach ($node->children() as $child) $walk($child);
|
||||
return;
|
||||
}
|
||||
$period = array_shift($parts);
|
||||
$dates = explode('/', $period);
|
||||
if (count($dates) !== 2) {
|
||||
foreach ($node->children() as $child) $walk($child);
|
||||
return;
|
||||
}
|
||||
$parseDate = function($str) {
|
||||
$parts = explode('.', $str);
|
||||
if (count($parts) < 5) return false;
|
||||
list($Y, $m, $d, $H, $i) = $parts;
|
||||
$dateStr = sprintf('%04d-%02d-%02d %02d:%02d:00', $Y, $m, $d, $H, $i);
|
||||
return DateTime::createFromFormat('Y-m-d H:i:s', $dateStr);
|
||||
};
|
||||
$start = $parseDate($dates[0]);
|
||||
$end = $parseDate($dates[1]);
|
||||
if (!$start || !$end || $now < $start || $now > $end) {
|
||||
foreach ($node->children() as $child) $walk($child);
|
||||
return;
|
||||
}
|
||||
$blocks = array_map('trim', $parts);
|
||||
if (!empty($blocks) && !in_array($side, $blocks)) {
|
||||
foreach ($node->children() as $child) $walk($child);
|
||||
return;
|
||||
}
|
||||
|
||||
$urlAttrRaw = trim((string)$node['url']);
|
||||
$titleRaw = (string)$node['title'];
|
||||
$urlPart = trim($urlAttrRaw, "/\\");
|
||||
$pageFile = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $urlPart . '.page.php';
|
||||
$pageFileReal = realpath($pageFile);
|
||||
$pageContent = '';
|
||||
if ($pageFileReal && strpos($pageFileReal, $rootReal) === 0 && is_file($pageFileReal) && is_readable($pageFileReal)) {
|
||||
$pageXml = @simplexml_load_file($pageFileReal);
|
||||
if ($pageXml && isset($pageXml->content->{$lng})) {
|
||||
$pageContent = strip_tags((string)$pageXml->content->{$lng});
|
||||
$maxLength = ($side === 'center') ? 300 : 100;
|
||||
$pageContent = mb_substr($pageContent, 0, $maxLength) . (mb_strlen($pageContent) > $maxLength ? '...' : '');
|
||||
}
|
||||
}
|
||||
$nameRaw = trim((string)$node['name']);
|
||||
$tagPath = [];
|
||||
$n = $node;
|
||||
while ($n) {
|
||||
$tag = $n->getName();
|
||||
if ($tag !== 'site' && $tag !== 'index') {
|
||||
$tagPath[] = $tag;
|
||||
}
|
||||
$n = $n->xpath('..') ? $n->xpath('..')[0] : null;
|
||||
}
|
||||
$tagPath = array_reverse($tagPath);
|
||||
if (empty($tagPath)) {
|
||||
$link = '/';
|
||||
} else {
|
||||
$link = implode('/', $tagPath) . '.html';
|
||||
}
|
||||
$link = htmlspecialchars($link);
|
||||
$readMore = '<a href="' . $link . '">читать дальше</a>';
|
||||
$title = $titleRaw !== '' ? htmlspecialchars($titleRaw) : '';
|
||||
|
||||
$html .= '<div>';
|
||||
if ($side === "center") $html .= '</br> ';
|
||||
if ($title !== '') $html .= '<div plugin-title="pluginTitle" class="' . htmlspecialchars($tplClass) . '">' . $title . '</div>';
|
||||
$html .= '<div class="' . htmlspecialchars($bclass) . '"><div class="bcont">' . $pageContent . ' ' . $readMore . '</div></div>';
|
||||
if ($side !== 'center') $html .= '</br> ';
|
||||
$html .= '</div>';
|
||||
foreach ($node->children() as $child) $walk($child);
|
||||
};
|
||||
if ($xml && isset($xml->index)) $walk($xml->index);
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Генерирует HTML-строку горизонтального меню из XML-структуры
|
||||
* @param object $menuVar XML-объект меню
|
||||
* @param array $RURLstr Массив сегментов URL для определения вложенности
|
||||
* @param int $ItemNo Индекс текущего элемента в URL
|
||||
* @param string $Vector Вертикальное ('v') или горизонтальное отображение
|
||||
* @return string Сформированное HTML-меню
|
||||
*/
|
||||
function GetXMLMenu($menuVar,$RURLstr,$ItemNo,$Vector){
|
||||
global $config, $path, $_SESSION;
|
||||
|
||||
$child_menu = "";
|
||||
$topURL = '';
|
||||
|
||||
if ($ItemNo!=0) {
|
||||
for ($i = 1; $i <= $ItemNo; $i+=1) {
|
||||
$topURL .=$RURLstr[$i].'/';
|
||||
$menuVar =$menuVar->{$RURLstr[$i]};
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
foreach ($menuVar->children() as $child_page) {
|
||||
if (FindPageUser($child_page['users'],$_SESSION['username'])) {
|
||||
if ($i!=0) {
|
||||
if ($Vector!='v') {
|
||||
$child_menu .=' :: ';
|
||||
} else {
|
||||
$child_menu .='<br>';
|
||||
}
|
||||
}
|
||||
$child_menu .= '<a href="'.$config['server'].$topURL.$child_page->getName().'.html">' . $child_page['title'] . '</a>';
|
||||
$i=$i+1;
|
||||
}
|
||||
}
|
||||
|
||||
return $child_menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Генерирует HTML-блок бокового меню из XML-структуры
|
||||
* @param object $menuVar XML-объект меню
|
||||
* @param array $RURLstr Массив сегментов URL для определения вложенности
|
||||
* @param int $ItemNo Индекс текущего элемента в URL
|
||||
* @return string Сформированное HTML боковое меню
|
||||
*/
|
||||
function GetSideXMLMenu($menuVar,$RURLstr,$ItemNo){
|
||||
global $config, $path, $_SESSION;
|
||||
|
||||
$child_menu = "";
|
||||
$topURL = '';
|
||||
|
||||
if ($ItemNo!=0) {
|
||||
for ($i = 1; $i <= $ItemNo; $i+=1) {
|
||||
$topURL .=$RURLstr[$i].'/';
|
||||
$menuVar =$menuVar->{$RURLstr[$i]};
|
||||
}
|
||||
}
|
||||
|
||||
$child_menu.='<div class="side-menu-header">';
|
||||
$child_menu.='<label for="menu-toggle" class="menu-btn close">×</label>';
|
||||
$child_menu.='<a href="'.$config['server'].'" class="side-home">Home</a>';
|
||||
$child_menu.='</div>';
|
||||
|
||||
foreach ($menuVar->children() as $child_page) {
|
||||
if (FindPageUser($child_page['users'],$_SESSION['username'])) {
|
||||
$child_menu.='<a href="'.$config['server'].$topURL.$child_page->getName().'.html" class="side-link">'.$child_page['title'].'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
return $child_menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Проверяет, имеет ли пользователь доступ к странице
|
||||
* @param string $PageUser Список пользователей, имеющих доступ, через запятую
|
||||
* @param string $user Имя пользователя
|
||||
* @return bool true если доступ разрешён, false если нет
|
||||
*/
|
||||
function FindPageUser($PageUser,$user){
|
||||
if ($PageUser==''){
|
||||
$test =true;
|
||||
}
|
||||
else{
|
||||
$test =false;
|
||||
$PageUser =explode(',',$PageUser);
|
||||
for ($i = 0; $i <= count($PageUser)-1; $i+=1){
|
||||
if ($PageUser[$i]==$user){
|
||||
$test =true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $test;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Разбирает файл XML страницы и возвращает информацию о запрошенном URL
|
||||
* @param string $FPfile Путь к XML-файлу с описанием страниц
|
||||
* @param mixed $RURLstr Массив сегментов URL или строка 'error'
|
||||
* @return array Массив с информацией о странице, включая URL, шаблон, заголовок и плагины
|
||||
*/
|
||||
function URLstr($FPfile,$RURLstr){
|
||||
global $path, $server, $config;
|
||||
$xmlstr =simplexml_load_file($FPfile);
|
||||
if (!isset($xmlstr->index)) {
|
||||
$index = $xmlstr->addChild('index', "\n");
|
||||
$index->addAttribute('url', 'data/createSite');
|
||||
|
||||
$lang = isset($config['lng']) ? $config['lng'] : 'ru';
|
||||
$titles = [ 'ru' => 'Страница создание нового сайта', 'en' => 'New site creation page', 'lv' => 'Jaunas vietnes izveides lapa' ];
|
||||
$index->addAttribute('title', isset($titles[$lang]) ? $titles[$lang] : $titles['ru']);
|
||||
|
||||
$index->addAttribute('name', 'index');
|
||||
$index->addAttribute('template', 'MedWait');
|
||||
$index->addAttribute('PageMenu', '0,1,2');
|
||||
$index->addAttribute('users', '');
|
||||
$index->addAttribute('group', '');
|
||||
$index->addAttribute('news', '');
|
||||
$index->addAttribute('plugins', '');
|
||||
$xmlstr->asXML($FPfile);
|
||||
}
|
||||
$ansv['sitename'] =$xmlstr->sitename;
|
||||
$ansv['XML'] =$xmlstr;
|
||||
$ansv['pageURL'] =$xmlstr->sitename;
|
||||
$fileURL ='http://'.$_SERVER['HTTP_HOST'];
|
||||
$ansv['URLLine'] ="";
|
||||
if ($RURLstr!='error'){
|
||||
for ($i = 0; $i <= count($RURLstr)-1; $i+=1){
|
||||
if ($xmlstr->{$RURLstr[$i]}['name']!=''){
|
||||
if ($i!=count($RURLstr)-1) {
|
||||
if ($i!=0){
|
||||
$fileURL .='/'.$xmlstr->{$RURLstr[$i]}->getName();
|
||||
$end ='.html';
|
||||
}
|
||||
else{
|
||||
$end ='/index.html';
|
||||
}
|
||||
$ansv['URLLine'] .= '<a href="'.$fileURL.$end.'" title="'.$xmlstr->{$RURLstr[$i]}['title'].'">'.$xmlstr->{$RURLstr[$i]}['name'].'</a>>>';
|
||||
}
|
||||
else{
|
||||
$ansv['URLLine'] .= $xmlstr->{$RURLstr[$i]}['name'];
|
||||
$ansv['FileURL'] = $xmlstr->{$RURLstr[$i]}['url'];
|
||||
$ansv['template'] = $xmlstr->{$RURLstr[$i]}['template'];
|
||||
$ansv['title'] = $xmlstr->{$RURLstr[$i]}['title'];
|
||||
$ansv['page'] = $xmlstr->{$RURLstr[$i]};
|
||||
$ansv['page_plugins'] = (string)($xmlstr->{$RURLstr[$i]}['plugins'] ?? '');
|
||||
}
|
||||
$xmlstr = $xmlstr->{$RURLstr[$i]};
|
||||
}
|
||||
else {
|
||||
$ansv['URLLine'] = 'error';
|
||||
$ansv['FileURL'] = 'error';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $ansv;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Разбирает файл XML страницы и возвращает информацию о запрошенном URL
|
||||
* @param string $FPfile Путь к XML-файлу с описанием страниц
|
||||
* @param mixed $RURLstr Массив сегментов URL или строка 'error'
|
||||
* @return array Массив с информацией о странице, включая URL, шаблон, заголовок и плагины
|
||||
*/
|
||||
function loadPluginsInCenterBlock() {
|
||||
global $_SESSION, $path, $config;
|
||||
if ($_SESSION['Login'] == 'true') {
|
||||
$availablePlugins = ['dgrm', 'SvgEditorM'];
|
||||
$pluginDir = $path . 'main_plugin/';
|
||||
if (is_dir($pluginDir)) {
|
||||
$dirs = array_diff(scandir($pluginDir), ['.', '..']);
|
||||
foreach ($dirs as $dir) {
|
||||
if (is_dir($pluginDir . $dir)) {
|
||||
if (!in_array($dir, $availablePlugins) || strpos($config['page_plugins'] ?? '', $dir) !== false) {
|
||||
if ($dir === 'SvgEditorM' || $dir === 'dgrm') {
|
||||
$html .= includePlugin(['plugin' => $dir]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$html .= includePlugin(['plugin' => 'form_editor']);
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
113
data/lang.php
Executable file
113
data/lang.php
Executable file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
$lang_Basic_functions = [
|
||||
'ru' => [
|
||||
'error' => 'Ошибка',
|
||||
'message' => 'Сообщение:',
|
||||
'ok' => 'ОК',
|
||||
'cancel' => 'Отмена',
|
||||
'yes' => 'Да',
|
||||
'no' => 'Нет',
|
||||
'main_block_saved' => 'Изменения главного блока сохранились!',
|
||||
'main_block_not_saved' => 'Изменения главного блока не сохранились!',
|
||||
'plugins_not_saved' => 'Плагины не сохранились!',
|
||||
'page_must_end_with_page_php' => 'Страница должна заканчиваться на ".page.php"!',
|
||||
'save_file_as' => 'Сохранить файл как:',
|
||||
'file' => 'Файл',
|
||||
'exists_overwrite_prompt' => 'уже существует. Перезаписать?',
|
||||
'new_file' => 'Новый файл!',
|
||||
'file_save_failed' => 'Не удалось сохранить файл!',
|
||||
'changes_saved_successfully' => 'Изменения успешно сохранены!',
|
||||
'data_save_error' => 'Ошибка сохранения данных!',
|
||||
'created_successfully' => 'успешно создан!',
|
||||
'file_creation_error' => 'Ошибка при создании файла',
|
||||
'folder' => 'Папка',
|
||||
'select_file' => 'Выберите файл',
|
||||
'file_manager_title' => 'Файловый менеджер',
|
||||
'name' => 'Имя',
|
||||
'save' => 'Сохранить',
|
||||
'open' => 'Открыть',
|
||||
'choose' => 'Выбрать',
|
||||
'column_size_bytes' => 'Размер (байт)',
|
||||
'column_creation_date' => 'Дата создания',
|
||||
|
||||
'plugin_title_empty_error' => 'Заголовок пустой!',
|
||||
'open_page' => 'Откройте страницу на сайте, а не через менеджер, чтобы сохранить заголовки!',
|
||||
'enter_new_title' => 'Введите новый заголовок:',
|
||||
'title_saved' => 'Заголовок сохранён!',
|
||||
'new_file' => 'Новый файл'
|
||||
],
|
||||
'en' => [
|
||||
'error' => 'Error',
|
||||
'message' => 'Message:',
|
||||
'ok' => 'OK',
|
||||
'cancel' => 'Cancel',
|
||||
'yes' => 'Yes',
|
||||
'no' => 'No',
|
||||
'main_block_saved' => 'Main block changes saved!',
|
||||
'main_block_not_saved' => 'Main block changes not saved!',
|
||||
'plugins_not_saved' => 'Plugins not saved!',
|
||||
'page_must_end_with_page_php' => 'Page must end with ".page.php"!',
|
||||
'save_file_as' => 'Save file as:',
|
||||
'file' => 'File',
|
||||
'exists_overwrite_prompt' => 'already exists. Overwrite?',
|
||||
'new_file' => 'New file!',
|
||||
'file_save_failed' => 'Failed to save file!',
|
||||
'changes_saved_successfully' => 'Changes saved successfully!',
|
||||
'data_save_error' => 'Data save error!',
|
||||
'created_successfully' => 'created successfully!',
|
||||
'file_creation_error' => 'Error creating file',
|
||||
'folder' => 'Folder',
|
||||
'select_file' => 'Select file',
|
||||
'file_manager_title' => 'File Manager',
|
||||
'name' => 'Name',
|
||||
'save' => 'Save',
|
||||
'open' => 'Open',
|
||||
'choose' => 'Choose',
|
||||
'column_size_bytes' => 'Size (bytes)',
|
||||
'column_creation_date' => 'Creation Date',
|
||||
|
||||
'plugin_title_empty_error' => 'Title is empty!',
|
||||
'open_page' => 'Open the page on the website, not through the manager, to save the headings!',
|
||||
'enter_new_title' => 'Enter a new title:',
|
||||
'title_saved' => 'Title saved!',
|
||||
'new_file' => 'Jauns fails'
|
||||
],
|
||||
'lv' => [
|
||||
'error' => 'Kļūda',
|
||||
'message' => 'Ziņojums:',
|
||||
'ok' => 'Ok',
|
||||
'cancel' => 'Atcelt',
|
||||
'yes' => 'Jā',
|
||||
'no' => 'Nē',
|
||||
'main_block_saved' => 'Galvenā bloka izmaiņas saglabātas!',
|
||||
'main_block_not_saved' => 'Galvenā bloka izmaiņas nesaglabājās!',
|
||||
'plugins_not_saved' => 'Spraudņi nav saglabāti!',
|
||||
'page_must_end_with_page_php' => 'Lapa jābeidz ar ".page.php"!',
|
||||
'save_file_as' => 'Saglabāt kā failu:',
|
||||
'file' => 'Fails',
|
||||
'exists_overwrite_prompt' => 'jau pastāv. Pārrakstīt?',
|
||||
'new_file' => 'Jauns fails!',
|
||||
'file_save_failed' => 'Neizdevās saglabāt failu!',
|
||||
'changes_saved_successfully' => 'Izmaiņas veiksmīgi saglabātas!',
|
||||
'data_save_error' => 'Datu saglabāšanas kļūda!',
|
||||
'created_successfully' => 'veiksmīgi izveidots!',
|
||||
'file_creation_error' => 'Kļūda, izveidojot failu',
|
||||
'folder' => 'Mape',
|
||||
'select_file' => 'Izvēlieties failu',
|
||||
'file_manager_title' => 'Failu pārvaldnieks',
|
||||
'name' => 'Nosaukums',
|
||||
'save' => 'Saglabāt',
|
||||
'open' => 'Atvērt',
|
||||
'choose' => 'Izvēlēties',
|
||||
'column_size_bytes' => 'Izmērs (baiti)',
|
||||
'column_creation_date' => 'Izveides datums',
|
||||
|
||||
'plugin_title_empty_error' => 'Virsraksts ir tukšs!',
|
||||
'open_page' => 'Atveriet lapu vietnē, nevis caur pārvaldnieku, lai saglabātu virsrakstus!',
|
||||
'enter_new_title' => 'Ievadiet jauno virsrakstu:',
|
||||
'title_saved' => 'Virsraksts saglabāts!',
|
||||
'new_file' => 'Jauns fails'
|
||||
],
|
||||
];
|
||||
|
||||
return $lang_Basic_functions;
|
||||
7
data/request_on_users.php
Executable file
7
data/request_on_users.php
Executable file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<users>
|
||||
<users>
|
||||
<user name="svjatoslavyeliseev2@gmail.com" pass="svjatoslavyeliseev2@gmail.com" access="" email="svjatoslavyeliseev2@gmail.com" link="1d17bfc70bf2def3c091e17e3779d85e"/>
|
||||
<user name="srgar" pass="srgar" access="" email="vjatoslavyeliseev2@gmail.com" link="aff04c580bdd5d9bc44379e52468880d"/>
|
||||
</users>
|
||||
</users>
|
||||
24
data/template.page.php
Executable file
24
data/template.page.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<page>
|
||||
<general>
|
||||
<!--Kлючевые слова-->
|
||||
<keywords></keywords>
|
||||
</general>
|
||||
<!--Содержание страницы-->
|
||||
<!--Левые блоки-->
|
||||
<lblock>
|
||||
</lblock>
|
||||
<!--Правые блоки-->
|
||||
<rblock>
|
||||
</rblock>
|
||||
<!--Текст страницы-->
|
||||
<content tclass="btitle" bclass="bfloat">
|
||||
|
||||
<ru><![CDATA[]]></ru>
|
||||
|
||||
<lv><![CDATA[]]></lv>
|
||||
|
||||
<en><![CDATA[]]></en>
|
||||
|
||||
</content>
|
||||
</page>
|
||||
196
data/top.css.php
Executable file
196
data/top.css.php
Executable file
@@ -0,0 +1,196 @@
|
||||
#hbody {
|
||||
text-align :center;
|
||||
position :fixed;
|
||||
width :-webkit-fill-available;
|
||||
height :1.2em;
|
||||
padding: 2px 25px;
|
||||
background :rgb(237,232,237);
|
||||
background-image :linear-gradient(bottom, rgb(194,194,194) 15%, rgb(237,232,237) 57%);
|
||||
background-image :-o-linear-gradient(bottom, rgb(194,194,194) 15%, rgb(237,232,237) 57%);
|
||||
background-image :-moz-linear-gradient(bottom, rgb(194,194,194) 15%, rgb(237,232,237) 57%);
|
||||
background-image :-webkit-linear-gradient(bottom, rgb(194,194,194) 15%, rgb(237,232,237) 57%);
|
||||
background-image :-ms-linear-gradient(bottom, rgb(194,194,194) 15%, rgb(237,232,237) 57%);
|
||||
background-image :-webkit-gradient(linear, left bottom, left top, color-stop(0.15, rgb(194,194,194)), color-stop(0.57, rgb(237,232,237)));
|
||||
color :#666;
|
||||
text-shadow :1px 1px 3px #666, -1px -1px 3px #FFF, 1px 1px #666, -1px -1px #FFF;
|
||||
/*
|
||||
font-family :Arial, Tahoma, Verdana, sans-serif;
|
||||
*/
|
||||
font-size :1.3em;
|
||||
top :0px;
|
||||
z-index :1000;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.side-link{
|
||||
white-space: normal;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
padding: 10px 20px 10px 20px;
|
||||
}
|
||||
.side-menu-header{
|
||||
padding: 30px 20px 20px 20px;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.15, rgb(233 233 233)), color-stop(0.57, rgb(194 194 194)));
|
||||
}
|
||||
/*- меню страниц */
|
||||
.menu-btn {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: right;
|
||||
margin-left: 9px;
|
||||
}
|
||||
.side-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: -100%;
|
||||
width: 70%;
|
||||
max-width: 13em;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
transition: left 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.15, rgb(194, 194, 194)), color-stop(0.57, rgb(237, 232, 237)));
|
||||
z-index: 1006;
|
||||
}
|
||||
.menu-toggle {
|
||||
font-size: 2em;
|
||||
margin: -3px 0px 0px 0px;
|
||||
}
|
||||
.menu-toggle:checked ~ .side-menu {
|
||||
right: 0;
|
||||
}
|
||||
#overlay {
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
z-index: 1005;
|
||||
}
|
||||
#overlay.active {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#shome{
|
||||
position :relative;
|
||||
float :left;
|
||||
}
|
||||
|
||||
|
||||
#smenu{
|
||||
position: relative;
|
||||
margin: 0px auto;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
margin: 0px 10px;
|
||||
padding: 0px 3px;
|
||||
}
|
||||
|
||||
#slng{
|
||||
text-transform :uppercase;
|
||||
position :relative;
|
||||
float :right;
|
||||
}
|
||||
|
||||
#slng ul li a,
|
||||
#slng ul li a:visited {
|
||||
display :block;
|
||||
text-decoration :none;
|
||||
text-align :center;
|
||||
line-height :20px;
|
||||
overflow :hidden;
|
||||
}
|
||||
|
||||
#slng ul {
|
||||
padding :0;
|
||||
margin :0;
|
||||
list-style :none;
|
||||
}
|
||||
|
||||
#slng ul li {
|
||||
float :left;
|
||||
position :relative;
|
||||
}
|
||||
|
||||
#slng ul li ul {
|
||||
display :none;
|
||||
background :rgb(237,232,237);
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
/* specific to non IE browsers */
|
||||
#slng ul li:hover a { }
|
||||
|
||||
#slng ul li:hover ul {
|
||||
display :block;
|
||||
}
|
||||
|
||||
#slng ul li:hover ul li a.hide { }
|
||||
|
||||
#slng ul li:hover ul li:hover a.hide { }
|
||||
|
||||
#slng ul li:hover ul li ul {
|
||||
display :none;
|
||||
}
|
||||
|
||||
#slng ul li:hover ul li a {
|
||||
display :block;
|
||||
}
|
||||
|
||||
#slng ul li:hover ul li a:hover { }
|
||||
|
||||
#slng ul li:hover ul li:hover ul {
|
||||
display :block;
|
||||
position :absolute;
|
||||
left :50px;
|
||||
top :0;
|
||||
}
|
||||
|
||||
#slng ul li:hover ul li:hover ul.left {
|
||||
left :-105px;
|
||||
}
|
||||
|
||||
#f button{
|
||||
color :#666;
|
||||
background :none;
|
||||
cursor :pointer;
|
||||
border :0;
|
||||
text-shadow :1px 1px 3px #666,
|
||||
-1px -1px 3px #FFF,
|
||||
1px 1px #666,
|
||||
-1px -1px #FFF;
|
||||
font-family :serif;
|
||||
font-size :1em;
|
||||
}
|
||||
|
||||
#f, #f button{
|
||||
display :inline;
|
||||
margin :1px;
|
||||
padding :0;
|
||||
}
|
||||
|
||||
#f button:hover{
|
||||
color :rgb(153,153,153);
|
||||
text-shadow :-1px -1px #666,
|
||||
1px 1px #FFF;
|
||||
}
|
||||
|
||||
#hbody a{
|
||||
color :#666;
|
||||
text-shadow :1px 1px 3px #666,
|
||||
-1px -1px 3px #FFF,
|
||||
1px 1px #666,
|
||||
-1px -1px #FFF;
|
||||
text-decoration :none;
|
||||
}
|
||||
|
||||
#hbody a:hover{
|
||||
color :rgb(153,153,153);
|
||||
text-shadow :-1px -1px #666,
|
||||
1px 1px #FFF;
|
||||
}
|
||||
|
||||
31
data/top.php
Executable file
31
data/top.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=%encoding%" />
|
||||
<title>%sitename%</title>
|
||||
<link rel="icon" type="image/ico" href="%icon%" />
|
||||
<link href="%server%template/%template%/css.php" rel="stylesheet" type="text/css" />
|
||||
<link href="%server%data/footer.css.php" rel="stylesheet" type="text/css" />
|
||||
<link href="%server%data/top.css.php" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="hbody">
|
||||
<div id="shome">
|
||||
<a href="%server%">Home</a>
|
||||
</div>
|
||||
<div id="smenu">
|
||||
%TopMenu%
|
||||
</div>
|
||||
|
||||
<input type="checkbox" id="menu-toggle" class="menu-toggle" hidden>
|
||||
<label for="menu-toggle" class="menu-btn open">☰</label>
|
||||
<nav class="side-menu">
|
||||
%sideMenu%
|
||||
</nav>
|
||||
<div id="overlay"></div>
|
||||
<div id="slng">
|
||||
%LngMenu%
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
9
data/users.php
Executable file
9
data/users.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<users>
|
||||
<users>
|
||||
<user name="Admin" pass="b09c600fddc573f117449b3723f23d64" access="Admin, creatingAccounts" email="mail9182298@gmail.com"/>
|
||||
<user name="Admin2" pass="b09c600fddc573f117449b3723f23d64" access="Admin" email="svjatoslavyeliseev@gmail.com"/>
|
||||
<user name="test" pass="b09c600fddc573f117449b3723f23d64" access="" email="svjatoslavyeliseev@gmail.com"/>
|
||||
<user name="test2" pass="b09c600fddc573f117449b3723f23d64" access="" email="svjatoslavyeliseev@gmail.com"/>
|
||||
</users>
|
||||
</users>
|
||||
Reference in New Issue
Block a user