Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HaiSoft (public)
Plesk - Mail Autoconfig
Commits
af7ea0f3
Commit
af7ea0f3
authored
Jun 19, 2018
by
Benoît
Browse files
Delete apple_fr.xml
parent
9ad01609
Changes
1
Show whitespace changes
Inline
Side-by-side
apple_fr.xml
deleted
100644 → 0
View file @
9ad01609
<?php if ($_REQUEST['email'] != "" && $_REQUEST['nom'] != "" && filter_var($_REQUEST['email'], FILTER_VALIDATE_EMAIL)): ?>
<
?php
header('Content-Type: application/x-apple-aspen-config');
header("Content-Disposition: attachment; filename=\"".$_REQUEST['email'].".mobileconfig\"");
$conf = file_get_contents('apple.mobileconfig');
$conf = str_replace('%email%', $_REQUEST['email'], $conf);
$conf = str_replace('%full_name%', $_REQUEST['nom'], $conf);
function guidv4()
{
if (function_exists('com_create_guid') === true)
return trim(com_create_guid(), '{}');
$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6])
&
0x0f | 0x40); // set version to 0100
$data[8] = chr(ord($data[8])
&
0x3f | 0x80); // set bits 6-7 to 10
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}
$firstid = guidv4();
$secondid = guidv4();
$conf = str_replace('%first_uuid%', $firstid, $conf);
$conf = str_replace('%second_uuid%', $secondid, $conf);
$host_name = gethostname();
$conf = str_replace('%hostname%', $host_name, $conf);
print $conf;
?>
<?php else: ?>
<html>
<head>
<title>
Auto-configuration mail pour Apple
</title>
<meta
name=
"viewport"
content=
"width=device-width; initial-scale=1; user-scalable=no"
/>
</head>
<body
style=
"font: 100% Verdana;"
>
<form
method=
"post"
action=
"apple.xml"
>
<p
style=
"text-align: center"
>
<img
src=
"APPLELOGO"
alt=
"COMPANYNAME logo"
/><br/>
<br/><br/>
Entrez vos nom et pr
é
nom (qui s'afficheront en tant qu'exp
é
diteur des e-mails)
<br/>
et votre adresse email compl
è
te, afin d'obtenir un fichier de configuration pour votre appareil Apple
<br/>
(iPhone/iPad sous iOS 4 ou plus - Mac sous OS X 10.8 ou plus)
<br/>
<br/><br/>
Pr
é
nom et nom (requis) :
<input
type=
"text"
name=
"nom"
style=
"height: 30px; width: 250px;"
/><br/>
<br/><br/>
Adresse email (requis) :
<input
type=
"text"
name=
"email"
style=
"height: 30px; width: 250px;"
/><br/>
<br/><br/>
<input
type=
"submit"
value=
"Télécharger"
/><br/><br/>
Veillez
à
remplir tout les champs, et
à
entrer une adresse email valide, sinon le t
é
l
é
chargement ne se lancera pas !
</p>
</form>
</body>
</html>
<?php endif ?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment