Subversion Repositories wpShopGermany4

Rev

Rev 6581 | Rev 6669 | 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
 
5488 daniel 51
		<p><?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?></p><br />
1067 daniel 52
 
6508 daniel 53
		<?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 54
 
55
			<?php $modul_install = $this->get_option($_REQUEST['modul'], $this->view['global']); ?>
56
			<?php echo wpsg_drawForm_Select('aktiv', __('Modul aktiviert', 'wpsg'), array('0' => __('Nein', 'wpsg'), '1' => __('Ja', 'wpsg')), ((wpsg_isSizedInt($modul_install))?'1':'0')); ?>
57
 
58
		<?php } ?>
5382 daniel 59
 
1469 daniel 60
		<?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
6484 daniel 61
 
62
		<?php echo wpsg_drawForm_TextStart(); ?>
5451 daniel 63
 
6484 daniel 64
			<?php
6503 daniel 65
 
6484 daniel 66
				echo $this->arAllModule[$_REQUEST['modul']]->version;
67
 
68
				if (wpsg_isSizedArray($modul_info[$_REQUEST['modul']]))
69
				{
70
 
71
					$modul_info_modul = $modul_info[$_REQUEST['modul']];
6503 daniel 72
 
73
					if ($modul_info_modul['version'] === $this->arAllModule[$_REQUEST['modul']]->version)
6484 daniel 74
					{
75
 
76
						echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
77
 
78
					}
79
					else if (version_compare($modul_info_modul['version'], WPSG_VERSION) > 0)
80
					{
81
 
82
						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');
83
 
84
					}
6503 daniel 85
					else if (version_compare($modul_info_modul['version'], $this->arAllModule[$_REQUEST['modul']]->versio) > 0)
6484 daniel 86
					{
87
 
88
						echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
89
 
6503 daniel 90
						echo '<br />';
6581 thomas 91
						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 92
 
93
					}
94
 
95
				}
96
 
97
			?>
98
 
99
		<?php echo wpsg_drawForm_TextEnd(__('Version', 'wpsg')); ?>
100
 
101
		<?php echo wpsg_drawForm_TextStart(); ?>
102
 
103
			<?php if (array_key_exists($_REQUEST['modul'], $modul_info)) { ?>
104
 
105
				<?php if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['free'])) { ?>
106
					<span class="wpsg_message_ok"><?php echo __('Kostenfrei', 'wpsg'); ?></span>
107
				<?php } else if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['active'])) { ?>
108
					<span class="wpsg_message_ok"><?php echo __('Aktiv', 'wpsg'); ?></span>
109
				<?php } else { ?>
110
 
6503 daniel 111
					<?php if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['demo_active'])) { ?>
112
						<span class="wpsg_message_demo"><?php echo __('Demo Modus', 'wpsg'); ?></span>
113
					<?php } else { ?>
114
						<span class="wpsg_error"><?php echo __('Nicht aktiv', 'wpsg'); ?></span>
115
					<?php } ?>
116
 
6522 daniel 117
					<?php if ($this->bLicence === true) { ?>
6484 daniel 118
					<?php if (wpsg_isSizedString($modul_info[$_REQUEST['modul']]['shop_url'])) {  ?>
119
					[ <a href="<?php echo $modul_info[$_REQUEST['modul']]['shop_url']; ?>"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
120
					<?php } else { ?>
121
					[ <a href="https://shop.maennchen1.de/"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
122
					<?php } ?>
123
					[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulcode eingeben', 'wpsg'); ?></a> ]
124
 
6503 daniel 125
					<?php if (!wpsg_isTrue($modul_info[$_REQUEST['modul']]['demo_active'])) { ?>
126
					<br />
127
 
128
					[ <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> ]
129
					<?php } ?>
6522 daniel 130
					<?php } else { ?>
131
					<br /><span class="wpsg_error"><?php echo __('Ohne Lizenz können Sie dieses Modul nicht verwenden.', 'wpsg'); ?></span>
132
					<?php } ?>
6503 daniel 133
 
6484 daniel 134
				<?php } ?>
135
 
136
			<?php } else { ?>
137
				<span class="wpsg_error"><?php echo __('Unbekannt', 'wpsg'); ?></span>
138
			<?php } ?>
139
 
140
		<?php echo wpsg_drawForm_TextEnd(__('Lizenz')); ?>
6503 daniel 141
 
5451 daniel 142
		<?php } ?>
6618 daniel 143
 
6503 daniel 144
		<?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 145
 
6503 daniel 146
			<hr />
147
 
1559 daniel 148
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
1469 daniel 149
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
150
			<?php } ?>
151
 
152
			<input type="hidden" name="subaction" value="module" />
153
 
1559 daniel 154
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
1469 daniel 155
			</form>
1465 daniel 156
			<?php } ?>
1469 daniel 157
 
2506 daniel 158
			<?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
1469 daniel 159
			<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
1468 daniel 160
			<?php } ?>
1465 daniel 161
 
1559 daniel 162
			<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
4808 daniel 163
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
1068 daniel 164
			<?php } ?>
6503 daniel 165
 
4808 daniel 166
		<?php } else { ?>
6503 daniel 167
 
168
			<?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) { ?>
169
			<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
170
			<?php } ?>
171
 
1197 daniel 172
		<?php } ?>
173
 
1559 daniel 174
	<?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
1067 daniel 175
	</form>
1197 daniel 176
	<?php } ?>
5488 daniel 177
 
6488 daniel 178
	<?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 179
	<?php echo $this->arModule[$_REQUEST['modul']]->settings_edit_afterform(); ?>
180
	<?php } ?>
181
 
5454 daniel 182
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
1067 daniel 183
</div>
2645 daniel 184
<?php } else { ?>
185
 
6475 daniel 186
	<div class="wpsg_admin_content form-horizontal">
187
		<div class="panel panel-default">
188
			<div class="panel-heading clearfix">
189
				<h3 class="panel-title"><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
190
		 	</div>
191
		 	<div class="panel-body">
192
 
6522 daniel 193
				<?php if ($this->bLicence === true) { ?>
6476 daniel 194
				<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul">
195
 
196
					<fieldset>
197
						<legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
198
 
199
						<div class="row">
200
							<div class="col-xs-10">
201
 
202
								<input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
203
 
204
							</div>
205
							<div class="col-xs-2">
206
 
207
								<input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
208
 
209
							</div>
210
						</div>
211
					</fieldset>
212
 
213
				</form>
6522 daniel 214
				<?php } else { ?>
215
 
216
				<p><?php echo __('Modulcodes können erst verwendet werden, wenn ihre wpShopGermany Lizenz aktiviert ist.', 'wpsg'); ?>
6476 daniel 217
 
6522 daniel 218
				<?php } ?>
219
 
6476 daniel 220
				<hr />
221
 
6522 daniel 222
				<?php include dirname(__FILE__).'/modulelist.phtml'; ?>
223
 
6475 daniel 224
			</div>
225
	 	</div>
6522 daniel 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>