diff --git a/hwe/a_vote.php b/hwe/a_vote.php
index 2945961b..92505fb7 100644
--- a/hwe/a_vote.php
+++ b/hwe/a_vote.php
@@ -230,8 +230,17 @@ if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
$nationVote[$nation][$ownVote] += $cnt;
}
+ $totalPer = 0;
for ($i=0; $i < $voteTypeCount; $i++) {
$per = round(($totalVote[$i]??0) * 100 / $memCount, 1);
+ if($i == $voteTypeCount-1){
+ $per = 100-$totalPer;
+ }
+ else{
+ $totalPer += $per;
+ }
+
+
// if($per < 5) { $vote['cnt'] = " "; }
?>
@@ -269,8 +278,15 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
";
+ $totalPer = 0;
for ($i=0; $i < $voteTypeCount; $i++) {
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
+ if($i == $voteTypeCount-1){
+ $per = 100-$totalPer;
+ }
+ else{
+ $totalPer += $per;
+ }
// if($per < 5) { $vote['cnt'] = " "; }
?>
@@ -315,6 +331,7 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
|
";
+ $totalPer = 0;
for ($k=0; $k < $voteTypeCount; $k++) {
if($memCount == 0){
$per = 0;
@@ -322,6 +339,13 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
else{
$per = round($nationVote[$nation['nation']][$k]??0 / $memCount * 100, 1);
}
+
+ if($i == $voteTypeCount-1){
+ $per = 100-$totalPer;
+ }
+ else{
+ $totalPer += $per;
+ }
// if($per < 5) { $vote['cnt'] = " "; }
?>
diff --git a/hwe/func.php b/hwe/func.php
index b735de65..3fb372b4 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -1440,7 +1440,7 @@ function checkDelay() {
$minute = $iter * $term;
$newTurntime = $turntime->add(new \DateInterval("PT{$minute}M"));
$newNextTurntime = $turntime->add(new \DateInterval("PT{$term}M"));
- $gameStor->turntime = $newTurntime;
+ $gameStor->turntime = $newTurntime->format('Y-m-d H:i:s');
$db->update('general', [
'turntime'=> $db->sqleval('DATE_ADD(turntime, INTERVAL %i MINUTE)', $minute)
|