Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

тест на любав 2.0

Июн
3
0
Пользователь
тест на любов 2.0
скреншот снезу
Снимок экрана (4).png

PHP:
<?php
$characters = [
    "Пикамонов" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 85],
    "Комару" => ["emoji" => "🐱", "power" => 78],
    "damitz" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 92],
    "last emperor." => ["emoji" => "👑", "power" => 88],
    "Nesquik XF" => ["emoji" => "🐰", "power" => 95],
    "admin" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 99],
    "Kolpak" => ["emoji" => "K", "power" => 91],
    "z1poff" => ["emoji" => "💤", "power" => 76],
    "viovit" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 83],
    "nikitius" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 87],
    "Spolzer" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 88],
    "JustAlex" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 84],
    "admin tfornik" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 90]
];

function calculateLove($name1, $name2) {
    $combined = $name1 . $name2;
    $loveScore = 0;
   
    for ($i = 0; $i < strlen($combined); $i++) {
        $loveScore += ord($combined[$i]);
    }
   
    return ($loveScore % 100) + 1;
}

$selected1 = array_key_first($characters);
$selected2 = array_keys($characters)[1];

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $selected1 = $_POST['name1'] ?? array_key_first($characters);
    $selected2 = $_POST['name2'] ?? array_keys($characters)[1];
   
    $loveLevel = calculateLove($selected1, $selected2);
   
    if ($loveLevel > 80) {
        $result = "Идеальная пара! ❤️ У $selected1 и $selected2 будет прекрасная любовь!";
    } elseif ($loveLevel > 50) {
        $result = "Хорошая совместимость! ❤️ $selected1 и $selected2 подходят друг другу!";
    } elseif ($loveLevel > 30) {
        $result = "Есть шансы! ❤️ $selected1 и $selected2 могут быть вместе.";
    } else {
        $result = "Сложные отношения. ❤️ $selected1 и $selected2 придется работать над этим.";
    }
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Тест на совместимость</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #ffe6e6;
            margin: 0;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }
       
        .background-avatars {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            opacity: 0.1;
        }
       
        .bg-avatar {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            animation: floatAvatar 20s infinite linear;
        }
       
        @keyframes floatAvatar {
            0% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, -50px) rotate(90deg); }
            50% { transform: translate(50px, 100px) rotate(180deg); }
            75% { transform: translate(-50px, 50px) rotate(270deg); }
            100% { transform: translate(0, 0) rotate(360deg); }
        }
       
        .container {
            max-width: 500px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
        }
        h1 {
            color: #ff3366;
            text-align: center;
        }
        select {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ffb3c6;
            border-radius: 5px;
        }
        button {
            background: #ff3366;
            color: white;
            border: none;
            padding: 10px 20px;
            width: 100%;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }
        button:hover {
            background: #ff1a53;
        }
        .result {
            margin-top: 20px;
            padding: 15px;
            background: #fff0f5;
            border-radius: 5px;
        }
        .love-bar {
            height: 20px;
            background: #ffccd5;
            border-radius: 10px;
            margin: 10px 0;
        }
        .love-fill {
            height: 100%;
            background: linear-gradient(to right, #ff3366, #ff0066);
            border-radius: 10px;
            width: 0%;
            transition: width 1s;
        }
        .pair-display {
            font-size: 20px;
            color: #ff3366;
            text-align: center;
            margin: 10px 0;
            font-weight: bold;
        }
        select option {
            padding: 5px;
        }
    </style>
</head>
<body>
    <div class="background-avatars">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 10%; left: 5%; animation-delay: 0s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 20%; right: 10%; animation-delay: -2s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" class="bg-avatar" style="bottom: 30%; left: 15%; animation-delay: -4s;">
        <img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" class="bg-avatar" style="top: 50%; right: 20%; animation-delay: -6s;">
        <img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" class="bg-avatar" style="bottom: 10%; right: 5%; animation-delay: -8s;">
        <img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" class="bg-avatar" style="top: 70%; left: 10%; animation-delay: -10s;">
        <img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" class="bg-avatar" style="top: 30%; left: 80%; animation-delay: -12s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" class="bg-avatar" style="bottom: 50%; left: 50%; animation-delay: -14s;">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 80%; right: 30%; animation-delay: -16s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 15%; left: 60%; animation-delay: -18s;">
    </div>

    <div class="container">
        <h1>Тест на совместимость ❤️</h1>
       
        <form method="post">
            <div>
                <label>Первый персонаж:</label>
                <select name="name1" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected1) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
           
            <div>
                <label>Второй персонаж:</label>
                <select name="name2" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected2) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
           
            <button type="submit">Проверить совместимость</button>
        </form>
       
        <?php if (isset($loveLevel)): ?>
            <div class="result">
                <div class="pair-display">
                    <?= $characters[$selected1]['emoji'] ?> <?= htmlspecialchars($selected1) ?> ❤️ <?= htmlspecialchars($selected2) ?> <?= $characters[$selected2]['emoji'] ?>
                </div>
               
                <div class="love-bar">
                    <div class="love-fill" style="width: <?= $loveLevel ?>%;"></div>
                </div>
               
                <p><strong>Совместимость: <?= $loveLevel ?>%</strong></p>
                <p><?= $result ?></p>
            </div>
        <?php endif; ?>
    </div>
