/var/www/hkosl.com/littleark/webadmin/error.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
<?php

$page_settings 
= array(
    
'formid'     => 'Home'// for permission
    
'section'    => 'Error'// parent/page title
    
'subsection' => '403'// page title
    
'domain'     => 'home'// table/model name
    
'access'     => 'GNr'// for permission
);
require_once 
"check_login.php";

$status_code = (int) $_REQUEST['code'] ?: (int) $_code ?: '403';
if (
$status_code) {
  
// todo: translate code to proper description
  // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
  
$page_settings['subsection'] = $status_code;
  
$page_settings['msg'] = "Forbidden";
}
http_response_code($status_code);
// header("HTTP/1.0 {$page_settings['subsection']} {$page_settings['msg']}");
?>
<!DOCTYPE html>
<html>
  <head>
      <?php require_once "_html_head.php";?>
  </head>
  <body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">

      <?php require_once "_header.php";?>

      <?php require_once "_menu.php";?>

      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">

          <h1>
            <?=_lang($page_settings['subsection']);?>
            <small><?=_lang("Forbidden");?></small>
          </h1>

          <ol class="breadcrumb">
            <li><a href="index.php"><?=_lang("Dashboard");?></a></li>
            <li><a href="index.php"><?=_lang("Error");?></a></li>
            <li class="active"><i class="fa"></i> <?=_lang($page_settings['msg']);?></li>
          </ol>

        </section>

        <!-- Main content -->
        <section class="content">

          <!-- Your Page Content Here -->

          <div class="error-page">
                  <h2 class="headline text-red"><?=_($page_settings['subsection']);?></h2>

                  <div class="error-content">
                    <h3>&nbsp;</h3>
                    <h3><i class="fa fa-warning text-red"></i> <?=$page_settings['msg']?>.</h3>

                    <p>
                      <a href="./">return to dashboard</a> or contact administrator.
                    </p>

                    <form class="search-form hide">
                      <div class="input-group">
                        <input type="text" name="search" class="form-control" placeholder="Search">

                        <div class="input-group-btn">
                          <button type="submit" name="submit" class="btn btn-danger btn-flat"><i class="fa fa-search"></i>
                          </button>
                        </div>
                      </div>
                      <!-- /.input-group -->
                    </form>
                  </div>
                </div>
                <!-- /.error-page -->


          <!-- End of Your Page Content Here -->

        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->

      <?php require_once "_footer.php";?>

      <?php require_once "_aside.php";?>

    </div><!-- ./wrapper -->

    <!-- REQUIRED JS SCRIPTS -->
      <?php require_once "_html_script.php";?>
  </body>
</html>