6479 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Lizenzverwaltung
|
|
|
5 |
*/
|
|
|
6 |
|
6484 |
daniel |
7 |
$wpsg_update_data = wpsg_get_update_data();
|
|
|
8 |
|
6488 |
daniel |
9 |
if (!is_array($wpsg_update_data) || !current_user_can('wpsg_lizence') || !wpsg_isSizedInt($wpsg_update_data['returnCode'])) die();
|
6484 |
daniel |
10 |
|
6479 |
daniel |
11 |
?>
|
|
|
12 |
|
|
|
13 |
<div class="wpsg_admin" id="wpsg-bs">
|
|
|
14 |
|
|
|
15 |
<nav class="navbar navbar-default">
|
|
|
16 |
<div class="container-fluid">
|
|
|
17 |
<div class="navbar-header">
|
|
|
18 |
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
|
|
|
19 |
</div>
|
|
|
20 |
<div class="collapse navbar-collapse">
|
|
|
21 |
<ul class="nav navbar-nav">
|
|
|
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>
|
|
|
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&action=module"><?php echo __("Module", "wpsg"); ?></a></li>
|
|
|
24 |
|
6484 |
daniel |
25 |
<?php if (current_user_can('wpsg_lizence') && is_array($wpsg_update_data)) { ?>
|
6479 |
daniel |
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&action=registrierung"><?php echo __("Lizenzverwaltung", "wpsg"); ?></a></li>
|
|
|
27 |
<?php } ?>
|
|
|
28 |
|
|
|
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">
|
|
|
30 |
<?php echo __('Aktuelles', 'wpsg'); ?>
|
|
|
31 |
<?php $wpsg_news_unread = wpsg_news::countUnreadNews(); if (wpsg_isSizedInt($wpsg_news_unread)) { ?>
|
6526 |
daniel |
32 |
<span class="badge" style="background-color:#D9534F;"><?php echo $wpsg_news_unread; ?></span>
|
6479 |
daniel |
33 |
<?php } ?>
|
|
|
34 |
</a></li>
|
|
|
35 |
</ul>
|
|
|
36 |
<ul class="nav navbar-nav navbar-right">
|
|
|
37 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "hilfe")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=hilfe"><?php echo __("Hilfe", "wpsg"); ?></a></li>
|
|
|
38 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "ueber")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=ueber"><?php echo __("Über", "wpsg"); ?></a></li>
|
|
|
39 |
</ul>
|
|
|
40 |
</div>
|
|
|
41 |
</div>
|
|
|
42 |
</nav>
|
6503 |
daniel |
43 |
|
6479 |
daniel |
44 |
<div class="wpsg_admin_wrap">
|
6503 |
daniel |
45 |
|
|
|
46 |
<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
|
6479 |
daniel |
47 |
|
|
|
48 |
<div class="wpsg_admin_submenu">
|
|
|
49 |
|
|
|
50 |
<div class="list-group">
|
|
|
51 |
<span class="list-group-head list-group-item"><?php echo __('Lizenzverwaltung'); ?></span>
|
|
|
52 |
<a class="list-group-item <?php echo (($this->view['subaction'] == 'registerdata')?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=registerdata"><?php echo __('Registrierungsdaten', 'wpsg'); ?></a>
|
|
|
53 |
<a class="list-group-item <?php echo (($this->view['subaction'] == 'domaindata')?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domaindata"><?php echo __('Domainverwaltung', 'wpsg'); ?></a>
|
|
|
54 |
<a class="list-group-item <?php echo (($this->view['subaction'] == 'modulactivation')?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulaktivierung', 'wpsg'); ?></a>
|
|
|
55 |
</div>
|
|
|
56 |
|
|
|
57 |
</div>
|
|
|
58 |
|
|
|
59 |
<div class="wpsg_admin_content form-horizontal">
|
|
|
60 |
|
|
|
61 |
<div class="panel panel-default">
|
|
|
62 |
<div class="panel-heading clearfix">
|
|
|
63 |
<h3 class="panel-title">
|
|
|
64 |
|
|
|
65 |
<?php if ($this->view['subaction'] === 'registerdata') { ?><?php echo __('Registrierungsdaten', 'wpsg'); ?>
|
|
|
66 |
<?php } else if ($this->view['subaction'] === 'domaindata') { ?><?php echo __('Domainverwaltung', 'wpsg'); ?>
|
|
|
67 |
<?php } else if ($this->view['subaction'] === 'modulactivation') { ?><?php echo __('Modulaktivierung', 'wpsg'); ?><?php } ?>
|
|
|
68 |
|
|
|
69 |
</h3>
|
|
|
70 |
</div>
|
|
|
71 |
<div class="panel-body">
|
|
|
72 |
|
|
|
73 |
<?php if ($this->view['subaction'] === 'registerdata') { ?>
|
|
|
74 |
|
6484 |
daniel |
75 |
<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=saveRegister">
|
|
|
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>
|
6479 |
daniel |
105 |
|
6484 |
daniel |
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>
|
7316 |
thomas |
113 |
<th class="col_domain"><?php echo __('Domain', 'wpsg'); ?></th>
|
6484 |
daniel |
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 { ?>
|
6479 |
daniel |
132 |
|
6484 |
daniel |
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 } ?>
|
|
|
156 |
|
6479 |
daniel |
157 |
<?php } else if ($this->view['subaction'] === 'modulactivation') { ?>
|
|
|
158 |
|
|
|
159 |
<?php $this->shop->loadModule(true); ?>
|
|
|
160 |
<?php $wpsg_update_data = wpsg_get_update_data(); ?>
|
6484 |
daniel |
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>
|
6479 |
daniel |
166 |
|
6484 |
daniel |
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 |
|
6526 |
daniel |
185 |
<?php if (wpsg_isSizedArray($wpsg_update_data)) { ?>
|
|
|
186 |
<?php // Ich zeige hier nur die Aktiven Module an ?>
|
|
|
187 |
<?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); } ?>
|
|
|
188 |
|
|
|
189 |
<table class="table modultable">
|
|
|
190 |
<thead>
|
|
|
191 |
<tr>
|
|
|
192 |
<th><?php echo __('Modulname', 'wpsg'); ?></th>
|
|
|
193 |
<th><?php echo __('Version', 'wpsg'); ?></th>
|
|
|
194 |
<th><?php echo __('Lizenz', 'wpsg'); ?></th>
|
|
|
195 |
<th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
|
|
|
196 |
</tr>
|
|
|
197 |
</thead>
|
|
|
198 |
<tbody>
|
|
|
199 |
<?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
|
|
|
200 |
<tr style="font-style:normal;" class="success">
|
|
|
201 |
<td><?php echo $modul_info['label']; ?></td>
|
|
|
202 |
<td>
|
|
|
203 |
|
|
|
204 |
<?php if ($this->shop->hasModInstalled($modul_key)) { ?>
|
|
|
205 |
<?php echo $this->shop->arAllModule[$modul_key]->version; ?>
|
|
|
206 |
<?php } ?>
|
|
|
207 |
|
|
|
208 |
</td>
|
|
|
209 |
<td>
|
|
|
210 |
|
|
|
211 |
<?php if ($modul_info['free'] === true) { ?>
|
|
|
212 |
<?php echo __('kostenlos', 'wpsg'); ?>
|
|
|
213 |
<?php } else if ($modul_info['active'] === true) { ?>
|
|
|
214 |
<?php echo __('enthalten', 'wpsg'); ?>
|
|
|
215 |
<?php } else { ?>
|
|
|
216 |
|
|
|
217 |
<?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
|
|
|
218 |
<a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
|
|
|
219 |
<?php } else { ?>
|
|
|
220 |
<a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
|
|
|
221 |
<?php } ?>
|
|
|
222 |
|
|
|
223 |
<?php } ?>
|
|
|
224 |
|
|
|
225 |
</td>
|
|
|
226 |
<td><?php
|
|
|
227 |
|
|
|
228 |
echo $modul_info['version'];
|
|
|
229 |
|
|
|
230 |
if ($this->shop->hasModInstalled($modul_key) && $modul_info['version'] === $this->shop->arAllModule[$modul_key]->version)
|
|
|
231 |
{
|
|
|
232 |
|
|
|
233 |
echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
|
|
|
234 |
|
|
|
235 |
}
|
|
|
236 |
else if (version_compare($modul_info['version'], WPSG_VERSION) > 0)
|
|
|
237 |
{
|
|
|
238 |
|
|
|
239 |
echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong><br />'.wpsg_translate(__('<a href="#1#">wpShopGermany Update</a> notwendig', 'wpsg'), WPSG_URL_WP.'wp-admin/plugins.php');
|
|
|
240 |
|
|
|
241 |
}
|
6773 |
daniel |
242 |
else if (version_compare($modul_info['version'], $this->shop->arAllModule[$modul_key]->version) > 0)
|
6526 |
daniel |
243 |
{
|
|
|
244 |
|
|
|
245 |
echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
|
|
|
246 |
|
|
|
247 |
if ($modul_info['active'] === true)
|
|
|
248 |
{
|
|
|
249 |
|
|
|
250 |
echo '<br />';
|
6645 |
daniel |
251 |
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.'&source=licence');
|
6526 |
daniel |
252 |
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
?></td>
|
|
|
258 |
</tr>
|
|
|
259 |
<?php } ?>
|
|
|
260 |
</tbody>
|
|
|
261 |
</table>
|
|
|
262 |
|
|
|
263 |
<?php } ?>
|
6484 |
daniel |
264 |
|
6479 |
daniel |
265 |
<?php } ?>
|
|
|
266 |
|
|
|
267 |
</div>
|
|
|
268 |
</div>
|
|
|
269 |
|
|
|
270 |
</div>
|
|
|
271 |
|
|
|
272 |
</div>
|
|
|
273 |
|
|
|
274 |
</div>
|