</body>
</html>
 
Июн
3
0
Пользователь
тест на любов 2.0
скреншот снезу
Посмотреть вложение 24534

PHP:
<?php
$characters = [
    "Пикамонов" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 85],
    "Комару" => ["emoji" => "🐱", "power" => 78],
    "damitz" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 92],
    "last emperor." => ["emoji" => "👑", "power" => 88],
    "Nesquik XF" => ["emoji" => "🐰", "power" => 95],
    "admin" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 99],
    "Kolpak" => ["emoji" => "K", "power" => 91],
    "z1poff" => ["emoji" => "💤", "power" => 76],
    "viovit" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 83],
    "nikitius" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 87],
    "Spolzer" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 88],
    "JustAlex" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 84],
    "admin tfornik" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 90]
];

function calculateLove($name1, $name2) {
    $combined = $name1 . $name2;
    $loveScore = 0;
 
    for ($i = 0; $i < strlen($combined); $i++) {
        $loveScore += ord($combined[$i]);
    }
 
    return ($loveScore % 100) + 1;
}

$selected1 = array_key_first($characters);
$selected2 = array_keys($characters)[1];

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $selected1 = $_POST['name1'] ?? array_key_first($characters);
    $selected2 = $_POST['name2'] ?? array_keys($characters)[1];
 
    $loveLevel = calculateLove($selected1, $selected2);
 
    if ($loveLevel > 80) {
        $result = "Идеальная пара! ❤️ У $selected1 и $selected2 будет прекрасная любовь!";
    } elseif ($loveLevel > 50) {
        $result = "Хорошая совместимость! ❤️ $selected1 и $selected2 подходят друг другу!";
    } elseif ($loveLevel > 30) {
        $result = "Есть шансы! ❤️ $selected1 и $selected2 могут быть вместе.";
    } else {
        $result = "Сложные отношения. ❤️ $selected1 и $selected2 придется работать над этим.";
    }
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Тест на совместимость</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #ffe6e6;
            margin: 0;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }
     
        .background-avatars {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            opacity: 0.1;
        }
     
        .bg-avatar {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            animation: floatAvatar 20s infinite linear;
        }
     
        @keyframes floatAvatar {
            0% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, -50px) rotate(90deg); }
            50% { transform: translate(50px, 100px) rotate(180deg); }
            75% { transform: translate(-50px, 50px) rotate(270deg); }
            100% { transform: translate(0, 0) rotate(360deg); }
        }
     
        .container {
            max-width: 500px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
        }
        h1 {
            color: #ff3366;
            text-align: center;
        }
        select {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ffb3c6;
            border-radius: 5px;
        }
        button {
            background: #ff3366;
            color: white;
            border: none;
            padding: 10px 20px;
            width: 100%;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }
        button:hover {
            background: #ff1a53;
        }
        .result {
            margin-top: 20px;
            padding: 15px;
            background: #fff0f5;
            border-radius: 5px;
        }
        .love-bar {
            height: 20px;
            background: #ffccd5;
            border-radius: 10px;
            margin: 10px 0;
        }
        .love-fill {
            height: 100%;
            background: linear-gradient(to right, #ff3366, #ff0066);
            border-radius: 10px;
            width: 0%;
            transition: width 1s;
        }
        .pair-display {
            font-size: 20px;
            color: #ff3366;
            text-align: center;
            margin: 10px 0;
            font-weight: bold;
        }
        select option {
            padding: 5px;
        }
    </style>
</head>
<body>
    <div class="background-avatars">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 10%; left: 5%; animation-delay: 0s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 20%; right: 10%; animation-delay: -2s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" class="bg-avatar" style="bottom: 30%; left: 15%; animation-delay: -4s;">
        <img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" class="bg-avatar" style="top: 50%; right: 20%; animation-delay: -6s;">
        <img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" class="bg-avatar" style="bottom: 10%; right: 5%; animation-delay: -8s;">
        <img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" class="bg-avatar" style="top: 70%; left: 10%; animation-delay: -10s;">
        <img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" class="bg-avatar" style="top: 30%; left: 80%; animation-delay: -12s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" class="bg-avatar" style="bottom: 50%; left: 50%; animation-delay: -14s;">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 80%; right: 30%; animation-delay: -16s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 15%; left: 60%; animation-delay: -18s;">
    </div>

    <div class="container">
        <h1>Тест на совместимость ❤️</h1>
     
        <form method="post">
            <div>
                <label>Первый персонаж:</label>
                <select name="name1" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected1) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
         
            <div>
                <label>Второй персонаж:</label>
                <select name="name2" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected2) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
         
            <button type="submit">Проверить совместимость</button>
        </form>
     
        <?php if (isset($loveLevel)): ?>
            <div class="result">
                <div class="pair-display">
                    <?= $characters[$selected1]['emoji'] ?> <?= htmlspecialchars($selected1) ?> ❤️ <?= htmlspecialchars($selected2) ?> <?= $characters[$selected2]['emoji'] ?>
                </div>
             
                <div class="love-bar">
                    <div class="love-fill" style="width: <?= $loveLevel ?>%;"></div>
                </div>
             
                <p><strong>Совместимость: <?= $loveLevel ?>%</strong></p>
                <p><?= $result ?></p>
            </div>
        <?php endif; ?>
    </div>
