[go: up one dir, main page]

Menu

[r21]: / advicesTable.php  Maximize  Restore  History

Download this file

44 lines (35 with data), 2.4 kB

 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
<?php
include('includes/databaseLogin.php');
include('includes/installedLanguage.php');
echo "<!DOCTYPE html>";
?>
<html>
<head>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<?php
mysql_query("BEGIN");
if(isset($_POST[sCode])){
$getAdvices = mysql_query("SELECT * FROM advices ORDER BY adviceTime");
while($row = mysql_fetch_array($getAdvices)) {
$titoloAdv = str_replace('\'', '\\\'', $row[adviceTitle]);
if($_POST[priv] == 'w'){
echo "<div class=\"Block\"><div class=\"BlockBL\"><div></div></div><div class=\"BlockBR\"><div></div></div><div class=\"BlockTL\"></div><div class=\"BlockTR\"><div></div></div><div class=\"BlockT\"></div><div class=\"BlockR\"><div></div></div><div class=\"BlockB\"><div></div></div><div class=\"BlockL\"></div><div class=\"BlockC\"></div><div class=\"BlockContent\"><span class=\"BlockHeader\"><span><table style=\"width: 100%;\"><tr><td>" . $row[adviceTitle] . "</td><td style=\"text-align:right; width: 1%;\"><a class=\"aAdviceModify\" name=\"" . $row[adviceID] . "\" href=\"#\"><img src=\"images/nuovoApp.png\"></a></td><td style=\"text-align:right; width: 1%;\"><a class=\"aAdviceDelete\" name=\"" . $row[adviceID] . "_" . $titoloAdv . "\" href=\"#\"><img src=\"images/cancella.png\"></a></td></tr></table></span></span><div class=\"BlockContentBorder\" style=\"text-indent:50px; text-align:justify;\">";
}else{
echo "<div class=\"Block\"><div class=\"BlockBL\"><div></div></div><div class=\"BlockBR\"><div></div></div><div class=\"BlockTL\"></div><div class=\"BlockTR\"><div></div></div><div class=\"BlockT\"></div><div class=\"BlockR\"><div></div></div><div class=\"BlockB\"><div></div></div><div class=\"BlockL\"></div><div class=\"BlockC\"></div><div class=\"BlockContent\"><span class=\"BlockHeader\"><span><table style=\"width: 100%;\"><tr><td>" . $row[adviceTitle] . "</td></tr></table></span></span><div class=\"BlockContentBorder\" style=\"text-indent:50px; text-align:justify;\">";
}
if($row[adviceImgName] != 'none'){
echo "<div style=\"float: right;\"><img src=\"images/" . $row[adviceImgName] . "\"></div>";
}
echo nl2br($row[adviceContent]);
//echo urldecode($row[adviceContent]);
echo "</div>";
echo "</div>";
echo "</div>";
}
}
mysql_query("COMMIT");
?>
</body>
</html>