-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.php
153 lines (140 loc) · 5.95 KB
/
event.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php
require_once("./stpiadmin/includes/includes.php");
require_once("./stpiadmin/includes/classes/content/clshead.php");
require_once("./stpiadmin/includes/classes/content/clsbody.php");
require_once("./stpiadmin/includes/classes/content/clsmenu.php");
require_once("./stpiadmin/includes/classes/content/clsfooter.php");
require_once("./stpiadmin/includes/classes/motd/clsmotd.php");
require_once("./stpiadmin/includes/classes/security/clslock.php");
require_once("./stpiadmin/includes/classes/event/clsevent.php");
$strPage = basename($_SERVER["SCRIPT_NAME"]);
$objMotd = new clsmotd();
$objTexte = new clstexte("./texte/event");
$objBody = new clsbody();
$objHead = new clshead($objTexte->stpi_getArrTxt("headtitre"), $objTexte->stpi_getArrTxt("keywords"), $objTexte->stpi_getArrTxt("description"));
$objMenu = new clsmenu($strPage);
$objFooter = new clsfooter();
$objBdd = clsBdd::singleton();
$objLock = new clslock($strPage, "login.php");
$objLock->stpi_pageNotEncrypted();
$objEvent = new clsevent();
$objEventLg =& $objEvent->stpi_getObjEventLg();
$objDateHeure =& $objEvent->stpi_getObjDateHeure();
$objDate =& $objDateHeure->stpi_getObjDate();
$objTypeEvent =& $objEvent->stpi_getObjTypeEvent();
$objTypeEventLg =& $objTypeEvent->stpi_getObjTypeEventLg();
$objAdresse =& $objEvent->stpi_getObjAdresse();
// Début page
$objHead->stpi_affPublicHead();
$objBody->stpi_affBodyHeader($objTexte->stpi_getArrTxt("welcome"));
// <!-- MainContentStart -->
$objMotd->stpi_affPublic();
if ($arrNbTypeEventID = $objTypeEvent->stpi_selAll())
{
foreach ($arrNbTypeEventID as $nbTypeEventID)
{
if ($objTypeEvent->stpi_setNbID($nbTypeEventID))
{
if ($objTypeEvent->stpi_setObjTypeEventLgFromBdd())
{
print("<a name=\"typeevent" . $objBdd->stpi_trsBddToHTML($nbTypeEventID) . "\"></a>\n");
print("<h2>" . $objBdd->stpi_trsBddToHTML($objTypeEventLg->stpi_getStrName()) . "</h2>\n");
$strDesc = $objTypeEventLg->stpi_getStrDesc();
if(!empty($strDesc))
{
print("<p>\n");
print($objBdd->stpi_trsBddToBBCodeHTML($strDesc) . "\n");
print("</p>\n");
}
print("<br/>\n");
}
if ($arrAdresseID = $objTypeEvent->stpi_selNbAdresseIDPublic())
{
foreach ($arrAdresseID as $nbAdresseID)
{
if ($objAdresse->stpi_setNbID($nbAdresseID))
{
print("<h1>" . $objBdd->stpi_trsBddToHTML($objAdresse->stpi_getStrEndroit()) . "</h1>\n");
print("<h2>" . $objBdd->stpi_trsBddToHTML($objAdresse->stpi_getStrAdresse()) . ", ");
print($objBdd->stpi_trsBddToHTML($objAdresse->stpi_getStrVille()) . ", ");
$strProvinceID = $objAdresse->stpi_getStrProvinceID();
if (!empty($strProvinceID) && $strProvinceID != "isNULL")
{
print($objBdd->stpi_trsBddToHTML($strProvinceID) . ", ");
}
print($objBdd->stpi_trsBddToHTML($objAdresse->stpi_getStrCountryID()) . ", ");
print($objBdd->stpi_trsBddToHTML($objAdresse->stpi_getStrCodePostal()));
print("</h2>\n");
if ($arrNbEventID = $objTypeEvent->stpi_selNbEventID($nbAdresseID))
{
foreach ($arrNbEventID as $nbEventID)
{
if ($objEvent->stpi_setNbID($nbEventID))
{
print("<a name=\"event" . $objBdd->stpi_trsBddToHTML($nbEventID) . "\"></a>\n");
print("<table border=\"0\">\n");
print("<tr>\n");
$nbImageID = $objEvent->stpi_getNbImageID();
if (!empty($nbImageID))
{
print("<td style=\"text-align: center; vertical-align: middle; width:" . $objBdd->stpi_trsBddToHTML($objEvent->stpi_getNbImgWidthMax()) . "px; height:" . $objBdd->stpi_trsBddToHTML($objEvent->stpi_getNbImgHeightMax()) . "px;\">\n");
print("<img alt=\"" . $objBdd->stpi_trsBddToHTML($nbImageID) . "\" src=\"./eventimgaff.php?nbImageID=" . $objBdd->stpi_trsBddToHTML($nbImageID) . "\" />\n");
print("</td>\n");
}
print("<td style=\"vertical-align: top;\">\n");
if ($objEvent->stpi_setObjEventLgFromBdd())
{
print("<h3>" . $objBdd->stpi_trsBddToHTML($objEventLg->stpi_getStrName()) . "</h3>\n");
print("<p>\n");
$strDesc = $objEventLg->stpi_getStrDesc();
if (!empty($strDesc))
{
print($objBdd->stpi_trsBddToBBCodeHTML($strDesc) . "<br/>\n");
}
$strLien = $objEventLg->stpi_getStrLien();
if (!empty($strLien))
{
print("<a target=\"_blank\" href=\"" . $objBdd->stpi_trsBddToHTML($strLien) . "\">" . $objBdd->stpi_trsBddToHTML($strLien) . "</a><br/>\n");
}
print("</p>\n");
}
if ($arrNbDateHeureID = $objEvent->stpi_selNbDateHeureIDPublic())
{
print("<p><b>\n");
foreach ($arrNbDateHeureID as $nbDateHeureID)
{
if ($objDateHeure->stpi_setNbID($nbDateHeureID))
{
list($dtDebut, $dtHeure) = explode(" ", $objDateHeure->stpi_getDtDebut());
print($objBdd->stpi_trsBddToHTML($objDate->stpi_trsDateISOtoTexte($dtDebut)) . " " . $objBdd->stpi_trsBddToHTML($dtHeure) . " ");
print($objBdd->stpi_trsBddToHTML($objTexte->stpi_getArrTxt("until")) . " ");
list($dtFin, $dtHeure) = explode(" ", $objDateHeure->stpi_getDtFin());
if ($dtDebut == $dtFin)
{
print($objBdd->stpi_trsBddToHTML($dtHeure));
}
else
{
print($objBdd->stpi_trsBddToHTML($objDate->stpi_trsDateISOtoTexte($dtFin)) . " " . $objBdd->stpi_trsBddToHTML($dtHeure) . " ");
}
print("<br/>\n");
}
}
print("</b></p>\n");
}
print("</td>\n");
print("</tr>\n");
print("</table>\n");
print("<br/>\n");
}
}
}
}
}
}
}
}
}
// <!-- MainContentEnd -->
$objFooter->stpi_affFooter();
?>