<?php
if (!isset($_SESSION['username'])) {
header('Location: ./login.php'); }
?>
<?php
$error_message1 = "";
$action = isset($_POST['action']) ?
$_POST['action'] : ''; $mysql_server = 'localhost';
$mysql_username = 'xxx';
$mysql_password = 'xxx';
$mysql_database = 'xxx';
$mysql_table1 = 'nagroda1';
$mysql_table2 = 'nagroda2';
$mysql_table3 = 'nagroda3';
$mysql_table4 = 'nagroda4';
$mysql_table5 = 'nagroda5';
$mysql_table6 = 'nagroda6';
// Tabele do errorów
$db = mysql_connect($mysql_server, $mysql_username, $mysql_password); $sql = "SELECT id FROM ".$mysql_table1;
$sql = "SELECT id FROM ".$mysql_table2;
$sql = "SELECT id FROM ".$mysql_table3;
$sql = "SELECT id FROM ".$mysql_table4;
$sql = "SELECT id FROM ".$mysql_table5;
$sql = "SELECT id FROM ".$mysql_table6;
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $nagroda1 >= 2 ) // Ilość nagrody 1
{
$error_message1 = 'Brak nagrody';
}
else
// Brak nagrody 1
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $nagroda2 >= 2 ) // Ilość nagrody 2
{
$error_message2 = 'Brak nagrody';
}
else
// Brak nagrody 2
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $nagroda3 >= 2 ) // Ilość nagrody 3
{
$error_message3 = 'Brak nagrody';
}
else
// Brak nagrody 3
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $nagroda4 >= 2 ) // Ilość nagrody 4
{
$error_message4 = 'Brak nagrody';
}
else
// Brak nagrody 4
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $nagroda5 >= 2 ) // Ilość nagrody 5
{
$error_message5 = 'Brak nagrody';
}
else
// Brak nagrody 5
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $nagroda6 >= 2 ) // Ilość nagrody 6
{
$error_message6 = 'Brak nagrody';
}
else
// Brak nagrody 6
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="pl">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Katalog nagród</title>
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
</style>
<style type="text/css">
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<script type="text/javascript">
<!--
function SetImage(id, filename)
{
var elem=document.getElementById(id);
if(elem)
{
elem.src=filename;
}
}
//-->
</script>
</head>
<body>
<div id="container">
<div id="wb_Shape1" style="margin:0;padding:0;position:absolute;left:259px;top:295px;width:745px;heigh
t:884px;text-align:left;z-index:0;">
<img src="images/img0015.png" id="Shape1" alt="" title="" style="border-width:0;width:745px;height:884px"></div>
<div id="wb_Image1" style="margin:0;padding:0;position:absolute;left:254px;top:46px;width:740px;height
:168px;text-align:left;z-index:1;">
<img src="images/top.bez.png" id="Image1" alt="" border="0" style="width:740px;height:168px;"></div>
<div id="wb_Image2" style="margin:0;padding:0;position:absolute;left:253px;top:0px;width:105px;height:
45px;text-align:left;z-index:2;">
<a href="./index.html" onmouseover="SetImage('Image2','images/button-niebieski_01.png');return false;" onmouseout="SetImage('Image2','images/przycisk-szary1_01.png');return false;"><img src="images/przycisk-szary1_01.png" id="Image2" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image3" style="margin:0;padding:0;position:absolute;left:358px;top:0px;width:105px;height:
45px;text-align:left;z-index:3;">
<a href="./rejestracja.html" onmouseover="SetImage('Image3','images/button-niebieski_02.png');return false;" onmouseout="SetImage('Image3','images/przycisk-szary1_02.png');return false;"><img src="images/przycisk-szary1_02.png" id="Image3" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image4" style="margin:0;padding:0;position:absolute;left:463px;top:0px;width:105px;height:
45px;text-align:left;z-index:4;">
<a href="./oferty.html" onmouseover="SetImage('Image4','images/button-niebieski_03.png');return false;" onmouseout="SetImage('Image4','images/przycisk-szary1_03.png');return false;"><img src="images/przycisk-szary1_03.png" id="Image4" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image5" style="margin:0;padding:0;position:absolute;left:568px;top:0px;width:105px;height:
45px;text-align:left;z-index:5;">
<a href="./dowody.html" onmouseover="SetImage('Image5','images/button-niebieski_04.png');return false;" onmouseout="SetImage('Image5','images/przycisk-szary1_04.png');return false;"><img src="images/przycisk-szary1_04.png" id="Image5" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image6" style="margin:0;padding:0;position:absolute;left:673px;top:0px;width:105px;height:
45px;text-align:left;z-index:6;">
<a href="./zasady.html" onmouseover="SetImage('Image6','images/button-niebieski_05.png');return false;" onmouseout="SetImage('Image6','images/przycisk-szary1_05.png');return false;"><img src="images/przycisk-szary1_05.png" id="Image6" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image7" style="margin:0;padding:0;position:absolute;left:778px;top:0px;width:105px;height:
45px;text-align:left;z-index:7;">
<a href="./wyplata.html" onmouseover="SetImage('Image7','images/button-niebieski_06.png');return false;" onmouseout="SetImage('Image7','images/przycisk-szary1_06.png');return false;"><img src="images/przycisk-szary1_06.png" id="Image7" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image8" style="margin:0;padding:0;position:absolute;left:883px;top:0px;width:105px;height:
45px;text-align:left;z-index:8;">
<a href="./forum.html" onmouseover="SetImage('Image8','images/button-niebieski_07.png');return false;" onmouseout="SetImage('Image8','images/przycisk-szary1_07.png');return false;"><img src="images/przycisk-szary1_07.png" id="Image8" alt="" border="0" style="width:105px;height:45px;"></a></div>
<div id="wb_Image9" style="margin:0;padding:0;position:absolute;left:354px;top:326px;width:154px;heigh
t:240px;text-align:left;z-index:9;">
<a href="./nagroda1.php"><img src="images/godzrestocku.png" id="Image9" alt="" border="0" style="width:154px;height:240px;"></a></div>
<div id="wb_Image10" style="margin:0;padding:0;position:absolute;left:552px;top:326px;width:154px;heigh
t:240px;text-align:left;z-index:10;">
<img src="images/javelin30.png" id="Image10" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image11" style="margin:0;padding:0;position:absolute;left:750px;top:326px;width:154px;heigh
t:240px;text-align:left;z-index:11;">
<img src="images/pktx2.png" id="Image11" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image12" style="margin:0;padding:0;position:absolute;left:354px;top:602px;width:154px;heigh
t:240px;text-align:left;z-index:12;">
<img src="images/premiumnagrodaeu.png" id="Image12" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image13" style="margin:0;padding:0;position:absolute;left:552px;top:602px;width:154px;heigh
t:240px;text-align:left;z-index:13;">
<img src="images/premka3.png" id="Image13" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Image14" style="margin:0;padding:0;position:absolute;left:751px;top:602px;width:154px;heigh
t:240px;text-align:left;z-index:14;">
<img src="images/losowygift.png" id="Image14" alt="" border="0" style="width:154px;height:240px;"></div>
<div id="wb_Shape2" style="margin:0;padding:0;position:absolute;left:413px;top:234px;width:453px;heigh
t:52px;text-align:center;z-index:15;">
<img src="images/img0016.png" id="Shape2" alt="" title="" style="border-width:0;width:453px;height:52px"></div>
<div id="Html1" style="position:absolute;left:593px;top:459px;width:222px;height:252px;z-index:16">
<div id="brak1" style="position:absolute;left:-200px;top:76px;width:119px;height:29px;z-index:16">
<?php echo $error_message1;?></div>
<div id="brak2" style="position:absolute;left:1px;top:76px;width:119px;height:29px;z-index:16">
<?php echo $error_message2;?></div>
<div id="brak3" style="position:absolute;left:-200px;top:76px;width:119px;height:29px;z-index:16">
<?php echo $error_message3;?></div>
<div id="brak4" style="position:absolute;left:-200px;top:76px;width:119px;height:29px;z-index:16">
<?php echo $error_message4;?></div>
<div id="brak5" style="position:absolute;left:-200px;top:76px;width:119px;height:29px;z-index:16">
<?php echo $error_message5;?></div>
<div id="brak6" style="position:absolute;left:-200px;top:76px;width:119px;height:29px;z-index:16">
<?php echo $error_message6;?></div>
</div>
</div>
</body>
</html>