Initial commit

This commit is contained in:
2025-07-27 18:47:50 +03:00
parent ae1ed5b41b
commit d127006d9d
196 changed files with 72333 additions and 0 deletions

280
data/Basic_functions.css Normal file
View File

@@ -0,0 +1,280 @@
/* главное */
body, html{
margin :0px;
padding :0px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.bfloat {
font-size: 1em;
}
.toolbar-container {
touch-action: none;
}
#copyr_sym *, .deploy *, .elementEditPanelElement * {
margin-top: 2px;
margin-bottom: 2px;
}
@media only screen and (pointer: coarse) {
#panel {
border-radius: 0px !important;
}
#managerDiv, #treeDiv {
max-width: -webkit-fill-available !important;
top: 74px !important;
left: auto !important;
transform: none !important;
box-shadow: none !important;
border-radius: 0px !important;
height: -webkit-fill-available !important;
overflow-y: hidden !important;
overflow-x: hidden !important;
width: -webkit-fill-available !important;
}
#treeTableDiv {
margin: 0px 10px 0px 10px !important;
overflow-y: hidden !important;
height: auto !important;
}
#managerTableDiv {
margin: 0px 10px 0px 10px !important;
overflow-y: overlay !important;
height: -webkit-fill-available !important;
}
#treeTableDiv, #managerProperties {
width: calc(100% - 20px) !important;
}
}
.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;
}
@media (min-width: 0px) and (max-width: 549px) {
#hbody {
font-size: 1.4em !important;
}
#treeDiv {
font-size: 1.05em !important;
}
#authorizationButton {
background: url(../../img/pict/mc_iconslyb.svg) calc(var(--autButBackX) * 1.27px) calc(var(--autButBackY) * 1.27px) !important;
background-size: calc(1122px* 1.27) !important;
width: 28px !important;
height: 28px !important;
margin-left: 9px;
}
#siteSettingsButton {
background: url(../../img/pict/mc_iconslyb.svg) calc(-1840px * 1.27) calc(1664px * 1.27 - 1px) !important;
background-size: calc(1122px* 1.27) !important;
width: 28px !important;
height: 28px !important;
margin-left: 9px;
}
#left-float:not(:empty), #right-float:not(:empty) {
width: calc(50% - 10px);
}
.center-float {
width: 100%;
}
#left-float, #right-float {
padding: 5px 0px !important;
}
.center-float {
padding: 5px 0px 15px 0px !important;
}
.menu-btn {
margin-left: 9px;
}
.menu-btn {
margin-left: 14px;
}
#slng {
margin-left: 3px;
}
#authorizationDiv {
width: 90% !important;
}
#BackArrow {
background: url(../../img/pict/mc_iconslyb.svg) calc(-77px* 1.27) calc(-37px* 1.27) !important;
background-size: calc(1122px* 1.27) !important;
width: 28px !important;
height: 28px !important;
top: 37px !important;
}
.authorizationDivCloseFun {
background: url(../../img/pict/mc_iconslyb.svg) calc(-159px* 1.27) calc(-120px* 1.27) !important;
background-size: calc(1122px* 1.27) !important;
width: 28px !important;
height: 28px !important;
}
.butinAuto, .butin, .sele {
height: 25px !important;
font-size: 1em !important;
}
.cust2 {
top: 247% !important;
}
}
#basis3 {
left: 0 !important;
top: 33px !important;
transform: none !important;
}
@media (min-width: 550px) {
#hbody {
font-size: 1.3em;
}
}
@media (min-width: 550px) and (max-width: 699px) {
#left-float:not(:empty), #right-float:not(:empty) {
width: 22%;
}
.center-float {
width: calc(56% - 30px);
}
#left-float, #right-float, .center-float {
padding: 5px !important;
}
}
@media (min-width: 700px) and (max-width: 1239px) {
#left-float:not(:empty), #right-float:not(:empty) {
width: 20%;
}
.center-float {
width: calc(60% - 30px);
}
#left-float, #right-float, .center-float {
padding: 5px !important;
}
}
@media (min-width: 1240px) {
#left-float:not(:empty), #right-float:not(:empty) {
width: 18%;
}
.center-float {
width: calc(64% - 40px);
}
#pbody {
padding-left: 40px;
padding-right: 40px;
}
}
/* блоки редактирования */
#content {
overflow-x: hidden;
overflow-y: hidden;
}
#content td {
height: 19px;
}
[contenteditable="true"]:focus {
outline: 1px solid #000;
outline-offset: 2px;
border-radius: 2px;
}
button {
background-color: #ffffff;
border: 1px solid rgb(0, 0, 0);
border-radius: 2px;
}
#editor a {
text-decoration: none;
color: inherit;
}
ul, ol {
margin-block-start: 0em;
margin-block-end: 0em;
}
/* показ сообщений */
.messageBlock {
width: 400px;
height: auto;
top: 10px;
z-index: 1003;
right: 0;
position: fixed;
display: inline-block;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
margin: 15px;
font-family: 'Roboto', sans-serif;
transition: opacity 0.15s ease-in-out;
background-color: rgba(255, 255, 255, 0.92);
max-width: -webkit-fill-available;
}
.messageBlock.show {
opacity: 1;
}
.messageBasicText {
padding: 10px 15px 10px 15px;
border: none;
border-bottom: inherit;
font-size: 1.5em;
}
.messageText {
font-size: 1.15em;
margin: 15px;
}
.messageInput {
font-size: 1.15em;
margin: 18px 18px 3px 18px;
padding: 2px;
width: -webkit-fill-available;
}
.messageButton {
background-color: rgba(255, 255, 255, 0.92);
padding: 8px;
border-radius: 15px;
float: right;
font-size: 1.15em;
width: 35px;
text-align: center;
cursor: pointer;
margin: 15px;
}

