Subversion Repositories wpShopGermany4

Rev

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