1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Templatedatei für die Modulseite des Backend
|
|
|
5 |
* Sollte nicht angepasst werden
|
|
|
6 |
*/
|
|
|
7 |
|
6484 |
daniel |
8 |
$wpsg_update_data = wpsg_get_update_data();
|
|
|
9 |
if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) $modul_info = $wpsg_update_data['modulinfo'];
|
|
|
10 |
else $modul_info = array();
|
|
|
11 |
|
|
|
12 |
//wpsg_debug($modul_info);
|
|
|
13 |
|
1067 |
daniel |
14 |
?>
|
|
|
15 |
<div class="wpsg_admin_submenu">
|
|
|
16 |
|
5382 |
daniel |
17 |
<div class="wpsg_modul_search_wrap">
|
|
|
18 |
<input id="wpsg_modul_search" type="text" class="wpsg_modul_search" value="<?php echo wpsg_getStr($_COOKIE['wpsg-modulfilter-search']); ?>" />
|
|
|
19 |
<label title="<?php echo __('Wenn aktiviert, werden nur aktive Module angezeigt'); ?>">
|
|
|
20 |
<input type="checkbox" <?php echo ((wpsg_isSizedString($_COOKIE['wpsg-modulfilter-check'], 'true'))?'checked="checked"':''); ?> id="wpsg_modul_onlyactive" class="wpsg_modul_onlyactive" />
|
|
|
21 |
<span class="glyphicon glyphicon-ok wpsg_modul_onlyactive_glyphicon" aria-hidden="true"></span>
|
|
|
22 |
</label>
|
|
|
23 |
</div>
|
|
|
24 |
|
1067 |
daniel |
25 |
<?php foreach ($this->view['groups'] as $group_name => $g) { ?>
|
5385 |
daniel |
26 |
<div class="list-group list-modul-group" style="display:none;" >
|
5382 |
daniel |
27 |
<span class="list-group-item list-group-head"><?php echo $group_name; ?></span>
|
5370 |
daniel |
28 |
<?php foreach ($g as $mod_key => $m) { ?>
|
5866 |
hartmut |
29 |
<a class="<?php echo (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':''); ?> list-group-modul list-group-item <?php echo (($mod_key == wpsg_getStr($_REQUEST['modul'])?'active':'')); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $mod_key; ?>">
|
5382 |
daniel |
30 |
<span class="wpsg_modul_name"><?php echo $m->name; ?></span>
|
5370 |
daniel |
31 |
<?php if (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':'') { ?>
|
|
|
32 |
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
|
|
|
33 |
<?php } ?>
|
|
|
34 |
</a>
|
|
|
35 |
<?php } ?>
|
|
|
36 |
</div>
|
|
|
37 |
<?php } ?>
|
5371 |
daniel |
38 |
|
1067 |
daniel |
39 |
</div>
|
|
|
40 |
|
|
|
41 |
<?php if (isset($_REQUEST['modul'])) { ?>
|
5454 |
daniel |
42 |
<div class="wpsg_admin_content form-horizontal">
|
|
|
43 |
<?php echo wpsg_drawForm_AdminboxStart($this->arAllModule[$_REQUEST['modul']]->name); ?>
|
1067 |
daniel |
44 |
<form name="form1" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $_REQUEST['modul']; ?>&noheader=1" method="post" enctype="multipart/form-data">
|
|
|
45 |
|
5488 |
daniel |
46 |
<!-- <h3>
|
1401 |
daniel |
47 |
<?php echo $this->arAllModule[$_REQUEST['modul']]->name; ?>
|
1559 |
daniel |
48 |
<?php if (isset($this->arAllModule[$_REQUEST['modul']]->hilfeURL) && $this->arAllModule[$_REQUEST['modul']]->hilfeURL != '') { ?>
|
1727 |
daniel |
49 |
<a target="_blank" href="<?php echo $this->arAllModule[$_REQUEST['modul']]->hilfeURL; ?>" class="wpsg_form_help_notip"></a>
|
1067 |
daniel |
50 |
<?php } ?>
|
5488 |
daniel |
51 |
</h3> -->
|
1067 |
daniel |
52 |
|
5488 |
daniel |
53 |
<p><?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?></p><br />
|
1067 |
daniel |
54 |
|
5382 |
daniel |
55 |
<?php $modul_install = $this->get_option($_REQUEST['modul'], $this->view['global']); ?>
|
|
|
56 |
<?php echo wpsg_drawForm_Select('aktiv', __('Modul aktiviert', 'wpsg'), array('0' => __('Nein', 'wpsg'), '1' => __('Ja', 'wpsg')), ((wpsg_isSizedInt($modul_install))?'1':'0')); ?>
|
|
|
57 |
|
1469 |
daniel |
58 |
<?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
|
6484 |
daniel |
59 |
|
|
|
60 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
5451 |
daniel |
61 |
|
6484 |
daniel |
62 |
<?php
|
|
|
63 |
|
|
|
64 |
echo $this->arAllModule[$_REQUEST['modul']]->version;
|
|
|
65 |
|
|
|
66 |
if (wpsg_isSizedArray($modul_info[$_REQUEST['modul']]))
|
|
|
67 |
{
|
|
|
68 |
|
|
|
69 |
$modul_info_modul = $modul_info[$_REQUEST['modul']];
|
|
|
70 |
|
|
|
71 |
if ($modul_info_modul['version'] === $this->shop->arAllModule[$_REQUEST['modul']]->version)
|
|
|
72 |
{
|
|
|
73 |
|
|
|
74 |
echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
|
|
|
75 |
|
|
|
76 |
}
|
|
|
77 |
else if (version_compare($modul_info_modul['version'], WPSG_VERSION) > 0)
|
|
|
78 |
{
|
|
|
79 |
|
|
|
80 |
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');
|
|
|
81 |
|
|
|
82 |
}
|
|
|
83 |
else if (version_compare($modul_info_modul['version'], $this->shop->arAllModule[$_REQUEST['modul']]->versio) > 0)
|
|
|
84 |
{
|
|
|
85 |
|
|
|
86 |
echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
|
|
|
87 |
|
|
|
88 |
if ($modul_info_modul['active'] === true)
|
|
|
89 |
{
|
|
|
90 |
|
|
|
91 |
echo '<br />';
|
|
|
92 |
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='.$_REQUEST['modul']);
|
|
|
93 |
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
?>
|
|
|
101 |
|
|
|
102 |
<?php echo wpsg_drawForm_TextEnd(__('Version', 'wpsg')); ?>
|
|
|
103 |
|
|
|
104 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
105 |
|
|
|
106 |
<?php if (array_key_exists($_REQUEST['modul'], $modul_info)) { ?>
|
|
|
107 |
|
|
|
108 |
<?php if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['free'])) { ?>
|
|
|
109 |
<span class="wpsg_message_ok"><?php echo __('Kostenfrei', 'wpsg'); ?></span>
|
|
|
110 |
<?php } else if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['active'])) { ?>
|
|
|
111 |
<span class="wpsg_message_ok"><?php echo __('Aktiv', 'wpsg'); ?></span>
|
|
|
112 |
<?php } else { ?>
|
|
|
113 |
<span class="wpsg_error"><?php echo __('Nicht aktiv', 'wpsg'); ?></span>
|
|
|
114 |
|
|
|
115 |
<?php if (wpsg_isSizedString($modul_info[$_REQUEST['modul']]['shop_url'])) { ?>
|
|
|
116 |
[ <a href="<?php echo $modul_info[$_REQUEST['modul']]['shop_url']; ?>"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
|
|
|
117 |
<?php } else { ?>
|
|
|
118 |
[ <a href="https://shop.maennchen1.de/"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
|
|
|
119 |
<?php } ?>
|
|
|
120 |
[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulcode eingeben', 'wpsg'); ?></a> ]
|
|
|
121 |
|
|
|
122 |
<?php } ?>
|
|
|
123 |
|
|
|
124 |
<?php } else { ?>
|
|
|
125 |
<span class="wpsg_error"><?php echo __('Unbekannt', 'wpsg'); ?></span>
|
|
|
126 |
<?php } ?>
|
|
|
127 |
|
|
|
128 |
<?php echo wpsg_drawForm_TextEnd(__('Lizenz')); ?>
|
5451 |
daniel |
129 |
|
6484 |
daniel |
130 |
<hr />
|
|
|
131 |
|
5451 |
daniel |
132 |
<?php } ?>
|
1469 |
daniel |
133 |
|
6491 |
hartmut |
134 |
<?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || 1))) { ?>
|
1559 |
daniel |
135 |
<?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
|
1469 |
daniel |
136 |
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
|
|
|
137 |
<?php } ?>
|
|
|
138 |
|
|
|
139 |
<input type="hidden" name="subaction" value="module" />
|
|
|
140 |
|
1559 |
daniel |
141 |
<?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
|
1469 |
daniel |
142 |
</form>
|
1465 |
daniel |
143 |
<?php } ?>
|
1469 |
daniel |
144 |
|
2506 |
daniel |
145 |
<?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
|
1469 |
daniel |
146 |
<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
|
1468 |
daniel |
147 |
<?php } ?>
|
1465 |
daniel |
148 |
|
1559 |
daniel |
149 |
<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
|
4808 |
daniel |
150 |
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
|
1068 |
daniel |
151 |
<?php } ?>
|
4808 |
daniel |
152 |
<?php } else { ?>
|
|
|
153 |
<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
|
1197 |
daniel |
154 |
<?php } ?>
|
|
|
155 |
|
1559 |
daniel |
156 |
<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
|
1067 |
daniel |
157 |
</form>
|
1197 |
daniel |
158 |
<?php } ?>
|
5488 |
daniel |
159 |
|
6488 |
daniel |
160 |
<?php if (array_key_exists($_REQUEST['modul'], $this->arModule) && (!isset($this->arAllModule[$_REQUEST['modul']]->version) || (($this->arAllModule[$_REQUEST['modul']]->free === true || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])))))) { ?>
|
5488 |
daniel |
161 |
<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit_afterform(); ?>
|
|
|
162 |
<?php } ?>
|
|
|
163 |
|
5454 |
daniel |
164 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
1067 |
daniel |
165 |
</div>
|
2645 |
daniel |
166 |
<?php } else { ?>
|
|
|
167 |
|
6475 |
daniel |
168 |
<div class="wpsg_admin_content form-horizontal">
|
|
|
169 |
<div class="panel panel-default">
|
|
|
170 |
<div class="panel-heading clearfix">
|
|
|
171 |
<h3 class="panel-title"><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
|
|
|
172 |
</div>
|
|
|
173 |
<div class="panel-body">
|
|
|
174 |
|
6476 |
daniel |
175 |
<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul">
|
|
|
176 |
|
|
|
177 |
<fieldset>
|
|
|
178 |
<legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
|
|
|
179 |
|
|
|
180 |
<div class="row">
|
|
|
181 |
<div class="col-xs-10">
|
|
|
182 |
|
|
|
183 |
<input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
|
|
|
184 |
|
|
|
185 |
</div>
|
|
|
186 |
<div class="col-xs-2">
|
|
|
187 |
|
|
|
188 |
<input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
|
|
|
189 |
|
|
|
190 |
</div>
|
|
|
191 |
</div>
|
|
|
192 |
</fieldset>
|
|
|
193 |
|
|
|
194 |
</form>
|
|
|
195 |
|
|
|
196 |
<hr />
|
|
|
197 |
|
6475 |
daniel |
198 |
<?php $wpsg_update_data = wpsg_get_update_data(); ?>
|
6488 |
daniel |
199 |
<?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
|
6475 |
daniel |
200 |
|
6476 |
daniel |
201 |
<table class="table modultable">
|
6475 |
daniel |
202 |
<thead>
|
|
|
203 |
<tr>
|
|
|
204 |
<th><?php echo __('Modulname', 'wpsg'); ?></th>
|
6484 |
daniel |
205 |
<th><?php echo __('Version', 'wpsg'); ?></th>
|
6475 |
daniel |
206 |
<th><?php echo __('Lizenz', 'wpsg'); ?></th>
|
|
|
207 |
<th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
|
|
|
208 |
</tr>
|
|
|
209 |
</thead>
|
|
|
210 |
<tbody>
|
|
|
211 |
<?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
|
6476 |
daniel |
212 |
<tr style="font-style:normal;" class="
|
|
|
213 |
|
|
|
214 |
<?php if ($modul_info['free'] === true) { ?>
|
|
|
215 |
<?php echo 'active'; ?>
|
|
|
216 |
<?php } else if ($modul_info['active'] === true) { ?>
|
|
|
217 |
<?php echo 'success'; ?>
|
|
|
218 |
<?php } else { ?>
|
|
|
219 |
<?php echo 'info'; ?>
|
|
|
220 |
<?php } ?>
|
|
|
221 |
|
|
|
222 |
">
|
6475 |
daniel |
223 |
<td><?php echo $modul_info['label']; ?></td>
|
|
|
224 |
<td>
|
|
|
225 |
|
|
|
226 |
<?php if ($this->hasModInstalled($modul_key)) { ?>
|
|
|
227 |
<?php echo $this->arAllModule[$modul_key]->version; ?>
|
|
|
228 |
<?php } ?>
|
|
|
229 |
|
|
|
230 |
</td>
|
|
|
231 |
<td>
|
|
|
232 |
|
|
|
233 |
<?php if ($modul_info['free'] === true) { ?>
|
|
|
234 |
<?php echo __('kostenlos', 'wpsg'); ?>
|
|
|
235 |
<?php } else if ($modul_info['active'] === true) { ?>
|
|
|
236 |
<?php echo __('enthalten', 'wpsg'); ?>
|
|
|
237 |
<?php } else { ?>
|
6476 |
daniel |
238 |
|
6488 |
daniel |
239 |
<?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
|
|
|
240 |
<a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
|
6476 |
daniel |
241 |
<?php } else { ?>
|
6484 |
daniel |
242 |
<a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
|
6476 |
daniel |
243 |
<?php } ?>
|
|
|
244 |
|
6475 |
daniel |
245 |
<?php } ?>
|
|
|
246 |
|
|
|
247 |
</td>
|
|
|
248 |
<td><?php
|
|
|
249 |
|
|
|
250 |
echo $modul_info['version'];
|
|
|
251 |
|
|
|
252 |
if ($this->hasModInstalled($modul_key) && $modul_info['version'] === $this->arAllModule[$modul_key]->version)
|
|
|
253 |
{
|
|
|
254 |
|
6476 |
daniel |
255 |
echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
|
6475 |
daniel |
256 |
|
|
|
257 |
}
|
|
|
258 |
else if (version_compare($modul_info['version'], WPSG_VERSION) > 0)
|
|
|
259 |
{
|
|
|
260 |
|
6476 |
daniel |
261 |
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');
|
6475 |
daniel |
262 |
|
|
|
263 |
}
|
6476 |
daniel |
264 |
else if (version_compare($modul_info['version'], $this->arAllModule[$modul_key]->versio) > 0)
|
|
|
265 |
{
|
|
|
266 |
|
6484 |
daniel |
267 |
echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
|
|
|
268 |
|
|
|
269 |
if ($modul_info['active'] === true)
|
|
|
270 |
{
|
|
|
271 |
|
|
|
272 |
echo '<br />';
|
|
|
273 |
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);
|
|
|
274 |
|
|
|
275 |
}
|
6475 |
daniel |
276 |
|
6476 |
daniel |
277 |
}
|
|
|
278 |
|
6475 |
daniel |
279 |
?></td>
|
|
|
280 |
</tr>
|
|
|
281 |
<?php } ?>
|
|
|
282 |
</tbody>
|
|
|
283 |
</table>
|
6476 |
daniel |
284 |
|
6475 |
daniel |
285 |
<?php } else { ?>
|
|
|
286 |
|
|
|
287 |
<p>
|
|
|
288 |
Lizenz aktivieren
|
|
|
289 |
</p>
|
|
|
290 |
|
|
|
291 |
<?php } ?>
|
|
|
292 |
|
|
|
293 |
</div>
|
|
|
294 |
</div>
|
|
|
295 |
</div>
|
4950 |
daniel |
296 |
|
1700 |
daniel |
297 |
<?php } ?>
|
|
|
298 |
|
3244 |
daniel |
299 |
<script type="text/javascript">/* <![CDATA[ */
|
1700 |
daniel |
300 |
|
5382 |
daniel |
301 |
function wpsg_ssh_module()
|
|
|
302 |
{
|
|
|
303 |
|
|
|
304 |
jQuery('.list-modul-group').show();
|
|
|
305 |
jQuery('.wpsg_admin_submenu .list-group-item').show();
|
|
|
306 |
|
|
|
307 |
var check = jQuery('#wpsg_modul_onlyactive').prop('checked');
|
|
|
308 |
var search = jQuery('#wpsg_modul_search').val();
|
|
|
309 |
|
|
|
310 |
jQuery.cookie('wpsg-modulfilter-check', check);
|
|
|
311 |
jQuery.cookie('wpsg-modulfilter-search', search);
|
|
|
312 |
|
|
|
313 |
jQuery('.wpsg_modul_name').each(function() {
|
|
|
314 |
|
|
|
315 |
if (!jQuery(this).parent().hasClass('active'))
|
|
|
316 |
{
|
|
|
317 |
|
|
|
318 |
if (check && !jQuery(this).parent().hasClass('modul_akt')) jQuery(this).parent().hide();
|
5749 |
daniel |
319 |
else if (jQuery.trim(search) != '')
|
5382 |
daniel |
320 |
{
|
|
|
321 |
|
|
|
322 |
var re = new RegExp(search, 'i');
|
5749 |
daniel |
323 |
|
5382 |
daniel |
324 |
if (!jQuery(this).html().match(re)) jQuery(this).parent().hide();
|
|
|
325 |
else jQuery(this).parent().show();
|
|
|
326 |
|
|
|
327 |
}
|
|
|
328 |
|
|
|
329 |
}
|
|
|
330 |
|
|
|
331 |
} );
|
|
|
332 |
|
|
|
333 |
jQuery('.list-modul-group').each(function() {
|
|
|
334 |
|
|
|
335 |
if (jQuery(this).find('.list-group-modul:visible').length <= 0) jQuery(this).hide();
|
|
|
336 |
else jQuery(this).show();
|
|
|
337 |
|
|
|
338 |
} );
|
|
|
339 |
|
|
|
340 |
}
|
|
|
341 |
|
1700 |
daniel |
342 |
jQuery(document).ready(function() {
|
|
|
343 |
|
5382 |
daniel |
344 |
jQuery('#wpsg_modul_onlyactive').bind('change', function(event) {
|
|
|
345 |
|
|
|
346 |
wpsg_ssh_module();
|
|
|
347 |
jQuery(this).blur();
|
|
|
348 |
|
|
|
349 |
} );
|
|
|
350 |
|
|
|
351 |
jQuery('#wpsg_modul_search').focus().bind('blur', wpsg_ssh_module);
|
|
|
352 |
jQuery('#wpsg_modul_search').focus().bind('keyup', wpsg_ssh_module);
|
|
|
353 |
|
|
|
354 |
wpsg_ssh_module();
|
|
|
355 |
|
1700 |
daniel |
356 |
} );
|
|
|
357 |
|
3244 |
daniel |
358 |
/* ]]> */</script>
|