</body>
</html>
паставте лайук пажалуста если понравиться я дабвавив новых персов и фон прекольн
 
Лучше плохо начать, чем хорошо бездействовать
Ноя
2,561
2,471
Профессионал
тест на любов 2.0
скреншот снезу
Посмотреть вложение 24534

PHP:
<?php
$characters = [
    "Пикамонов" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 85],
    "Комару" => ["emoji" => "🐱", "power" => 78],
    "damitz" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 92],
    "last emperor." => ["emoji" => "👑", "power" => 88],
    "Nesquik XF" => ["emoji" => "🐰", "power" => 95],
    "admin" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 99],
    "Kolpak" => ["emoji" => "K", "power" => 91],
    "z1poff" => ["emoji" => "💤", "power" => 76],
    "viovit" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 83],
    "nikitius" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 87],
    "Spolzer" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 88],
    "JustAlex" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 84],
    "admin tfornik" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 90]
];

function calculateLove($name1, $name2) {
    $combined = $name1 . $name2;
    $loveScore = 0;
  
    for ($i = 0; $i < strlen($combined); $i++) {
        $loveScore += ord($combined[$i]);
    }
  
    return ($loveScore % 100) + 1;
}

$selected1 = array_key_first($characters);
$selected2 = array_keys($characters)[1];

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $selected1 = $_POST['name1'] ?? array_key_first($characters);
    $selected2 = $_POST['name2'] ?? array_keys($characters)[1];
  
    $loveLevel = calculateLove($selected1, $selected2);
  
    if ($loveLevel > 80) {
        $result = "Идеальная пара! ❤️ У $selected1 и $selected2 будет прекрасная любовь!";
    } elseif ($loveLevel > 50) {
        $result = "Хорошая совместимость! ❤️ $selected1 и $selected2 подходят друг другу!";
    } elseif ($loveLevel > 30) {
        $result = "Есть шансы! ❤️ $selected1 и $selected2 могут быть вместе.";
    } else {
        $result = "Сложные отношения. ❤️ $selected1 и $selected2 придется работать над этим.";
    }
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Тест на совместимость</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #ffe6e6;
            margin: 0;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }
      
        .background-avatars {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            opacity: 0.1;
        }
      
        .bg-avatar {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            animation: floatAvatar 20s infinite linear;
        }
      
        @keyframes floatAvatar {
            0% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, -50px) rotate(90deg); }
            50% { transform: translate(50px, 100px) rotate(180deg); }
            75% { transform: translate(-50px, 50px) rotate(270deg); }
            100% { transform: translate(0, 0) rotate(360deg); }
        }
      
        .container {
            max-width: 500px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
        }
        h1 {
            color: #ff3366;
            text-align: center;
        }
        select {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ffb3c6;
            border-radius: 5px;
        }
        button {
            background: #ff3366;
            color: white;
            border: none;
            padding: 10px 20px;
            width: 100%;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }
        button:hover {
            background: #ff1a53;
        }
        .result {
            margin-top: 20px;
            padding: 15px;
            background: #fff0f5;
            border-radius: 5px;
        }
        .love-bar {
            height: 20px;
            background: #ffccd5;
            border-radius: 10px;
            margin: 10px 0;
        }
        .love-fill {
            height: 100%;
            background: linear-gradient(to right, #ff3366, #ff0066);
            border-radius: 10px;
            width: 0%;
            transition: width 1s;
        }
        .pair-display {
            font-size: 20px;
            color: #ff3366;
            text-align: center;
            margin: 10px 0;
            font-weight: bold;
        }
        select option {
            padding: 5px;
        }
    </style>
</head>
<body>
    <div class="background-avatars">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 10%; left: 5%; animation-delay: 0s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 20%; right: 10%; animation-delay: -2s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" class="bg-avatar" style="bottom: 30%; left: 15%; animation-delay: -4s;">
        <img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" class="bg-avatar" style="top: 50%; right: 20%; animation-delay: -6s;">
        <img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" class="bg-avatar" style="bottom: 10%; right: 5%; animation-delay: -8s;">
        <img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" class="bg-avatar" style="top: 70%; left: 10%; animation-delay: -10s;">
        <img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" class="bg-avatar" style="top: 30%; left: 80%; animation-delay: -12s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" class="bg-avatar" style="bottom: 50%; left: 50%; animation-delay: -14s;">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 80%; right: 30%; animation-delay: -16s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 15%; left: 60%; animation-delay: -18s;">
    </div>

    <div class="container">
        <h1>Тест на совместимость ❤️</h1>
      
        <form method="post">
            <div>
                <label>Первый персонаж:</label>
                <select name="name1" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected1) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
          
            <div>
                <label>Второй персонаж:</label>
                <select name="name2" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected2) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
          
            <button type="submit">Проверить совместимость</button>
        </form>
      
        <?php if (isset($loveLevel)): ?>
            <div class="result">
                <div class="pair-display">
                    <?= $characters[$selected1]['emoji'] ?> <?= htmlspecialchars($selected1) ?> ❤️ <?= htmlspecialchars($selected2) ?> <?= $characters[$selected2]['emoji'] ?>
                </div>
              
                <div class="love-bar">
                    <div class="love-fill" style="width: <?= $loveLevel ?>%;"></div>
                </div>
              
                <p><strong>Совместимость: <?= $loveLevel ?>%</strong></p>
                <p><?= $result ?></p>
            </div>
        <?php endif; ?>
    </div>
