Merge branch 'feature/plan-auto-send-release'

hotfix/远程访问多媒体中心
lyt 6 years ago
commit d6f38f4547

@ -169,7 +169,7 @@ function real_phone_number($phone, $nation_code)
function calc_age($birthday)
{
$now = new DateTime();
$birth = new DateTime(strstr($birthday, " ", TRUE));
$birth = new DateTime($birthday);
$date_d = $now->diff($birth);
$d_t = ($date_d->format("%y"));
return $d_t;
@ -181,7 +181,7 @@ function calc_age_type($birthday)
return 1;
}
$age = calc_age($birthday);
if ($age < 18) {
if ($age > 0 && $age < 18) {
return 2;
}
return 1;

Loading…
Cancel
Save