Newer
Older
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
<?
function dispNews(){
$str = '<div id="main_body"><div id="all_side">';
$str .= '<div id="newsbox">';
$str .= '<ul>' . dispNewsRows() . '</ul>';
$str .= '</div></div>';
$str .= '<div class="clr"> </div>';
$str .= '</div>';
echo $str;
}
function dispNewsRows(){
$str = '';
if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] )
$result = getLastNews(2);
else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] )
$result = getLastNews(1);
else
$result = getLastNews(0);
if (mysql_num_rows($result)){
while ($news = mysql_fetch_array($result)) {
// DISP NEWS TITLE BY TENDU
$str .= dispWhenTendu($news["news_tendu"]);
$str .= '<li><h2><strong>'.$news["news_title"].'</strong>';
// DISP NEWS CONTENT BY TENDU
$str .= dispWhenTendu($news["news_tendu"]);
$str .= '<span class="news_date"> - '.$news["news_date"].'</span></h2>
<p class="news_text">'.$news["news_comment"].'</p>
<p class="news_separator"><br /><img alt="" src="images/corner_20.png" /><br /></p>
</li>';
}
}
return ($str);
}
?>