AddDefaultCharset UTF-8
<IfModule mod_charset.c>
CharsetSourceEnc utf-8
CharsetDefault utf-8
</IfModule>
Options All -Indexes
SetEnvIfNoCase User-Agent ".*bingbot" badbingbot
Deny from env=badbingbot
#order deny,allow
#deny from all
#allow from 37.54.132.147
#allow from 188.163.0.121
#allow from 83.217.8.21
#allow from 185.173.178.159
php_flag engine 1
#AuthType Basic
#AuthName "Защищенная зона Астерии (Не только .htaccess)"
#AuthUserFile /var/www/dwarbest887/data/www/dwar2.xyz/admin/.htpasswd
#require valid-user
php_value display_errors 1
php_value display_startup_errors 1
php_value error_reporting E_ALL
<Files "*.inc">
Deny from all
</Files>
<Files "*.lib">
Deny from all
</Files>
<Files "*.log">
Deny from all
</Files>
<Files .htpasswd>
deny from all
</Files>
<Files "*.admin">
deny from all
</Files>
<Files "*.lua">
deny from all
</Files>
#Включаем отслеживание сим-ссылок
#Options +FollowSymLinks
#Запускаем url_rewriting
#RewriteEngine On
#Блокируем все ссылки, содержащие <script>
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#Блокируем все скрипты, которые пытаются изменить переменные PHP Globals:
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#Блокируем все скрипты, которые пытаются изменить переменную _REQUEST:
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
#Перенаправляем все подобные на главную страницу
RewriteRule ^(.*)$ / [F,L]
#RewriteEngine on
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?dwar2.xyz [NC]
#RewriteRule \.(jpg|jpeg|png|gif)$ http://dropbox.com/hotlink-placeholder.jpg [NC,R,L]
# Запретить другим сайтам использовать прямые ссылки на ваши картинки
#RewriteCond %{HTTP_REFERER} !^$
# Форматы файлов, для которых устанавливается защита
# Выводит ошибку 403
#RewriteCond %{HTTP_REFERER} !^http://(www\.)?dwar2\.top/ [nc]
#RewriteRule \.(sh|area|room|tpl|lua|php|gif|jpeg|jpg|png|bmp|mov|swf|dcr|exe|rar|avi|vob|zip|pdf|txt|doc|flv|mp3|mp4)$ - [NC,F,L]
# или показывает спецрисунок вместо указанного
#RewriteRule \.(sh|area|room|tpl|bat)$ - [NC,F,L]
#RewriteRule ^(includes/|lib/|cronsd2/|private/|area/|111scripts/|freekassa/) - [F,L,NC]
# Запретить другим сайтам использовать прямые ссылки на ваши картинки
#RewriteCond %{HTTP_REFERER} !^$
# Дальше список разрешенных доменов
#RewriteCond %{HTTP_REFERER} !^http://(www\.)?dwar2\.top/ [nc]
#RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?yandex.ru [nc]
#RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?google. [nc]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?домен_дружественного сайта.ru [nc]
# Форматы файлов, для которых устанавливается защита
# Выводит ошибку 403
# RewriteRule \.(jpe?g|bmp|gif|png|css|mov|swf|dcr|exe|rar|avi|vob|zip|pdf|txt|doc|flv|mp3|mp4)$ - [nc,F,L]
# или показывает спецрисунок вместо указанного
#RewriteRule .*\.(jpe?g|bmp|gif|png)$ images/nohotlink.jpg [nc,L]
#или
#RewriteRule .*\.(gif|jpg|png)$ http://dwar2.xyz/images/hotlinkers.jpg [nc]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?dwar2.xyz [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
php_value post_max_size 0
#Блокируем плохих ботов и роботов
SetEnvIfNoCase user-Agent ^FrontPage [NC,OR]
SetEnvIfNoCase user-Agent ^Java.* [NC,OR]
SetEnvIfNoCase user-Agent ^Microsoft.URL [NC,OR]
SetEnvIfNoCase user-Agent ^MSFrontPage [NC,OR]
SetEnvIfNoCase user-Agent ^Offline.Explorer [NC,OR]
SetEnvIfNoCase user-Agent ^[Ww]eb[Bb]andit [NC,OR]
SetEnvIfNoCase user-Agent ^Zeus [NC]
<limit get="" post="" head="">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</limit>
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .comment\/reply\/*
RewriteCond %{HTTP_REFERER} !.*dwar2.xyz.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
#Включаем отслеживание сим-ссылок
Options +FollowSymLinks
#Запускаем url_rewriting
RewriteEngine On
#Блокируем все ссылки, содержащие <script>
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#Блокируем все скрипты, которые пытаются изменить переменные PHP Globals:
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#Блокируем все скрипты, которые пытаются изменить переменную _REQUEST:
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
#Перенаправляем все подобные на страницу с ошибкой 403 — запрещено
RewriteRule ^(.*)$ index.php [F,L]
[Thu Sep 01 13:35:03.469110 2022] [auth_digest:notice] [pid 955] AH01757: generating secret for digest authentication ...
[Thu Sep 01 13:35:03.470238 2022] [lbmethod_heartbeat:notice] [pid 955] AH02282: No slotmem from mod_heartmonitor
[Thu Sep 01 13:35:03.521335 2022] [mpm_prefork:notice] [pid 955] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.3.31 configured -- resuming normal operations
[Thu Sep 01 13:35:03.521359 2022] [core:notice] [pid 955] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Sep 01 13:37:27.965606 2022] [php7:error] [pid 1755] [client 192.168.1.101:3639] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 13:37:52.249842 2022] [php7:error] [pid 1756] [client 134.249.86.37:3668] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 13:43:33.879434 2022] [php7:error] [pid 1755] [client 134.249.86.37:3919] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 13:43:43.019199 2022] [php7:error] [pid 1767] [client 192.168.1.101:3926] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 13:44:59.479245 2022] [php7:error] [pid 1758] [client 165.227.0.21:54130] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 13:45:46.169244 2022] [php7:error] [pid 1760] [client 134.249.86.37:3967] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 13:45:59.673859 2022] [php7:warn] [pid 1755] [client 134.249.86.37:3971] PHP Warning: Use of undefined constant MAIN_TITLE - assumed 'MAIN_TITLE' (this will throw an Error in a future version of PHP) in /var/www/html/register.php on line 437
[Thu Sep 01 13:45:59.674317 2022] [php7:error] [pid 1755] [client 134.249.86.37:3971] PHP Fatal error: Uncaught Error: Call to undefined function static_get() in /var/www/html/register.php:439\nStack trace:\n#0 {main}\n thrown in /var/www/html/register.php on line 439
[Thu Sep 01 13:50:55.405229 2022] [php7:notice] [pid 1756] [client 134.249.86.37:4041] PHP Notice: Undefined variable: display in /var/www/html/user_info.php on line 89
[Thu Sep 01 13:50:55.405500 2022] [php7:notice] [pid 1756] [client 134.249.86.37:4041] PHP Notice: Undefined variable: mults_cdn in /var/www/html/user_info.php on line 96
[Thu Sep 01 13:50:55.405628 2022] [php7:error] [pid 1756] [client 134.249.86.37:4041] PHP Fatal error: Uncaught Error: Call to undefined function html_user_info() in /var/www/html/user_info.php:106\nStack trace:\n#0 {main}\n thrown in /var/www/html/user_info.php on line 106
[Thu Sep 01 13:52:09.629122 2022] [php7:notice] [pid 1758] [client 159.203.15.118:1031] PHP Notice: Undefined variable: display in /var/www/html/user_info.php on line 89
[Thu Sep 01 13:52:09.629187 2022] [php7:notice] [pid 1758] [client 159.203.15.118:1031] PHP Notice: Undefined variable: mults_cdn in /var/www/html/user_info.php on line 96
[Thu Sep 01 13:52:09.629269 2022] [php7:error] [pid 1758] [client 159.203.15.118:1031] PHP Fatal error: Uncaught Error: Call to undefined function html_user_info() in /var/www/html/user_info.php:106\nStack trace:\n#0 {main}\n thrown in /var/www/html/user_info.php on line 106
[Thu Sep 01 14:02:19.537564 2022] [core:error] [pid 1755] [client 152.89.196.62:52576] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
[Thu Sep 01 15:23:10.277351 2022] [php7:error] [pid 1820] [client 34.77.127.183:53118] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 15:24:16.991061 2022] [php7:error] [pid 1822] [client 157.230.244.188:39598] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 15:34:32.935234 2022] [php7:error] [pid 1755] [client 45.83.64.225:16108] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
[Thu Sep 01 16:04:15.455569 2022] [php7:error] [pid 1821] [client 185.196.220.70:48974] PHP Parse error: syntax error, unexpected end of file in /var/www/html/index.php on line 1171
mysqli_commit($db);
print "INSERT INTO archive SELECT * FROM content WHERE id='.$rid.';";
print "DELETE FROM content WHERE id='.$rid.';";
mysqli_commit($db);
echo 'INSERT INTO archive SELECT * FROM content WHERE id='.$rid.';';
echo 'DELETE FROM content WHERE id=.$rid.';';
<?php
session_start();
require "config.php";
if(isset($_SESSION['id']))
{
if(isset($_POST['redsub']))
{
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$rid=$_POST['rid'];
$red_name=$_POST['rname'];
$red_birth=$_POST['rbirth'];
$red_sps= mysqli_real_escape_string($db, $_POST['rsps']);
$red_temph=$_POST['rtemph'];
$red_prevacc=$_POST['rprevacc'];
$red_date=$_POST['rdate'];
$ndate;
$red_status=$_POST['rstatus'];
$statusdate=date('Y-m-d');
$mysqli;
//Установка даты следующего тестирования
switch ($red_prevacc)
{
case 'Значение1':
$dateAt = strtotime(' + 6 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
case 'Значение2':
$dateAt = strtotime(' + 6 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
case 'Значение3':
$dateAt = strtotime(' + 6 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
case 'Значение4':
$dateAt = strtotime(' + 6 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
case 'Значение5':
$dateAt = strtotime(' + 3 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
case 'Значение6':
$dateAt = strtotime(' + 3 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
default:
$dateAt = strtotime(' + 12 months', strtotime($red_date));
$ndate = date('Y-m-d', $dateAt);
break;
}
//print "ID = $rid Name = $red_name<br /> Date = $red_date<br /> Next date = $ndate<br /> Prev = $red_prevacc<br /> Temph = $red_temph<br /> Barack = $red_sps<br /> Виправлення зроблені $statusdate";
//(`name`, `birth`, `sps`, `temph`, `prevacc`, `date`, `next_date`, `status`, `date_status`)
if(isset($red_status)&&$red_status=='Выбыл')
{
$mysqli->begin_transaction($db);
try {
$stmt = $mysqli->prepare($db, "INSERT INTO archive SELECT * FROM content WHERE id=?");
$stmt->bind_param("i", $rid);
$stmt->execute();
$stmt = $mysqli->prepare($db, "DELETE FROM content WHERE id=?");
$stmt->bind_param("i", $rid);
$stmt->execute();
$mysqli->commit();
} catch (\Exception $exception) {
$mysqli->rollback();
throw $exception;
}
}
/*$query6 = "UPDATE content SET `name` = '$red_name', `birth` = '$red_birth', `sps` = '$red_sps', `temph` = '$red_temph', `prevacc` = '$red_prevacc', `date` = '$red_date', `next_date` = '$ndate', status = '$red_status', date_status = '$statusdate' WHERE `id` = '$rid'";
if($result1 = mysqli_query($db, $query6))
{
header("Location:".$site_url);
}
else
{
echo "Ошибка: " . mysqli_error($db);
}*/
}
else
{
echo "Некорректные данные";
}
mysqli_close($db);
}
else
{
header("Location:".$site_url);
}
?>
mysqli_begin_transaction($db); try { $stmt = mysqli_prepare($db, "INSERT INTO archive SELECT * FROM content WHERE id=?"); mysqli_stmt_bind_param($stmt, "i", $rid); mysqli_stmt_execute($stmt); $stmt = mysqli_prepare($db, "DELETE FROM content WHERE id=?");
Fatal error: Uncaught Error: Call to a member function begin_transaction() on null in H:\serv\OSPanel\domains\proj\include\editrow.php:60 Stack trace: #0 {main} thrown in H:\serv\OSPanel\domains\proj\include\editrow.php on line 60