index.php
3.27 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
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
<?
session_start();
Error_Reporting(E_ALL & ~E_NOTICE);
include ("config.php");
include ("./lang/lang.php");
include ("./lib/db_class.php");
include ("./lib/pages_class.php");
$lang = "ua";
if (!isset($_GET['pages']))
{
$pages = "main";
}
else {
$pages = $_GET['pages'];
}
$db = new DBClass(SERVER,USER,PASSWORD,DBNAME);
include ("./modules/autorization/autorization.php");
include ("./modules/registration/registration.php");
if (($_POST[fogot_pass_form])or($_GET['hash_code_recover'])or($_GET['hash_code_back']))
{
include ("./modules/recover_pass/recover_pass.php");
}
$PagesClass = new PagesClass();
if ($db->openConnection())
{
$autoriz = $PagesClass->notAutorizate($pages, $lang);
$PagesClass->switchContentBlock($pages, $content_block, $text_block);
$PagesClass->pages = $pages;
$colum = "p_name, top_text, tpl, title, about, about_2, keywords, description, not_autoriz";
$table = "pages_$lang";
$where = "link = "."'".$pages."'"."";
$pages_el = $db->select($colum,$table,$where);
$pages_el_about = $PagesClass->switchContentText($pages_el[0][about_2], $regist, $_GET['hash_code_recover'], $pages);
if (!empty($pages_el_about))
{
$pages_el[0][about] = $pages_el_about;
}
}
else
{
echo "Ошибка подключения к базе данных";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
<TITLE><? echo $pages_el[0][title]; ?></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META Name="KEYWORDS" Content="<? echo $pages_el[0][keywords]; ?>">
<META Name="DESCRIPTION" Content="<? echo $pages_el[0][description] ?>">
<LINK HREF="http://<? print_r($_SERVER['HTTP_HOST']) ?>/css/style.css" TYPE="text/css" REL="stylesheet">
<script type="text/javascript" src="http://<? print_r($_SERVER['HTTP_HOST']) ?>/js/jquery-1.7.2.js" ></script>
<script type="text/javascript" src="http://<? print_r($_SERVER['HTTP_HOST']) ?>/js/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://<? print_r($_SERVER['HTTP_HOST']) ?>/js/mousewheel.js"></script>
<link rel="shortcut icon" href="http://<? print_r($_SERVER['HTTP_HOST']) ?>/images/favicon.ico"/>
<link type="text/css" href="http://<? print_r($_SERVER['HTTP_HOST']) ?>/css/pwdmeter.css" media="screen" rel="stylesheet"/>
<script type="text/javascript" src="http://<? print_r($_SERVER['HTTP_HOST']) ?>/js/slider.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://<? print_r($_SERVER['HTTP_HOST']) ?>/css/slider.css" />
<!--[if lt IE 7]>
<link type="text/css" href="http://<? print_r($_SERVER['HTTP_HOST']) ?>/css/ie.css" media="screen" rel="stylesheet" />
<![endif]-->
<!--<script type="text/javascript" src="http://<? print_r($_SERVER['HTTP_HOST']) ?>/js/pwdmeter.js" language="javascript"></script>-->
<base href="http://<? print_r($_SERVER['HTTP_HOST']) ?>">
</HEAD>
<BODY>
<div class="main_container_div">
<div class="site_top">
<?php
include ("./tpl/top.php");
?>
</div>
<div class="div_main_block">
<?php
include ("./tpl/tpl_".$pages_el[0][tpl].".php");
?>
</div>
</div>
<div class="div_bottom">
<div class="main_container_div">
<?php
include ("./tpl/bottom.php");
?>
</div>
</div>
<?
$db->closeConnection();
?>
</BODY>
</HTML>