Subversion Repositories wpShopGermany4

Rev

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