Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -88,18 +88,18 @@ $form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" nam
88 88
 
89 89
 $output .= html_form('dyndns_edit', 'save', 'type=dyndns&action=edit&'.(isset($_REQUEST['id']) ? 'id='.$_REQUEST['id'] : ''), $form);
90 90
 
91
-  
91
+
92 92
 if (! $new) {
93 93
     $records = get_dyndns_records($_REQUEST['id']);
94 94
 
95 95
     $output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4>
96 96
   
97 97
   <ul>';
98
-  
98
+
99 99
     foreach ($records as $record) {
100 100
         $output .= '<li>'.$record['fqdn'].' (Typ: '.strtoupper($record['type']).' / TTL: '.$record['ttl'].' Sek.)</li>';
101 101
     }
102
-  
102
+
103 103
     $output .= '</ul>';
104 104
     output("<p>".internal_link('dyndns_hostnames', "Liste ändern...", "id={$_REQUEST['id']}")."</p>");
105 105
 }
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.
... ...
@@ -26,20 +26,21 @@ $section = 'dns_dyndns';
26 26
 
27 27
 $new = true;
28 28
 $dyndns = array();
29
-if (isset($_REQUEST['id']))
30
-{
31
-  $dyndns = get_dyndns_account($_REQUEST['id']);
32
-  $new = false;
29
+if (isset($_REQUEST['id'])) {
30
+    $dyndns = get_dyndns_account($_REQUEST['id']);
31
+    $new = false;
33 32
 }
34 33
 
35 34
 
36 35
 $username_http = $_SESSION['userinfo']['username'];
37
-if (isset($dyndns['handle']))
38
-  $username_http .= "_{$dyndns['handle']}";
36
+if (isset($dyndns['handle'])) {
37
+    $username_http .= "_{$dyndns['handle']}";
38
+}
39 39
 
40 40
 $http_update_info = '';
41
-if (isset($dyndns['password']))
42
-  $http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
41
+if (isset($dyndns['password'])) {
42
+    $http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
43
+}
43 44
 
44 45
 
45 46
 $html_header .= '<script type="text/javascript">
... ...
@@ -63,11 +64,12 @@ document.getElementById("username_http").firstChild.data = http_username;
63 64
 title('DynDNS-Account');
64 65
 
65 66
 
66
-if (! $new ) 
67
-  $output .= '<div style="padding: 0.5em; border: 1px solid black;"><strong>aktuelle Daten:</strong><br />
67
+if (! $new) {
68
+    $output .= '<div style="padding: 0.5em; border: 1px solid black;"><strong>aktuelle Daten:</strong><br />
68 69
   letztes Update: '.$dyndns['lastchange'].'<br />
69 70
   aktuelle Adresse: '.$dyndns['address'].'
70 71
   </div>';
72
+}
71 73
 
72 74
 $form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" name="handle" id="handle" value="'.(isset($dyndns['handle']) ? $dyndns['handle'] : '').'" onkeyup="updateUsernameHTTP()" /></p>
73 75
 
... ...
@@ -87,19 +89,17 @@ $form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" nam
87 89
 $output .= html_form('dyndns_edit', 'save', 'type=dyndns&action=edit&'.(isset($_REQUEST['id']) ? 'id='.$_REQUEST['id'] : ''), $form);
88 90
 
89 91
   
90
-if (! $new )
91
-{
92
-  $records = get_dyndns_records($_REQUEST['id']);
92
+if (! $new) {
93
+    $records = get_dyndns_records($_REQUEST['id']);
93 94
 
94
-  $output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4>
95
+    $output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4>
95 96
   
96 97
   <ul>';
97 98
   
98
-  foreach ($records AS $record) {
99
-    $output .= '<li>'.$record['fqdn'].' (Typ: '.strtoupper($record['type']).' / TTL: '.$record['ttl'].' Sek.)</li>';
100
-  }
99
+    foreach ($records as $record) {
100
+        $output .= '<li>'.$record['fqdn'].' (Typ: '.strtoupper($record['type']).' / TTL: '.$record['ttl'].' Sek.)</li>';
101
+    }
101 102
   
102
-  $output .= '</ul>';
103
-  output("<p>".internal_link('dyndns_hostnames', "Liste ändern...", "id={$_REQUEST['id']}")."</p>");
103
+    $output .= '</ul>';
104
+    output("<p>".internal_link('dyndns_hostnames', "Liste ändern...", "id={$_REQUEST['id']}")."</p>");
104 105
 }
105
-
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
... ...
@@ -100,5 +100,6 @@ if (! $new )
100 100
   }
101 101
   
102 102
   $output .= '</ul>';
103
+  output("<p>".internal_link('dyndns_hostnames', "Liste ändern...", "id={$_REQUEST['id']}")."</p>");
103 104
 }
