MRBS 1.12.2 等保2.0二级整改完整提交
Docker image / push (push) Canceled after 0s

包含:登录失败锁定、90天密码有效期、30分钟会话超时、
强制改密、登录审计日志、屏幕水印、企业背景图、
备案信息固定底部、favicon、登录页JS修复等全部改动
This commit is contained in:
人事系统开发
2026-09-08 21:19:47 +08:00
commit 48092cab42
2221 changed files with 659586 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
declare(strict_types=1);
namespace MRBS\ICalendar;
use DateTimeZone;
use MRBS\DateTime;
use function MRBS\get_vocab;
class RFC5545
{
// An array which can be used to map day of the week numbers (0..6)
// onto days of the week as defined in RFC 5545
public const DAYS = ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'];
// Convert an RFC 5545 day to an ordinal number representing the day of the week,
// eg "MO" returns "1"
public static function convertDayToOrd($day) : int
{
$tmp = array_keys(self::DAYS, $day);
if (count($tmp) === 0)
{
throw new RFC5545Exception(
get_vocab('invalid_RFC5545_day', $day),
RFC5545Exception::INVALID_DAY
);
}
return $tmp[0];
}
// Splits a BYDAY string into its ordinal and day parts, returned as a simple array.
// For example "-1SU" is returned an array indexed by 'ordinal' and 'day' keys, eg
// array('ordinal' => -1, 'day' => 'SU');
public static function parseByday(string $byday) : array
{
$result = array();
$split_pos = mb_strlen($byday) -2;
$result['ordinal'] = (int) mb_substr($byday, 0, $split_pos);
$result['day'] = mb_substr($byday, $split_pos, 2);
return $result;
}
}