first commit

This commit is contained in:
karol1 2025-01-14 21:12:24 +01:00
commit d5255ea7fd
6 changed files with 124 additions and 0 deletions

0
american.php Normal file
View File

BIN
crested.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

0
crested.php Normal file
View File

BIN
peruwianka.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

69
peruwianka.php Normal file
View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="PL">
<head>
<meta charset="UTF-8">
<title>Hodowla świnek morskich</title>
<link rel="stylesheet" href="styl.css">
</head>
<body>
<header>
<h1>Hodowla świnek morskich - zamów świnkowe maluszki</h1>
</header>
<nav>
<a href="peruwianka.php">Rasa Peruwianka</a>
<a href="american.php">Rasa American</a>
<a href="crested.php">Rasa Crested</a>
</nav>
<aside>
<h3>Poznaj wszystkie rasy świnek morskich</h3>
<ol>
<?php
$mysqli = mysqli_connect('localhost', 'root', '', 'hodowla');
$lista = mysqli_query($mysqli, "SELECT rasa FROM rasy");
while($row = mysqli_fetch_row($lista)){
echo "<li>" . $row[0] . "</li>";
}
mysqli_close($mysqli);
?>
</ol>
</aside>
<main>
<img src="peruwianka.jpg" alt="Świnka morska rasy peruwianka">
<?php
$mysqli = mysqli_connect('localhost', 'root', '', 'hodowla');
$skrypt2 = mysqli_query($mysqli, "SELECT DISTINCT data_ur, miot, rasa FROM rasy JOIN swinki ON rasy.id = rasy_id WHERE rasy.id = '1'");
while($rasa = mysqli_fetch_array($skrypt2)){
echo "<h2>Rasa: " . $rasa[2] . "</h2>";
}
$skrypt2 = mysqli_query($mysqli, "SELECT DISTINCT data_ur, miot, rasa FROM rasy JOIN swinki ON rasy.id = rasy_id WHERE rasy.id = '1'");
while($rasa = mysqli_fetch_array($skrypt2)){
echo "<p>Data urodzenia: " . $rasa[0] . "</p>";
}
$skrypt2 = mysqli_query($mysqli, "SELECT DISTINCT data_ur, miot, rasa FROM rasy JOIN swinki ON rasy.id = rasy_id WHERE rasy.id = '1'");
while($rasa = mysqli_fetch_array($skrypt2)){
echo "<p>Oznaczenie miotu: " . $rasa[1] . "</p>";
}
mysqli_close($mysqli);
?><hr>
<h2>Świnki w tym miocie</h2>
<?php
$mysqli = mysqli_connect('localhost', 'root', '', 'hodowla');
$skrypt3 = mysqli_query($mysqli, "SELECT imie, cena, opis FROM swinki WHERE rasy_id = '1'");
while($trojka = mysqli_fetch_array($skrypt3)){
echo "<h3>" . $trojka[0] . " - " . $trojka[1] . "zl</h3><p>" . $trojka[2] . "</p>";
}
mysqli_close($mysqli);
?>
</main>
<footer>
<p>Stronę wykonał: CHUJ DUPA CIPA</p>
</footer>
</body>
</html>

55
styl.css Normal file
View File

@ -0,0 +1,55 @@
html {
font-family: Helvetica;
}
header, footer{
background-color: saddlebrown;
color: white;
text-align: center;
padding: 7px;
}
nav {
background-color: peru;
width: 80%;
height: 40px;
padding-top: 20px;
float: left;
}
main {
width: 80%;
height: 700px;
font-size: 120%;
overflow: auto;
float: left;
}
aside {
background-color: peru;
color: white;
width: 20%;
height: 760px;
float: right;
}
footer {
clear: both;
}
a {
color: #ddd;
padding-left: 90px;
font-size: 140%;
text-decoration: none;
}
a:hover{
color: white;
}
img{
float: left;
margin: 30px;
}