104 105
 
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/security.php');
Browse code

Benutze überall title() statt output("<h3>...</h3>")

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

bernd authored on18/09/2010 13:35:15
Showing1 changed files
... ...
@@ -28,7 +28,7 @@ if (isset($dyndns['password']))
28 28
   $http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
29 29
 
30 30
 
31
-$output .= '<script type="text/javascript">
31
+$html_header .= '<script type="text/javascript">
32 32
 var username = "'.$_SESSION['userinfo']['username'].'";
33 33
 var handle;
34 34
 var http_username;
... ...
@@ -46,7 +46,7 @@ document.getElementById("username_http").firstChild.data = http_username;
46 46
 ';
47 47
 
48 48
 
49
-$output .= '<h3>DynDNS-Account</h3>';
49
+title('DynDNS-Account');
50 50
 
51 51
 
52 52
 if (! $new ) 
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
... ...
@@ -3,7 +3,7 @@
3 3
 require_once('inc/base.php');
4 4
 require_once('inc/security.php');
5 5
 
6
-require_role(ROLE_CUSTOMER);
6
+require_role(ROLE_SYSTEMUSER);
7 7
 
8 8
 require_once('dnsinclude.php');
9 9
 
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 @@ $section = 'dns_dyndns';
12 12
 
13 13
 $new = true;
14 14
 $dyndns = array();
