getError("pw"); $emailError = $form->getError("email"); $sitterError = $form->getError("sit"); // Sitters count (keep original logic) $count = 0; if ($session->userinfo['sit1'] != 0) $count += 1; if ($session->userinfo['sit2'] != 0) $count += 1; /** * PERMISIUNI SITTER * * Lista e definita o singura data si folosita si la sitterii existenti, si la * casuta de adaugare, ca sa nu se desincronizeze. Cheile din $_POST sunt * perm1[], perm2[] si perm_new[], fiecare continand valorile bitilor bifati. */ $sitterPermList = array( SITTER_PERM_ATTACK => defined('SITTER_P_ATTACK') ? SITTER_P_ATTACK : 'send attacks', SITTER_PERM_RAID => defined('SITTER_P_RAID') ? SITTER_P_RAID : 'send raids', SITTER_PERM_REINF => defined('SITTER_P_REINF') ? SITTER_P_REINF : 'send reinforcements', SITTER_PERM_RES => defined('SITTER_P_RES') ? SITTER_P_RES : 'send resources to other players', SITTER_PERM_GOLD => defined('SITTER_P_GOLD') ? SITTER_P_GOLD : 'spend Gold', ); /** * Casutele pentru un slot. $mask = permisiunile curente, $field = numele * campului din formular. */ function sitterPermBoxes($mask, $field, $list) { /** * Marcaj ascuns: o casuta nebifata nu se trimite deloc prin POST, deci * "toate debifate" ar arata identic cu "sectiunea nu a fost afisata". * Campul asta e mereu trimis, asa ca Profile.php poate deosebi cele doua * situatii si nu reseteaza permisiunile din greseala. */ $out = ''; $out .= '
'; foreach ($list as $bit => $label) { $checked = (((int) $mask & $bit) === $bit) ? ' checked' : ''; $out .= ''; } return $out . '
'; } ?>
".$pwError.""; } ?>
userinfo['email'] ?? '', ENT_QUOTES, 'UTF-8'); ?>
".$emailError.""; } ?>
(/2)
You have no sitters."; } $sitSlots = [1 => 'sit1', 2 => 'sit2']; foreach ($sitSlots as $type => $key) { if ($session->userinfo[$key] != 0) { $uid = $session->userinfo[$key]; $uname = $database->getUserField($uid, "username", 0); echo "
"; echo "checker."&type=".$type."\">"; echo "\"Remove"; echo ""; echo "".$uname.""; // permisiunile curente ale acestui sitter $permField = 'perm' . $type; $permMask = isset($session->userinfo[$key . '_perm']) ? (int) $session->userinfo[$key . '_perm'] : SITTER_PERM_ALL; echo sitterPermBoxes($permMask, $permField, $sitterPermList); echo "
"; } } ?>
getSitee($session->uid); if (count($sitee) == 0) { echo "You have no sitters."; } else { foreach ($sitee as $sit) { echo ""; } } ?>
".$sitterError.""; } ?> isDeleting($session->uid); if ($timestamp) { echo ""; } else { ?>
"; echo "uid."&a=1&e=4\">"; echo "\"Cancel"; echo ""; $time = $generator->getTimeFormat(($timestamp - time())); echo "The account will be deleted in timer."\">".$time." .
getError("del"))) { echo "".$deleteError.""; } ?>