</body>
</html>
О боже, воспоминание разблокировано. Я помню, когда была 1-вая часть, хахахахаах.
Не понятно, конечно зачем, это и для чего, правда
OFFTOP

Что я там забыл, интересно...
Не дай бог он станет админом

 
Июн
3
0
Пользователь
тест на любов 2.0
скреншот снезу
Посмотреть вложение 24534

PHP:
<?php
$characters = [
    "Пикамонов" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 85],
    "Комару" => ["emoji" => "🐱", "power" => 78],
    "damitz" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 92],
    "last emperor." => ["emoji" => "👑", "power" => 88],
    "Nesquik XF" => ["emoji" => "🐰", "power" => 95],
    "admin" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 99],
    "Kolpak" => ["emoji" => "K", "power" => 91],
    "z1poff" => ["emoji" => "💤", "power" => 76],
    "viovit" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 83],
    "nikitius" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 87],
    "Spolzer" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 88],
    "JustAlex" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 84],
    "admin tfornik" => ["emoji" => '<img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" style="width:30px;height:30px;border-radius:50%;vertical-align:middle;">', "power" => 90]
];

function calculateLove($name1, $name2) {
    $combined = $name1 . $name2;
    $loveScore = 0;
 
    for ($i = 0; $i < strlen($combined); $i++) {
        $loveScore += ord($combined[$i]);
    }
 
    return ($loveScore % 100) + 1;
}

