Checked PSR-1 / PHP 8.1 Undefiend Varialbe, type error

This commit is contained in:
kjh
2022-05-30 08:30:08 +00:00
parent b1640d7b76
commit 993e689800
27 changed files with 2694 additions and 2621 deletions

View File

@ -1,9 +1,10 @@
<?php
$sub_menu = "200300";
include_once('./_common.php');
require_once './_common.php';
if ($w == 'u' || $w == 'd')
if ($w == 'u' || $w == 'd') {
check_demo();
}
auth_check_menu($auth, $sub_menu, 'w');
@ -13,29 +14,24 @@ $ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
$ma_subject = isset($_POST['ma_subject']) ? strip_tags(clean_xss_attributes($_POST['ma_subject'])) : '';
$ma_content = isset($_POST['ma_content']) ? $_POST['ma_content'] : '';
if ($w == '')
{
if ($w == '') {
$sql = " insert {$g5['mail_table']}
set ma_subject = '{$ma_subject}',
ma_content = '{$ma_content}',
ma_time = '".G5_TIME_YMDHIS."',
ma_time = '" . G5_TIME_YMDHIS . "',
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($sql);
}
else if ($w == 'u')
{
} elseif ($w == 'u') {
$sql = " update {$g5['mail_table']}
set ma_subject = '{$ma_subject}',
ma_content = '{$ma_content}',
ma_time = '".G5_TIME_YMDHIS."',
ma_time = '" . G5_TIME_YMDHIS . "',
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
where ma_id = '{$ma_id}' ";
sql_query($sql);
}
else if ($w == 'd')
{
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
} elseif ($w == 'd') {
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
sql_query($sql);
}
goto_url('./mail_list.php');
goto_url('./mail_list.php');