Subversion Repositories wpShopGermany4

Rev

Rev 6503 | Rev 6522 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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&amp;action=module&amp;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&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;noheader=1" method="post" enctype="multipart/form-data">
45
 
5488 daniel 46
		<!-- <h3>
6503 daniel 47
		<?php echo $this->arAllModule[$_REQUEST['modul']]->name; ?>
48
		<?php if (isset($this->arAllModule[$_REQUEST['modul']]->hilfeURL) && $this->arAllModule[$_REQUEST['modul']]->hilfeURL != '') { ?>
49
		<a target="_blank" href="<?php echo $this->arAllModule[$_REQUEST['modul']]->hilfeURL; ?>" class="wpsg_form_help_notip"></a>
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
 
6508 daniel 55
		<?php if (!isset($wpsg_update_data['modulinfo'][$_REQUEST['modul']]) || @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true || @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true || $wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true) { ?>
6503 daniel 56
 
57
			<?php $modul_install = $this->get_option($_REQUEST['modul'], $this->view['global']); ?>
58
			<?php echo wpsg_drawForm_Select('aktiv', __('Modul aktiviert', 'wpsg'), array('0' => __('Nein', 'wpsg'), '1' => __('Ja', 'wpsg')), ((wpsg_isSizedInt($modul_install))?'1':'0')); ?>
59
 
60
		<?php } ?>
5382 daniel 61
 
1469 daniel 62
		<?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
6484 daniel 63
 
64
		<?php echo wpsg_drawForm_TextStart(); ?>
5451 daniel 65
 
6484 daniel 66
			<?php
6503 daniel 67
 
6484 daniel 68
				echo $this->arAllModule[$_REQUEST['modul']]->version;
69
 
70
				if (wpsg_isSizedArray($modul_info[$_REQUEST['modul']]))
71
				{
72
 
73
					$modul_info_modul = $modul_info[$_REQUEST['modul']];
6503 daniel 74
 
75
					if ($modul_info_modul['version'] === $this->arAllModule[$_REQUEST['modul']]->version)
6484 daniel 76
					{
77
 
78
						echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
79
 
80
					}
81
					else if (version_compare($modul_info_modul['version'], WPSG_VERSION) > 0)
82
					{
83
 
84
						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');
85
 
86
					}
6503 daniel 87
					else if (version_compare($modul_info_modul['version'], $this->arAllModule[$_REQUEST['modul']]->versio) > 0)
6484 daniel 88
					{
89
 
90
						echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
91
 
6503 daniel 92
						echo '<br />';
93
						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']);
6484 daniel 94
 
95
					}
96
 
97
				}
98
 
99
			?>
100
 
101
		<?php echo wpsg_drawForm_TextEnd(__('Version', 'wpsg')); ?>
102
 
103
		<?php echo wpsg_drawForm_TextStart(); ?>
104
 
105
			<?php if (array_key_exists($_REQUEST['modul'], $modul_info)) { ?>
106
 
107
				<?php if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['free'])) { ?>
108
					<span class="wpsg_message_ok"><?php echo __('Kostenfrei', 'wpsg'); ?></span>
109
				<?php } else if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['active'])) { ?>
110
					<span class="wpsg_message_ok"><?php echo __('Aktiv', 'wpsg'); ?></span>
111
				<?php } else { ?>
112
 
6503 daniel 113
					<?php if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['demo_active'])) { ?>
114
						<span class="wpsg_message_demo"><?php echo __('Demo Modus', 'wpsg'); ?></span>
115
					<?php } else { ?>
116
						<span class="wpsg_error"><?php echo __('Nicht aktiv', 'wpsg'); ?></span>
117
					<?php } ?>
118
 
