-
Notifications
You must be signed in to change notification settings - Fork 0
/
profily.php
97 lines (87 loc) · 2.85 KB
/
profily.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Language" content="cs">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta name="geo.country" content="CZ">
<meta name="keywords" content="skauti Plzeň,skauting Plzen,Vločka Plzeň,skauti předškoláci,skautský oddíl Plzeň">
<meta name="Rating" content="General">
<meta name="googlebot" content="snippet,archive">
<meta name="description" content="28. oddíl Vločka - Profily">
<link href="style.css" rel="stylesheet" type="text/css">
<link rel="image_src" href="http://vlocka.skauting.cz/images/ikonyweb/logo3.png">
<link href="http://vlocka.skauting.cz/images/ikonyweb/logo-mini3.ico" rel="Shortcut Icon">
<title>28. oddíl Vločka Plzeň</title>
</head>
<body>
<div id="hlavni">
<?php
require 'php/databaze.php';
require 'php-vzhled/zahlavi-default.php';
require 'php-vzhled/horejsek.php';
require 'php-vzhled/vlevo_zacatek.php';?>
<div class="odkazy">
<h3>PROFILY</h3>
<ul>
<?php
if(isset($_SESSION["profilID"])){
echo("<li><a href='profil.php?profilID=" . $_SESSION["profilID"] . "'>MŮJ PROFIL</a></li>");
}
?>
</ul>
</div>
<?php
require 'php-vzhled/vlevo_konec.php';
?>
<div class="obsah" >
<?php
if(!isset($databaze)){
$databaze = new Databaze();
}
if(isset($_SESSION["role"]) && $_SESSION["role"] < 2){
$sql = "SELECT profilID, prezdivka FROM profily";
}
else{
$sql = "SELECT profilID, prezdivka FROM profily WHERE aktivni > 0";
}
echo("<h1>Profily</h1>");
$profily = $databaze->queryObjectArray($sql);
if(array_key_exists("uspech", $_GET)){?>
<div class="succes">
<p><?php echo($_GET["uspech"])?></p>
</div>
<?php
}
if(!$profily){
echo("<p style=\"margin: 20px; font-size: 18px\">V databázi nejsou žádné profily");
}
else{
echo("<div class=\"profily_cele\">");
$barva = "#FFB96A";
for($i = 0; $i < count($profily); $i++){
$profil = $profily[$i];
echo("<a class=\"profily\" href=\"profil.php?profilID=" . $profil->profilID .
"\" style=\"display: block; background-color: " . $barva . "\">");
echo("<span class=\"profily-prezdivka\"><p>" . $profil->prezdivka . "</p></span>");
echo("<span class=\"profily-fotka\">");
include("php-vzhled/fotka_mala.php");
echo("</span>");
echo("</a>");
if($barva == "#FFB96A"){
$barva = "#FFEE9F";
}
else{
$barva = "#FFB96A";
}
}
echo("</div>");
}
?>
</div>
<?php require 'php-vzhled/spodek.php'?>
</div>
</body>
</html>