Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -49,14 +49,14 @@ if (isset($_GET['type']) && $_GET['type'] == 'dyndns') {
49 49
     }
50 50
     if ($_GET['action'] == 'edit') {
51 51
         check_form_token('dyndns_edit');
52
-      
52
+
53 53
         $newid = null;
54 54
         if ($id) {
55 55
             edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
56 56
         } else {
57 57
             $newid = create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
58 58
         }
59
-  
59
+
60 60
         if (! ($debugmode || we_have_an_error())) {
61 61
             if ($id) {
62 62
                 // Bearbeitung
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on26/06/2018 13:58:19
Showing1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 9
 To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 14
 Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
... ...
@@ -25,96 +25,85 @@ require_once('dnsinclude.php');
25 25
 
26 26
 $section = 'dns_dyndns';
27 27
 
28
-$id = NULL;
29
-if (isset($_REQUEST['id']))
30
-  $id = (int) $_REQUEST['id'];
28
+$id = null;
29
+if (isset($_REQUEST['id'])) {
30
+    $id = (int) $_REQUEST['id'];
31
+}
31 32
 
32 33
 
33 34
 if (isset($_GET['type']) && $_GET['type'] == 'dyndns') {
34
-  if ($_GET['action'] == 'delete') {
35
-    $sure = user_is_sure();
36
-    if ($sure === NULL)
37
-    {
38
-      are_you_sure("type=dyndns&action=delete&id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
39
-    }
40
-    elseif ($sure === true)
41
-    {
42
-      delete_dyndns_account($id);
43
-      if (! $debugmode)
44
-        header("Location: dyndns");
45
-    }
46
-    elseif ($sure === false)
47
-    {
48
-      if (! $debugmode)
49
-        header("Location: dyndns");
35
+    if ($_GET['action'] == 'delete') {
36
+        $sure = user_is_sure();
37
+        if ($sure === null) {
38
+            are_you_sure("type=dyndns&action=delete&id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
39
+        } elseif ($sure === true) {
40
+            delete_dyndns_account($id);
41
+            if (! $debugmode) {
42
+                header("Location: dyndns");
43
+            }
44
+        } elseif ($sure === false) {
45
+            if (! $debugmode) {
46
+                header("Location: dyndns");
47
+            }
48
+        }
50 49
     }
51
-  }
52
-  if ($_GET['action'] == 'edit') {
53
-    check_form_token('dyndns_edit');
50
+    if ($_GET['action'] == 'edit') {
51
+        check_form_token('dyndns_edit');
54 52
       
55
-    $newid = NULL;
56
-    if ($id) {
57
-      edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
58
-    } else {
59
-      $newid = create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
60
-    }
53
+        $newid = null;
54
+        if ($id) {
55
+            edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
56
+        } else {
57
+            $newid = create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
58
+        }
61 59
   
62
-    if (! ($debugmode || we_have_an_error())) {
63
-      if ($id) { 
64
-        // Bearbeitung
65
-        header('Location: dyndns');
66
-      } else {
67
-        // Neu angelegt
68
-        header('Location: dyndns_hostnames?id='.$newid);
69
-      }
60
+        if (! ($debugmode || we_have_an_error())) {
61
+            if ($id) {
62
+                // Bearbeitung
63
+                header('Location: dyndns');
64
+            } else {
65
+                // Neu angelegt
66
+                header('Location: dyndns_hostnames?id='.$newid);
67
+            }
68
+        }
70 69
     }
71
-  }
72 70
 }
73 71
 
74 72
 
75 73
 if (isset($_GET['dns']) && isset($_GET['dom'])) {
76
-  $section = 'dns_dns';
77
-  $domains = get_domain_list($_SESSION['customerinfo']['customerno'], $_SESSION['userinfo']['uid']);
78
-  $dom = NULL;
79
-  foreach ($domains as $d) {
80
-    if ($d->id == $_GET['dom']) {
81
-      $dom = $d;
82
-      break;
74
+    $section = 'dns_dns';
75
+    $domains = get_domain_list($_SESSION['customerinfo']['customerno'], $_SESSION['userinfo']['uid']);
76
+    $dom = null;
77
+    foreach ($domains as $d) {
78
+        if ($d->id == $_GET['dom']) {
79
+            $dom = $d;
80
+            break;
81
+        }
83 82
     }
84
-  }
85
-  if (! $dom) {
86
-    system_failure("Domain nicht gefunden!");
87
-  }
88
-  if ($_GET['dns'] == 0) {
89
-    if ($dom->dns == 1) {
90
-      $sure = user_is_sure();
91
-      if ($sure === NULL)
92
-      {
93
-        are_you_sure("dom={$dom->id}&dns=0", "Möchten Sie die Domain {$dom->fqdn} aus dem DNS-Server entfernen?");
94
-      }
95
-      elseif ($sure === true)
96
-      {
97
-        remove_from_dns($dom->id);
98
-        redirect('dns');
99
-      }
100
-      elseif ($sure === false)
101
-      {
102
-        redirect('dns');
103
-      }      
104
-    } else {
105
-      system_failure("Diese Domain ist nicht im DNS-Server eingetragen.");
83
+    if (! $dom) {
84
+        system_failure("Domain nicht gefunden!");
106 85
     }
107
-  }
108
-  if ($_GET['dns'] == 1) {
109
-    if ($dom->dns == 0) {
110
-      add_to_dns($dom->id);
111
-      redirect('dns');
112
-    } else {
113
-      system_failure("Diese Domain ist bereits im DNS-Server eingetragen.");
86
+    if ($_GET['dns'] == 0) {
87
+        if ($dom->dns == 1) {
88
+            $sure = user_is_sure();
89
+            if ($sure === null) {
90
+                are_you_sure("dom={$dom->id}&dns=0", "Möchten Sie die Domain {$dom->fqdn} aus dem DNS-Server entfernen?");
91
+            } elseif ($sure === true) {
92
+                remove_from_dns($dom->id);
93
+                redirect('dns');
94
+            } elseif ($sure === false) {
95
+                redirect('dns');
96
+            }
97
+        } else {
98
+            system_failure("Diese Domain ist nicht im DNS-Server eingetragen.");
99
+        }
100
+    }
101
+    if ($_GET['dns'] == 1) {
102
+        if ($dom->dns == 0) {
103
+            add_to_dns($dom->id);
104
+            redirect('dns');
105
+        } else {
106
+            system_failure("Diese Domain ist bereits im DNS-Server eingetragen.");
107
+        }
114 108
     }
115
-  }
116
-  
117 109
 }
118
-
119
-
120
-
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Erzeuge nicht einen DynDNS-Hostname unser der Masterdomain sondern frage gleich vom User ab welcher Hostname verwendet werden soll

Bernd Wurst authored on01/07/2016 10:19:58
Showing1 changed files
... ...
@@ -51,15 +51,23 @@ if (isset($_GET['type']) && $_GET['type'] == 'dyndns') {
51 51
   }
52 52
   if ($_GET['action'] == 'edit') {
53 53
     check_form_token('dyndns_edit');
54
-    
54
+      
55
+    $newid = NULL;
55 56
     if ($id) {
56 57
       edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
57 58
     } else {
58
-      create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
59
+      $newid = create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
59 60
     }
60 61
   
61
-    if (! ($debugmode || we_have_an_error()))
62
-      header('Location: dyndns');
62
+    if (! ($debugmode || we_have_an_error())) {
63
+      if ($id) { 
64
+        // Bearbeitung
65
+        header('Location: dyndns');
66
+      } else {
67
+        // Neu angelegt
68
+        header('Location: dyndns_hostnames?id='.$newid);
69
+      }
70
+    }
63 71
   }
64 72
 }
65 73
 
Browse code

Warne, wenn bei den DNS-Servern etwas nicht stimmt

Bernd Wurst authored on25/03/2014 09:50:08
Showing1 changed files
... ...
@@ -30,7 +30,7 @@ if (isset($_REQUEST['id']))
30 30
   $id = (int) $_REQUEST['id'];
31 31
 
32 32
 
33
-if ($_GET['type'] == 'dyndns') {
33
+if (isset($_GET['type']) && $_GET['type'] == 'dyndns') {
34 34
   if ($_GET['action'] == 'delete') {
35 35
     $sure = user_is_sure();
36 36
     if ($sure === NULL)
... ...
@@ -64,5 +64,49 @@ if ($_GET['type'] == 'dyndns') {
64 64
 }
65 65
 
66 66
 
67
+if (isset($_GET['dns']) && isset($_GET['dom'])) {
68
+  $section = 'dns_dns';
69
+  $domains = get_domain_list($_SESSION['customerinfo']['customerno'], $_SESSION['userinfo']['uid']);
70
+  $dom = NULL;
71
+  foreach ($domains as $d) {
72
+    if ($d->id == $_GET['dom']) {
73
+      $dom = $d;
74
+      break;
75
+    }
76
+  }
77
+  if (! $dom) {
78
+    system_failure("Domain nicht gefunden!");
79
+  }
80
+  if ($_GET['dns'] == 0) {
81
+    if ($dom->dns == 1) {
82
+      $sure = user_is_sure();
83
+      if ($sure === NULL)
84
+      {
85
+        are_you_sure("dom={$dom->id}&dns=0", "Möchten Sie die Domain {$dom->fqdn} aus dem DNS-Server entfernen?");
86
+      }
87
+      elseif ($sure === true)
88
+      {
89
+        remove_from_dns($dom->id);
90
+        redirect('dns');
91
+      }
92
+      elseif ($sure === false)
93
+      {
94
+        redirect('dns');
95
+      }      
96
+    } else {
97
+      system_failure("Diese Domain ist nicht im DNS-Server eingetragen.");
98
+    }
99
+  }
100
+  if ($_GET['dns'] == 1) {
101
+    if ($dom->dns == 0) {
102
+      add_to_dns($dom->id);
103
+      redirect('dns');
104
+    } else {
105
+      system_failure("Diese Domain ist bereits im DNS-Server eingetragen.");
106
+    }
107
+  }
108
+  
109
+}
110
+
67 111
 
68 112
 
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on08/02/2014 05:45:07
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on19/01/2013 10:49:50
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on11/03/2012 15:40:04
Showing1 changed files
... ...
@@ -1,4 +1,18 @@
1 1
 <?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2012 by schokokeks.org Hosting, namely
6
+  Bernd Wurst <bernd@schokokeks.org>
7
+  Hanno Böck <hanno@schokokeks.org>
8
+
9
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10
+
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12
+http://creativecommons.org/publicdomain/zero/1.0/
13
+
14
+Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15
+*/
2 16
 
3 17
 require_once('inc/base.php');
4 18
 require_once('inc/debug.php');
Browse code

Erlaube *useraccounts* das edtieren von DNS-records

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1731 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on06/05/2010 14:49:17
Showing1 changed files
... ...
@@ -5,7 +5,7 @@ require_once('inc/debug.php');
5 5
 global $debugmode;
6 6
 require_once('inc/security.php');
7 7
 
8
-require_role(ROLE_CUSTOMER);
8
+require_role(ROLE_SYSTEMUSER);
9 9
 
10 10
 require_once('dnsinclude.php');
11 11
 
Browse code

Warnings eliminiert und Plusibilitäts-Check

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1490 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on05/10/2009 20:37:39
Showing1 changed files
... ...
@@ -12,7 +12,7 @@ require_once('dnsinclude.php');
12 12
 $section = 'dns_dyndns';
13 13
 
14 14
 $id = NULL;
15
-if ($_REQUEST['id'])
15
+if (isset($_REQUEST['id']))
16 16
   $id = (int) $_REQUEST['id'];
17 17
 
18 18
 
Browse code

* alle internen Links sinnvoll (und gleichartig!) encoden * Automatischer Upgrader für Drupal funktioniert jetzt

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1301 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on07/03/2009 14:48:53
Showing1 changed files
... ...
@@ -21,7 +21,7 @@ if ($_GET['type'] == 'dyndns') {
21 21
     $sure = user_is_sure();
22 22
     if ($sure === NULL)
23 23
     {
24
-      are_you_sure("type=dyndns&action=delete&amp;id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
24
+      are_you_sure("type=dyndns&action=delete&id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
25 25
     }
26 26
     elseif ($sure === true)
27 27
     {
Browse code

eliminate .php extensions for URLs

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1128 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on08/08/2008 19:32:32
Showing1 changed files
... ...
@@ -27,12 +27,12 @@ if ($_GET['type'] == 'dyndns') {
27 27
     {
28 28
       delete_dyndns_account($id);
29 29
       if (! $debugmode)
30
-        header("Location: dyndns.php");
30
+        header("Location: dyndns");
31 31
     }
32 32
     elseif ($sure === false)
33 33
     {
34 34
       if (! $debugmode)
35
-        header("Location: dyndns.php");
35
+        header("Location: dyndns");
36 36
     }
37 37
   }
38 38
   if ($_GET['action'] == 'edit') {
... ...
@@ -45,7 +45,7 @@ if ($_GET['type'] == 'dyndns') {
45 45
     }
46 46
   
47 47
     if (! ($debugmode || we_have_an_error()))
48
-      header('Location: dyndns.php');
48
+      header('Location: dyndns');
49 49
   }
50 50
 }
51 51
 
Browse code

Stub für dns-Admin-Interface

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1127 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on08/08/2008 17:19:03
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,54 @@
1
+<?php
2
+
3
+require_once('inc/base.php');
4
+require_once('inc/debug.php');
5
+global $debugmode;
6
+require_once('inc/security.php');
7
+
8
+require_role(ROLE_CUSTOMER);
9
+
10
+require_once('dnsinclude.php');
11
+
12
+$section = 'dns_dyndns';
13
+
14
+$id = NULL;
15
+if ($_REQUEST['id'])
16
+  $id = (int) $_REQUEST['id'];
17
+
18
+
19
+if ($_GET['type'] == 'dyndns') {
20
+  if ($_GET['action'] == 'delete') {
21
+    $sure = user_is_sure();
22
+    if ($sure === NULL)
23
+    {
24
+      are_you_sure("type=dyndns&action=delete&amp;id={$id}", "Möchten Sie den DynDNS-Account wirklich löschen?");
25
+    }
26
+    elseif ($sure === true)
27
+    {
28
+      delete_dyndns_account($id);
29
+      if (! $debugmode)
30
+        header("Location: dyndns.php");
31
+    }
32
+    elseif ($sure === false)
33
+    {
34
+      if (! $debugmode)
35
+        header("Location: dyndns.php");
36
+    }
37
+  }
38
+  if ($_GET['action'] == 'edit') {
39
+    check_form_token('dyndns_edit');
40
+    
41
+    if ($id) {
42
+      edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
43
+    } else {
44
+      create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']);
45
+    }
46
+  
47
+    if (! ($debugmode || we_have_an_error()))
48
+      header('Location: dyndns.php');
49
+  }
50
+}
51
+
52
+
53
+
54
+