-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
49 lines (37 loc) · 1.19 KB
/
index.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
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Особый случай - вход администратора.
if (isset($_POST['adminHash'])) {
require_once("config.php");
// Подключим шаблон заголовка.
include("testp-head.html");
include("testp-admin.php");
// Подкючим шаблон footer.
include("testp-foot.html");
die();
}
if ($_GET['act'] == null)
Header("Location: index.php?act=add&from=noact");
require_once("config.php");
// Переменные.
$act = $_GET['act'];
$errtype = isset($_GET['errtype']) ? $_GET['errtype'] : "";
// Подключим шаблон заголовка.
include("testp-head.html");
if ($act == "add")
if ($errtype == "maxsizelimit")
// Превышен лимит размера файла с изображенем.
include("testp-imgmaxsizelim.html");
elseif ($errtype == "uploadfail")
include("testp-uplfail.html");
else
include("testp-form.html");
elseif ($act == "view")
include("testp-viewer.php");
elseif ($act == "admin" || $_POST['adminHash'])
include("testp-admin.php");
else
die(include("testp-foot.html"));
// Подкючим шаблон footer.
include("testp-foot.html");
?>