diff --git a/.gitignore b/.gitignore
index 85d04c84..307ba888 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,7 @@ public/media/*.size
composer.lock
php/sentry.php
php/vendor
+_translate.cache
+media_import
+__pycache__
+vendor
diff --git a/php/clonos.php b/php/clonos.php
index ff565ed4..3bfc5149 100644
--- a/php/clonos.php
+++ b/php/clonos.php
@@ -7,12 +7,16 @@ require_once('forms.php');
require_once('utils.php');
class ClonOS {
+ const TRANSLATE_CACHE_NAME='_translate.cache';
+ const BACK_FOLDER_NAME='back';
+
public $server_name='';
public $workdir='';
public $environment='';
public $realpath='';
public $realpath_php='';
public $realpath_public='';
+ public $realpath_dialogs='';
public $realpath_page='';
public $uri_chunks=array();
public $json_name='';
@@ -65,6 +69,7 @@ class ClonOS {
$this->realpath=$_real_path.'/'; # /usr/home/web/cp/clonos/
$this->realpath_php=$_real_path.'/php/'; # /usr/home/web/cp/clonos/php/
$this->realpath_public=$_real_path.'/public/'; # /usr/home/web/cp/clonos/public/
+ $this->realpath_dialogs=$this->realpath_public.'dialogs/'; # /usr/home/web/cp/clonos/public/dialogs/
$this->media_import=$_real_path.'/media_import/';
if($this->environment=='development'){
@@ -104,7 +109,7 @@ class ClonOS {
$this->json_name=$this->realpath_page.'a.json.php';
//echo $this->realpath_page;
}else if($_SERVER['REQUEST_URI']){
-
+ /*
if($this->uri_chunks[0]=='overview1')
{
$this->uri_chunks[0]='overview';
@@ -120,7 +125,7 @@ class ClonOS {
echo 'incfile: ',$incfile;exit;
//break 1;
}
-
+ */
//$this->realpath_page=$this->realpath_public.'pages/'.trim($_SERVER['REQUEST_URI'],'/').'/';
if(isset($this->uri_chunks[0])){
$this->realpath_page=$this->realpath_public.'pages/'.$this->uri_chunks[0].'/';
@@ -283,6 +288,94 @@ class ClonOS {
{
return $this->_locale->translate($phrase);
}
+
+ function ccmd_trltGo()
+ {
+ $dbres=[];
+ $form=$this->_vars['form_data'];
+ if(isset($form['phraseID']) && is_numeric($form['phraseID']))
+ {
+ $db=new Db('clonos');
+ if(!$db->isConnected())
+ return array('error'=>true,'error_message'=>'translate db connection lost!');
+
+ $dbres=$db->selectOne(
+ 'SELECT e.text as eng, o.text as oth FROM "lang_en" as e left join "lang_other" as o on e.id=o.en_id where e.id=?',
+ [[$form['phraseID'],PDO::PARAM_INT]]
+ );
+
+ $dbres['phraseID']=$form['phraseID'];
+ $dbres['type']=$form['type'];
+ $dbres['dialog']=$form['dialog'];
+ }
+ return $dbres;
+
+ }
+ function ccmd_trltUpdate()
+ {
+ $lang=$this->_locale->get_lang();
+ $form=$this->_vars['form_data'];
+
+ switch($form['type'])
+ {
+ case 'dialog':
+ $cache_file_name=$this->realpath_dialogs.ClonOS::TRANSLATE_CACHE_NAME.
+ DIRECTORY_SEPARATOR.$lang.'.'.$form['dialog'].'.php';
+ break;
+ case 'pages':
+ $cache_file_name=$this->realpath_page.ClonOS::TRANSLATE_CACHE_NAME.
+ DIRECTORY_SEPARATOR.$lang.'.index.php';
+ break;
+ default:
+ echo $cache_file_name;
+ exit;
+ break;
+ }
+
+ if(file_exists($cache_file_name)) unlink($cache_file_name);
+ //echo $cache_file_name;
+ //exit;
+ //echo $file_name;exit;
+ $db=new Db('clonos');
+ if(!$db->isConnected())
+ return array('error'=>true,'error_message'=>'translate db connection error!');
+
+ $dbres=$db->update("update lang_other set text=?,lang=? where en_id=?",[
+ [$form['translText'],PDO::PARAM_STR],
+ [$lang,PDO::PARAM_STR],
+ [$form['phraseID'],PDO::PARAM_INT]
+ ]);
+
+ //echo '
';print_r($dbres);
+
+ if(!isset($dbres['error']))
+ {
+ if($dbres['rowCount']==0)
+ {
+ $dbres=$db->insert("insert into lang_other (en_id,text,lang) values (?,?,?)",[
+ [$form['phraseID'],PDO::PARAM_INT],
+ [$form['translText'],PDO::PARAM_STR],
+ [$lang,PDO::PARAM_STR]
+ ]);
+ //print_r($dbres);exit;
+ if($dbres['error'])
+ {
+ return $dbres;
+ }
+ $dbres['phraseID']=$dbres['lastID'];
+ }
+ }
+
+
+ //$back_file=
+
+ return [
+ 'error'=>false,
+ 'rowCount'=>$dbres['rowCount'],
+ 'phraseID'=>$form['phraseID'],
+ 'phrase'=>$form['translText']
+ ];
+ }
function ccmd_getJsonPage(){
$included_result_array=false;
@@ -2093,7 +2186,10 @@ class ClonOS {
function placeDialogByName($dialog_name=null){
if(is_null($dialog_name)) return;
echo PHP_EOL;
- $file_name=$this->realpath_public.'dialogs/'.$dialog_name.'.php';
+ //$file_name=$this->realpath_public.'dialogs/'.$dialog_name.'.php';
+
+ $trres=$this->_translate->translate('dialogs','dialogs/',$dialog_name.'.php');
+ $file_name=$this->_translate->get_translated_filename();
if(file_exists($file_name)){
include($file_name);
echo PHP_EOL,PHP_EOL;
diff --git a/php/config.php b/php/config.php
index 69a2dc59..14674e6a 100644
--- a/php/config.php
+++ b/php/config.php
@@ -387,7 +387,7 @@ class Config
$res1=$cpu+$ram1;
if($min>$res1 || $min==0) {$min=$res1;$min_id=$item['id'];}
- $name=''.$item['name'].' (cpu: '.$cpu.'; ram: '.$ram.'; hdd: '.$item['pkg_vm_disk'].')';
+ $name=$item['name'].' (cpu: '.$cpu.'; ram: '.$ram.'; hdd: '.$item['pkg_vm_disk'].')'; # ''.
$html.=' '.$name.' '.PHP_EOL;
}
return array('html'=>$html,'min_id'=>$min_id);
diff --git a/php/localization.php b/php/localization.php
index 677750a8..b2724d2c 100644
--- a/php/localization.php
+++ b/php/localization.php
@@ -8,11 +8,60 @@ class Localization
function __construct($realpath_public)
{
+#$_COOKIE['lang']='ru';
$this->realpath=$realpath_public;
(isset($_COOKIE['lang'])) AND $this->language=$_COOKIE['lang'];
(!array_key_exists($this->language, Config::$languages)) AND $this->language='en';
include($realpath_public.'/lang/'.$this->language.'.php');
$this->translate_arr=$lang;
+
+ /*
+ $n=1;
+ foreach($lang as $eng=>$rus)
+ {
+ echo $n,' — ',$eng," ";
+ $n++;
+ }
+ exit;
+ */
+
+ # Если нужно наполнить базу, то нужно убрать комментарий и запустить страницу
+ # с параметром /?go=go
+ /*
+ if($_GET['go']=='go')
+ {
+ #var_dump($lang);
+ #exit;
+
+ $db=new Db('clonos');
+ if(!$db->isConnected())
+ {
+ print_r(['error'=>true,'error_message'=>'db connection lost!']);
+ exit;
+ }
+
+ foreach($lang as $eng=>$rus)
+ {
+ $dbres=$db->insert("insert into lang_en (text) values (?)",[[$eng, PDO::PARAM_STR]]);
+ if($dbres['error'])
+ {
+ print_r(['error'=>true,'error_message'=>$dbres['info']]);
+ exit;
+ }
+
+ $new_id=$dbres['lastID'];
+ $dbres=$db->insert("insert into lang_other (en_id,text,lang) values (?,?,?)",[[$new_id],[$rus],['ru']]);
+ if($dbres['error'])
+ {
+ print_r(['error'=>true,'error_message'=>$dbres['info']]);
+ exit;
+ }
+
+ }
+ }
+ echo 'all ok';
+ exit;
+ */
}
public function get_lang()
@@ -32,7 +81,9 @@ class Localization
}
-
+# для отключения ссылок в меню, чтобы можно было его перевести:
+# $('ul.menu').on('click',function(event){return false;});
+# доделать со временем
class Translate
{
private $locale='';
@@ -57,20 +108,28 @@ class Translate
public function translate($path,$page,$file_name)
{
$translate_cache='_translate.cache';
+ $backup_dir='back';
switch($path)
{
case 'pages':
$full_path=$this->realpath.$path.DIRECTORY_SEPARATOR.$page.DIRECTORY_SEPARATOR;
$translate_cache_path=$full_path.$translate_cache.DIRECTORY_SEPARATOR;
+ $backup_path=$full_path.$backup_dir.DIRECTORY_SEPARATOR;
$this->translated_file=$translate_cache_path.$this->language.'.index.php';
+ //echo $this->translated_file;exit;
break;
case 'dialogs':
$full_path=$this->realpath.$path.DIRECTORY_SEPARATOR;
$translate_cache_path=$full_path.$translate_cache.DIRECTORY_SEPARATOR;
+ $backup_path=$full_path.$backup_dir.DIRECTORY_SEPARATOR;
$this->translated_file=$translate_cache_path.$this->language.'.'.$file_name;
break;
+ default:
+ $path='system';
}
+ if(!is_dir($full_path)) return;
+
if(!is_dir($translate_cache_path))
{
mkdir($translate_cache_path);
@@ -82,8 +141,10 @@ class Translate
$file=$full_path.$file_name;
+ $mtime_translate=0;
$mtime_orig=filemtime($file);
- $mtime_translate=filemtime($this->translated_file);
+ if(file_exists($this->translated_file))
+ $mtime_translate=filemtime($this->translated_file);
# $mtime_db_update — дата последней модификации перевода в БД
if($mtime_orig<$mtime_translate)
@@ -101,8 +162,8 @@ class Translate
{
$is_changed=false;
$txt=file_get_contents($file);
- preg_match_all('#]*)>(.*) #',$txt,$res,PREG_SET_ORDER);
-// var_dump($res);exit;
+ preg_match_all('#]*)>(.*) #U',$txt,$res,PREG_SET_ORDER);
+ //echo '';var_dump($res);exit;
$ids_arr=[];
@@ -120,6 +181,7 @@ class Translate
{
// если у тэга есть ID, то проверяем текст и формируем шаблон
preg_match_all('#((id)="?([\d]+)"?|update)#',$attrs,$params,PREG_SET_ORDER);
+
if(is_array($params)) // && $this->language!='en'
{
// ИЗМЕНИТЬ КОММЕНТАРИЙ! --- если у пользователя язык интерфейса не английский, то переводим
@@ -131,13 +193,20 @@ class Translate
if(is_numeric($p[3]))
{
$id=$p[3];
- $dbres=$db->selectOne("select text from lang_en where id=?",[[$id,PDO::PARAM_INT]]);
+ $dbres=$db->selectOne("select text from lang_en where id=? and type in (?,?)",[
+ [$id,PDO::PARAM_INT],
+ [$path,PDO::PARAM_STR],
+ ['system',PDO::PARAM_STR]
+ ]);
+ //var_dump($dbres);
if(!empty($dbres))
{
if($text!=$dbres['text'])
{
// если оригинальный текст изменился, то обновляем его в базе
- $dbres1=$db->update('update lang_en set text=? where id=?',[[$text,PDO::PARAM_STR],[$id,PDO::PARAM_INT]]);
+ # временно отключил, пока наполняется основная база. Потом нужно вернуть обратно
+ /*
+ $dbres1=$db->update('update lang_en set text=? where id=? and type=?',[[$text,PDO::PARAM_STR],[$id,PDO::PARAM_INT],[$path,PDO::PARAM_STR]]);
if(isset($dbres1['rowCount']))
{
if($dbres1['rowCount']>0)
@@ -145,11 +214,14 @@ class Translate
$is_changed=true;
}
}
+ */
}
+
}
$ids_arr[]=$id;
}
}
+ //print_r($ids_arr);exit;
/*
if($p[0]=='update' && $id>0)
{
@@ -170,13 +242,20 @@ delete FROM "lang_en";
VACUUM;
UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = 'lang_en'
*/
-
- $dbres=$db->selectOne("select id from lang_en where text=?",[[$text, PDO::PARAM_STR]]); //,[[$text, PDO::PARAM_STR]]);
+ $dbres=$db->selectOne("select id from lang_en where text=? and type in (?,?)",[
+ [$text,PDO::PARAM_STR],
+ [$path,PDO::PARAM_STR],
+ ['system',PDO::PARAM_STR]
+ ]);
if(isset($dbres['error']) && $dbres['error'])
{
echo 'error db: ',$dbres['info'];
exit;
}
+ //echo $text;
+ //var_dump($dbres);
+ //echo ' ';
+
if(is_numeric($dbres['id']))
{
// если фраза есть в базе, то вписываем её ID в тэг
@@ -187,7 +266,7 @@ UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = 'lang_en'
if($dbres===false)
{
// если фразы нет в базе, то добавляем её туда и вписываем новый ID в тэг
- $dbres=$db->insert("insert into lang_en (text) values (?)",[[$text, PDO::PARAM_STR]]);
+ $dbres=$db->insert("insert into lang_en (text,type) values (?,?)",[[$text, PDO::PARAM_STR],[$path, PDO::PARAM_STR]]);
if($dbres['error'])
return array('error'=>true,'error_message'=>$dbres['info']);
@@ -195,18 +274,29 @@ UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = 'lang_en'
$new_text=''.$text." ";
$txt=str_replace($tag,$new_text,$txt);
$is_changed=true;
-
+ //echo $txt;
$ids_arr[]=$dbres['lastID'];
}
}
+
}
}
// бэкапим предыдущий файл и сохраняем видоизменённый
if($is_changed)
{
- rename($full_path.$file_name,$full_path.'_back.'.time().'.'.$file_name);
+ if(!is_dir($backup_path))
+ {
+ mkdir($backup_path);
+ }
+
+ //rename($full_path.$file_name,$full_path.
+ // $backup_dir.DIRECTORY_SEPARATOR.time().'.'.$file_name);
+ rename($full_path.$file_name,$backup_path.time().'.'.$file_name);
file_put_contents($full_path.$file_name,$txt);
+ #echo 'save';
+ #echo $txt;
+ #exit;
}
// переводим на другие языки
@@ -222,14 +312,28 @@ UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = 'lang_en'
foreach($res as $item)
{
- $pat='#]*>(.*) #';
- $txt=preg_replace($pat,$item['text'],$txt);
+ $pat='#]*>(.*) #U';
+ $txtChg=''.$item['text'].' ';
+ $txt=preg_replace($pat,$txtChg,$txt); //''. //.' '
}
- $txt=preg_replace('#(]*)>| )#','',$txt);
+ //$txt=preg_replace('#(]*)>| )#','',$txt);
+ $txt=preg_replace('##U','',$txt);
+ $txt=str_replace(' ','',$txt);
+
+ $txt=preg_replace("#title='([^\']+)'#U","$1",$txt);
+
+ $txt=preg_replace("#(]+>)]+>(.*) #U","$1$2",$txt);
+
+ # чистим кнопки от лишних тэгов
+ $txt=preg_replace('# tanslated_file=$translate_cache_path.$this->language.'.index.php';
file_put_contents($this->translated_file,$txt);
+ #echo $txt;
+ #exit;
//var_dump($res);
//echo $ids_txt;
diff --git a/public/css/styles.css b/public/css/styles.css
index 30de5bd1..e7e4aef9 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -1,3 +1,5 @@
+@import url("translate.css");
+
html {
background:#333;
margin:0;
@@ -109,7 +111,7 @@ header {
height:52px;
background-image: url(/images/main-menu-bg.png);
background-repeat: repeat-x;
- background-position-y: 15px;
+ background-position: 0 15px;
}
.header ul {
height: 52px;
diff --git a/public/css/translate.css b/public/css/translate.css
new file mode 100644
index 00000000..09c754b9
--- /dev/null
+++ b/public/css/translate.css
@@ -0,0 +1,25 @@
+body.translate span[id*="trlt-"]:hover {
+ background-color:#faafba;
+ cursor:help;
+ color:black;
+}
+
+body.translate span[id*="trlt-"]:hover:before {
+ content:'\01E2';
+ display:block;
+ position:absolute;
+ float:left;
+ background-color:black;
+ font-size:8pt;
+ color:white;
+ padding:2px 4px;
+
+}
+
+dialog#translates h1 {
+ color:#337ab7;
+ font-size:120%;
+}
+dialog#translates textarea {
+ height:120px;
+}
\ No newline at end of file
diff --git a/public/dialogs/_back.1733347857.jail-settings.php b/public/dialogs/_back.1733347857.jail-settings.php
deleted file mode 100644
index 73b68834..00000000
--- a/public/dialogs/_back.1733347857.jail-settings.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
- Create jail
- Edit jail
-
- Jail Settings
-
-
- Create" class="new button ok-but" />
- Save" class="edit button ok-but" />
-
-
-
-
-err_messages.add({
- 'vm_name':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
-});
-
-
-
- translate('Clone Virtual Machine');?>
-
- translate('Cloned Virtual Machine Settings');?>
-
-
-
-
-
-
diff --git a/public/dialogs/_translate.cache/en.bhyve-new.php b/public/dialogs/_translate.cache/en.bhyve-new.php
deleted file mode 100644
index ed77fc9b..00000000
--- a/public/dialogs/_translate.cache/en.bhyve-new.php
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
- translate('Create Virtual Machine');?>
- translate('Edit Virtual Machine');?>
-
- translate('Virtual Machine Settings');?>
-
-
-
-
-
-
-
diff --git a/public/dialogs/_translate.cache/en.bhyve-obtain.php b/public/dialogs/_translate.cache/en.bhyve-obtain.php
deleted file mode 100644
index 69ebb3ee..00000000
--- a/public/dialogs/_translate.cache/en.bhyve-obtain.php
+++ /dev/null
@@ -1,84 +0,0 @@
-
- translate('Create Virtual Machine from Library');?>
- translate('Virtual Machine Settings');?>
-
-
-
-
-
-
-
-err_messages.add({
- 'jname':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
-});
-
-
-
- translate('Rename virtual machine');?>
-
- translate('Renamed Virtual Machine Settings');?>
-
-
-
-
-
-
diff --git a/public/dialogs/_translate.cache/en.jail-clone.php b/public/dialogs/_translate.cache/en.jail-clone.php
deleted file mode 100644
index 75e9b134..00000000
--- a/public/dialogs/_translate.cache/en.jail-clone.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- translate('Clone jail');?>
-
- translate('Cloned Jail Settings');?>
-
-
-
-
-
-
diff --git a/public/dialogs/_translate.cache/en.jail-import.php b/public/dialogs/_translate.cache/en.jail-import.php
deleted file mode 100644
index bfd98f4d..00000000
--- a/public/dialogs/_translate.cache/en.jail-import.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- translate('Import jail');?>
- translate('Edit jail');?>
-
- translate('Jail Import');?>
-
-
-
-
-
-
\ No newline at end of file
diff --git a/public/dialogs/_translate.cache/en.jail-rename.php b/public/dialogs/_translate.cache/en.jail-rename.php
deleted file mode 100644
index 00ee4d4c..00000000
--- a/public/dialogs/_translate.cache/en.jail-rename.php
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- translate('Rename jail');?>
-
- translate('Renamed Jail Settings');?>
-
-
-
-
-
-
diff --git a/public/dialogs/_translate.cache/en.jail-settings-config-menu.php b/public/dialogs/_translate.cache/en.jail-settings-config-menu.php
deleted file mode 100644
index f3892fdf..00000000
--- a/public/dialogs/_translate.cache/en.jail-settings-config-menu.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
\ No newline at end of file
diff --git a/public/dialogs/_translate.cache/en.jail-settings.php b/public/dialogs/_translate.cache/en.jail-settings.php
deleted file mode 100644
index e7e5e038..00000000
--- a/public/dialogs/_translate.cache/en.jail-settings.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
- Create jail
- Edit jail
-
- Jail Settings
-
-
-
-
-
-
-
-
- translate('Task log');?>
-
- Task log here…
-
-
-
-
-
diff --git a/public/dialogs/_translate.cache/en.vnc-bhyve.php b/public/dialogs/_translate.cache/en.vnc-bhyve.php
deleted file mode 100644
index b7f45563..00000000
--- a/public/dialogs/_translate.cache/en.vnc-bhyve.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- translate('Please, wait for initialize Virtual Machine');?>
- translate('You can click here, or wait');?>: translate('some time');?>
-
-
-
-
-
\ No newline at end of file
diff --git a/public/dialogs/_translate.cache/en.vnc.php b/public/dialogs/_translate.cache/en.vnc.php
deleted file mode 100644
index e761d8b9..00000000
--- a/public/dialogs/_translate.cache/en.vnc.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/public/dialogs/_translate.cache/ru.bhyve-clone.php b/public/dialogs/_translate.cache/ru.bhyve-clone.php
index 98b88e11..2531c270 100644
--- a/public/dialogs/_translate.cache/ru.bhyve-clone.php
+++ b/public/dialogs/_translate.cache/ru.bhyve-clone.php
@@ -1,23 +1,23 @@
- translate('Clone Virtual Machine');?>
+ Clone Virtual Machine
- translate('Cloned Virtual Machine Settings');?>
+ Cloned Virtual Machine Settings
-
-
+
+
diff --git a/public/dialogs/_translate.cache/ru.bhyve-new.php b/public/dialogs/_translate.cache/ru.bhyve-new.php
index ed77fc9b..5a57e0d7 100644
--- a/public/dialogs/_translate.cache/ru.bhyve-new.php
+++ b/public/dialogs/_translate.cache/ru.bhyve-new.php
@@ -1,8 +1,8 @@
- translate('Create Virtual Machine');?>
- translate('Edit Virtual Machine');?>
+ Создание виртуальной машины
+ Edit Virtual Machine
- translate('Virtual Machine Settings');?>
+ Настройки
-
-
-
+
+
+
diff --git a/public/dialogs/_translate.cache/ru.bhyve-obtain.php b/public/dialogs/_translate.cache/ru.bhyve-obtain.php
index 69ebb3ee..ce3f1875 100644
--- a/public/dialogs/_translate.cache/ru.bhyve-obtain.php
+++ b/public/dialogs/_translate.cache/ru.bhyve-obtain.php
@@ -1,34 +1,34 @@
- translate('Create Virtual Machine from Library');?>
- translate('Virtual Machine Settings');?>
+ Создание из библиотеки
+ Настройки
-
-
+
+
err_messages.add({
- 'jname':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
+ 'jname':'Не может быть пустым. Имя должно начинаться и содержать латинские буквы / a-z / и не должно иметь спец. символы: -,.=% и тд. ',
});
- translate('Rename virtual machine');?>
+ Rename virtual machine
- translate('Renamed Virtual Machine Settings');?>
+ Renamed Virtual Machine Settings
-
-
+
+
diff --git a/public/dialogs/_translate.cache/ru.jail-clone.php b/public/dialogs/_translate.cache/ru.jail-clone.php
index 75e9b134..cfe6d51c 100644
--- a/public/dialogs/_translate.cache/ru.jail-clone.php
+++ b/public/dialogs/_translate.cache/ru.jail-clone.php
@@ -1,36 +1,36 @@
- translate('Clone jail');?>
+ Clone jail
- translate('Cloned Jail Settings');?>
+ Cloned Jail Settings
-
-
+
+
diff --git a/public/dialogs/_translate.cache/ru.jail-import.php b/public/dialogs/_translate.cache/ru.jail-import.php
index bfd98f4d..dd5bd47a 100644
--- a/public/dialogs/_translate.cache/ru.jail-import.php
+++ b/public/dialogs/_translate.cache/ru.jail-import.php
@@ -1,25 +1,25 @@
- translate('Import jail');?>
- translate('Edit jail');?>
+ Импорт контейнера
+ редактирование параметров контейнера
- translate('Jail Import');?>
+ Импорт контейнера
-
+
\ No newline at end of file
diff --git a/public/dialogs/_translate.cache/ru.jail-rename.php b/public/dialogs/_translate.cache/ru.jail-rename.php
index 00ee4d4c..2de01b2c 100644
--- a/public/dialogs/_translate.cache/ru.jail-rename.php
+++ b/public/dialogs/_translate.cache/ru.jail-rename.php
@@ -1,36 +1,36 @@
- translate('Rename jail');?>
+ Rename jail
- translate('Renamed Jail Settings');?>
+ Renamed Jail Settings
-
-
+
+
diff --git a/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php b/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php
index f3892fdf..c0e8b52b 100644
--- a/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php
+++ b/public/dialogs/_translate.cache/ru.jail-settings-config-menu.php
@@ -1,10 +1,10 @@
\ No newline at end of file
diff --git a/public/dialogs/_translate.cache/ru.jail-settings.php b/public/dialogs/_translate.cache/ru.jail-settings.php
index 7b2a716e..7130ac9c 100644
--- a/public/dialogs/_translate.cache/ru.jail-settings.php
+++ b/public/dialogs/_translate.cache/ru.jail-settings.php
@@ -1,60 +1,60 @@
- Create jail
- Edit jail
+ создание контейнера
+ редактирование параметров контейнера
- Jail Settings
+ настройки контейнера
-
-
-
+
+
+
- translate('Task log');?>
+ Task log
- Task log here…
+ Task log here…
-
+
diff --git a/public/dialogs/_translate.cache/ru.vnc-bhyve.php b/public/dialogs/_translate.cache/ru.vnc-bhyve.php
index b7f45563..bf667e43 100644
--- a/public/dialogs/_translate.cache/ru.vnc-bhyve.php
+++ b/public/dialogs/_translate.cache/ru.vnc-bhyve.php
@@ -10,8 +10,8 @@
- translate('Please, wait for initialize Virtual Machine');?>
- translate('You can click here, or wait');?>: translate('some time');?>
+ Пожалуйста, подождите пока инициализируется виртуальная машина
+ Вы можете кликнуть сюда или подождать : некоторое время
diff --git a/public/dialogs/authkey.php b/public/dialogs/authkey.php
index d1b0470f..5bb02902 100644
--- a/public/dialogs/authkey.php
+++ b/public/dialogs/authkey.php
@@ -1,25 +1,25 @@
- translate('Create Authkey');?>
- translate('Settings');?>
+ Create Authkey
+ Settings
-
-
+ Create" class="button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/!orig.jail-settings.php b/public/dialogs/back/!orig.jail-settings.php
similarity index 100%
rename from public/dialogs/!orig.jail-settings.php
rename to public/dialogs/back/!orig.jail-settings.php
diff --git a/public/dialogs/back/1733863638.system-login.php b/public/dialogs/back/1733863638.system-login.php
new file mode 100644
index 00000000..90c679b6
--- /dev/null
+++ b/public/dialogs/back/1733863638.system-login.php
@@ -0,0 +1,20 @@
+
+
+ Error! User not found!
+
+
+
+
+
+
+
+
diff --git a/public/dialogs/back/1733863638.translate.php b/public/dialogs/back/1733863638.translate.php
new file mode 100644
index 00000000..cbcaa6ad
--- /dev/null
+++ b/public/dialogs/back/1733863638.translate.php
@@ -0,0 +1,27 @@
+
+
+ Translate
+
+ Translate phrase
+
+
+
+ Вы можете поучаствовать в переводе интерфейса на свой язык.
+
+
+ Original phrase :
+
+
+
+ Translated phrase :
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/dialogs/back/1733865625.translate.php b/public/dialogs/back/1733865625.translate.php
new file mode 100644
index 00000000..75f7c16c
--- /dev/null
+++ b/public/dialogs/back/1733865625.translate.php
@@ -0,0 +1,28 @@
+
+
+ Translate
+
+ Translate phrase
+
+
+
+ Вы можете поучаствовать в переводе интерфейса на свой язык.
+
+
+ Original phrase :
+
+
+
+ Translated phrase :
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/dialogs/back/1733866006.translate.php b/public/dialogs/back/1733866006.translate.php
new file mode 100644
index 00000000..f490cd5b
--- /dev/null
+++ b/public/dialogs/back/1733866006.translate.php
@@ -0,0 +1,28 @@
+
+
+ Translate
+
+ Translate phrase
+
+
+
+ Вы можете поучаствовать в переводе интерфейса на свой язык.
+
+
+ Original phrase :
+
+
+
+ Translated phrase :
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/dialogs/bases-repo.php b/public/dialogs/bases-repo.php
index 52907774..767cf002 100644
--- a/public/dialogs/bases-repo.php
+++ b/public/dialogs/bases-repo.php
@@ -1,38 +1,38 @@
- translate('Compile FreeBSD');?>
- translate('Compile from bases');?>
+ Compile FreeBSD
+ Compile from bases
-
-
+ Get" class="button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/bases.php b/public/dialogs/bases.php
index 8ac54f02..e8eef61d 100644
--- a/public/dialogs/bases.php
+++ b/public/dialogs/bases.php
@@ -1,30 +1,30 @@
- translate('Compile FreeBSD');?>
- translate('Compile from sources');?>
+ Compile FreeBSD
+ Compile from sources
- translate('Sources version');?>:
+ Sources version :
getBasesCompileList(); ?>
- translate('Source');?>:
+ Source :
- translate('Clonos repository');?>
+ Clonos repository
-
-
+ Get" class="button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/bhyve-clone.php b/public/dialogs/bhyve-clone.php
index 98b88e11..f3991000 100644
--- a/public/dialogs/bhyve-clone.php
+++ b/public/dialogs/bhyve-clone.php
@@ -1,23 +1,23 @@
- translate('Clone Virtual Machine');?>
+ Clone Virtual Machine
- translate('Cloned Virtual Machine Settings');?>
+ Cloned Virtual Machine Settings
-
-
+ Clone" class="new button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/bhyve-new.php b/public/dialogs/bhyve-new.php
index ed77fc9b..7a84318c 100644
--- a/public/dialogs/bhyve-new.php
+++ b/public/dialogs/bhyve-new.php
@@ -1,8 +1,8 @@
- translate('Create Virtual Machine');?>
- translate('Edit Virtual Machine');?>
+ Create Virtual Machine
+ Edit Virtual Machine
- translate('Virtual Machine Settings');?>
+ Virtual Machine Settings
- translate('VM OS profile');?>:
+ VM OS profile :
config->os_types_create(); ?>
- translate('Virtual Machine name');?>:
+ Virtual Machine name :
- translate('VM template (cpu, ram, hdd)');?>:
+ VM template (cpu, ram, hdd) :
config->vm_packages_list(); echo $vm_res['html']; ?>
- translate('VM CPUs');?>:
+ VM CPUs :
@@ -42,7 +42,7 @@ err_messages.add({
- translate('VM RAM');?>:
+ VM RAM :
@@ -50,7 +50,7 @@ err_messages.add({
- translate('VM Image size');?>:
+ VM Image size :
@@ -58,45 +58,45 @@ err_messages.add({
- translate('Attached boot ISO image');?>:
+ Attached boot ISO image :
- Profile default ISO
+ Profile default ISO
media_iso_list_html(); ?>
- translate('VNC IP address');?>:
+ VNC IP address :
127.0.0.1
0.0.0.0
- translate('VNC PORT');?>:
+ VNC PORT :
- translate('VNC Password');?>:
- — translate('use to log in VNC console');?>
+ VNC Password :
+ — use to log in VNC console
- translate('Net Interface');?>:
+ Net Interface :
- auto
+ auto
get_interfaces_html(); ?>
-
-
-
+ Create" class="new button ok-but" />
+ Save" class="edit button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/bhyve-obtain.php b/public/dialogs/bhyve-obtain.php
index 69ebb3ee..14d11cc9 100644
--- a/public/dialogs/bhyve-obtain.php
+++ b/public/dialogs/bhyve-obtain.php
@@ -1,34 +1,34 @@
- translate('Create Virtual Machine from Library');?>
- translate('Virtual Machine Settings');?>
+ Create Virtual Machine from Library
+ Virtual Machine Settings
-
-
+ Create" class="button ok-but" />
+ Cancel" class="button red cancel-but" />
err_messages.add({
- 'jname':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
+ 'jname':'Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=% ',
});
- translate('Rename virtual machine');?>
+ Rename virtual machine
- translate('Renamed Virtual Machine Settings');?>
+ Renamed Virtual Machine Settings
-
-
+ Rename" class="new button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/helpers-add.php b/public/dialogs/helpers-add.php
index 254e2ac4..48de2c0a 100644
--- a/public/dialogs/helpers-add.php
+++ b/public/dialogs/helpers-add.php
@@ -1,13 +1,13 @@
- translate('Helpers add');?>
+ Helpers add
- translate('Select helpers for install');?>
+ Select helpers for install
-
-
+
+
diff --git a/public/dialogs/image-import.php b/public/dialogs/image-import.php
index 435922bb..770701f5 100644
--- a/public/dialogs/image-import.php
+++ b/public/dialogs/image-import.php
@@ -1,36 +1,36 @@
- translate('Image Import');?>
-
+ Image Import
+
- translate('Settings');?>
+ Settings
-
-
+ Import" class="new button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/jail-clone.php b/public/dialogs/jail-clone.php
index 75e9b134..dff32445 100644
--- a/public/dialogs/jail-clone.php
+++ b/public/dialogs/jail-clone.php
@@ -1,36 +1,36 @@
- translate('Clone jail');?>
+ Clone jail
- translate('Cloned Jail Settings');?>
+ Cloned Jail Settings
-
-
+ Clone" class="new button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/jail-import.php b/public/dialogs/jail-import.php
index bfd98f4d..39a5219f 100644
--- a/public/dialogs/jail-import.php
+++ b/public/dialogs/jail-import.php
@@ -1,25 +1,25 @@
- translate('Import jail');?>
- translate('Edit jail');?>
+ Import jail
+ Edit jail
- translate('Jail Import');?>
+ Jail Import
-
Drag & Drop Files Here
-
-or-
+
Drag & Drop Files Here
+
-or-
- Click to open the file Browser
-
+ Click to open the file Browser
+
@@ -29,7 +29,7 @@ err_messages.add({
-
+ Cancel" class="button red cancel-but" />
\ No newline at end of file
diff --git a/public/dialogs/jail-rename.php b/public/dialogs/jail-rename.php
index 00ee4d4c..e021f361 100644
--- a/public/dialogs/jail-rename.php
+++ b/public/dialogs/jail-rename.php
@@ -1,36 +1,36 @@
- translate('Rename jail');?>
+ Rename jail
- translate('Renamed Jail Settings');?>
+ Renamed Jail Settings
-
-
+ Rename" class="new button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/jail-settings-config-menu.php b/public/dialogs/jail-settings-config-menu.php
index f3892fdf..7b3a43f4 100644
--- a/public/dialogs/jail-settings-config-menu.php
+++ b/public/dialogs/jail-settings-config-menu.php
@@ -1,10 +1,10 @@
\ No newline at end of file
diff --git a/public/dialogs/jail-settings.php b/public/dialogs/jail-settings.php
index 78a52890..12f882ad 100644
--- a/public/dialogs/jail-settings.php
+++ b/public/dialogs/jail-settings.php
@@ -1,60 +1,60 @@
- Create jail
- Edit jail
+ Create jail
+ Edit jail
- Jail Settings
+ Jail Settings
- Create" class="new button ok-but" />
- Save" class="edit button ok-but" />
- Cancel" class="button red cancel-but" />
+ Create" class="new button ok-but" />
+ Save" class="edit button ok-but" />
+ Cancel" class="button red cancel-but" />
err_messages.add({
- 'vm_name':'translate("Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=%");?>',
+ 'vm_name':'Can not be empty. Name must begin with a letter / a-z / and not have any special symbols: -,.=% ',
});
- translate('Create Kubernetes');?>
+ Create Kubernetes
- translate('create master node and workers');?>
+ create master node and workers
-
-
+ Create" class="new button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/dialogs/media-upload.php b/public/dialogs/media-upload.php
index 646eca58..51fa6e5f 100644
--- a/public/dialogs/media-upload.php
+++ b/public/dialogs/media-upload.php
@@ -2,18 +2,18 @@
err_messages.add({});
- translate('Add Storage Media');?>
- translate('Upload ISO');?>
+ Add Storage Media
+ Upload ISO
-
Drag & Drop Files Here
-
-or-
+
Drag & Drop Files Here
+
-or-
- Click to open the file Browser
+ Click to open the file Browser
@@ -24,7 +24,7 @@ err_messages.add({});
-
+ Close" class="button red cancel-but" />
diff --git a/public/dialogs/media.php b/public/dialogs/media.php
index 5048d141..0c87faf5 100644
--- a/public/dialogs/media.php
+++ b/public/dialogs/media.php
@@ -1,26 +1,26 @@
- translate('Add Storage Media');?>
- translate('Settings');?>
+ Add Storage Media
+ Settings
-
-
+
+
diff --git a/public/dialogs/settings-getupdate.php b/public/dialogs/settings-getupdate.php
index 28f862fb..fa1b1816 100644
--- a/public/dialogs/settings-getupdate.php
+++ b/public/dialogs/settings-getupdate.php
@@ -1,10 +1,10 @@
- translate('Settings update');?>
+ Settings update
- Check for updates…
+ Check for updates…
-
-
+ Get updates" class="new button ok-but hidden">
+ Close" class="button red cancel-but" />
diff --git a/public/dialogs/src-get.php b/public/dialogs/src-get.php
index 1182c4c1..cdf247e7 100644
--- a/public/dialogs/src-get.php
+++ b/public/dialogs/src-get.php
@@ -1,39 +1,39 @@
- translate('Get Sources FreeBSD');?>
- translate('Get Version');?>
+ Get Sources FreeBSD
+ Get Version
-
-
+ Get" class="button ok-but" />
+ Cancel" class="button red cancel-but" />
-
translate(' Error! User not found!'); ?>
-
+
Error! User not found!
+
-
+ Go to the system" class="button ok-but" />
diff --git a/public/dialogs/tasklog.php b/public/dialogs/tasklog.php
index 52b79723..1744b87c 100644
--- a/public/dialogs/tasklog.php
+++ b/public/dialogs/tasklog.php
@@ -1,9 +1,9 @@
- translate('Task log');?>
+ Task log
- Task log here…
+ Task log here…
-
+ Close" class="button red cancel-but" />
diff --git a/public/dialogs/translate.php b/public/dialogs/translate.php
new file mode 100644
index 00000000..8b2bf49c
--- /dev/null
+++ b/public/dialogs/translate.php
@@ -0,0 +1,28 @@
+
+
+ Translate
+
+ Translate phrase
+
+
+
+ Вы можете поучаствовать в переводе интерфейса на свой язык.
+
+
+ Original phrase :
+
+
+
+ Translated phrase :
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/dialogs/users-new.php b/public/dialogs/users-new.php
index 47efaf19..14a3ebd7 100644
--- a/public/dialogs/users-new.php
+++ b/public/dialogs/users-new.php
@@ -1,57 +1,57 @@
- translate('Add new user');?>
- translate('Edit user info');?>
+ Add new user
+ Edit user info
- translate('User Settings');?>
+ User Settings
-
-
-
+ Add" class="new button ok-but" />
+ Save" class="edit button ok-but" />
+ Cancel" class="button red cancel-but" />
\ No newline at end of file
diff --git a/public/dialogs/vm_packages-new.php b/public/dialogs/vm_packages-new.php
index a98830aa..2b0641c4 100644
--- a/public/dialogs/vm_packages-new.php
+++ b/public/dialogs/vm_packages-new.php
@@ -1,36 +1,36 @@
- translate('Add new template');?>
- translate('Edit template');?>
+ Add new template
+ Edit template
- translate('Template Settings');?>
+ Template Settings
-
-
-
+ Add" class="new button ok-but" />
+ Save" class="edit button ok-but" />
+ Cancel" class="button red cancel-but" />
\ No newline at end of file
diff --git a/public/dialogs/vnc-bhyve.php b/public/dialogs/vnc-bhyve.php
index b7f45563..03f5df69 100644
--- a/public/dialogs/vnc-bhyve.php
+++ b/public/dialogs/vnc-bhyve.php
@@ -10,8 +10,8 @@
- translate('Please, wait for initialize Virtual Machine');?>
- translate('You can click here, or wait');?>: translate('some time');?>
+ Please, wait for initialize Virtual Machine
+ You can click here, or wait : some time
diff --git a/public/dialogs/vpnet.php b/public/dialogs/vpnet.php
index c92d1851..b2899de1 100644
--- a/public/dialogs/vpnet.php
+++ b/public/dialogs/vpnet.php
@@ -1,26 +1,26 @@
- translate('Create Network');?>
- translate('Settings');?>
+ Create Network
+ Settings
-
-
+ Create" class="button ok-but" />
+ Cancel" class="button red cancel-but" />
diff --git a/public/index.php b/public/index.php
index f98d2650..846f1a48 100644
--- a/public/index.php
+++ b/public/index.php
@@ -12,6 +12,7 @@ require_once($_real_path.'/php/menu.php');
$chunks=Utils::gen_uri_chunks($uri);
$clonos=new ClonOS($_real_path, $chunks);
$locale = new Localization($_real_path.'/public/'); # /usr/home/web/cp/clonos/public/
+$translate=new Translate($locale,$_real_path);
$menu=new Menu($locale, $chunks, $_real_path.'/public/pages/');
if(isset($_GET['upload'])){
@@ -32,7 +33,8 @@ $root=trim($_SERVER['DOCUMENT_ROOT'], $_ds);
if(!empty($chunks)) $uri=$chunks[0];
$file_path=$_ds.$root.$_ds.'pages'.$_ds.$uri.$_ds;
-$file_name=$file_path.$lang.'.index.php';
+//$file_name=$file_path.$lang.'.index.php';
+$file_name='index.php';
$json_name=$file_path.'a.json.php';
if(empty($uri)){
@@ -127,8 +129,11 @@ foreach(Config::$languages as $lng=>$lngname){
translate('pages',$chunks[0],'index.php');
+$incfile=$translate->get_translated_filename();
+if(file_exists($incfile)){ //$file_name
+ include($incfile); //$file_name
} else {
echo '
'.$locale->translate('Not implemented yet').'! ';
}
@@ -158,6 +163,7 @@ $clonos->placeDialogs();
+placeDialogByName('translate'); ?>
@@ -174,6 +180,8 @@ echo $menu->html;
-placeDialogByName('system-login'); ?>
+
+ placeDialogByName('system-login'); ?>
ClonOS — is a powerfull system for…
Cloud computing, Lightweight containerization, Virtualization, etc…
diff --git a/public/js/clonos.js b/public/js/clonos.js
index 1fd83b37..2911f65e 100644
--- a/public/js/clonos.js
+++ b/public/js/clonos.js
@@ -57,7 +57,9 @@ var clonos={
$('ul.menu a[href="/'+p[1]+'/"]').addClass('sel');
if(isset(page_titles))
{
- $('div.header #title').html(page_titles[p[1]]);
+ var title=page_titles[p[1]];
+ $('div.header #title').html(title);
+ $('title').html('ClonOS — ' + title);
}
},
route:function(args)
@@ -78,10 +80,18 @@ var clonos={
}
this.loadData('getJsonPage',$.proxy(this.onLoadData,this));
},
+ onBackHistory:function(event)
+ {
+ if(!$('body').hasClass('translate'))
+ {
+ $('input#trlt-chk').prop('checked',false);
+ }
+ },
addEvents:function()
{
$(window).on('hashchange',$.proxy(this.onHashChange,this));
+ $(window).on('pageshow',$.proxy(this.onBackHistory,this));
$('#lng-sel').on('change',$.proxy(this.setLang,this)); //function(){document.cookie="lang="+$(this).val()+";path=/;";location.reload();});
$('#content').on('click',$.proxy(this.bodyClick,this));
$('#login').on('click',$.proxy(this.loginAction,this));
@@ -196,6 +206,63 @@ var clonos={
}
return phrase;
},
+ trltGo:function(id,el)
+ {
+ var lang=this.getLang();
+ var dlgname='';
+ if(lang=='en')
+ {
+ alert('There is no need to translate into English, since all the phrases of the project are written in it.\nPlease select the interface language you want to translate English phrases into.');
+ return;
+ }
+ if($('body').hasClass('translate'))
+ {
+ var type='system';
+ var dialog=$(el).parents('dialog');
+ if(dialog.length>0)
+ {
+ type='dialog';
+ dlgname=$(dialog).attr('id');
+ }else{
+ var pages=$(el).parents('div#ctop');
+ if(pages.length>0) type='pages';
+ }
+
+ var posts=$('form#transtlates').serializeArray();
+ posts.push({'name':'type','value':type});
+ posts.push({'name':'dialog','value':dlgname});
+ posts.push({'name':'phraseID','value':id});
+ this.loadData('trltGo',$.proxy(this.onTrltGo,this),posts);
+
+ this.dialogShow1('translates','new');
+ return;
+ }
+ },
+ trltOn:function()
+ {
+ if($('input#trlt-chk').is(':checked'))
+ $('body').addClass('translate');
+ else
+ $('body').removeClass('translate');
+ },
+ onTrltGo:function(data)
+ {
+ $('form#translate textarea#origPhrase').val(data.eng);
+ $('form#translate textarea#translPhrase').val(data.oth);
+ $('form#translate input#trlt-phID').val(data.phraseID);
+ $('form#translate input#trlt-type').val(data.type);
+ $('form#translate input#trlt-dlgname').val(data.dialog);
+ },
+ onTrltUpdate:function(data)
+ {
+ //debugger;
+ if(typeof data.error!='undefined' && !data.error)
+ {
+ $('body span#trlt-'+data.phraseID).html(data.phrase).css({backgroundColor: '#ffdddd'});
+ setTimeout(function(id){$('span#trlt-'+id).css({backgroundColor:''})},200,data.phraseID);
+ this.dialogClose('translates');
+ }
+ },
getTrIdsForCheck:function(table_id)
{
@@ -213,6 +280,10 @@ var clonos={
dialogOpen:function(event)
{
var tg=event.target;
+ if(tg.id.substr(0,5)=='trlt-')
+ {
+ tg=$(event.target).parent();
+ }
var cl=$(tg).attr('class');
var res=new RegExp(/id:([^ ]+)/);
if(res=cl.match(res))
@@ -352,22 +423,25 @@ var clonos={
if(!$(dialog).hasClass('fullscreen'))
this.dialogSetPosition(dialog);
},
- dialogClose:function()
+ dialogClose:function(dname)
{
var dialogs=$('dialog');
for(var n=0,nl=dialogs.length;n
0) $('form',dialog).get(0).reset(); // Очищаем форму, после нажатия на CANCEL
}
- $(dialog).css('display','none');
- if($('form',dialog).length>0) $('form',dialog).get(0).reset(); // Очищаем форму, после нажатия на CANCEL
}
},
dialogCloseByKey:function(event)
@@ -630,6 +704,14 @@ var clonos={
this.loadData(fmode,$.proxy(this.onK8sCreate,this),posts);
}
+ if(id=='translates')
+ {
+ var fmode='trltUpdate';
+ //var pr=$()
+ var posts=$('form#translate').serializeArray();
+ this.loadData(fmode,$.proxy(this.onTrltUpdate,this),posts);
+ }
+
}
},
fillFormDataOnChange:function(data)
@@ -1811,6 +1893,20 @@ var clonos={
//debugger;
if(!this.authorized) {location.reload();return;}
var target=event.target;
+ var elid=$(target).attr('id');
+ if(typeof elid=='undefined') elid=$(target)[0].id;
+
+ if(elid.substr(0,5)=='trlt-')
+ {
+ var trltId=elid.substr(5);
+ this.trltGo(trltId,target);
+ if($('body').hasClass('translate')) return false;
+ var target=$(target).parent();
+ elid=$(target)[0].id;
+ if(typeof elid=='undefined') elid=$(target).attr(id);
+ }
+
+
if($(target).parents('form').length>0)
{
var cl=$(target).attr('class');
@@ -1857,7 +1953,7 @@ var clonos={
return;
}
- var elid=$(target).attr('id');
+
/* ловим клики по выпадающему меню */
if(typeof elid!='undefined')
@@ -1872,6 +1968,7 @@ var clonos={
this.DDMenuSelect(elid);
return;break;
}
+
}
var outer=$(target).parents('.vnc-wait');
@@ -1926,7 +2023,8 @@ var clonos={
var opt='jail';
if(tblid=='bhyveslist') opt='bhyve';
- var cl=target.className;
+ var cl=$(target).attr('class');
+ if(typeof cl=='undefined') cl=$(target)[0].className;
switch(cl)
{
case 'icon-cancel':
@@ -3438,6 +3536,11 @@ var clonos={
document.cookie="lang="+lang+";path=/;";
location.reload();
},
+ getLang:function()
+ {
+ var lang=$('#lng-sel option[selected="selected"]').val();
+ return lang;
+ },
graphs:{},
createGraphs:function()
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/__init__.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/__init__.cpython-311.pyc
index 70205440..82fced26 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/__init__.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/__init__.cpython-311.pyc differ
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/__main__.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/__main__.cpython-311.pyc
index a41d8d9c..96b69d84 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/__main__.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/__main__.cpython-311.pyc differ
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/auth_plugins.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/auth_plugins.cpython-311.pyc
index c6b89b31..c13ebb70 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/auth_plugins.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/auth_plugins.cpython-311.pyc differ
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/websocket.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/websocket.cpython-311.pyc
index db0ca252..53356a85 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/websocket.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/websocket.cpython-311.pyc differ
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/websocketproxy.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/websocketproxy.cpython-311.pyc
index 2a25b6c4..1923ab8f 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/websocketproxy.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/websocketproxy.cpython-311.pyc differ
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/websocketserver.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/websocketserver.cpython-311.pyc
index 015b9dee..eb147355 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/websocketserver.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/websocketserver.cpython-311.pyc differ
diff --git a/public/novnc/utils/websockify/websockify/__pycache__/websockifyserver.cpython-311.pyc b/public/novnc/utils/websockify/websockify/__pycache__/websockifyserver.cpython-311.pyc
index 706c2571..27cb6658 100644
Binary files a/public/novnc/utils/websockify/websockify/__pycache__/websockifyserver.cpython-311.pyc and b/public/novnc/utils/websockify/websockify/__pycache__/websockifyserver.cpython-311.pyc differ
diff --git a/public/pages/authkey/en.index.php b/public/pages/authkey/back/--en.index.php
similarity index 100%
rename from public/pages/authkey/en.index.php
rename to public/pages/authkey/back/--en.index.php
diff --git a/public/pages/authkey/ru.index.php b/public/pages/authkey/back/--ru.index.php
similarity index 100%
rename from public/pages/authkey/ru.index.php
rename to public/pages/authkey/back/--ru.index.php
diff --git a/public/pages/authkey/back/1733533365.index.php b/public/pages/authkey/back/1733533365.index.php
new file mode 100644
index 00000000..d153e0d5
--- /dev/null
+++ b/public/pages/authkey/back/1733533365.index.php
@@ -0,0 +1,19 @@
+useDialogs(array(
+ 'authkey',
+));
+?>
+List of authorization keys
+
+
+
+
+ Name of key
+ Authkey body
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/authkey/back/1733684597.index.php b/public/pages/authkey/back/1733684597.index.php
new file mode 100644
index 00000000..f5463bee
--- /dev/null
+++ b/public/pages/authkey/back/1733684597.index.php
@@ -0,0 +1,19 @@
+useDialogs(array(
+ 'authkey',
+));
+?>
+List of authorization keys
+
+
+ Add new authkey
+
+
+
+
+ Name of key
+ Authkey body
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/authkey/index.php b/public/pages/authkey/index.php
new file mode 100644
index 00000000..fb6993bc
--- /dev/null
+++ b/public/pages/authkey/index.php
@@ -0,0 +1,19 @@
+useDialogs(array(
+ 'authkey',
+));
+?>
+List of authorization keys
+
+
+ Add new authkey
+
+
+
+
+ Name of key
+ Authkey body
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/bases/en.index.php b/public/pages/bases/back/--en.index.php
similarity index 100%
rename from public/pages/bases/en.index.php
rename to public/pages/bases/back/--en.index.php
diff --git a/public/pages/bases/ru.index.php b/public/pages/bases/back/--ru.index.php
similarity index 100%
rename from public/pages/bases/ru.index.php
rename to public/pages/bases/back/--ru.index.php
diff --git a/public/pages/bases/back/1733533888.index.php b/public/pages/bases/back/1733533888.index.php
new file mode 100644
index 00000000..ea25c62a
--- /dev/null
+++ b/public/pages/bases/back/1733533888.index.php
@@ -0,0 +1,28 @@
+useDialogs(array(
+ 'bases',
+ 'bases-repo',
+));
+?>
+FreeBSD bases:
+
+Build from source code
+ Fetch from repository
+
+
+
+
+ Node name
+ Name
+ Platform
+ Arch
+ TargetArch
+ Ver
+ Elf
+ Action
+ Action
+
+
+
+
+
diff --git a/public/pages/bases/index.php b/public/pages/bases/index.php
new file mode 100644
index 00000000..b723e977
--- /dev/null
+++ b/public/pages/bases/index.php
@@ -0,0 +1,28 @@
+useDialogs(array(
+ 'bases',
+ 'bases-repo',
+));
+?>
+FreeBSD bases:
+
+Build from source code
+ Fetch from repository
+
+
+
+
+ Node name
+ Name
+ Platform
+ Arch
+ TargetArch
+ Ver
+ Elf
+ Action
+ Action
+
+
+
+
+
diff --git a/public/pages/bhyvevms/en.index.php b/public/pages/bhyvevms/back/--en.index.php
similarity index 100%
rename from public/pages/bhyvevms/en.index.php
rename to public/pages/bhyvevms/back/--en.index.php
diff --git a/public/pages/bhyvevms/ru.index.php b/public/pages/bhyvevms/back/--ru.index.php
similarity index 100%
rename from public/pages/bhyvevms/ru.index.php
rename to public/pages/bhyvevms/back/--ru.index.php
diff --git a/public/pages/bhyvevms/back/_back.1733530658.index.php b/public/pages/bhyvevms/back/_back.1733530658.index.php
new file mode 100644
index 00000000..25f7d731
--- /dev/null
+++ b/public/pages/bhyvevms/back/_back.1733530658.index.php
@@ -0,0 +1,32 @@
+useDialogs(array(
+ 'vnc-bhyve',
+ 'bhyve-new',
+ 'bhyve-obtain',
+ 'bhyve-clone',
+ 'bhyve-rename',
+ 'jail-settings-config-menu',
+));
+?>
+Bhyve VMs
+
+
+ Create from ISO
+ Cloud images
+
+
+
+
+ Node name
+ VM
+ Usage
+ RAM
+ CPU
+ OS type
+ Status
+ Action
+ VNC
+ VNC port
+
+
+
diff --git a/public/pages/bhyvevms/index.php b/public/pages/bhyvevms/index.php
new file mode 100644
index 00000000..38b0d8cf
--- /dev/null
+++ b/public/pages/bhyvevms/index.php
@@ -0,0 +1,32 @@
+useDialogs(array(
+ 'vnc-bhyve',
+ 'bhyve-new',
+ 'bhyve-obtain',
+ 'bhyve-clone',
+ 'bhyve-rename',
+ 'jail-settings-config-menu',
+));
+?>
+Bhyve VMs
+
+
+ Create from ISO
+ Cloud images
+
+
+
+
+ Node name
+ VM
+ Usage
+ RAM
+ CPU
+ OS type
+ Status
+ Action
+ VNC
+ VNC port
+
+
+
diff --git a/public/pages/imported/en.index.php b/public/pages/imported/back/--en.index.php
similarity index 100%
rename from public/pages/imported/en.index.php
rename to public/pages/imported/back/--en.index.php
diff --git a/public/pages/imported/ru.index.php b/public/pages/imported/back/--ru.index.php
similarity index 100%
rename from public/pages/imported/ru.index.php
rename to public/pages/imported/back/--ru.index.php
diff --git a/public/pages/imported/back/_back.1733533778.index.php b/public/pages/imported/back/_back.1733533778.index.php
new file mode 100644
index 00000000..8407f367
--- /dev/null
+++ b/public/pages/imported/back/_back.1733533778.index.php
@@ -0,0 +1,21 @@
+useDialogs(array(
+ 'jail-import',
+ 'image-import',
+// 'jail-settings-config-menu',
+));
+?>
+Imported images:
+
+Import
+
+
+
+ Image name
+ Size
+ Type
+ Status
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/imported/index.php b/public/pages/imported/index.php
new file mode 100644
index 00000000..bca7f1c6
--- /dev/null
+++ b/public/pages/imported/index.php
@@ -0,0 +1,21 @@
+useDialogs(array(
+ 'jail-import',
+ 'image-import',
+// 'jail-settings-config-menu',
+));
+?>
+Imported images:
+
+Import
+
+
+
+ Image name
+ Size
+ Type
+ Status
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/instance_jail/en.index.php b/public/pages/instance_jail/back/--en.index.php
similarity index 100%
rename from public/pages/instance_jail/en.index.php
rename to public/pages/instance_jail/back/--en.index.php
diff --git a/public/pages/instance_jail/ru.index.php b/public/pages/instance_jail/back/--ru.index.php
similarity index 100%
rename from public/pages/instance_jail/ru.index.php
rename to public/pages/instance_jail/back/--ru.index.php
diff --git a/public/pages/instance_jail/back/_back.1733530350.index.php b/public/pages/instance_jail/back/_back.1733530350.index.php
new file mode 100644
index 00000000..ce1f9d1b
--- /dev/null
+++ b/public/pages/instance_jail/back/_back.1733530350.index.php
@@ -0,0 +1,23 @@
+useDialogs(array(
+
+));
+?>
+
+
Template for instances:
+
+
+
+
+
+
+ Logo
+ Name
+ Desc
+
+
+
+
+
+
+
diff --git a/public/pages/instance_jail/index.php b/public/pages/instance_jail/index.php
new file mode 100644
index 00000000..36975b90
--- /dev/null
+++ b/public/pages/instance_jail/index.php
@@ -0,0 +1,23 @@
+useDialogs(array(
+
+));
+?>
+
+
Template for instances:
+
+
+
+
+
+
+ Logo
+ Name
+ Desc
+
+
+
+
+
+
+
diff --git a/public/pages/jailscontainers/en.index.php b/public/pages/jailscontainers/back/--en.index.php
similarity index 100%
rename from public/pages/jailscontainers/en.index.php
rename to public/pages/jailscontainers/back/--en.index.php
diff --git a/public/pages/jailscontainers/back/--orig.index.php b/public/pages/jailscontainers/back/--orig.index.php
new file mode 100644
index 00000000..b524211c
--- /dev/null
+++ b/public/pages/jailscontainers/back/--orig.index.php
@@ -0,0 +1,36 @@
+uri_chunks[1])){
+ include('helpers.php');
+ return;
+}
+
+$clonos->useDialogs([
+ 'vnc',
+ 'jail-settings',
+ 'jail-settings-config-menu',
+ 'jail-import',
+ 'jail-clone',
+ 'jail-rename',
+]);
+
+?>
+Jail containers:
+
+Create jail
+Import
+
+
+
+
+ Node name
+ Jail
+ Usage
+ IP address
+ Status
+ Action
+ VNC
+ Port
+
+
+
+
diff --git a/public/pages/jailscontainers/ru.index.php b/public/pages/jailscontainers/back/--ru.index.php
similarity index 100%
rename from public/pages/jailscontainers/ru.index.php
rename to public/pages/jailscontainers/back/--ru.index.php
diff --git a/public/pages/jailscontainers/back/1733528548.index.php b/public/pages/jailscontainers/back/1733528548.index.php
new file mode 100644
index 00000000..b524211c
--- /dev/null
+++ b/public/pages/jailscontainers/back/1733528548.index.php
@@ -0,0 +1,36 @@
+uri_chunks[1])){
+ include('helpers.php');
+ return;
+}
+
+$clonos->useDialogs([
+ 'vnc',
+ 'jail-settings',
+ 'jail-settings-config-menu',
+ 'jail-import',
+ 'jail-clone',
+ 'jail-rename',
+]);
+
+?>
+Jail containers:
+
+Create jail
+Import
+
+
+
+
+ Node name
+ Jail
+ Usage
+ IP address
+ Status
+ Action
+ VNC
+ Port
+
+
+
+
diff --git a/public/pages/jailscontainers/index.php b/public/pages/jailscontainers/index.php
index b524211c..25df28cb 100644
--- a/public/pages/jailscontainers/index.php
+++ b/public/pages/jailscontainers/index.php
@@ -14,22 +14,22 @@ $clonos->useDialogs([
]);
?>
-Jail containers:
+Jail containers:
-Create jail
-Import
+Create jail
+Import
- Node name
- Jail
- Usage
- IP address
- Status
- Action
- VNC
- Port
+ Node name
+ Jail
+ Usage
+ IP address
+ Status
+ Action
+ VNC
+ Port
diff --git a/public/pages/k8s/en.index.php b/public/pages/k8s/back/--en.index.php
similarity index 100%
rename from public/pages/k8s/en.index.php
rename to public/pages/k8s/back/--en.index.php
diff --git a/public/pages/k8s/ru.index.php b/public/pages/k8s/back/--ru.index.php
similarity index 100%
rename from public/pages/k8s/ru.index.php
rename to public/pages/k8s/back/--ru.index.php
diff --git a/public/pages/k8s/back/1733532898.index.php b/public/pages/k8s/back/1733532898.index.php
new file mode 100644
index 00000000..74ef62ec
--- /dev/null
+++ b/public/pages/k8s/back/1733532898.index.php
@@ -0,0 +1,19 @@
+useDialogs(['k8s-new']);
+?>
+K8S Сlusters:
+Create Kubernetes
+
+
+
+
+ Cluster ID
+ Cluster Name
+ Masters Count
+ Workers Count
+ VM list
+ Actions
+
+
+
+
diff --git a/public/pages/k8s/index.php b/public/pages/k8s/index.php
new file mode 100644
index 00000000..d0e10432
--- /dev/null
+++ b/public/pages/k8s/index.php
@@ -0,0 +1,19 @@
+useDialogs(['k8s-new']);
+?>
+K8S Сlusters:
+Create Kubernetes
+
+
+
+
+ Cluster ID
+ Cluster Name
+ Masters Count
+ Workers Count
+ VM list
+ Actions
+
+
+
+
diff --git a/public/pages/media/en.index.php b/public/pages/media/back/--en.index.php
similarity index 100%
rename from public/pages/media/en.index.php
rename to public/pages/media/back/--en.index.php
diff --git a/public/pages/media/ru.index.php b/public/pages/media/back/--ru.index.php
similarity index 100%
rename from public/pages/media/ru.index.php
rename to public/pages/media/back/--ru.index.php
diff --git a/public/pages/media/back/1733533655.index.php b/public/pages/media/back/1733533655.index.php
new file mode 100644
index 00000000..644ec4f4
--- /dev/null
+++ b/public/pages/media/back/1733533655.index.php
@@ -0,0 +1,24 @@
+useDialogs(array(
+ //$section_name,
+ 'media-upload',
+));
+?>
+Virtual media list
+
+
+
+ Upload ISO
+
+
+
+
+ Name of the disk
+ Path
+ VM
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/media/index.php b/public/pages/media/index.php
new file mode 100644
index 00000000..eac7177c
--- /dev/null
+++ b/public/pages/media/index.php
@@ -0,0 +1,24 @@
+useDialogs(array(
+ //$section_name,
+ 'media-upload',
+));
+?>
+Virtual media list
+
+
+
+ Upload ISO
+
+
+
+
+ Name of the disk
+ Path
+ VM
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/overview/_translate.cache/ru.index.php b/public/pages/overview/_translate.cache/ru.index.php
index ba6b4091..200370c3 100644
--- a/public/pages/overview/_translate.cache/ru.index.php
+++ b/public/pages/overview/_translate.cache/ru.index.php
@@ -1,42 +1,42 @@
-
Общая статистика облака:
+
Общая статистика облака:
- Параметр Values
+ Параметр Значение
- Количество нод:
- Online nodes:
- Offline nodes:
- Num of jails:
- Num of cores:
- Average freq. Mhz:
- Summary RAM:
- Summary storage size:
+ Количество нод:
+ Нод онлайн:
+ Нод офлайн:
+ Количество клеток:
+ Количество ядер:
+ Средняя частота, Mhz:
+ Всего RAM:
+ Объём хранилища:
- Unable to fetch net info!
+ Unable to fetch net info!
-
Current node CPU usage:
+
Загрузка процессоров в кластере:
-
Current node RAM usage:
+
Использование памяти в кластере:
-It is an open source and free product which powered by other project (major importance list):
+Это открытый и свободный проект, использующий в своей работе такие проекты, как (наиболее значимые):
diff --git a/public/pages/overview/ru.index.php b/public/pages/overview/back/--ru.index.php
similarity index 100%
rename from public/pages/overview/ru.index.php
rename to public/pages/overview/back/--ru.index.php
diff --git a/public/pages/overview/back/index.php b/public/pages/overview/back/index.php
new file mode 100644
index 00000000..6f8fb476
--- /dev/null
+++ b/public/pages/overview/back/index.php
@@ -0,0 +1,46 @@
+
+
+
Summary statistics for cloud:
+
+
+
+ Param Values
+
+
+
+ Num of nodes:
+ Online nodes:
+ Offline nodes:
+ Num of jails:
+ Num of cores:
+ Average freq. Mhz:
+ Summary RAM:
+ Summary storage size:
+
+
+ Unable to fetch net info!
+
+
+
+
+
Current node CPU usage:
+
+
+
Current node RAM usage:
+
+
+
+
+It is an open source and free product which powered by other project (major importance list):
+
+
+
diff --git a/public/pages/overview/index.php b/public/pages/overview/index.php
index 5de841bf..e4e0106d 100644
--- a/public/pages/overview/index.php
+++ b/public/pages/overview/index.php
@@ -1,42 +1,42 @@
-
Summary statistics for cloud:
+
Summary statistics for cloud:
- Param Values
+ Param Values
- Num of nodes:
- Online nodes:
- Offline nodes:
- Num of jails:
- Num of cores:
- Average freq. Mhz:
- Summary RAM:
- Summary storage size:
+ Num of nodes:
+ Online nodes:
+ Offline nodes:
+ Num of jails:
+ Num of cores:
+ Average freq. Mhz:
+ Summary RAM:
+ Summary storage size:
- Unable to fetch net info!
+ Unable to fetch net info!
-
Current node CPU usage:
+
Current node CPU usage:
-
Current node RAM usage:
+
Current node RAM usage:
-It is an open source and free product which powered by other project (major importance list):
+It is an open source and free product which powered by other project (major importance list):
diff --git a/public/pages/ru.index.php b/public/pages/ru.index.php
deleted file mode 100644
index 02279b73..00000000
--- a/public/pages/ru.index.php
+++ /dev/null
@@ -1 +0,0 @@
-RU
\ No newline at end of file
diff --git a/public/pages/settings/en.index.php b/public/pages/settings/back/--en.index.php
similarity index 100%
rename from public/pages/settings/en.index.php
rename to public/pages/settings/back/--en.index.php
diff --git a/public/pages/settings/ru.index.php b/public/pages/settings/back/--ru.index.php
similarity index 100%
rename from public/pages/settings/ru.index.php
rename to public/pages/settings/back/--ru.index.php
diff --git a/public/pages/settings/back/1733606162.index.php b/public/pages/settings/back/1733606162.index.php
new file mode 100644
index 00000000..ff77a258
--- /dev/null
+++ b/public/pages/settings/back/1733606162.index.php
@@ -0,0 +1,19 @@
+useDialogs(['settings-getupdate']);
+?>
+
+Settings
+Check for updates
+ Upgrade
+
+
+
+
+
+ Component
+ Version
+ Available
+
+
+
+
diff --git a/public/pages/settings/index.php b/public/pages/settings/index.php
new file mode 100644
index 00000000..2154ad63
--- /dev/null
+++ b/public/pages/settings/index.php
@@ -0,0 +1,19 @@
+useDialogs(['settings-getupdate']);
+?>
+
+Settings
+Check for updates
+ Upgrade
+
+
+
+
+
+ Component
+ Version
+ Available
+
+
+
+
diff --git a/public/pages/sources/en.index.php b/public/pages/sources/back/--en.index.php
similarity index 100%
rename from public/pages/sources/en.index.php
rename to public/pages/sources/back/--en.index.php
diff --git a/public/pages/sources/ru.index.php b/public/pages/sources/back/--ru.index.php
similarity index 100%
rename from public/pages/sources/ru.index.php
rename to public/pages/sources/back/--ru.index.php
diff --git a/public/pages/sources/back/1733534093.index.php b/public/pages/sources/back/1733534093.index.php
new file mode 100644
index 00000000..865d8c3b
--- /dev/null
+++ b/public/pages/sources/back/1733534093.index.php
@@ -0,0 +1,24 @@
+useDialogs(array(
+ 'src-get',
+// 'jail-settings',
+// 'jail-settings-config-menu',
+));
+?>
+FreeBSD source codes:
+
+Get version
+
+
+
+
+ Node name
+ Ver
+ Rev
+ Update date
+ Action
+ Status
+
+
+
+
\ No newline at end of file
diff --git a/public/pages/sources/index.php b/public/pages/sources/index.php
new file mode 100644
index 00000000..6828a95e
--- /dev/null
+++ b/public/pages/sources/index.php
@@ -0,0 +1,24 @@
+useDialogs(array(
+ 'src-get',
+// 'jail-settings',
+// 'jail-settings-config-menu',
+));
+?>
+FreeBSD source codes:
+
+Get version
+
+
+
+
+ Node name
+ Ver
+ Rev
+ Update date
+ Action
+ Status
+
+
+
+
\ No newline at end of file
diff --git a/public/pages/sqlite/en.index.php b/public/pages/sqlite/back/--en.index.php
similarity index 100%
rename from public/pages/sqlite/en.index.php
rename to public/pages/sqlite/back/--en.index.php
diff --git a/public/pages/sqlite/ru.index.php b/public/pages/sqlite/back/--ru.index.php
similarity index 100%
rename from public/pages/sqlite/ru.index.php
rename to public/pages/sqlite/back/--ru.index.php
diff --git a/public/pages/sqlite/back/1733534294.index.php b/public/pages/sqlite/back/1733534294.index.php
new file mode 100644
index 00000000..09636fa4
--- /dev/null
+++ b/public/pages/sqlite/back/1733534294.index.php
@@ -0,0 +1,3 @@
+SQLite admin interface
+
+Open SQLite Admin interface
\ No newline at end of file
diff --git a/public/pages/sqlite/index.php b/public/pages/sqlite/index.php
new file mode 100644
index 00000000..8e665ce3
--- /dev/null
+++ b/public/pages/sqlite/index.php
@@ -0,0 +1,3 @@
+SQLite admin interface
+
+Open SQLite Admin interface
\ No newline at end of file
diff --git a/public/pages/tasklog/en.index.php b/public/pages/tasklog/back/--en.index.php
similarity index 100%
rename from public/pages/tasklog/en.index.php
rename to public/pages/tasklog/back/--en.index.php
diff --git a/public/pages/tasklog/ru.index.php b/public/pages/tasklog/back/--ru.index.php
similarity index 100%
rename from public/pages/tasklog/ru.index.php
rename to public/pages/tasklog/back/--ru.index.php
diff --git a/public/pages/tasklog/back/1733534224.index.php b/public/pages/tasklog/back/1733534224.index.php
new file mode 100644
index 00000000..05fce70a
--- /dev/null
+++ b/public/pages/tasklog/back/1733534224.index.php
@@ -0,0 +1,22 @@
+useDialogs(array(
+ 'tasklog',
+));
+?>
+Task logs
+
+Flush log
+
+
+
+ Task ID
+ Log file
+ CMD
+ Start time
+ End time
+ Status
+ Error code
+ Log size
+
+
+
\ No newline at end of file
diff --git a/public/pages/tasklog/index.php b/public/pages/tasklog/index.php
new file mode 100644
index 00000000..8f074791
--- /dev/null
+++ b/public/pages/tasklog/index.php
@@ -0,0 +1,22 @@
+useDialogs(array(
+ 'tasklog',
+));
+?>
+Task logs
+
+Flush log
+
+
+
+ Task ID
+ Log file
+ CMD
+ Start time
+ End time
+ Status
+ Error code
+ Log size
+
+
+
\ No newline at end of file
diff --git a/public/pages/users/en.index.php b/public/pages/users/back/--en.index.php
similarity index 100%
rename from public/pages/users/en.index.php
rename to public/pages/users/back/--en.index.php
diff --git a/public/pages/users/ru.index.php b/public/pages/users/back/--ru.index.php
similarity index 100%
rename from public/pages/users/ru.index.php
rename to public/pages/users/back/--ru.index.php
diff --git a/public/pages/users/back/1733606507.index.php b/public/pages/users/back/1733606507.index.php
new file mode 100644
index 00000000..b83987f7
--- /dev/null
+++ b/public/pages/users/back/1733606507.index.php
@@ -0,0 +1,21 @@
+useDialogs(['users-new']);
+?>
+
+User management
+Add users
+
+
+
+
+ Login
+ First Name
+ Last Name
+ Registration
+ Last login
+ Active
+ Action
+
+
+
+
\ No newline at end of file
diff --git a/public/pages/users/index.php b/public/pages/users/index.php
new file mode 100644
index 00000000..881191f5
--- /dev/null
+++ b/public/pages/users/index.php
@@ -0,0 +1,21 @@
+useDialogs(['users-new']);
+?>
+
+User management
+Add users
+
+
+
+
+ Login
+ First Name
+ Last Name
+ Registration
+ Last login
+ Active
+ Action
+
+
+
+
\ No newline at end of file
diff --git a/public/pages/vm_packages/en.index.php b/public/pages/vm_packages/back/--en.index.php
similarity index 100%
rename from public/pages/vm_packages/en.index.php
rename to public/pages/vm_packages/back/--en.index.php
diff --git a/public/pages/vm_packages/ru.index.php b/public/pages/vm_packages/back/--ru.index.php
similarity index 100%
rename from public/pages/vm_packages/ru.index.php
rename to public/pages/vm_packages/back/--ru.index.php
diff --git a/public/pages/vm_packages/back/1733532527.index.php b/public/pages/vm_packages/back/1733532527.index.php
new file mode 100644
index 00000000..720011d8
--- /dev/null
+++ b/public/pages/vm_packages/back/1733532527.index.php
@@ -0,0 +1,23 @@
+useDialogs(array(
+ 'vm_packages-new',
+));
+?>
+
+VM Packages
+Add package
+
+
+
+
+ Package name
+ Description
+ RAM
+ Disk size
+ vCPU
+ Modified by
+ Action
+
+
+
+
diff --git a/public/pages/vm_packages/index.php b/public/pages/vm_packages/index.php
new file mode 100644
index 00000000..20e13c11
--- /dev/null
+++ b/public/pages/vm_packages/index.php
@@ -0,0 +1,23 @@
+useDialogs(array(
+ 'vm_packages-new',
+));
+?>
+
+VM Packages
+Add package
+
+
+
+
+ Package name
+ Description
+ RAM
+ Disk size
+ vCPU
+ Modified by
+ Action
+
+
+
+
diff --git a/public/pages/vpnet/en.index.php b/public/pages/vpnet/back/--en.index.php
similarity index 100%
rename from public/pages/vpnet/en.index.php
rename to public/pages/vpnet/back/--en.index.php
diff --git a/public/pages/vpnet/ru.index.php b/public/pages/vpnet/back/--ru.index.php
similarity index 100%
rename from public/pages/vpnet/ru.index.php
rename to public/pages/vpnet/back/--ru.index.php
diff --git a/public/pages/vpnet/back/1733533116.index.php b/public/pages/vpnet/back/1733533116.index.php
new file mode 100644
index 00000000..7a3c399b
--- /dev/null
+++ b/public/pages/vpnet/back/1733533116.index.php
@@ -0,0 +1,17 @@
+useDialogs(['vpnet']);
+?>
+Subnet list
+
+
+ Add subnet
+
+
+
+
+ Name of subnet
+ Subnet
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/pages/vpnet/index.php b/public/pages/vpnet/index.php
new file mode 100644
index 00000000..e4e8ca66
--- /dev/null
+++ b/public/pages/vpnet/index.php
@@ -0,0 +1,17 @@
+useDialogs(['vpnet']);
+?>
+Subnet list
+
+
+ Add subnet
+
+
+
+
+ Name of subnet
+ Subnet
+ Action
+
+
+
\ No newline at end of file
diff --git a/public/upload.php b/public/upload.php
index 6525f8f3..e27a8524 100644
--- a/public/upload.php
+++ b/public/upload.php
@@ -28,7 +28,7 @@ if($_SERVER['REQUEST_METHOD'] === 'POST'){
!isset($_FILES['file']['error']) ||
is_array($_FILES['file']['error'])
) {
- echo json_encode(array('status' => 'Upload Fail: An error occurred!';));
+ echo json_encode(array('status' => 'Upload Fail: An error occurred!'));
exit;
}