add lenoblast in group 44

This commit is contained in:
arlemp@selectel.ru
2025-06-30 16:56:04 +03:00
parent 2f5927cce0
commit 3cd1a2b6f7
5 changed files with 46 additions and 25 deletions

View File

@@ -6,6 +6,7 @@
"Пользователи": "users",
"Группы":"groupuser",
"Авторы":"authors",
"Персоны":"persons",
"Контроль":"control"
},

View File

@@ -1,5 +1,6 @@
{
"Контент": {
"Новости Cпб": "anonline_spb_plus"
"Новости Cпб": "anonline_spb_plus",
"Ленобласть": "anonline_lenobl"
}
}

View File

@@ -378,6 +378,22 @@
</view>
<filter>False</filter>
</item>
<item>
<column>person_id</column>
<title>Персона</title>
<type>lookup</type>
<lookup>
<table>persons</table>
<id>person_id</id>
<column>personname</column>
<order>personname</order>
</lookup>
<view>
<table>False</table>
<form>True</form>
</view>
<filter>False</filter>
</item>
<item>
<column>date_insert</column>
<title>Дата / Время</title>

View File

@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF8"?>
<?xml version="1.0" encoding="UTF-8"?>
<items>
<main>
<table>persons</table>
<increment>person_id</increment>
<title>Контент. Герои пресс-конференций</title>
<order>personname</order>
<title>Контент. Персоны</title>
</main>
<item>
<column>person_id</column>
@@ -13,52 +14,51 @@
<table>True</table>
<form>False</form>
</view>
<hint>Порядковый номер новости</hint>
</item>
<item>
<column>personname</column>
<title>Имя</title>
<col>100</col>
<type>text</type>
<col>120</col>
<view>
<table>True</table>
<form>True</form>
</view>
<maxsize>75</maxsize>
<hint>Заголовок</hint>
</item>
<item>
<column>persondescript</column>
<title>Описание</title>
<column>personslug</column>
<title>slug</title>
<type>text</type>
<col>120</col>
<view>
<table>False</table>
<form>True</form>
</view>
<hint>Заголовок</hint>
</item>
<item>
<column>personbio</column>
<title>Досье</title>
<title>Био</title>
<type>textarea</type>
<row>20</row>
<col>120</col>
<col>100</col>
<row>10</row>
<maxsize>15000</maxsize>
<view>
<table>False</table>
<form>True</form>
</view>
<maxsize>75</maxsize>
<hint>Заголовок</hint>
<typograf>1</typograf>
</item>
<item>
<column>personphoto</column>
<title>Фото</title>
<type>file</type>
<dateversion>True</dateversion>
<view>
<table>False</table>
<table>True</table>
<form>True</form>
</view>
<type>file</type>
<folder>pub/images/persons</folder>
</item>
</items>

View File

@@ -33,6 +33,8 @@ function copy_sql( $sql ){
function history_db( $table, $data, $conn = '' ){
return false;
end($data); // Перемещаем указатель массива на последний элемент
$inc = key($data); // Получаем ключ последнего элемента
$inc_value = current($data); // Получаем значение последнего элемента
@@ -2191,18 +2193,18 @@ $order = (isset($_GET['order'])) ? strip_tags(trim($_GET['order'])) : '';
//$actupdate = 'UPDATE '.$maintable.' SET '.$actupdate.' WHERE '.separ($increment).' = '."'".$increment_value."'".' AND '.separ($item[$i]->fieldate).' = '.quote('0000-00-00 00:00:00').' OR '.separ($item[$i]->fieldate).' IS NULL';
$actupdate = 'UPDATE '.$maintable.' SET '.$actupdate.' WHERE '.separ($increment).' = '."'".$increment_value."'".' AND '.separ($item[$i]->fieldate).' IS NULL';
mysqli_query($this->link, $actupdate) or write_log('Ошибка mysqli: '.mysqli_error().' SQL:'.$actupdate);
db_get( $actupdate, 'db2'); //временно вместо history db
//db_get( $actupdate, 'db2'); //временно вместо history db
# дата
$actupdate = 'UPDATE '.$maintable.' SET '.$actupdate.' WHERE '.separ($increment).' = '."'".$increment_value."'".' AND '.separ($item[$i]->fieldate).'='.quote('0000-00-00 00:00:00');
mysqli_query($this->link, $actupdate) or write_log('Ошибка mysqli: '.mysqli_error().' SQL:'.$actupdate);
db_get( $actupdate, 'db2'); //временно вместо history db
//db_get( $actupdate, 'db2'); //временно вместо history db
# user activate
if (isset($item[$i]->curruser)) {
$usersql = 'UPDATE '.$maintable.' SET '.separ($item[$i]->curruser).'='.$this->userid.' WHERE '.separ($increment).' = '."'".$increment_value."'";
mysqli_query($this->link, $usersql) or write_log('Ошибка mysqli: '.mysqli_error().' SQL:'.$usersql);
db_get( $usersql, 'db2'); //временно вместо history db
//db_get( $usersql, 'db2'); //временно вместо history db
}
}
}
@@ -2285,7 +2287,8 @@ $order = (isset($_GET['order'])) ? strip_tags(trim($_GET['order'])) : '';
if (!$upd_result) {
write_log('Ошибка mysqli: '.mysqli_error().' SQL:'.$upd_sql);
} else {
db_get( $upd_sql, 'db2'); //временно вместо history db
//db_get( $upd_sql, 'db2'); //временно вместо history db
$t = 1;
}
}
}
@@ -2318,7 +2321,7 @@ $order = (isset($_GET['order'])) ? strip_tags(trim($_GET['order'])) : '';
if (copy($_FILES[$column]["tmp_name"], $newfilename)){
$sql_add_file = 'UPDATE '.$maintable.' SET '.$column.' = '."'".$newfname."'".' WHERE '.$increment.' = '.$inc_indx;
$file_update = mysqli_query($this->link, 'UPDATE '.$maintable.' SET '.$column.' = '."'".$newfname."'".' WHERE '.$increment.' = '.$inc_indx);
db_get( $sql_add_file, 'db2'); //временно вместо history db
//db_get( $sql_add_file, 'db2'); //временно вместо history db
}
else
echo 'не удалось скопировать '.$newfilename;