-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage-sub.php
145 lines (127 loc) · 8.18 KB
/
page-sub.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
$user_sync_key = $this->options['key'];
$user_sync_url_c = $this->options['central_url'];
$disabled = '';
if ( "" != $user_sync_url_c )
$disabled = 'readonly="readonly"';
?>
<script type="text/javascript">
jQuery( document ).ready( function() {
jQuery( "#user_sync_form" ).submit( function () {
if ( "" == jQuery( "#user_sync_url_c" ).val() && "uninstall" != jQuery( "#usync_action" ).val( ) ) {
alert( "<?php _e( 'Bitte trage die URL der Master-Seite ein', 'user-sync' ) ?>" );
return false;
}
if ( "" == jQuery( "#user_sync_key" ).val() && "uninstall" != jQuery( "#usync_action" ).val( ) ) {
alert( "<?php _e( 'Bitte trage den Schlüssel der Master-Seite ein', 'user-sync' ) ?>" );
return false;
}
return true;
});
jQuery(".tooltip_img[title]").tooltip();
//uninstall plugin options
jQuery( "#uninstall_yes" ).on("click", function() {
jQuery( "#usync_action" ).val( "uninstall" );
jQuery( "#user_sync_form" ).submit();
return false;
});
jQuery( "#uninstall" ).on("click", function() {
jQuery( "#uninstall_confirm" ).show( );
return false;
});
jQuery( "#uninstall_no" ).on("click", function() {
jQuery( "#uninstall_confirm" ).hide( );
return false;
});
});
</script>
<div class="wrap">
<?php
//Debug mode
if ( isset( $this->options['debug_mode'] ) && '1' == $this->options['debug_mode'] ):?>
<div class="updated fade"><p><?php _e( 'Der Debug-Modus ist aktiviert.', 'user-sync' ); ?></p></div>
<?php endif; ?>
<h2><?php _e( 'Subseite-Einstellungen', 'user-sync' ) ?></h2>
<h3><?php _e( 'Alle Benutzerdaten von der Master-Seite werden mit dieser Seite synchronisiert.', 'user-sync' ) ?></h3>
<form method="post" action="" id="user_sync_form">
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php _e( 'URL der Master-Seite:', 'user-sync' ) ?>
</th>
<td>
<input type="text" name="user_sync_url_c" id="user_sync_url_c" value="<?php echo $user_sync_url_c; ?>" size="50" <?php echo $disabled; ?> />
</td>
</tr>
<tr valign="top">
<th scope="row">
<?php _e( 'Schlüssel der Master-Seite:', 'user-sync' ) ?>
</th>
<td>
<input type="text" name="user_sync_key" id="user_sync_key" value="<?php echo $user_sync_key; ?>" size="50" <?php echo $disabled; ?> />
</td>
</tr>
<?php if ( "" == $disabled ) {?>
<tr valign="top">
<th scope="row">
<?php _e( 'Standardeinstellungen:', 'user-sync' ) ?>
</th>
<td>
<span class="description">
<?php _e( 'Du kannst diese Einstellungen später auf der Master-Seite ändern.', 'user-sync' ) ?>
</span>
<br />
<label>
<input type="checkbox" name="replace_user" value="1" />
<?php _e( 'Gelöschte Benutzer nicht ersetzen', 'user-sync' ) ?>
</label>
<br />
<label>
<input type="checkbox" name="overwrite_user" value="1" />
<?php _e( 'Überschreibe keine vorhandenen Benutzer (füge sie als zusätzliche Benutzer hinzu).', 'user-sync' ) ?>
</label>
</td>
</tr>
<?php } ?>
</table>
<?php if ( "" == $disabled ) {?>
<p><?php _e( "Hinweis: Sei vorsichtig, wenn Du vorhandene Benutzer überschreibst, da alle vorhandenen Benutzer und ihre Kennwörter ersetzt werden, wenn auf der Unterwebseite derselbe Benutzername vorhanden ist.", 'user-sync' ) ?></p>
<?php }?>
<?php if ( "" == $disabled ) {?>
<?php
//safe mode notice
if ( isset( $this->safe_mode_notice ) ):?>
<span style="color: red;" ><?php _e( 'Achtung: Abgesicherter Modus!', 'user-sync' ); ?></span>
<img class="tooltip_img" src="<?php echo $this->plugin_url . "images/"; ?>info_small.png" title="<?php echo $this->safe_mode_notice; ?>"/>
<br />
<?php endif; ?>
<p class="submit">
<input type="hidden" name="usync_action" id="usync_action" value="sub_site" />
<input type="submit" class="button" value="<?php _e( 'Verbinde diese Seite mit der Master-Seite und führe eine vollständige Synchronisierung durch', 'user-sync' ) ?>" />
</p>
<?php } else {?>
<p class="submit">
<input type="hidden" name="usync_action" id="usync_action" value="remove_settings" />
<input type="submit" class="button button-secondary" value="<?php _e( 'Trenne die Verbindung zur Master-Seite', 'user-sync' ) ?>" />
<span class="description"><?php _e( 'Trenne die Synchronisierung mit der Master-Seite', 'email-newsletter' ) ?></span>
</p>
<?php } ?>
<div class="submit">
<input type="button" class="button" id="uninstall" style="color: red;" value="<?php _e( 'Deinstallationsoptionen', 'user-sync' ) ?>" />
<span class="description"><?php _e( "Lösche alle Plugin-Optionen aus der Datenbank.", 'email-newsletter' ) ?></span>
<div id="uninstall_confirm" style="display: none;">
<p>
<span class="description"><?php _e( 'Bist du sicher?', 'email-newsletter' ) ?></span>
</p>
<p>
<input type="button" class="button" name="uninstall" id="uninstall_no" value="<?php _e( 'Nein', 'email-newsletter' ) ?>" />
<input type="button" class="button" name="uninstall" id="uninstall_yes" value="<?php _e( 'Ja', 'email-newsletter' ) ?>" />
</p>
</div>
</div>
<p>
<?php _e( "Ausführliche Anweisungen zur Verwendung findest Du unter:", 'user-sync' ) ?><br />
<a href="https://cp-psource.github.io/benutzer-sync/" target="_blank" ><?php _e( 'Anweisungen zur Installation und Verwendung der WordPress-Benutzersynchronisierung.', 'user-sync' ) ?></a>
</p>
</form>
</div>