Subversion Repositories wpShopGermany4

Rev

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