Subversion Repositories wpShopGermany4

Rev

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