Subversion Repositories wpShopGermany4

Rev

Rev 6479 | Rev 6488 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6479 Rev 6484
Line 2... Line 2...
2
 
2
 
3
    /**
3
    /**
4
     * Template für die Lizenzverwaltung
4
     * Template für die Lizenzverwaltung
5
     */
5
     */
6
 
6
 
-
 
7
    $wpsg_update_data = wpsg_get_update_data();
-
 
8
 
-
 
9
    if (!is_array($wpsg_update_data) || !current_user_can('wpsg_lizence')) die();
-
 
10
 
7
?>
11
?>
8
 
12
 
9
<div class="wpsg_admin" id="wpsg-bs">
13
<div class="wpsg_admin" id="wpsg-bs">
10
 
14
 
11
	<nav class="navbar navbar-default">
15
	<nav class="navbar navbar-default">
Line 16... Line 20...
16
			<div class="collapse navbar-collapse">
20
			<div class="collapse navbar-collapse">
17
				<ul class="nav navbar-nav">
21
				<ul class="nav navbar-nav">
18
			 		<li role="presentation" class="<?php echo (($this->view['actionName'] == "index")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin"><?php echo __("Einstellungen", "wpsg"); ?></a></li>
22
			 		<li role="presentation" class="<?php echo (($this->view['actionName'] == "index")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin"><?php echo __("Einstellungen", "wpsg"); ?></a></li>
19
					<li role="presentation" class="<?php echo (($this->view['actionName'] == "module")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module"><?php echo __("Module", "wpsg"); ?></a></li>
23
					<li role="presentation" class="<?php echo (($this->view['actionName'] == "module")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module"><?php echo __("Module", "wpsg"); ?></a></li>
20
						
24
						
21
					<?php if (current_user_can('wpsg_lizence') && is_array(wpsg_get_update_data())) { ?>			
25
					<?php if (current_user_can('wpsg_lizence') && is_array($wpsg_update_data)) { ?>			
22
					<li role="presentation" class="<?php echo (($this->view['actionName'] == "licence")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=registrierung"><?php echo __("Lizenzverwaltung", "wpsg"); ?></a></li>
26
					<li role="presentation" class="<?php echo (($this->view['actionName'] == "licence")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=registrierung"><?php echo __("Lizenzverwaltung", "wpsg"); ?></a></li>
23
					<?php } ?>
27
					<?php } ?>
24
					
28
					
25
					<li role="presentation" class="<?php echo (($this->view['actionName'] == 'news')?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
29
					<li role="presentation" class="<?php echo (($this->view['actionName'] == 'news')?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
26
						<?php echo __('Aktuelles', 'wpsg'); ?>
30
						<?php echo __('Aktuelles', 'wpsg'); ?>
Line 36... Line 40...
36
			</div>
40
			</div>
37
		</div>		
41
		</div>		
38
	</nav>
42
	</nav>
39
	
43
	
40
	<?php echo $this->writeBackendMessage(); ?>
44
	<?php echo $this->writeBackendMessage(); ?>
41
			  	
45
    			  	
42
	<div class="wpsg_admin_wrap">
46
	<div class="wpsg_admin_wrap">
43
		
47
		
44
        <div class="wpsg_admin_submenu">
48
        <div class="wpsg_admin_submenu">
45
	
49
	
46
            <div class="list-group">
50
            <div class="list-group">
Line 66... Line 70...
66
                </div>
70
                </div>
67
                <div class="panel-body">
71
                <div class="panel-body">
68
            
72
            
