forked from dcms-social/dcms107
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrules.php
415 lines (40 loc) · 1.75 KB
/
rules.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
<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
$banpage=true;
include_once 'sys/inc/user.php';
//only_reg();
$set['title']='Правила';
include_once 'sys/inc/thead.php';
title();
err();
aut();
if ((!isset($_SESSION['refer']) || $_SESSION['refer']==NULL)
&& isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!=NULL &&
!preg_match('#info\.php#',$_SERVER['HTTP_REFERER']))
$_SESSION['refer']=str_replace('&','&',preg_replace('#^http://[^/]*/#','/', $_SERVER['HTTP_REFERER']));
if (is_file(H.'sys/add/rules.txt'))
{
$f=file(H.'sys/add/rules.txt');
$k_page=k_page(count($f),$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*($page-1);
$end=$set['p_str']*$page;
for ($i=$start;$i<$end && $i<count($f);$i++)
echo ($i+1).') '.trim(stripcslashes(htmlspecialchars($f[$i])))."<br />\n";
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
}
if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
{
echo "<div class=\"foot\">\n";
echo "«<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a><br />\n";
echo "</div>\n";
}
include_once 'sys/inc/tfoot.php';
?>