C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\portal\modules\news\include.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
<?php
if(file_exists($mod_root."/news_count.php")) {
require(
$mod_root."/news_count.php");
}
$f_count 0;
$dir stripslashes($mod_root."/news");
$handle=@opendir($dir);
 
$dir_arr=array();
  while (
$file readdir($handle))
 {
  if (
$file != "." && $file != "..")
  {
    
   if(
is_dir($dir."/".$file))
   {
    
array_push($dir_arr,$file);
   }
if(
$file != "index.html") {
$f_count++;
}
  }
 }
 
closedir($handle);

if(!isset(
$news_show)) {
$news_show 5;
}
if(!isset(
$news_start)) {
$news_start $f_count 5;
}
$r_count 0;
$news_show_l "";
$news_show_m "";
$count 0;
$latest_10 "";
for(
$count 0$count <= $news_count$count++) {
if(
$count != 0) {
if(
file_exists($dir "/" $count ".php")) {
if((
$r_count >= $f_count 10) && ($r_count <= $f_count)) {
require(
$dir "/" $count ".php");
$latest_10 "&middot; <a href=\"$url/load.php?mod=news&do=view_comments&id=$count\">$subject</a> ($comments_count)<br>" $latest_10;
}
if((
$r_count >= $news_start) && ($r_count <= $news_start $news_show)) {
$news_id $count;
require(
$dir "/" $count ".php");
$avatar "";
if(
file_exists($root."/users/".strtolower($poster).".php")) {
require(
$root."/users/".strtolower($poster).".php");
}
if(
$avatar != "") {
$avatar get_avatar($poster);
}
$comments_link "<a href=\"$mod_url&do=view_comments&id=".$news_id."\">";
$comments_link_close "</a>";
require(
$mod_root."/news_style.php");
$var['news'] = "<a name=\"".$count."\"></a>" $news_style $var['news'];
}
if(
$r_count $news_start) { $news_show_m 1; }
if(
$r_count $news_start $news_show) { $news_show_l 1; }
$r_count++;
}
}
}
if((
$news_show_l == 1) || ($news_show_m == 1)) {
$var['news'] = $var['news'] . "<p><center>";
}
if(
$news_show_l == 1) {
$var['news'] = $var['news'] . "[<a href=\"".$_SERVER['PHP_SELF']."?mod=news&news_start=".($news_start $news_show 1)."&news_show=".$news_show."\">&lt;&lt; Previous ".$news_show."</a>] ";
}
if(
$news_show_m == 1) {
$var['news'] = $var['news'] . "[<a href=\"".$_SERVER['PHP_SELF']."?mod=news&news_start=".($news_start $news_show 1)."&news_show=".$news_show."\">Next ".$news_show." &gt;&gt;</a>]";
}
if((
$news_show_l == 1) || ($news_show_m == 1)) {
$var['news'] = $var['news'] . "</center>";
}
$var['news_latest_10'] = $latest_10;
require(
$mod_root."/latest_news.php");
?>