69
                    <?php if ($this->view['subaction'] === 'registerdata') { ?>
73
                    <?php if ($this->view['subaction'] === 'registerdata') { ?>
70
                    
74
                    
-
 
75
                        <form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=saveRegister">
71
                        
76
                            
-
 
77
                            <?php $strLicenceLabel = ''; ?>
-
 
78
                            <?php if ($wpsg_update_data['licence_model'] === 'enterprise') { $strLicenceLabel = __('Enterprise', 'wpsg'); ?>
-
 
79
                            <?php } else if ($wpsg_update_data['licence_model'] === 'pro') { $strLicenceLabel = __('Pro', 'wpsg'); } ?>
-
 
80
                             
-
 
81
                            <?php echo wpsg_drawForm_Text(_('Lizenzmodel'), $strLicenceLabel); ?>
-
 
82
                            
-
 
83
                            <br />
-
 
84
                            
-
 
85
                            <?php echo wpsg_drawForm_Input('register[company]', __('Firma', 'wpsg'), $wpsg_update_data['registerData']['company']); ?>
-
 
86
                            <?php echo wpsg_drawForm_Input('register[firstname]', __('Vorname', 'wpsg'), $wpsg_update_data['registerData']['firstname']); ?>
-
 
87
                            <?php echo wpsg_drawForm_Input('register[lastname]', __('Name', 'wpsg'), $wpsg_update_data['registerData']['lastname']); ?>
-
 
88
                            <?php echo wpsg_drawForm_Input('register[zip]', __('PLZ', 'wpsg'), $wpsg_update_data['registerData']['zip']); ?>
-
 
89
                            <?php echo wpsg_drawForm_Input('register[city]', __('Ort', 'wpsg'), $wpsg_update_data['registerData']['city']); ?>
-
 
90
                            <?php echo wpsg_drawForm_Input('register[street]', __('Straße', 'wpsg'), $wpsg_update_data['registerData']['street']); ?>
-
 
91
                            <?php echo wpsg_drawForm_Select('register[country]', __('Land', 'wpsg'), array(
-
 
92
                                '1' => __('Deutschland', 'wpsg'),
-
 
93
                                '2' => __('Österreich', 'wpsg'),
-
 
94
                                '3' => __('Schweiz', 'wpsg'),
-
 
95
                                '4' => __('Niederlande', 'wpsg'),
-
 
96
                                '5' => __('Belgien', 'wpsg')
-
 
97
                            ), $wpsg_update_data['registerData']['country']); ?>
-
 
98
                            <?php echo wpsg_drawForm_Input('register[email]', __('E-Mail', 'wpsg'), $wpsg_update_data['registerData']['email']); ?>
-
 
99
                                       
-
 
100
                            <br />
-
 
101
                            
-
 
102
                            <?php echo wpsg_drawForm_SubmitButton(__('Speichern', 'wpsg')); ?>
-
 
103
                            
-
 
104
                        </form>
72
                        
105
                        
73
                    <?php } else if ($this->view['subaction'] === 'domaindata') { ?>
106
                    <?php } else if ($this->view['subaction'] === 'domaindata') { ?>
-
 
107
               
-
 
108
                        <?php if (wpsg_isSizedArray($wpsg_update_data['domainData'])) { ?>
-
 
109
                              
-
 
110
                            <table class="table domaintable">
-
 
111
                                <thead>
-
 
112
                                    <tr>
-
 
113
                                        <th class="col_domain"><?php echo __('Domain', 'wspg'); ?></th>
-
 
114
                                        <th class="col_action"></th>
-
 
115
                                    </tr>
-
 
116
                                </thead>
-
 
117
                                <tbody>
-
 
118
                                    <?php foreach ($wpsg_update_data['domainData'] as $domain) { ?>
-
 
119
                                    <tr class="success">
-
 
120
                                        <td class="col_domain"><?php echo $domain; ?></td>
-
 
121
                                        <td class="col_action">
-
 
122
                                            
-
 
123
                                            <a href="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=domainDeRegister" class="btn btn-warning btn-sm"><?php echo __('Registrierung aufheben'); ?></a>
-
 
124
                                            
-
 
125
                                        </td>
-
 
126
                                    </tr>
-
 
127
                                    <?php } ?>
-
 
128
                                </tbody>
-
 
129
                            </table>
-
 
130
                            
-
 
131
                        <?php } else { ?>
-
 
132
                        
-
 
133
                            <p><?php echo __('Es sind noch keine Domains für diese Lizenz registriert.', 'wpsg'); ?></p>
-
 
134
                            
-
 
135
                        <?php } ?>
-
 
136
                        
-
 
137
                        <hr />
-
 
138
                        
-
 
139
                        <?php if (($wpsg_update_data['licence_model'] === 'enterprise' || sizeof($wpsg_update_data['domainData']) < 1) && !in_array($_SERVER['HTTP_HOST'], $wpsg_update_data['domainData'])) { ?>
-
 
140
                        
-
 
141
                            <p class="wpsg_message_ok"><?php echo __('Diese Domain kann noch auf Ihre Lizenz aktiviert werden.', 'wpsg'); ?></p>
-
 
142
                            
-
 
143
                            <br />
-
 
144
                            
-
 
145
                            <a href="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=domainRegister" class="btn btn-primary"><?php echo __('Diese Domain registrieren', 'wpsg'); ?></a>
-
 
146
                                                    
-
 
147
                        <?php } else if (in_array($_SERVER['HTTP_HOST'], $wpsg_update_data['domainData'])) { ?>
-
 
148
                            
-
 
149
                            <p class="wpsg_message_ok"><?php echo __('Diese Domain ist bereits auf diesen Schlüssel registriert.', 'wpsg'); ?></p>
-
 
150
                            
-
 
151
                        <?php } else { ?>
-
 
152
                            
-
 
153
                            <p class="error"><?php echo __('Diese Domain kann nicht mehr registriert werden.', 'wpsg'); ?></p>
-
 
154
                            
-
 
155
                        <?php } ?>
74
                    
156
                        
75
                    <?php } else if ($this->view['subaction'] === 'modulactivation') { ?>
157
                    <?php } else if ($this->view['subaction'] === 'modulactivation') { ?>
76
                    
158
                    
77
                        <?php $this->shop->loadModule(true); ?>
159
                        <?php $this->shop->loadModule(true); ?>
78
                        <?php $wpsg_update_data = wpsg_get_update_data(); ?>
160
                        <?php $wpsg_update_data = wpsg_get_update_data(); ?>
-
 
161
                        
-
 
162
                        <form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul&source=licence">
-
 
163
						
-
 
164
                            <fieldset>
-
 
165
                                <legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
79
                                                
166
                                                
-
 
167
                                <div class="row">
-
 
168
                                    <div class="col-xs-10">
-
 
169
                                        
-
 
170
                                        <input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
-
 
171
                                        
-
 
172
                                    </div>
-
 
173
                                    <div class="col-xs-2">
-
 
174
                                        
-
 
175
                                        <input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
-
 
176
                                        
-
 
177
                                    </div>
-
 
178
                                </div>
-
 
179
                            </fieldset>
-
 
180
                            
-
 
181
                        </form>
-
 
182
                        
-
 
183
                        <br />
-
 
184
                        
80
                        <?php if (wpsg_isSizedArray($wpsg_update_data)) { ?>
185
                        <?php if (wpsg_isSizedArray($wpsg_update_data)) { ?>
81
                        
186
                        
82
                            <?php // Ich zeige hier nur die Aktiven Module an ?>
187
                            <?php // Ich zeige hier nur die Aktiven Module an ?>
83
                            <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); } ?>
188
                            <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); } ?>