$selected1 = array_key_first($characters);
$selected2 = array_keys($characters)[1];

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $selected1 = $_POST['name1'] ?? array_key_first($characters);
    $selected2 = $_POST['name2'] ?? array_keys($characters)[1];
 
    $loveLevel = calculateLove($selected1, $selected2);
 
    if ($loveLevel > 80) {
        $result = "Идеальная пара! ❤️ У $selected1 и $selected2 будет прекрасная любовь!";
    } elseif ($loveLevel > 50) {
        $result = "Хорошая совместимость! ❤️ $selected1 и $selected2 подходят друг другу!";
    } elseif ($loveLevel > 30) {
        $result = "Есть шансы! ❤️ $selected1 и $selected2 могут быть вместе.";
    } else {
        $result = "Сложные отношения. ❤️ $selected1 и $selected2 придется работать над этим.";
    }
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Тест на совместимость</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #ffe6e6;
            margin: 0;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }
     
        .background-avatars {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            opacity: 0.1;
        }
     
        .bg-avatar {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            animation: floatAvatar 20s infinite linear;
        }
     
        @keyframes floatAvatar {
            0% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, -50px) rotate(90deg); }
            50% { transform: translate(50px, 100px) rotate(180deg); }
            75% { transform: translate(-50px, 50px) rotate(270deg); }
            100% { transform: translate(0, 0) rotate(360deg); }
        }
     
        .container {
            max-width: 500px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
        }
        h1 {
            color: #ff3366;
            text-align: center;
        }
        select {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ffb3c6;
            border-radius: 5px;
        }
        button {
            background: #ff3366;
            color: white;
            border: none;
            padding: 10px 20px;
            width: 100%;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }
        button:hover {
            background: #ff1a53;
        }
        .result {
            margin-top: 20px;
            padding: 15px;
            background: #fff0f5;
            border-radius: 5px;
        }
        .love-bar {
            height: 20px;
            background: #ffccd5;
            border-radius: 10px;
            margin: 10px 0;
        }
        .love-fill {
            height: 100%;
            background: linear-gradient(to right, #ff3366, #ff0066);
            border-radius: 10px;
            width: 0%;
            transition: width 1s;
        }
        .pair-display {
            font-size: 20px;
            color: #ff3366;
            text-align: center;
            margin: 10px 0;
            font-weight: bold;
        }
        select option {
            padding: 5px;
        }
    </style>
</head>
<body>
    <div class="background-avatars">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 10%; left: 5%; animation-delay: 0s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 20%; right: 10%; animation-delay: -2s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/1.jpg?1765214208" class="bg-avatar" style="bottom: 30%; left: 15%; animation-delay: -4s;">
        <img src="https://pawno-help.ru/data/avatars/m/0/197.jpg?1777403441" class="bg-avatar" style="top: 50%; right: 20%; animation-delay: -6s;">
        <img src="https://pawno-help.ru/data/avatars/o/17/17548.jpg?1739374319" class="bg-avatar" style="bottom: 10%; right: 5%; animation-delay: -8s;">
        <img src="https://pawno-help.ru/data/avatars/o/22/22534.jpg?1779637423" class="bg-avatar" style="top: 70%; left: 10%; animation-delay: -10s;">
        <img src="https://pawno-help.ru/data/avatars/o/15/15100.jpg?1760457384" class="bg-avatar" style="top: 30%; left: 80%; animation-delay: -12s;">
        <img src="https://pawno-help.ru/data/avatars/o/0/441.jpg?1773352752" class="bg-avatar" style="bottom: 50%; left: 50%; animation-delay: -14s;">
        <img src="https://pawno-help.ru/data/avatars/o/2/2444.jpg?1768183596" class="bg-avatar" style="top: 80%; right: 30%; animation-delay: -16s;">
        <img src="https://pawno-help.ru/data/avatars/o/14/14358.jpg?1779148333" class="bg-avatar" style="top: 15%; left: 60%; animation-delay: -18s;">
    </div>

    <div class="container">
        <h1>Тест на совместимость ❤️</h1>
     
        <form method="post">
            <div>
                <label>Первый персонаж:</label>
                <select name="name1" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected1) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
         
            <div>
                <label>Второй персонаж:</label>
                <select name="name2" required>
                    <?php foreach ($characters as $name => $data): ?>
                        <option value="<?= htmlspecialchars($name) ?>"
                            <?= ($name === $selected2) ? 'selected' : '' ?>>
                            <?= $data['emoji'] ?> <?= htmlspecialchars($name) ?>
                        </option>
                    <?php endforeach; ?>
                </select>
            </div>
         
            <button type="submit">Проверить совместимость</button>
        </form>
     
        <?php if (isset($loveLevel)): ?>
            <div class="result">
                <div class="pair-display">
                    <?= $characters[$selected1]['emoji'] ?> <?= htmlspecialchars($selected1) ?> ❤️ <?= htmlspecialchars($selected2) ?> <?= $characters[$selected2]['emoji'] ?>
                </div>
             
                <div class="love-bar">
                    <div class="love-fill" style="width: <?= $loveLevel ?>%;"></div>
                </div>
             
                <p><strong>Совместимость: <?= $loveLevel ?>%</strong></p>
                <p><?= $result ?></p>
            </div>
        <?php endif; ?>
    </div>
</body>
</html>
OFFTOP


Пользователи, оставившие реакции к сообщению №1

Все (1) Popcorn Popcorn (1)​


    1. Popcorn45 мин. назад

      Kolpak

      Профессионал · 18 · Из xenforo.com
      • Сообщения 1,903
      • Ресурсы 27
      • Решения 272
      • Реакции 6,137
      • Баллы 118

 
Сверху