6484 daniel 119
					<?php if (wpsg_isSizedString($modul_info[$_REQUEST['modul']]['shop_url'])) {  ?>
120
					[ <a href="<?php echo $modul_info[$_REQUEST['modul']]['shop_url']; ?>"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
121
					<?php } else { ?>
122
					[ <a href="https://shop.maennchen1.de/"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
123
					<?php } ?>
124
					[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulcode eingeben', 'wpsg'); ?></a> ]
125
 
6503 daniel 126
					<?php if (!wpsg_isTrue($modul_info[$_REQUEST['modul']]['demo_active'])) { ?>
127
					<br />
128
 
129
					[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=startDemo&modul=<?php echo $_REQUEST['modul']; ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher? Das Modul kann 14 Tage ab heute komplett in vollem Umfang getestet werden.', 'wpsg'); ?>');"><?php echo __('Demo Modus starten'); ?></a> ]
130
					<?php } ?>
131
 
6484 daniel 132
				<?php } ?>
133
 
134
			<?php } else { ?>
135
				<span class="wpsg_error"><?php echo __('Unbekannt', 'wpsg'); ?></span>
136
			<?php } ?>
137
 
138
		<?php echo wpsg_drawForm_TextEnd(__('Lizenz')); ?>
6503 daniel 139
 
5451 daniel 140
		<?php } ?>
1469 daniel 141
 
6503 daniel 142
		<?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || (@$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true || @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true || $wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true)) { ?>
143
 
144
			<hr />
145
 
1559 daniel 146
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
1469 daniel 147
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
148
			<?php } ?>
149
 
150
			<input type="hidden" name="subaction" value="module" />
151
 
1559 daniel 152
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
1469 daniel 153
			</form>
1465 daniel 154
			<?php } ?>
1469 daniel 155
 
2506 daniel 156
			<?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
1469 daniel 157
			<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
1468 daniel 158
			<?php } ?>
1465 daniel 159
 
1559 daniel 160
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
4808 daniel 161
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
1068 daniel 162
			<?php } ?>
6503 daniel 163
 
4808 daniel 164
		<?php } else { ?>
6503 daniel 165
 
166
			<?php if (@$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['demo_active'] === true || @$wpsg_update_data['modulinfo'][$_REQUEST['modul']]['active'] === true || $wpsg_update_data['modulinfo'][$_REQUEST['modul']]['free'] === true) { ?>
167
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
168
			<?php } ?>
169
 
1197 daniel 170
		<?php } ?>
171
 
1559 daniel 172
	<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
1067 daniel 173
	</form>
1197 daniel 174
	<?php } ?>
5488 daniel 175
 
6488 daniel 176
	<?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 177
	<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit_afterform(); ?>
178
	<?php } ?>
179
 
5454 daniel 180
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
1067 daniel 181
</div>
2645 daniel 182
<?php } else { ?>
183
 
6475 daniel 184
	<div class="wpsg_admin_content form-horizontal">
185
		<div class="panel panel-default">
186
			<div class="panel-heading clearfix">
187
				<h3 class="panel-title"><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
188
		 	</div>
189
		 	<div class="panel-body">
190
 
6476 daniel 191
				<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul">
192
 
193
					<fieldset>
194
						<legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
195
 
196
						<div class="row">
197
							<div class="col-xs-10">
198
 
199
								<input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
200
 
201
							</div>
202
							<div class="col-xs-2">
203
 
204
								<input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
205
 
206
							</div>
207
						</div>
208
					</fieldset>
209
 
210
				</form>
211
 
212
				<hr />
213
 
6475 daniel 214
				<?php $wpsg_update_data = wpsg_get_update_data(); ?>
6488 daniel 215
				<?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
6475 daniel 216
 
6476 daniel 217
					<table class="table modultable">
6475 daniel 218
  						<thead>
219
							<tr>
220
								<th><?php echo __('Modulname', 'wpsg'); ?></th>
6484 daniel 221
								<th><?php echo __('Version', 'wpsg'); ?></th>
6475 daniel 222
								<th><?php echo __('Lizenz', 'wpsg');  ?></th>
223
								<th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
224
							</tr>
225
						</thead>
226
						<tbody>
227
							<?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
6476 daniel 228
							<tr style="font-style:normal;" class="
229
 
230
								<?php if ($modul_info['free'] === true) { ?>
231
									<?php echo 'active'; ?>
232
								<?php } else if ($modul_info['active'] === true) { ?>
233
									<?php echo 'success'; ?>
234
								<?php } else { ?>
235
									<?php echo 'info'; ?>
236
								<?php } ?>
237
 
238
							">
6475 daniel 239
								<td><?php echo $modul_info['label']; ?></td>
240
								<td>
241
 
242
									<?php if ($this->hasModInstalled($modul_key)) { ?>
243
										<?php echo $this->arAllModule[$modul_key]->version; ?>
244
									<?php } ?>
245
 
246
								</td>
247
								<td>
248
 
249
									<?php if ($modul_info['free'] === true) { ?>
250
										<?php echo __('kostenlos', 'wpsg'); ?>
251
									<?php } else if ($modul_info['active'] === true) { ?>
252
										<?php echo __('enthalten', 'wpsg'); ?>
253
									<?php } else { ?>
6476 daniel 254
 
6488 daniel 255
										<?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
256
										<a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
6476 daniel 257
										<?php } else { ?>
6484 daniel 258
										<a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
6476 daniel 259
										<?php } ?>
260
 
6475 daniel 261
									<?php } ?>