15
-if ($_REQUEST['id'])
15
+if (isset($_REQUEST['id']))
16 16
 {
17 17
   $dyndns = get_dyndns_account($_REQUEST['id']);
18 18
   $new = false;
... ...
@@ -20,12 +20,12 @@ if ($_REQUEST['id'])
20 20
 
21 21
 
22 22
 $username_http = $_SESSION['userinfo']['username'];
23
-if ($dyndns['handle'])
24
-$username_http .= "_{$dyndns['handle']}";
23
+if (isset($dyndns['handle']))
24
+  $username_http .= "_{$dyndns['handle']}";
25 25
 
26 26
 $http_update_info = '';
27
-if ($dyndns['password'])
28
-$http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
27
+if (isset($dyndns['password']))
28
+  $http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
29 29
 
30 30
 
31 31
 $output .= '<script type="text/javascript">
... ...
@@ -55,27 +55,28 @@ if (! $new )
55 55
   aktuelle Adresse: '.$dyndns['address'].'
56 56
   </div>';
57 57
 
58
-$form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" name="handle" id="handle" value="'.$dyndns['handle'].'" onkeyup="updateUsernameHTTP()" /></p>
58
+$form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" name="handle" id="handle" value="'.(isset($dyndns['handle']) ? $dyndns['handle'] : '').'" onkeyup="updateUsernameHTTP()" /></p>
59 59
 
60 60
 <h4>Update per HTTPs</h4>
61 61
 <p style="margin-left: 2em;">Geben Sie hier ein Passwort ein um das Update per HTTPs zu aktivieren.'.$http_update_info.'</p>
62 62
 <p style="margin-left: 2em;">Benutzername:&#160;<strong><span id="username_http">'.$username_http.'</span></strong></p>
63
-<p style="margin-left: 2em;"><label for="password_http">Passwort:</label>&#160;<input type="password" id="password_http" name="password_http" value="'.($dyndns['password'] ? '************' : '').'" /></p>
63
+<p style="margin-left: 2em;"><label for="password_http">Passwort:</label>&#160;<input type="password" id="password_http" name="password_http" value="'.(isset($dyndns['password']) ? '************' : '').'" /></p>
64 64
 
65 65
 <h4>Update per SSH</h4>
66 66
 <p style="margin-left: 2em;">Kopieren Sie Ihren SSH-public-Key im OpenSSH-Format in dieses Eingabefeld um das Update per SSH zu aktivieren.</p>
67
-<p style="margin-left: 2em; vertical-align: middle;"><label for="sshkey">SSH Public-Key:</label><br /><textarea style="height: 10em; width: 80%;" id="sshkey" name="sshkey">'.$dyndns['sshkey'].'</textarea></p>
67
+<p style="margin-left: 2em; vertical-align: middle;"><label for="sshkey">SSH Public-Key:</label><br /><textarea style="height: 10em; width: 80%;" id="sshkey" name="sshkey">'.(isset($dyndns['sshkey']) ? $dyndns['sshkey'] : '').'</textarea></p>
68 68
 
69 69
 <p style="margin-left: 2em;"><input type="submit" value="Speichern" /></p>
70 70
 ';
71 71
 
72 72
 
73
-$output .= html_form('dyndns_edit', 'save', 'type=dyndns&action=edit&id='.$_REQUEST['id'], $form);
74
-
75
-$records = get_dyndns_records($_REQUEST['id']);
73
+$output .= html_form('dyndns_edit', 'save', 'type=dyndns&action=edit&'.(isset($_REQUEST['id']) ? 'id='.$_REQUEST['id'] : ''), $form);
76 74
 
75
+  
77 76
 if (! $new )
78 77
 {
78
+  $records = get_dyndns_records($_REQUEST['id']);
79
+
79 80
   $output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4>
80 81
   
81 82
   <ul>';
Browse code

Einige Dummheiten repariert, die beim ersetzen von $config durch config() aufgetreten sind. Zudem einige Closing-Tag-mismatches repariert, die man nur sieht wenn man XHTML-Modus einschaltet

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

bernd authored on23/05/2009 15:55:23
Showing1 changed files
... ...
@@ -57,7 +57,7 @@ if (! $new )
57 57
 
58 58
 $form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" name="handle" id="handle" value="'.$dyndns['handle'].'" onkeyup="updateUsernameHTTP()" /></p>
59 59
 
60
-<h4>Update per HTTPs</strong></h4>
60
+<h4>Update per HTTPs</h4>
61 61
 <p style="margin-left: 2em;">Geben Sie hier ein Passwort ein um das Update per HTTPs zu aktivieren.'.$http_update_info.'</p>
62 62
 <p style="margin-left: 2em;">Benutzername:&#160;<strong><span id="username_http">'.$username_http.'</span></strong></p>
63 63
 <p style="margin-left: 2em;"><label for="password_http">Passwort:</label>&#160;<input type="password" id="password_http" name="password_http" value="'.($dyndns['password'] ? '************' : '').'" /></p>
... ...
@@ -66,7 +66,7 @@ $form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" nam
66 66
 <p style="margin-left: 2em;">Kopieren Sie Ihren SSH-public-Key im OpenSSH-Format in dieses Eingabefeld um das Update per SSH zu aktivieren.</p>
67 67
 <p style="margin-left: 2em; vertical-align: middle;"><label for="sshkey">SSH Public-Key:</label><br /><textarea style="height: 10em; width: 80%;" id="sshkey" name="sshkey">'.$dyndns['sshkey'].'</textarea></p>
68 68
 
69
-<p style="margin-left: 2em;"><input type="submit" value="Speichern" />
69
+<p style="margin-left: 2em;"><input type="submit" value="Speichern" /></p>
70 70
 ';
71 71
 
72 72
 
Browse code

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

bernd authored on11/02/2009 18:32:52
Showing1 changed files
... ...
@@ -87,4 +87,3 @@ if (! $new )
87 87
   $output .= '</ul>';
88 88
 }
89 89
 
90
-?>   
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
... ...
@@ -70,7 +70,7 @@ $form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" nam
70 70
 ';
71 71
 
72 72
 
73
-$output .= html_form('dyndns_edit', 'save.php', 'type=dyndns&action=edit&id='.$_REQUEST['id'], $form);
73
+$output .= html_form('dyndns_edit', 'save', 'type=dyndns&action=edit&id='.$_REQUEST['id'], $form);
74 74
 
75 75
 $records = get_dyndns_records($_REQUEST['id']);
76 76
 
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,90 @@
1
+<?php
2
+
3
+require_once('inc/base.php');
4
+require_once('inc/security.php');
5
+
6
+require_role(ROLE_CUSTOMER);
7
+
8
+require_once('dnsinclude.php');
9
+
10
+$section = 'dns_dyndns';
11
+
12
+
13
+$new = true;
14
+$dyndns = array();
15
+if ($_REQUEST['id'])
16
+{
17
+  $dyndns = get_dyndns_account($_REQUEST['id']);
18
+  $new = false;
19
+}
20
+
21
+
22
+$username_http = $_SESSION['userinfo']['username'];
23
+if ($dyndns['handle'])
24
+$username_http .= "_{$dyndns['handle']}";
25
+
26
+$http_update_info = '';
27
+if ($dyndns['password'])
28
+$http_update_info = ' Lassen Sie das Passworteingabefeld unberührt um das bestehende Passwort zu erhalten. Entfernen Sie das bestehende Passwort um das HTTP-Update zu deaktivieren.';
29
+
30
+
31
+$output .= '<script type="text/javascript">
32
+var username = "'.$_SESSION['userinfo']['username'].'";
33
+var handle;
34
+var http_username;
35
+
36
+function updateUsernameHTTP() {
37
+handle = document.getElementById("handle").value;
38
+http_username = username;
39
+if (handle != "")
40
+http_username = username + "_" + handle;
41
+
42
+document.getElementById("username_http").firstChild.data = http_username;
43
+}
44
+
45
+</script>
46
+';
47
+
48
+
49
+$output .= '<h3>DynDNS-Account</h3>';
50
+
51
+
52
+if (! $new ) 
53
+  $output .= '<div style="padding: 0.5em; border: 1px solid black;"><strong>aktuelle Daten:</strong><br />
54
+  letztes Update: '.$dyndns['lastchange'].'<br />
55
+  aktuelle Adresse: '.$dyndns['address'].'
56
+  </div>';
57
+
58
+$form = '<p><label for="handle">Bezeichnung:</label>&#160;<input type="text" name="handle" id="handle" value="'.$dyndns['handle'].'" onkeyup="updateUsernameHTTP()" /></p>
59
+
60
+<h4>Update per HTTPs</strong></h4>
61
+<p style="margin-left: 2em;">Geben Sie hier ein Passwort ein um das Update per HTTPs zu aktivieren.'.$http_update_info.'</p>
62
+<p style="margin-left: 2em;">Benutzername:&#160;<strong><span id="username_http">'.$username_http.'</span></strong></p>
63
+<p style="margin-left: 2em;"><label for="password_http">Passwort:</label>&#160;<input type="password" id="password_http" name="password_http" value="'.($dyndns['password'] ? '************' : '').'" /></p>
64
+
65
+<h4>Update per SSH</h4>
66
+<p style="margin-left: 2em;">Kopieren Sie Ihren SSH-public-Key im OpenSSH-Format in dieses Eingabefeld um das Update per SSH zu aktivieren.</p>
67
+<p style="margin-left: 2em; vertical-align: middle;"><label for="sshkey">SSH Public-Key:</label><br /><textarea style="height: 10em; width: 80%;" id="sshkey" name="sshkey">'.$dyndns['sshkey'].'</textarea></p>
68
+
69
+<p style="margin-left: 2em;"><input type="submit" value="Speichern" />
70
+';
71
+
72
+
73
+$output .= html_form('dyndns_edit', 'save.php', 'type=dyndns&action=edit&id='.$_REQUEST['id'], $form);
74
+
75
+$records = get_dyndns_records($_REQUEST['id']);
76
+
77
+if (! $new )
78
+{
79
+  $output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4>
80
+  
81
+  <ul>';
82
+  
83
+  foreach ($records AS $record) {
84
+    $output .= '<li>'.$record['fqdn'].' (Typ: '.strtoupper($record['type']).' / TTL: '.$record['ttl'].' Sek.)</li>';
85
+  }
86
+  
87
+  $output .= '</ul>';
88
+}
89
+
90
+?>