Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Pelaa leikkilottoa automatisoidusti eikä se maksa mitään.
- Anna koneen arpoa ensin yksi oma lottorivi.
- Sen jälkeen kone arpoo ns. voittorivin ja vertaa omaa riviäsi voittoriviin.
- Arvonta toistetaan (30 sek välein) niin kauan kunnes omaan riviin osuu vähintään viisi (5) oikein.
- Arvonnan päätyttyä näet paljonko voitit tai todennäköisemmin hävisit.
- Play the play finnish lottery automatically in your browser (localhost) and it costs nothing.
- Let the machine draw one of its own lottery rows first.
- After that, the machine draws the so-called win line and compare your own line with the win line.
- The draw is repeated (every 30 seconds) until at least five (5) correctly match your row.
- After the draw is over, you will see how much you won or, more likely, lost.
- This script proves that by playing the lottery you can only lose your money!
- */
- header("Content-Type: text/html; charset=utf-8");
- header("Cache-Control: no-cache");
- $offset = 60 * 60 * 24 * 1;
- $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
- header($ExpStr);
- date_default_timezone_set("Europe/Helsinki");
- if (session_status() == PHP_SESSION_NONE) { session_start(); }
- if (!isset($_SESSION["Hudit"])) { $_SESSION["Hudit"] = 0; }
- if (!isset($_SESSION["Osumat"])) { $_SESSION["Osumat"] = 0; }
- $hutilaskuri = $_SESSION["Hudit"];
- $osumalaskuri = $_SESSION["Osumat"];
- echo "<script>var krt = '".($hutilaskuri +1)."';</script>";
- echo "<script>var klt = '".number_format((($hutilaskuri +1) * 1.5),2,","," ")."';</script>";
- echo "<script>var osm = '".$osumalaskuri."';</script>";
- //voittotaulukko
- $r7 = "~ 1 300 000 \u20AC";
- echo "<script>const r7 = '".$r7."';</script>";
- $r6extrawithplus = "~ 500 000 \u20AC";
- echo "<script>const r6extrawithplus = '".$r6extrawithplus."';</script>";
- $r6extrawithoutplus = "~ 100 000 \u20AC";
- echo "<script>const r6extrawithoutplus = '".$r6extrawithoutplus."';</script>";
- $r6withplus = "~ 10 000 \u20AC";
- echo "<script>const r6withplus = '".$r6withplus."';</script>";
- $r6withoutplus = "~ 2 000 \u20AC";
- echo "<script>const r6withoutplus = '".$r6withoutplus."';</script>";
- $r5withplus = "~ 250,00 \u20AC";
- echo "<script>const r5withplus = '".$r5withplus."';</script>";
- $r5withoutplus = "~ 50,00 \u20AC";
- echo "<script>const r5withoutplus = '".$r5withoutplus."';</script>";
- $r4withplus = "48,50 \u20AC";
- echo "<script>const r4withplus = '".$r4withplus."';</script>";
- $r4withoutplus = "8,50 \u20AC";
- echo "<script>const r4withoutplus = '".$r4withoutplus."';</script>";
- $r3extrawithplus = "8,50 \u20AC";
- echo "<script>const r3extrawithplus = '".$r3extrawithplus."';</script>";
- $r3extrawithoutplus = "0,50 \u20AC";
- echo "<script>const r3extrawithoutplus = '".$r3extrawithoutplus."';</script>";
- $rplus = "3,50 \u20AC";
- echo "<script>const rplus = '".$rplus."';</script>";
- $stake = "-1,50 \u20AC";
- echo "<script>const stake = '".$stake."';</script>";
- //arvonta: aseta oma rivi
- $lotteryd = $drawedd = $sorterd = $lotterypro = $plusro = array();
- for ($x = 1;$x < 41;$x++) { array_push($lotteryd,$x); }
- for ($x = 1;$x < 8;$x++) {
- shuffle($lotteryd);
- array_push($sorterd,$x);
- array_push($drawedd,$lotteryd[0]);
- array_splice($lotteryd, 0, 1);
- }
- sort($drawedd);
- //arvonta: arvo oma plusnumero
- for ($x = 1;$x < 31;$x++) { array_push($lotterypro,$x); }
- shuffle($lotterypro);
- array_push($plusro,$lotterypro[0]);
- //arvonta: arvo oikea rivi
- $lotteryr = $lotterypr = $drawedr = $sorterr = $extrar = $plusr = array();
- for ($x = 1;$x < 41;$x++) { array_push($lotteryr,$x); }
- for ($x = 1;$x < 8;$x++) {
- shuffle($lotteryr);
- array_push($sorterr,$x);
- array_push($drawedr,$lotteryr[0]);
- array_splice($lotteryr, 0, 1);
- }
- sort($drawedr);
- //arvonta: arvo lisänumero
- shuffle($lotteryr);
- array_push($extrar,$lotteryr[0]);
- //arvonta: arvo plusnumero
- for ($x = 1;$x < 31;$x++) { array_push($lotterypr,$x); }
- shuffle($lotterypr);
- array_push($plusr,$lotterypr[0]);
- //arvonta: tarkista osumat
- $x = $osumat = $extraosumat = $plusosumat = 0;
- while (isset($drawedr[$x])) {
- if (in_array($drawedr[$x], $drawedd)) {
- $osumat++;
- }
- $x++;
- }
- ?>
- <!DOCTYPE html>
- <html lang="fi">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>FAKELOTTO</title>
- <meta name="apple-mobile-web-app-title" content="FAKELOTTO" />
- <meta name="author" content="Oiva Pahtaja" />
- <style>*{box-sizing:border-box}html{background:#00F;height:100%}body{margin:10px}h1{color:#FFF;font-size:3em;margin:5px 0 15px}#main{width:360px;height:590px;margin:15px auto;display:block;text-align:center;border:1px solid #0F0;background:#FFF;border-radius:5px}#mainres{width:360px;margin:15px auto;display:none;text-align:center;border:1px solid #0F0;background:#FFF;border-radius:5px}#ndx{width:320px;margin:auto;display:block;text-align:center}#drawed,#yours{display:none}#uno,#due,#tre,#quattro,#cinque,#sei,#sette,#otto,#nove,#unox,#duex,#trex,#quattrox,#cinquex,#seix,#settex,#ottox{font-size:1.6em;display:inline-block}.btn{background:#00F;border-radius:10px;font-family:Arial,sans-serif;color:#FFF;font-size:20px;padding:10px 20px 10px 20px;text-decoration:none;outline:none}.btn:hover{text-decoration:none;cursor:default}.rec{color:#F00;font-weight:bold}.rece{color:#00F;font-weight:bold}.recep{color:#008000;font-weight:bold;text-decoration:underline}.tem{opacity:0}</style>
- </head><body>
- <?php
- echo "<div id='mainres'>";
- echo "<h4>PELATTU: <span id='krtkpl'></span> riviä ( <span id='klteur'></span> € )</h4>";
- echo "<h4>VOITETTU: <span id='vtteur'></span> €</h4>";
- echo "</div>";
- echo "<div id='main' title='Keltainen arpa palauttaisi 2 € tai enemmän. Valkoinen arpa ei tuo palautusta.'>";
- echo "<div id='yours'>";
- echo "<h2>Oma rivi:</h2>";
- if (in_array($drawedd[0], $drawedr)) {
- echo "<div id='unox'>".$drawedd[0]."</div>";
- echo "<script>let unoxrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[0]) {
- echo "<div id='unox'>".$drawedd[0]."</div>";
- echo "<script>let unoxrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='unox'>".$drawedd[0]."</div>";
- }
- echo " / ";
- if (in_array($drawedd[1], $drawedr)) {
- echo "<div id='duex'>".$drawedd[1]."</div>";
- echo "<script>let duexrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[1]) {
- echo "<div id='duex'>".$drawedd[1]."</div>";
- echo "<script>let duexrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='duex'>".$drawedd[1]."</div>";
- }
- echo " / ";
- if (in_array($drawedd[2], $drawedr)) {
- echo "<div id='trex'>".$drawedd[2]."</div>";
- echo "<script>let trexrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[2]) {
- echo "<div id='trex'>".$drawedd[2]."</div>";
- echo "<script>let trexrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='trex'>".$drawedd[2]."</div>";
- }
- echo " / ";
- if (in_array($drawedd[3], $drawedr)) {
- echo "<div id='quattrox'>".$drawedd[3]."</div>";
- echo "<script>let quattroxrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[3]) {
- echo "<div id='quattrox'>".$drawedd[3]."</div>";
- echo "<script>let quattroxrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='quattrox'>".$drawedd[3]."</div>";
- }
- echo " / ";
- if (in_array($drawedd[4], $drawedr)) {
- echo "<div id='cinquex'>".$drawedd[4]."</div>";
- echo "<script>let cinquexrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[4]) {
- echo "<div id='cinquex'>".$drawedd[4]."</div>";
- echo "<script>let cinquexrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='cinquex'>".$drawedd[4]."</div>";
- }
- echo " / ";
- if (in_array($drawedd[5], $drawedr)) {
- echo "<div id='seix'>".$drawedd[5]."</div>";
- echo "<script>let seixrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[5]) {
- echo "<div id='seix'>".$drawedd[5]."</div>";
- echo "<script>let seixrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='seix'>".$drawedd[5]."</div>";
- }
- echo " / ";
- if (in_array($drawedd[6], $drawedr)) {
- echo "<div id='settex'>".$drawedd[6]."</div>";
- echo "<script>let settexrec = '1';</script>";
- } else if (in_array($extrar[0], $drawedd) && $extrar[0] == $drawedd[6]) {
- echo "<div id='settex'>".$drawedd[6]."</div>";
- echo "<script>let settexrece = '1';</script>";
- $extraosumat = 1;
- } else {
- echo "<div id='settex'>".$drawedd[6]." </div>";
- }
- echo " + ";
- if (in_array($plusr[0], $plusro)) {
- echo "<div id='ottox'>".$plusro[0]."</div>";
- echo "<script>let ottoxrecep = '1';</script>";
- $plusosumat++;
- } else {
- echo "<div id='ottox'>".$plusro[0]."</div>";
- }
- echo "<br /><br />- - - - - - - - - - - - - - - - - - - - -<br />";
- echo "</div>";
- echo "<div id='drawed'>";
- echo "<h2>\"Oikea\" rivi:</h2>";
- echo "<div id='uno' class='rec'>".$drawedr[0]."</div>";
- echo " / ";
- echo "<div id='due' class='rec'>".$drawedr[1]."</div>";
- echo " / ";
- echo "<div id='tre' class='rec'>".$drawedr[2]."</div>";
- echo " / ";
- echo "<div id='quattro' class='rec'>".$drawedr[3]."</div>";
- echo " / ";
- echo "<div id='cinque' class='rec'>".$drawedr[4]."</div>";
- echo " / ";
- echo "<div id='sei' class='rec'>".$drawedr[5]."</div>";
- echo " / ";
- echo "<div id='sette' class='rec'>".$drawedr[6]."</div>";
- echo "<br /><br />";
- echo "<div id='otto'>Lisänro: <span class='rece'>".$extrar[0]."</span></div>";
- echo " / ";
- echo "<div id='nove'>Plusnro: <span class='recep'>".$plusr[0]."</span></div>";
- echo "<br /><br />- - - - - - - - - - - - - - - - - - - - -<br />";
- echo "<h2>Osumia: <span id='winn'>".$osumat."</span> + <span id='winne' title='LISÄNUMERO'>".$extraosumat."</span><br />";
- if ($plusosumat > 0) {
- echo "Plus: ✅</h2>";
- echo "<script>var winchep = '1'</script>";
- } else {
- echo "Plus: ❌</h2>";
- echo "<script>var winchep = '0'</script>";
- }
- echo "- - - - - - - - - - - - - - - - - - - - -<br />";
- echo "<h2>Tulos: <span id='winnr'> </span></h2>";
- echo "<div id='ndx'>";
- echo "<button id='nd' class='btn tem' onclick='newDraw()' disabled='disabled' title='Arvonta suoritettu ".date("d.m.Y \k\l\o H:i:s")."'>Uusi arvonta automaattisesti puolen minuutin välein 😃</button>";
- echo "</div>";
- echo "</div></div>";
- if (!isset($selaajan_ip)) { $selaajan_ip = "UNKNOWN"; }
- if($osumat == 7) {
- $osumalaskuri = $_SESSION["Osumat"] + 1300000;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 6 && $extraosumat == 1 && $plusosumat == 1) {
- $osumalaskuri = $_SESSION["Osumat"] + 500000;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 6 && $extraosumat == 1 && $plusosumat == 0) {
- $osumalaskuri = $_SESSION["Osumat"] + 100000;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 6 && $extraosumat == 0 && $plusosumat == 1) {
- $osumalaskuri = $_SESSION["Osumat"] + 10000;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 6 && $extraosumat == 0 && $plusosumat == 0) {
- $osumalaskuri = $_SESSION["Osumat"] + 2000;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 5 && $plusosumat == 1) {
- $osumalaskuri = $_SESSION["Osumat"] + 250;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 5 && $plusosumat == 0) {
- $osumalaskuri = $_SESSION["Osumat"] + 50;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 4 && $plusosumat == 1) {
- $osumalaskuri = $_SESSION["Osumat"] + 50;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 4 && $plusosumat == 0) {
- $osumalaskuri = $_SESSION["Osumat"] + 10;
- unset($_SESSION["Hudit"]);
- unset($_SESSION["Osumat"]);
- } else if($osumat == 3 && $extraosumat == 1 && $plusosumat == 1) {
- $osumalaskuri = $_SESSION["Osumat"] + 10;
- } else if($osumat == 3 && $extraosumat == 1 && $plusosumat == 0) {
- $osumalaskuri = $_SESSION["Osumat"] + 2;
- } else if($plusosumat == 1) {
- $osumalaskuri = $_SESSION["Osumat"] + 5;
- } else {
- $hutilaskuri = $_SESSION["Hudit"];
- $hutilaskuri++;
- $_SESSION["Hudit"] = $hutilaskuri;
- $osumalaskuri = $_SESSION["Osumat"] + 0;
- }
- echo "<script>var osm = '".$osumalaskuri."';</script>";
- if (isset($_SESSION["Osumat"])) { $_SESSION["Osumat"] = $osumalaskuri; }
- ?>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
- <script>var elem1,elem2,elem3,elem4,elem5,elem6,elem7,elem8,bonus,winche,winchee,winchep,uusinta;winche = document.getElementById("winn").innerText;winchee = document.getElementById("winne").innerText;function changeDocTitle(){document.title = "FEIKKILOTTO ("+winche+" + "+winchee+")";document.getElementById("mainres").style.display='block';document.getElementById("krtkpl").innerText=krt;document.getElementById("klteur").innerText=klt;document.getElementById("vtteur").innerText=osm;}function chkWin(){calcBonus();if(winche === "7" || winche === "6" || winche === "5"){$("#main").css("background-color", "#FF0");clearTimeout(uusinta);changeDocTitle();} else if(winche === "4"){$("#main").css("background-color", "#FF0");} else if(winche === "3" && winchee === "1"){$("#main").css("background-color", "#FF0");} else if(winchep === "1"){$("#main").css("background-color", "#FF0");} else {$("#winnr").css("color", "#F00");}}function calcBonus(){if (winche === '7'){bonus = r7;}else if(winche === '6' && winchee === '1' && winchep === '1'){bonus = r6extrawithplus;}else if(winche === '6' && winchee === '1' && winchep === '0'){bonus = r6extrawithoutplus;}else if(winche === '6' && winchee === '0' && winchep === '1'){bonus = r6withplus;}else if (winche === '6' && winchee === '0' && winchep === '0'){bonus = r6withoutplus;} else if(winche === '5' && winchep === '1'){bonus = r5withplus;}else if(winche === '5' && winchep === '0'){bonus = r5withoutplus;}else if(winche === '4' && winchep === '1'){bonus = r4withplus;}else if(winche === '4' && winchep === '0'){bonus = r4withoutplus;}else if(winche === '3' && winchee === '1' && winchep === '1'){bonus = r3extrawithplus;}else if(winche === '3' && winchee === '1' && winchep === '0'){bonus = r3extrawithoutplus;}else if(winchep === '1'){bonus = rplus;}else {bonus = stake;}}function newDraw(){location.reload()}function showYours(){$("#yours").fadeIn(1500);}function showDraw(){$("#drawed").fadeIn(1500);$("#nd").animate({opacity:1},1000);"undefined"!=typeof unoxrec&&(elem1=document.getElementById("unox")).classList.add("rec");"undefined"!=typeof unoxrece&&(elem1=document.getElementById("unox")).classList.add("rece");"undefined"!=typeof unoxrecep&&(elem1=document.getElementById("unox")).classList.add("recep");"undefined"!=typeof duexrec&&(elem2=document.getElementById("duex")).classList.add("rec");"undefined"!=typeof duexrece&&(elem2=document.getElementById("duex")).classList.add("rece");"undefined"!=typeof duexrecep&&(elem2=document.getElementById("duex")).classList.add("recep");"undefined"!=typeof trexrec&&(elem3=document.getElementById("trex")).classList.add("rec");"undefined"!=typeof trexrece&&(elem3=document.getElementById("trex")).classList.add("rece");"undefined"!=typeof trexrecep&&(elem3=document.getElementById("trex")).classList.add("recep");"undefined"!=typeof quattroxrec&&(elem4=document.getElementById("quattrox")).classList.add("rec");"undefined"!=typeof quattroxrece&&(elem4=document.getElementById("quattrox")).classList.add("rece");"undefined"!=typeof quattroxrecep&&(elem4=document.getElementById("quattrox")).classList.add("recep");"undefined"!=typeof cinquexrec&&(elem5=document.getElementById("cinquex")).classList.add("rec");"undefined"!=typeof cinquexrece&&(elem5=document.getElementById("cinquex")).classList.add("rece");"undefined"!=typeof cinquexrecep&&(elem5=document.getElementById("cinquex")).classList.add("recep");"undefined"!=typeof seixrec&&(elem1=document.getElementById("seix")).classList.add("rec");"undefined"!=typeof seixrece&&(elem1=document.getElementById("seix")).classList.add("rece");"undefined"!=typeof seixrecep&&(elem1=document.getElementById("seix")).classList.add("recep");"undefined"!=typeof settexrec&&(elem7=document.getElementById("settex")).classList.add("rec");"undefined"!=typeof settexrece&&(elem7=document.getElementById("settex")).classList.add("rece");"undefined"!=typeof settexrecep&&(elem7=document.getElementById("settex")).classList.add("recep");"undefined"!=typeof ottoxrecep&&(elem8=document.getElementById("ottox")).classList.add("recep");}$(document).ready(function(){setTimeout(function(){showYours()},1e3);setTimeout(function(){showDraw();chkWin();document.getElementById("winnr").innerText=bonus;},3e3);uusinta=setTimeout(function(){newDraw()},3e4)})</script>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement