-
Notifications
You must be signed in to change notification settings - Fork 0
/
liens.php
102 lines (83 loc) · 3.5 KB
/
liens.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
<?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/javascript/clsjavascript.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/lien/clslien.php");
$strPage = basename($_SERVER["SCRIPT_NAME"]);
$objMotd = new clsmotd();
$objTexte = new clstexte("./texte/lien");
$objBody = new clsbody();
$objHead = new clshead($objTexte->stpi_getArrTxt("headtitre"), $objTexte->stpi_getArrTxt("keywords"), $objTexte->stpi_getArrTxt("description"));
$objJavaScript = new clsjavascript();
$objMenu = new clsmenu($strPage);
$objFooter = new clsfooter();
$objBdd = clsBdd::singleton();
$objLock = new clslock($strPage, "login.php");
$objLock->stpi_pageNotEncrypted();
$objLien = new clslien();
$objTypeLien = $objLien->stpi_getObjTypeLien();
// Début page
$objHead->stpi_affPublicHead();
$objBody->stpi_affBodyHeader($objTexte->stpi_getArrTxt("welcome"));
// <!-- MainContentStart -->
$objMotd->stpi_affPublic();
if (!$arrNbTypeLienID = $objTypeLien->stpi_selAllPublic())
{
$arrNbTypeLienID = array();
}
foreach ($arrNbTypeLienID as $nbTypeLienID)
{
$objTypeLien->stpi_setNbID($nbTypeLienID);
$objTypeLien->stpi_setObjTypeLienLgFromBdd();
$objTypeLienLg = $objTypeLien->stpi_getObjTypeLienLg();
print("<h2>" . $objBdd->stpi_trsBddToHTML($objTypeLienLg->stpi_getStrName()) . "</h2>\n");
$strDesc = $objTypeLienLg->stpi_getStrDesc();
if(!empty($strDesc))
{
print("<p>\n");
print($objBdd->stpi_trsBddToBBCodeHTML($objTypeLienLg->stpi_getStrDesc()) . "\n");
print("</p>\n");
}
print("<br/>\n");
if (!$arrNbLienID = $objTypeLien->stpi_selNbLienID())
{
$arrNbLienID = array();
}
foreach ($arrNbLienID as $nbLienID)
{
$objLien->stpi_setNbID($nbLienID);
$objLien->stpi_setObjLienLgFromBdd();
$objLienLg = $objLien->stpi_getObjLienLg();
print("<table border=\"0\">\n");
print("<tr>\n");
$nbImageID = $objLien->stpi_getNbImageID();
if (!empty($nbImageID))
{
print("<td style=\"text-align: center; vertical-align: middle; width:" . $objBdd->stpi_trsBddToHTML($objLien->stpi_getNbImgWidthMax()) . "px; height:" . $objBdd->stpi_trsBddToHTML($objLien->stpi_getNbImgHeightMax()) . "px;\">\n");
print("<img alt=\"" . $objBdd->stpi_trsBddToHTML($objLien->stpi_getNbImageID()) . "\" src=\"./lienimgaff.php?nbImageID=" . $objBdd->stpi_trsBddToHTML($objLien->stpi_getNbImageID()) . "\" />\n");
print("</td>\n");
}
print("<td style=\"vertical-align: top;\">\n");
print("<h3>" . $objBdd->stpi_trsBddToHTML($objLienLg->stpi_getStrName()) . "</h3>\n");
$strDesc = $objLienLg->stpi_getStrDesc();
print("<p>\n");
if (!empty($strDesc))
{
print($objBdd->stpi_trsBddToBBCodeHTML($objLienLg->stpi_getStrDesc()) . "<br/>\n");
}
print("<a target=\"_blank\" href=\"" . $objBdd->stpi_trsBddToHTML($objLienLg->stpi_getStrLien()) . "\">" . $objBdd->stpi_trsBddToHTML($objLienLg->stpi_getStrLien()) . "</a><br/>\n");
print("</p>\n");
print("</td>\n");
print("</tr>\n");
print("</table>\n");
print("<br/>\n");
}
}
// <!-- MainContentEnd -->
$objFooter->stpi_affFooter();
?>