-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
451 lines (395 loc) · 18 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<?php
require 'soap_config.php';
$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri,
'trace' => 1,
'exceptions' => 1));
try {
if($session_id = $client->login($username, $password)) {
echo '';
}
?>
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Subdomain Regestration</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" type="text/javascript"></script>
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.0/css/bootstrapValidator.min.css'>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container">
<?php
if(empty($_POST)):
?>
<form class="well form-horizontal" action=" " method="post" id="contact_form">
<fieldset>
<!-- Form Name -->
<legend>Soap SubDomainService</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">Vorname</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="first_name" placeholder="Vorname" class="form-control" type="text">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" >Nachname</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="last_name" placeholder="Nachname" class="form-control" type="text">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">E-Mail</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input name="email" placeholder="E-Mail Adresse" class="form-control" type="text">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">Telefon #</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
<input name="phone" placeholder="(+49) 555-1212" class="form-control" type="text">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">Adresse</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
<input name="address" placeholder="Adresse" class="form-control" type="text">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">Stadt</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
<input name="city" placeholder="Stadt" class="form-control" type="text">
</div>
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label">Land</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-list"></i></span>
<select name="state" class="form-control selectpicker" >
<option value=" " selected disabled>Bitte Land wählen</option>
<option>Alabama</option>
<option>Alaska</option>
<option >Arizona</option>
<option >Arkansas</option>
<option >California</option>
<option >Colorado</option>
<option >Connecticut</option>
<option >Delaware</option>
<option >District of Columbia</option>
<option >Deutschland</option>
<option> Florida</option>
<option >Georgia</option>
<option >Hawaii</option>
<option >daho</option>
<option >Illinois</option>
<option >Indiana</option>
<option >Iowa</option>
<option> Kansas</option>
<option >Kentucky</option>
<option >Louisiana</option>
<option>Maine</option>
<option >Maryland</option>
<option> Mass</option>
<option >Michigan</option>
<option >Minnesota</option>
<option>Mississippi</option>
<option>Missouri</option>
<option>Montana</option>
<option>Nebraska</option>
<option>Nevada</option>
<option>New Hampshire</option>
<option>New Jersey</option>
<option>New Mexico</option>
<option>New York</option>
<option>North Carolina</option>
<option>North Dakota</option>
<option>Ohio</option>
<option>Oklahoma</option>
<option>Oregon</option>
<option>Pennsylvania</option>
<option>Rhode Island</option>
<option>South Carolina</option>
<option>South Dakota</option>
<option>Tennessee</option>
<option>Texas</option>
<option> Uttah</option>
<option>Vermont</option>
<option>Virginia</option>
<option >Washington</option>
<option >West Virginia</option>
<option>Wisconsin</option>
<option >Wyoming</option>
</select>
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">PLZ</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
<input name="zip" placeholder="PLZ" class="form-control" type="text">
</div>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label">Webname oder Benutzername</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-globe"></i></span>
<input name="website1" placeholder="Webname oder Benutzername" class="form-control" type="text">
<select name="website2" class="form-control selectpicker" >
<?php
foreach($domain_id as $key => $value):
$vaule2 = $client->sites_web_domain_get($session_id, $value);
?>
<option id="<?php echo $key; ?>"><?php echo $vaule2['domain']; ?></option>
<?php
endforeach;
?>
</select>
</div>
</div>
</div>
<!-- Text area -->
<div class="form-group">
<label class="col-md-4 control-label">Projekt Beschreibung</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
<textarea class="form-control" name="comment" placeholder="Projekt Beschreibung"></textarea>
</div>
</div>
</div>
<!-- Success message -->
<div class="alert alert-success" role="alert" id="success_message">Erfolg <i class="glyphicon glyphicon-thumbs-up"></i> Danke.</div>
<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label"></label>
<div class="col-md-4">
<button type="submit" class="btn btn-warning" >Senden <span class="glyphicon glyphicon-send"></span></button>
</div>
</div>
</fieldset>
<hr>
<!-- Editierbarer Bereich -->
<fieldset>
<legend>Lorem ipsum dolor sit amet</legend>
<div class="col-md-4" >
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
<div class="col-md-5" >
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
<div class="col-md-3" >
<b>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</b>
</div>
<div class="col-md-12">
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
</fieldset>
<!-- Editierbarer Bereich ENDE -->
</form>
<?php
else:
//######################################################//
?>
<div class="alert alert-success" role="alert" id="success_message2">Erfolg <i class="glyphicon glyphicon-thumbs-up"></i> <br>Danke das du unseren Service nutzt, hier sind deine Daten:</div>
<div class="alert alert-primary" role="alert">
<?php
//print_r($_POST);
$reseller_id = 0; // this id has to be 0 if the client shall not be assigned to admin or if the client is a reseller
$params1 = array(
'company_name' => '', //Firma / Organisation
'contact_name' => $_POST['first_name'].' '.$_POST['last_name'], // Vor und Nachname
'customer_no' => '', //Reseller ID
'street' => $_POST['address'], //Strasse
'zip' => $_POST['zip'], //PLZ
'city' => $_POST['city'], //Stadt
'state' => $_POST['state'], //Katon
'country' => 'DE', //Land
'telephone' => $_POST['phone'], //Telefonnummer
'mobile' => '', //Handynummer
'fax' => '', //Faxnummer
'email' => $_POST['email'], //E-Mailadresse
'internet' => '', //Webadresse
'icq' => '', //ICQ
'notes' => $_POST['comment'], //Kommentare
'default_mailserver' => 1, //ID des Hauptmailservers
'limit_maildomain' => 0, //Maildomains
'limit_mailbox' => 0, //Mailadresse
'limit_mailalias' => 0,
'limit_mailaliasdomain' => 0,
'limit_mailforward' => 0,
'limit_mailcatchall' => 0,
'limit_mailrouting' => 0,
'limit_mailfilter' => 0,
'limit_fetchmail' => 0,
'limit_mailquota' => 0,
'limit_spamfilter_wblist' => 0,
'limit_spamfilter_user' => 0,
'limit_spamfilter_policy' => 0,
'default_webserver' => 1, //ID Hauptwebserver
'limit_web_ip' => '',
'limit_web_domain' => 1, //Anzahl an Domains für Benutzer
'limit_web_quota' => 1024, //Speicherplatz 1024 = 1GB
'web_php_options' => 'fast-cgi,mod', //PHP Modus
'limit_web_subdomain' => 0,
'limit_web_aliasdomain' => 0,
'limit_ftp_user' => 1, //Anzahl für FTP Benutzer für Benutzer
'limit_shell_user' => 0, //shell zugriff 1 = ja 0 = nein
'ssh_chroot' => 'no,jailkit,ssh-chroot', //ssh Cronejobs
'limit_webdav_user' => 0,
'default_dnsserver' => 0, //ID Hauptdnsserver
'limit_dns_zone' => 0,
'limit_dns_slave_zone' => 0,
'limit_dns_record' => 0,
'default_dbserver' => 1, //ID HauptmysqlServer
'limit_database' => 1, //Anzahl an MySql Datenbanken
'limit_cron' => 1, //Anzahl an Cronejobs
'limit_cron_type' => 'url', // type des Ausführbaren Chrons
'limit_cron_frequency' => 5, //Wiederholungsrate in Minuten
'limit_traffic_quota' => -1, //traffic der Webdomain
'limit_client' => 0, // Ist > 0, Dann ist Benutzer ein Reseller
'parent_client_id' => 0,
'username' => $_POST['website1'].'.'.$_POST['website2'],
'password' => $session_id,
'language' => 'de', //Interfacesprache
'usertheme' => 'default', //Interfacelayout
'template_master' => 0, //ID Template
'template_additional' => 1, //ID Zusatztemplate
'created_at' => 0 //Erstellt am (Datum)
);
$affected_rows = $client->client_add($session_id, $reseller_id, $params1);
$client_id = $affected_rows;
$params = array(
'server_id' => 1,
'ip_address' => '*',
'domain' => $_POST['website1'].'.'.$_POST['website2'],
'type' => 'vhost',
'parent_domain_id' => 0,
'vhost_type' => 'name',
'hd_quota' => 1024,
'traffic_quota' => -1,
'cgi' => 'y',
'ssi' => 'y',
'suexec' => 'y',
'errordocs' => 1,
'is_subdomainwww' => 1,
'subdomain' => '',
'php' => 'y',
'ruby' => 'n',
'redirect_type' => '',
'redirect_path' => '',
'ssl' => 'n',
'ssl_state' => '',
'ssl_locality' => '',
'ssl_organisation' => '',
'ssl_organisation_unit' => '',
'ssl_country' => '',
'ssl_domain' => '',
'ssl_request' => '',
'ssl_key' => '',
'ssl_cert' => '',
'ssl_bundle' => '',
'ssl_action' => '',
'stats_password' => '',
'stats_type' => 'webalizer',
'allow_override' => 'All',
'apache_directives' => '',
'php_open_basedir' => '/',
'pm_max_requests' => 0,
'pm_process_idle_timeout' => 10,
'custom_php_ini' => '',
'backup_interval' => '',
'backup_copies' => 1,
'active' => 'y',
'traffic_quota_lock' => 'n',
'http_port' => '80',
'https_port' => '443'
);
$affected_rows2 = $client->sites_web_domain_add($session_id, $client_id, $params, $readonly = false);
echo "<br>";
echo "Ihr Passwort: ".$session_id."</br>";
echo "Ihr Benutzername: ".$_POST['website1'].'.'.$_POST['website2']."<br>";
echo "<br>";
echo "Administration: <a target='_blank' href='".$login_uri."' >Login</a><br>";
echo "Mysql Administration: <a target='_blank' href='".$mysql_uri."'>Mysql Login</a>";
//############################MAIL Versden mittels Mail PHP###############################//
$empfaenger = $_POST['email'];
$betreff = "Subdomain Regestriert"; //<-- Editierbar -->//
$from = "From: ".$mail_from;
//$from .= "Content-Type: text/html\n";
//$from .= "Content-Transfer-Encoding: 8bit\n";
$from .= "MIME-Version: 1.0\r\n";
$from .= "Content-type: text/html; charset=iso-8859-1\r\n";
$text = "Vielen Dank,<br>
wir freuen uns, Ihnen einen kleinen Webspace zu verfügung stellen zu dürfen.<br><br>
Hier nochmals alle Informationen:<br>
<p>Ihr Passwort: ".$session_id."</br>
Ihr Benutzername: ".$_POST['website1'].'.'.$_POST['website2']."<br>
</p>
<p>Bitte ändern Sie zuerst Ihr Passwort.<br>
Administration: <a target='_blank' href='".$login_uri."' >Login</a></p>
<p>Gern Helfen wir Ihnen weiter, dazu können SIe uns einfach eine E-Mail senden an: <a href='soap.help@orga-consult.eu'>soap.help@orga-consult.eu</a></p>
<p>Wenn Sie eine MySql-Datenbank erstellt haben, können Sie diese ebenfalls <a target='_blank' href='https://mysql.orga-consult.eu'>HIER VERWALTEN</a></p>
<p>Für die nutzung von FTP (File Transfer Protokoll) sind folgende daten nötig:<br>
Port: 21<br>
Adresse: ".$ftp_server."<br>
Benutzername: (diesen müssen Sie erstellen)<br>
Passwort: (diesen müssen SIe erstellen)</p>
<p>Mit freundlichen Grüßen, Ihr Orga Consult e.G. Team</p>
";
mail($empfaenger, $betreff, $text, $from);
//############################MAIL Versden mittels Mail PHP###############################//
?>
</div>
<?php endif; ?>
</div><!-- /.container -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.4.5/js/bootstrapvalidator.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
<?php
if($client->logout($session_id)) {
echo '';
}
} catch (SoapFault $e) {
echo $client->__getLastResponse();
die('SOAP Error: '.$e->getMessage());
}
?>