6479 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Lizenzverwaltung
|
|
|
5 |
*/
|
|
|
6 |
|
6484 |
daniel |
7 |
$wpsg_update_data = wpsg_get_update_data();
|
|
|
8 |
|
6488 |
daniel |
9 |
if (!is_array($wpsg_update_data) || !current_user_can('wpsg_lizence') || !wpsg_isSizedInt($wpsg_update_data['returnCode'])) die();
|
6484 |
daniel |
10 |
|
6479 |
daniel |
11 |
?>
|
|
|
12 |
|
|
|
13 |
<div class="wpsg_admin" id="wpsg-bs">
|
|
|
14 |
|
|
|
15 |
<nav class="navbar navbar-default">
|
|
|
16 |
<div class="container-fluid">
|
|
|
17 |
<div class="navbar-header">
|
|
|
18 |
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
|
|
|
19 |
</div>
|
|
|
20 |
<div class="collapse navbar-collapse">
|
|
|
21 |
<ul class="nav navbar-nav">
|
|
|
22 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "index")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin"><?php echo __("Einstellungen", "wpsg"); ?></a></li>
|
|
|
23 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "module")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module"><?php echo __("Module", "wpsg"); ?></a></li>
|
|
|
24 |
|
6484 |
daniel |
25 |
<?php if (current_user_can('wpsg_lizence') && is_array($wpsg_update_data)) { ?>
|
6479 |
daniel |
26 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "licence")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung"><?php echo __("Lizenzverwaltung", "wpsg"); ?></a></li>
|
|
|
27 |
<?php } ?>
|
|
|
28 |
|
|
|
29 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == 'news')?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
|
|
|
30 |
<?php echo __('Aktuelles', 'wpsg'); ?>
|
|
|
31 |
<?php $wpsg_news_unread = wpsg_news::countUnreadNews(); if (wpsg_isSizedInt($wpsg_news_unread)) { ?>
|
|
|
32 |
<span class="badge" style="background-color:#D9534F;"><?php echo sizeof($wpsg_news_unread); ?></span>
|
|
|
33 |
<?php } ?>
|
|
|
34 |
</a></li>
|
|
|
35 |
</ul>
|
|
|
36 |
<ul class="nav navbar-nav navbar-right">
|
|
|
37 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "hilfe")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=hilfe"><?php echo __("Hilfe", "wpsg"); ?></a></li>
|
|
|
38 |
<li role="presentation" class="<?php echo (($this->view['actionName'] == "ueber")?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=ueber"><?php echo __("Über", "wpsg"); ?></a></li>
|
|
|
39 |
</ul>
|
|
|
40 |
</div>
|
|
|
41 |
</div>
|
|
|
42 |
</nav>
|
6503 |
daniel |
43 |
|
6479 |
daniel |
44 |
<div class="wpsg_admin_wrap">
|
6503 |
daniel |
45 |
|
|
|
46 |
<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
|
6479 |
daniel |
47 |
|
|
|
48 |
<div class="wpsg_admin_submenu">
|
|
|
49 |
|
|
|
50 |
<div class="list-group">
|
|
|
51 |
<span class="list-group-head list-group-item"><?php echo __('Lizenzverwaltung'); ?></span>
|
|
|
52 |
<a class="list-group-item <?php echo (($this->view['subaction'] == 'registerdata')?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=registerdata"><?php echo __('Registrierungsdaten', 'wpsg'); ?></a>
|
|
|
53 |
<a class="list-group-item <?php echo (($this->view['subaction'] == 'domaindata')?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domaindata"><?php echo __('Domainverwaltung', 'wpsg'); ?></a>
|
|
|
54 |
<a class="list-group-item <?php echo (($this->view['subaction'] == 'modulactivation')?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulaktivierung', 'wpsg'); ?></a>
|
|
|
55 |
</div>
|
|
|
56 |
|
|
|
57 |
</div>
|
|
|
58 |
|
|
|
59 |
<div class="wpsg_admin_content form-horizontal">
|
|
|
60 |
|
|
|
61 |
<div class="panel panel-default">
|
|
|
62 |
<div class="panel-heading clearfix">
|
|
|
63 |
<h3 class="panel-title">
|
|
|
64 |
|
|
|
65 |
<?php if ($this->view['subaction'] === 'registerdata') { ?><?php echo __('Registrierungsdaten', 'wpsg'); ?>
|
|
|
66 |
<?php } else if ($this->view['subaction'] === 'domaindata') { ?><?php echo __('Domainverwaltung', 'wpsg'); ?>
|
|
|
67 |
<?php } else if ($this->view['subaction'] === 'modulactivation') { ?><?php echo __('Modulaktivierung', 'wpsg'); ?><?php } ?>
|
|
|
68 |
|
|
|
69 |
</h3>
|
|
|
70 |
</div>
|
|
|
71 |
<div class="panel-body">
|
|
|
72 |
|
|
|
73 |
<?php if ($this->view['subaction'] === 'registerdata') { ?>
|
|
|
74 |
|
6484 |
daniel |
75 |
<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=saveRegister">
|
|
|
76 |
|
|
|
77 |
<?php $strLicenceLabel = ''; ?>
|
|
|
78 |
<?php if ($wpsg_update_data['licence_model'] === 'enterprise') { $strLicenceLabel = __('Enterprise', 'wpsg'); ?>
|
|
|
79 |
<?php } else if ($wpsg_update_data['licence_model'] === 'pro') { $strLicenceLabel = __('Pro', 'wpsg'); } ?>
|
|
|
80 |
|
|
|
81 |
<?php echo wpsg_drawForm_Text(_('Lizenzmodel'), $strLicenceLabel); ?>
|
|
|
82 |
|
|
|
83 |
<br />
|
|
|
84 |
|
|
|
85 |
<?php echo wpsg_drawForm_Input('register[company]', __('Firma', 'wpsg'), $wpsg_update_data['registerData']['company']); ?>
|
|
|
86 |
<?php echo wpsg_drawForm_Input('register[firstname]', __('Vorname', 'wpsg'), $wpsg_update_data['registerData']['firstname']); ?>
|
|
|
87 |
<?php echo wpsg_drawForm_Input('register[lastname]', __('Name', 'wpsg'), $wpsg_update_data['registerData']['lastname']); ?>
|
|
|
88 |
<?php echo wpsg_drawForm_Input('register[zip]', __('PLZ', 'wpsg'), $wpsg_update_data['registerData']['zip']); ?>
|
|
|
89 |
<?php echo wpsg_drawForm_Input('register[city]', __('Ort', 'wpsg'), $wpsg_update_data['registerData']['city']); ?>
|
|
|
90 |
<?php echo wpsg_drawForm_Input('register[street]', __('Straße', 'wpsg'), $wpsg_update_data['registerData']['street']); ?>
|
|
|
91 |
<?php echo wpsg_drawForm_Select('register[country]', __('Land', 'wpsg'), array(
|
|
|
92 |
'1' => __('Deutschland', 'wpsg'),
|
|
|
93 |
'2' => __('Österreich', 'wpsg'),
|
|
|
94 |
'3' => __('Schweiz', 'wpsg'),
|
|
|
95 |
'4' => __('Niederlande', 'wpsg'),
|
|
|
96 |
'5' => __('Belgien', 'wpsg')
|
|
|
97 |
), $wpsg_update_data['registerData']['country']); ?>
|
|
|
98 |
<?php echo wpsg_drawForm_Input('register[email]', __('E-Mail', 'wpsg'), $wpsg_update_data['registerData']['email']); ?>
|
|
|
99 |
|
|
|
100 |
<br />
|
|
|
101 |
|
|
|
102 |
<?php echo wpsg_drawForm_SubmitButton(__('Speichern', 'wpsg')); ?>
|
|
|
103 |
|
|
|
104 |
</form>
|
6479 |
daniel |
105 |
|
6484 |
daniel |
106 |
<?php } else if ($this->view['subaction'] === 'domaindata') { ?>
|
|
|
107 |
|
|
|
108 |
<?php if (wpsg_isSizedArray($wpsg_update_data['domainData'])) { ?>
|
|
|
109 |
|
|
|
110 |
<table class="table domaintable">
|
|
|
111 |
<thead>
|
|
|
112 |
<tr>
|
|
|
113 |
<th class="col_domain"><?php echo __('Domain', 'wspg'); ?></th>
|
|
|
114 |
<th class="col_action"></th>
|
|
|
115 |
</tr>
|
|
|
116 |
</thead>
|
|
|
117 |
<tbody>
|
|
|
118 |
<?php foreach ($wpsg_update_data['domainData'] as $domain) { ?>
|
|
|
119 |
<tr class="success">
|
|
|
120 |
<td class="col_domain"><?php echo $domain; ?></td>
|
|
|
121 |
<td class="col_action">
|
|
|
122 |
|
|
|
123 |
<a href="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=domainDeRegister" class="btn btn-warning btn-sm"><?php echo __('Registrierung aufheben'); ?></a>
|
|
|
124 |
|
|
|
125 |
</td>
|
|
|
126 |
</tr>
|
|
|
127 |
<?php } ?>
|
|
|
128 |
</tbody>
|
|
|
129 |
</table>
|
|
|
130 |
|
|
|
131 |
<?php } else { ?>
|
6479 |
daniel |
132 |
|
6484 |
daniel |
133 |
<p><?php echo __('Es sind noch keine Domains für diese Lizenz registriert.', 'wpsg'); ?></p>
|
|
|
134 |
|
|
|
135 |
<?php } ?>
|
|
|
136 |
|
|
|
137 |
<hr />
|
|
|
138 |
|
|
|
139 |
<?php if (($wpsg_update_data['licence_model'] === 'enterprise' || sizeof($wpsg_update_data['domainData']) < 1) && !in_array($_SERVER['HTTP_HOST'], $wpsg_update_data['domainData'])) { ?>
|
|
|
140 |
|
|
|
141 |
<p class="wpsg_message_ok"><?php echo __('Diese Domain kann noch auf Ihre Lizenz aktiviert werden.', 'wpsg'); ?></p>
|
|
|
142 |
|
|
|
143 |
<br />
|
|
|
144 |
|
|
|
145 |
<a href="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=domainRegister" class="btn btn-primary"><?php echo __('Diese Domain registrieren', 'wpsg'); ?></a>
|
|
|
146 |
|
|
|
147 |
<?php } else if (in_array($_SERVER['HTTP_HOST'], $wpsg_update_data['domainData'])) { ?>
|
|
|
148 |
|
|
|
149 |
<p class="wpsg_message_ok"><?php echo __('Diese Domain ist bereits auf diesen Schlüssel registriert.', 'wpsg'); ?></p>
|
|
|
150 |
|
|
|
151 |
<?php } else { ?>
|
|
|
152 |
|
|
|
153 |
<p class="error"><?php echo __('Diese Domain kann nicht mehr registriert werden.', 'wpsg'); ?></p>
|
|
|
154 |
|
|
|
155 |
<?php } ?>
|
|
|
156 |
|
6479 |
daniel |
157 |
<?php } else if ($this->view['subaction'] === 'modulactivation') { ?>
|
|
|
158 |
|
|
|
159 |
<?php $this->shop->loadModule(true); ?>
|
|
|
160 |
<?php $wpsg_update_data = wpsg_get_update_data(); ?>
|
6484 |
daniel |
161 |
|
|
|
162 |
<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul&source=licence">
|
|
|
163 |
|
|
|
164 |
<fieldset>
|
|
|
165 |
<legend style="padding-top:0px;"><?php echo __('Modulcode aktivieren', 'wpsg'); ?></legend>
|
6479 |
daniel |
166 |
|
6484 |
daniel |
167 |
<div class="row">
|
|
|
168 |
<div class="col-xs-10">
|
|
|
169 |
|
|
|
170 |
<input required="required" type="text" class="form-control" name="modulcode" id="modulcode" />
|
|
|
171 |
|
|
|
172 |
</div>
|
|
|
173 |
<div class="col-xs-2">
|
|
|
174 |
|
|
|
175 |
<input class="btn btn-primary btn-block" type="submit" class="form-control" value="<?php echo __('Prüfen', 'wpsg'); ?>" />
|
|
|
176 |
|
|
|
177 |
</div>
|
|
|
178 |
</div>
|
|
|
179 |
</fieldset>
|
|
|
180 |
|
|
|
181 |
</form>
|
|
|
182 |
|
|
|
183 |
<br />
|
|
|
184 |
|
6522 |
daniel |
185 |
<?php include dirname(__FILE__).'/modulelist.phtml'; ?>
|
6484 |
daniel |
186 |
|
6479 |
daniel |
187 |
<?php } ?>
|
|
|
188 |
|
|
|
189 |
</div>
|
|
|
190 |
</div>
|
|
|
191 |
|
|
|
192 |
</div>
|
|
|
193 |
|
|
|
194 |
</div>
|
|
|
195 |
|
|
|
196 |
</div>
|