1194
data/Basic_functions.js Normal file

File diff suppressed because it is too large Load Diff

9
data/filepath.en.php Normal file
View 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 Normal file
View 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>

7
data/filepath.ru.php Normal file
View 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='MedWait' PageMenu='0,1,2' users='' group=''>
</index>
</site>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

153
data/fonts/fonts.css Normal file
View 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 Normal file
View File

@@ -0,0 +1,8 @@
<div id="fclear">
</div>
<div id="footer">
Powered by uText CMS<br>
2013 &#169 gugudze
</div>
</div>

43
data/footer.css.php Normal file
View 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;
*/
}

463
data/func.php Normal file
View File

@@ -0,0 +1,463 @@
<?php
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']
]);
}
}
function handleJsonRpcRequest($action) {
$input = json_decode(file_get_contents('php://input'), true);
$params = $input['params'] ?? [];
$id = $input['id'] ?? null;
$result = is_callable($action)
? call_user_func($action, $params[0] ?? null)
: null;
echo json_encode([
'jsonrpc' => '2.0',
'result' => $result,
'id' => $id
]);
}
#подключение плагинов
function includePhp() {
global $path;
$html = '';
$pluginDir = $path . 'main_plugin/';
if (is_dir($pluginDir)) {
$dirs = array_diff(scandir($pluginDir), ['.', '..']);
foreach ($dirs as $dir) {
if (is_dir($pluginDir . $dir)) {
$file = $pluginDir . $dir . '/plug.php';
if (is_file($file)) {
ob_start();
include $file;
$html .= ob_get_clean();
}
}
}
}
return $html;
}
function API() {
global $config, $path, $_SESSION;
$config['page_error'] = '';
if (isset($_POST['LogPage'])) {
$_SESSION['log_in'] = true;
}
if (isset($_POST['logoff'])) {
if (isset($_SESSION)) {
unset($_SESSION);
session_destroy();
}
echo json_encode(['status' => 'logged_off']);
}
if (isset($_POST['log'])) {
if ($_POST['log'] == "Войти") {
if (check($_POST['login'], md5($_POST['pass']))) {
$_SESSION['username'] = $_POST['login'];
$_SESSION['pass'] = $_POST['pass'];
$_SESSION['Login'] = 'true';
$_SESSION['log_in'] = false;
echo json_encode(['status' => 'true']);
} else {
$_SESSION['Login'] = 'false';
echo json_encode(['status' => 'false']);
}
}
}
}
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;
}
}
}
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;
}
# Генерация меню. По умолчанию ссылка активной страницы выделяется классом "selected"
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;
}
#Формировани блоков $BlockVar масив влоков $side тип блока tclass bclass
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);*/
}
# Функция обработки ошибки
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;
}
# Функция обработки ошибки
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;
}
# Проверка логина и пароля
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;
}
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")) {
if (document.getElementById("basis3").style.visibility === "visible" && window.contentIsEdit == true) {
messageQueue.push("Сохранить данные?");
try {
const userConfirmed = await messageCreateQuestion();
if (userConfirmed) {
if (window.newPageFunValue == "newPage") {
document.getElementById("saveHow").click();
messageFunction("Сохраните новую страницу!");
return;
} else {
await saveChanges();
}
}
} catch (error) {
console.log("Ошибка: ", error);
}
}
}
var form = document.createElement("form");
form.method = "post";
form.action = "";
var inputLng = document.createElement("input");
inputLng.type = "hidden";
inputLng.name = "lng";
inputLng.value = language;
form.appendChild(inputLng);
var inputAction = document.createElement("input");
inputAction.type = "hidden";
inputAction.name = "handleRequestAction";
inputAction.value = "API";
form.appendChild(inputAction);
document.getElementById("f").appendChild(form);
form.submit();
}
</script>
';
return $s;
}
function SetLng(){
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'];
}
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;
}
# Генерация меню. По умолчанию ссылка активной страницы выделяется классом "selected"
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;
}
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;
}
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;
}
function URLstr($FPfile,$RURLstr){
global $path, $server;
$xmlstr =simplexml_load_file($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]};
}
$xmlstr = $xmlstr->{$RURLstr[$i]};
}
else {
$ansv['URLLine'] = 'error';
$ansv['FileURL'] = 'error';
}
}
}
return $ansv;
}
function SetXML($file){
}
?>

110
data/lang.php Normal file
View File

@@ -0,0 +1,110 @@
<?php
$lang_Basic_functions = [
'ru' => [
'error' => 'Ошибка',
'message' => 'Сообщение:',
'ok' => 'ОК',
'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',
'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' => 'Labi',
'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;

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<users>
<users>
</users>
</users>

24
data/template.page.php Normal file
View 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>

155
data/top.css.php Normal file
View File

@@ -0,0 +1,155 @@
#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)));
}
#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;
}

29
data/top.php Normal file
View File

@@ -0,0 +1,29 @@
<!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" />
</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 Normal file
View 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>