-
Notifications
You must be signed in to change notification settings - Fork 1
/
show_news.php
133 lines (111 loc) · 2.9 KB
/
show_news.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
<?php
include_once 'head.php';
//----------------------------------
// Âîññòàâøèå èç Çàäà
//----------------------------------
foreach($_GET as $k => $v){
$$k = (!$v ? $$k : @htmlspecialchars($v));
}
if (is_array($_CUTE)){
foreach($_CUTE as $k => $v){
$$k = (!$static ? (!$v ? $$k : @htmlspecialchars($v)) : '');
}
}
foreach($_POST as $k => $v){
$$k = (!$v ? $$k : @htmlspecialchars($v));
}
if (is_array($static)){
foreach($vars as $k => $v){
if ($v != 'static' and $v != 'id' and $v != 'ucat'){
unset($$v);
}
}
foreach($static as $k => $v){
$$k = $v;
}
}
if (!$sort[0] or !eregi('(A|DE)SC', $sort[1])){
$sort = array('date', 'DESC');
}
if (eregi('([0-9]{2}):([0-9]{2}):([0-9]{2})', $time)){
$m_n = array('jan' => 1, 'feb' => 2, 'mar' => 3, 'apr' => 4, 'may' => 5, 'jun' => 6, 'jul' => 7, 'aug' => 8, 'sep' => 9, 'oct' => 10, 'nov' => 11, 'dec' => 12);
$time = explode(':', $time);
$time = mktime($time[0], $time[1], $time[2], (eregi('[a-z]', $month) ? $m_n[$month] : $month), $day, $year);
}
if (eregi('[a-z]', $category)){
$category = category_get_id($category);
}
if ($category and !eregi(',', $category)){
$template = ((!eregi('(rss|print).php', $_SERVER['PHP_SELF']) and !$static and $cat_template[$category]) ? $cat_template[$category] : $template);
}
if ($category){
foreach (explode(',', str_replace(' ', '', $category)) as $cat){
$category_tmp .= category_get_children($cat).',';
}
}
if (!$number){
$number = $sql->table_count('news');
}
if (!$template or strtolower($template) == 'default' or is_file($template)){
include $cutepath.'/data/tpl/Default.tpl';
} else {
include $cutepath.'/data/tpl/'.$template.'.tpl';
}
$cache_uniq = cache_touch_this();
$allow_categories = explode(',', chicken_dick($category_tmp, ','));
$allow_edit_comment = false;
$allow_add_comment = false;
$allow_comment_form = false;
$allow_full_story = false;
$allow_active_news = false;
$allow_comments = false;
if (!$static and ($id or $title or $time)){
if ($_POST['action'] == 'addcomment'){
$allow_add_comment = true;
} else {
$allow_full_story = true;
$allow_comments = true;
$allow_comment_form = true;
}
} else {
$allow_active_news = true;
}
include $cutepath.'/inc/show.inc.php';
$PHP_SELF = $_SERVER['PHP_SELF'];
if (!cache and !global_cache){
cache_remover();
}
if ($unset_vars = run_filters('unset', $unset_vars)){
foreach ($unset_vars as $unset){
unset($$unset);
}
}
unset(
/* ïîëüçîâàòåëüñêèå */
$template,
$category,
$static,
$number,
$year,
$month,
$day,
$user,
$author,
$skip,
$sort,
$cache_uniq,
$user_query,
/* ìóñîð */
$category_tmp,
$parent,
$catid,
$cat,
$no_prev,
$no_next,
$i,
$prev,
$count_tmp,
$unset_vars
);
?>
<!-- Powered by CuteNews.RU | http://cutenews.ru/ | http://forums.cutenewsru.com -->