84
                            
189
                            
85
                            <table class="table modultable">
190
                            <table class="table modultable">
86
                                <thead>
191
                                <thead>
87
                                    <tr>
192
                                    <tr>
88
                                        <th><?php echo __('Modulname', 'wpsg'); ?></th>
193
                                        <th><?php echo __('Modulname', 'wpsg'); ?></th>
89
                                        <th><?php echo __('installierte Version', 'wpsg'); ?></th>
194
                                        <th><?php echo __('Version', 'wpsg'); ?></th>
90
                                        <th><?php echo __('Lizenz', 'wpsg');  ?></th>
195
                                        <th><?php echo __('Lizenz', 'wpsg');  ?></th>
91
                                        <th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
196
                                        <th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
92
                                    </tr>
197
                                    </tr>
93
                                </thead>
198
                                </thead>
94
                                <tbody>
199
                                <tbody>
Line 109... Line 214...
109
                                            <?php } else if ($modul_info['active'] === true) { ?>
214
                                            <?php } else if ($modul_info['active'] === true) { ?>
110
                                                <?php echo __('enthalten', 'wpsg'); ?>
215
                                                <?php echo __('enthalten', 'wpsg'); ?>
111
                                            <?php } else { ?>
216
                                            <?php } else { ?>
112
                                                
217
                                                
113
                                                <?php if (wpsg_isSizedString($modul_info['url_shop'])) { ?>
218
                                                <?php if (wpsg_isSizedString($modul_info['url_shop'])) { ?>
114
                                                <a href="<?php echo $modul_info['url_shop']; ?>" target="_blank"><?php echo __('Modulcode hier erwerben', 'wpsg'); ?></a>
219
                                                <a href="<?php echo $modul_info['url_shop']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
115
                                                <?php } else { ?>
220
                                                <?php } else { ?>
116
                                                <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode hier erwerben', 'wpsg'); ?></a>
221
                                                <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
117
                                                <?php } ?>
222
                                                <?php } ?>
118
                                                
223
                                                
119
                                            <?php } ?>
