daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest May 17th, 2018 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. include "../config/sql.php";
  4. $brugernavn = $_SESSION['brugernavn'];
  5. $kodeord = $_SESSION['kodeord'];
  6. $rowData = mysql_query("SELECT * FROM bruger WHERE brugernavn='$brugernavn' AND kodeord='$kodeord'") or die(mysql_error());
  7. if (mysql_num_rows($rowData) == 1) {
  8.     while ($data = mysql_fetch_array($rowData)) {
  9.  
  10.         if ($_GET['ryk'] == "ja") {
  11.             $sql = mysql_query("SELECT * FROM brugere WHERE felt='" . $t . "'") or die(mysql_error());
  12.             $num = mysql_num_rows($sql);
  13.  
  14.             if ($num == "0") {
  15.                 mysql_query("UPDATE bruger SET felt='$_GET[felt]' WHERE brugernavn='$brugernavn'") or die(mysql_error());
  16.             }
  17.         }
  18.         ?>
  19.  
  20.         <html>
  21.             <body onload='loadet();'>
  22.  
  23.                 <script>
  24.                     parent.document.getElementById('chat').innerHTML = "<TABLE id='board' background='1.jpg'><?php
  25.         for ($t = 1; $t < 37; $t++) {
  26.  
  27.             $sql = mysql_query("SELECT * FROM bruger WHERE felt='" . $t . "'") or die(mysql_error());
  28.             $row = mysql_fetch_array($sql);
  29.             $num = mysql_num_rows($sql);
  30.  
  31.             if ($t % 9 == 1) {
  32.                 echo "<TR>";
  33.             }
  34.  
  35.             if ($num == "0") {
  36.                 echo "<TD id=" . $t . "><a href='ryk.php?felt=" . $t . "&ryk=ja' target='script'><img src='none.gif' width='100%' height='100%'></a></TD>";
  37.             } else {
  38.                 echo "<TD id=" . $t . "><img src=" . $row[figur] . "></TD>";
  39.             }
  40.  
  41.             if ($t % 9 == 0) {
  42.                 echo "</TR>";
  43.             }
  44.         }
  45.         ?></TABLE>";
  46.  
  47.                     function loadet(){
  48.                         setTimeout("location.reload(true)",5000); //antal millisekunder, der skal gå før chatten opdaterer (efter at siden er blevet hentet) her sat til 5 sekunder
  49.                     }
  50.                 </script>
  51.  
  52.  
  53.                 <?php
  54.             }
  55.         }
  56.         ?>
  57.  
  58. ////
  59.  
  60. chat.php
  61.  
  62.  
  63.  
  64. <html>
  65. <head>
  66. <title>test</title>
  67. <STYLE type=text/css>
  68. #board {
  69.     width: 420; height: 350; BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BORDER-LEFT: #000 1px solid; BORDER-BOTTOM: #000 1px solid; BORDER-COLLAPSE: collapse
  70. }
  71. #board TD {
  72.     VERTICAL-ALIGN: middle; WIDTH: 60px; CURSOR: pointer; BORDER: 0px; HEIGHT: 80px; TEXT-ALIGN: center;
  73. }
  74.  
  75. img
  76. {
  77. border: 0px;
  78. }
  79.  
  80. </STYLE>
  81. </head>
  82. <body onload='parent.script.location.href="ryk.php";'>
  83. <iframe name="chat" width="0" height="0" border="0" frameborder="0" name='script' src"ryk.php"></iframe>
  84. <div id='chat'></div>
  85. </body>
  86. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top