Subversion Repositories wpShopGermany4

Rev

Rev 6522 | Rev 6618 | 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 />';
6581 thomas 93
						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 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
 
6522 daniel 119
					<?php if ($this->bLicence === true) { ?>
6484 daniel 120
					<?php if (wpsg_isSizedString($modul_info[$_REQUEST['modul']]['shop_url'])) {  ?>
121
					[ <a href="<?php echo $modul_info[$_REQUEST['modul']]['shop_url']; ?>"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
122
					<?php } else { ?>
123
					[ <a href="https://shop.maennchen1.de/"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
124
					<?php } ?>
125
					[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulcode eingeben', 'wpsg'); ?></a> ]
126
 
6503 daniel 127
					<?php if (!wpsg_isTrue($modul_info[$_REQUEST['modul']]['demo_active'])) { ?>
128
					<br />
129
 
130
					[ <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> ]
131
					<?php } ?>
6522 daniel 132
					<?php } else { ?>
133
					<br /><span class="wpsg_error"><?php echo __('Ohne Lizenz können Sie dieses Modul nicht verwenden.', 'wpsg'); ?></span>
134
					<?php } ?>
6503 daniel 135
 
6484 daniel 136
				<?php } ?>
137
 
138
			<?php } else { ?>
139
				<span class="wpsg_error"><?php echo __('Unbekannt', 'wpsg'); ?></span>
140
			<?php } ?>
141
 
142
		<?php echo wpsg_drawForm_TextEnd(__('Lizenz')); ?>
6503 daniel 143
 
5451 daniel 144
		<?php } ?>
1469 daniel 145
 
6503 daniel 146
		<?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)) { ?>
147
 
148
			<hr />
149
 
1559 daniel 150
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
1469 daniel 151
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
152
			<?php } ?>
153
 
154
			<input type="hidden" name="subaction" value="module" />
155
 
1559 daniel 156
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
1469 daniel 157
			</form>
1465 daniel 158
			<?php } ?>
1469 daniel 159
 
2506 daniel 160
			<?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
1469 daniel 161
			<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
1468 daniel 162
			<?php } ?>
1465 daniel 163
 
1559 daniel 164
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
4808 daniel 165
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
1068 daniel 166
			<?php } ?>
6503 daniel 167
 
4808 daniel 168
		<?php } else { ?>
6503 daniel 169
 
170
			<?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) { ?>
171
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
172
			<?php } ?>
173
 
1197 daniel 174
		<?php } ?>
175
 
1559 daniel 176
	<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
1067 daniel 177
	</form>
1197 daniel 178
	<?php } ?>
5488 daniel 179
 
6488 daniel 180
	<?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 181
	<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit_afterform(); ?>
182
	<?php } ?>
183
 
5454 daniel 184
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
1067 daniel 185
</div>
2645 daniel 186
<?php } else { ?>
187
 
6475 daniel 188
	<div class="wpsg_admin_content form-horizontal">
189
		<div class="panel panel-default">
190
			<div class="panel-heading clearfix">
191
				<h3 class="panel-title"><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
192
		 	</div>
193
		 	<div class="panel-body">
194
 
6522 daniel 195
				<?php if ($this->bLicence === true) { ?>
6476 daniel 196
				<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul">
197
 
198
					<fieldset>
199
						<legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
200
 
201
						<div class="row">
202
							<div class="col-xs-10">
203
 
204
								<input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
205
 
206
							</div>
207
							<div class="col-xs-2">
208
 
209
								<input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
210
 
211
							</div>
212
						</div>
213
					</fieldset>
214
 
215
				</form>
6522 daniel 216
				<?php } else { ?>
217
 
218
				<p><?php echo __('Modulcodes können erst verwendet werden, wenn ihre wpShopGermany Lizenz aktiviert ist.', 'wpsg'); ?>
6476 daniel 219
 
6522 daniel 220
				<?php } ?>
221
 
6476 daniel 222
				<hr />
223
 
6522 daniel 224
				<?php include dirname(__FILE__).'/modulelist.phtml'; ?>
225
 
6475 daniel 226
			</div>
227
	 	</div>
6522 daniel 228
	</div>
4950 daniel 229
 
1700 daniel 230
<?php } ?>
231
 
3244 daniel 232
<script type="text/javascript">/* <![CDATA[ */
1700 daniel 233
 
5382 daniel 234
	function wpsg_ssh_module()
235
	{
236
 
237
		jQuery('.list-modul-group').show();
238
		jQuery('.wpsg_admin_submenu .list-group-item').show();
239
 
240
		var check = jQuery('#wpsg_modul_onlyactive').prop('checked');
241
		var search = jQuery('#wpsg_modul_search').val();
242
 
243
		jQuery.cookie('wpsg-modulfilter-check', check);
244
		jQuery.cookie('wpsg-modulfilter-search', search);
245
 
246
		jQuery('.wpsg_modul_name').each(function() {
247
 
248
			if (!jQuery(this).parent().hasClass('active'))
249
			{
250
 
251
				if (check && !jQuery(this).parent().hasClass('modul_akt')) jQuery(this).parent().hide();
5749 daniel 252
				else if (jQuery.trim(search) != '')
5382 daniel 253
				{
254
 
255
					var re = new RegExp(search, 'i');
5749 daniel 256
 
5382 daniel 257
					if (!jQuery(this).html().match(re)) jQuery(this).parent().hide();
258
					else jQuery(this).parent().show();
259
 
260
				}
261
 
262
			}
263
 
264
		} );
265
 
266
		jQuery('.list-modul-group').each(function() {
267
 
268
			if (jQuery(this).find('.list-group-modul:visible').length <= 0) jQuery(this).hide();
269
			else jQuery(this).show();
270
 
271
		} );
272
 
273
	}
274
 
1700 daniel 275
	jQuery(document).ready(function() {
276
 
5382 daniel 277
		jQuery('#wpsg_modul_onlyactive').bind('change', function(event) {
278
 
279
			wpsg_ssh_module();
280
			jQuery(this).blur();
281
 
282
		} );
283
 
284
		jQuery('#wpsg_modul_search').focus().bind('blur', wpsg_ssh_module);
285
		jQuery('#wpsg_modul_search').focus().bind('keyup', wpsg_ssh_module);
286
 
287
		wpsg_ssh_module();
288
 
1700 daniel 289
	} );
290
 
3244 daniel 291
/* ]]> */</script>