224
                                            <?php } ?>
120
                                            
225
                                            
121
                                        </td>
226
                                        </td>
Line 136... Line 241...
136
                                                
241
                                                
137
                                            }
242
                                            }
138
                                            else if (version_compare($modul_info['version'], $this->shop->arAllModule[$modul_key]->versio) > 0) 
243
                                            else if (version_compare($modul_info['version'], $this->shop->arAllModule[$modul_key]->versio) > 0) 
139
                                            {
244
                                            {
140
                                                
245
                                                
141
                                                echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong><br />';
246
                                                echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
-
 
247
                                                
-
 
248
                                                if ($modul_info['active'] === true) 
-
 
249
                                                {
-
 
250
                                                
-
 
251
                                                    echo '<br />';
142
                                                echo wpsg_translate(__('Version <a href="#1#">installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key); 
252
                                                    echo wpsg_translate(__('<a href="#1#">Version installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key);
-
 
253
                                                    
-
 
254
                                                }
143
                                            
255
                                                
144
                                            }
256
                                            }
145
                                            
257
                                            
146
                                        ?></td>
258
                                        ?></td>
147
                                    </tr>
259
                                    </tr>
148
                                    <?php } ?>
260
                                    <?php } ?>
149
                                </tbody>
261
                                </tbody>
150
                            </table>
262
                            </table>
151
                                                
263
                                                
152
                        <?php } ?>
264
                        <?php } ?>
153
                        
265
                                                                        
154
                        <form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul&source=licence">
-
 
155
						
-
 
156
                            <fieldset>
-
 
157
                                <legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
-
 
158
                                                
-
 
159
                                <div class="row">
-
 
160
                                    <div class="col-xs-10">
-
 
161
                                        
-
 
162
                                        <input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
-
 
163
                                        
-
 
164
                                    </div>
-
 
165
                                    <div class="col-xs-2">
-
 
166
                                        
-
 
167
                                        <input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
-
 
168
                                        
-
 
169
                                    </div>
-
 
170
                                </div>
-
 
171
                            </fieldset>
-
 
172
                            
-
 
173
                        </form>
-
 
174
                                                
-
 
175
                    <?php } ?>
266
                    <?php } ?>
176
                    
267
                    
177
                </div>
268
                </div>
178
            </div>
269
            </div>
179
            
270