262
 
263
								</td>
264
								<td><?php
265
 
266
									echo $modul_info['version'];
267
 
268
									if ($this->hasModInstalled($modul_key) && $modul_info['version'] === $this->arAllModule[$modul_key]->version)
269
									{
270
 
6476 daniel 271
										echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
6475 daniel 272
 
273
									}
274
									else if (version_compare($modul_info['version'], WPSG_VERSION) > 0)
275
									{
276
 
6476 daniel 277
										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 278
 
279
									}
6476 daniel 280
									else if (version_compare($modul_info['version'], $this->arAllModule[$modul_key]->versio) > 0)
281
									{
282
 
6484 daniel 283
										echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
284
 
285
										if ($modul_info['active'] === true)
286
										{
287
 
288
											echo '<br />';
289
											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);
290
 
291
										}
6475 daniel 292
 
6476 daniel 293
									}
294
 
6475 daniel 295
								?></td>
296
							</tr>
297
							<?php } ?>
298
						</tbody>
299
					</table>
6476 daniel 300
 
6475 daniel 301
				<?php } else { ?>
302
 
303
				<p>
6503 daniel 304
					<?php echo __('Bitte erwerben Sie eine Lizenz für wpShopGermany, damit sie unsere Erweiterungsmodule nutzen können.', 'wpsg'); ?>
6475 daniel 305
				</p>
306
 
307
				<?php } ?>
308
 
309
			</div>
310
	 	</div>
311
	</div>
4950 daniel 312
 
1700 daniel 313
<?php } ?>
314
 
3244 daniel 315
<script type="text/javascript">/* <![CDATA[ */
1700 daniel 316
 
5382 daniel 317
	function wpsg_ssh_module()
318
	{
319
 
320
		jQuery('.list-modul-group').show();
321
		jQuery('.wpsg_admin_submenu .list-group-item').show();
322
 
323
		var check = jQuery('#wpsg_modul_onlyactive').prop('checked');
324
		var search = jQuery('#wpsg_modul_search').val();
325
 
326
		jQuery.cookie('wpsg-modulfilter-check', check);
327
		jQuery.cookie('wpsg-modulfilter-search', search);
328
 
329
		jQuery('.wpsg_modul_name').each(function() {
330
 
331
			if (!jQuery(this).parent().hasClass('active'))
332
			{
333
 
334
				if (check && !jQuery(this).parent().hasClass('modul_akt')) jQuery(this).parent().hide();
5749 daniel 335
				else if (jQuery.trim(search) != '')
5382 daniel 336
				{
337
 
338
					var re = new RegExp(search, 'i');
5749 daniel 339
 
5382 daniel 340
					if (!jQuery(this).html().match(re)) jQuery(this).parent().hide();
341
					else jQuery(this).parent().show();
342
 
343
				}
344
 
345
			}
346
 
347
		} );
348
 
349
		jQuery('.list-modul-group').each(function() {
350
 
351
			if (jQuery(this).find('.list-group-modul:visible').length <= 0) jQuery(this).hide();
352
			else jQuery(this).show();
353
 
354
		} );
355
 
356
	}
357
 
1700 daniel 358
	jQuery(document).ready(function() {
359
 
5382 daniel 360
		jQuery('#wpsg_modul_onlyactive').bind('change', function(event) {
361
 
362
			wpsg_ssh_module();
363
			jQuery(this).blur();
364
 
365
		} );
366
 
367
		jQuery('#wpsg_modul_search').focus().bind('blur', wpsg_ssh_module);
368
		jQuery('#wpsg_modul_search').focus().bind('keyup', wpsg_ssh_module);
369
 
370
		wpsg_ssh_module();
371
 
1700 daniel 372
	} );
373
 
3244 daniel 374
/* ]]> */</script>