Переглянути джерело

Moved headers to the top to fix #29

Maurice Meyer 8 роки тому
батько
коміт
f238b7edaa
10 змінених файлів з 49 додано та 49 видалено
  1. 4 4
      add-domain.php
  2. 4 4
      domains.php
  3. 4 4
      edit-master.php
  4. 4 4
      edit-remote.php
  5. 4 4
      edit-user.php
  6. 6 6
      install.php
  7. 6 6
      logout.php
  8. 4 4
      password.php
  9. 9 9
      upgrade.php
  10. 4 4
      users.php

+ 4 - 4
add-domain.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Domains</title>

+ 4 - 4
domains.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Domains</title>

+ 4 - 4
edit-master.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Domains</title>

+ 4 - 4
edit-remote.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Remotes</title>

+ 4 - 4
edit-user.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Users</title>

+ 6 - 6
install.php

@@ -1,3 +1,9 @@
+<?php
+    require_once 'lib/headers.php';
+    if(file_exists("config/config-user.php")) {
+        Header("Location: index.php");
+    }
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,12 +17,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    if(file_exists("config/config-user.php")) {
-        Header("Location: index.php");
-    }
-?>
 <html>
     <head>
         <title>PDNS Manager - Domains</title>

+ 6 - 6
logout.php

@@ -1,3 +1,9 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+    session_destroy();
+    setcookie("authSecret", "", 1, "/", "", false, true);
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,12 +17,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-    session_destroy();
-    setcookie("authSecret", "", 1, "/", "", false, true);
-?>
 <html>
     <head>
         <title>PDNS Manager</title>

+ 4 - 4
password.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Password</title>

+ 9 - 9
upgrade.php

@@ -1,3 +1,12 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'config/config-default.php';
+    require_once 'lib/database.php';
+    require_once 'lib/checkversion.php';
+    if(checkVersion($db)) {
+        Header("Location: index.php");
+    }
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,15 +20,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'config/config-default.php';
-    require_once 'lib/database.php';
-    require_once 'lib/checkversion.php';
-    if(checkVersion($db)) {
-        Header("Location: index.php");
-    }
-?>
 <html>
     <head>
         <title>PDNS Manager - Upgrade</title>

+ 4 - 4
users.php

@@ -1,3 +1,7 @@
+<?php
+    require_once 'lib/headers.php';
+    require_once 'lib/session.php';
+?>
 <!DOCTYPE html>
 <!--
 Copyright 2016 Lukas Metzger <developer@lukas-metzger.com>.
@@ -11,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<?php
-    require_once 'lib/headers.php';
-    require_once 'lib/session.php';
-?>
 <html>
     <head>
         <title>PDNS Manager - Users</title>