Created
June 13, 2016 16:00
-
-
Save iNPUTmice/28113eecccf50dc81d266c4215cb1264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url_parts = preg_split('/@|\//',$_SERVER["REQUEST_URI"]); | |
if (count($url_parts) < 4 || empty($url_parts[3])) { | |
header('Location: https://conversations.im'); | |
die(); | |
} else { | |
$localpart = strtolower(urldecode($url_parts[2])); | |
$domainpart = strtolower(urldecode($url_parts[3])); | |
$jid = $localpart.'@'.$domainpart; | |
$muc = $url_parts[1] === 'j'; | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="IE=edge" http-equiv="X-UA-Compatible"> | |
<meta content="width=device-width, initial-scale=1, user-scalable=0" name="viewport"> | |
<title>Join the Conversation</title> | |
<link href="/css/bootstrap.min.css" rel="stylesheet"> | |
<style> | |
.main { | |
padding-top: 40px; | |
max-width: 600px; | |
width: 90%; | |
margin: 0 auto; | |
} | |
</style> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div class="main"> | |
<?php | |
$contact = htmlentities(ucwords($localpart,"-.")); | |
$play = 'https://play.google.com/store/apps/details?id=eu.siacs.conversations&referrer=utm_source%3Dinvite'; | |
if (strpos(strtolower($_SERVER["HTTP_USER_AGENT"]),'android') !== false) { | |
$target = 'market://details?id=eu.siacs.conversations'; | |
} else { | |
$target = $play; | |
} | |
?> | |
<p class="lead text-center"> | |
<?php if ($muc) {?> | |
You have been invited to | |
<?php } else {?> | |
The user <?= $contact ?> has invited you to | |
<?php }?> | |
</p> | |
<h3 class="text-center">Join the Conversation</h3> | |
<p> | |
XMPP is a provider independent form of instant messaging. | |
That means you can pick from many different clients and have a free choice of server operators to | |
<?php if ($muc) {?> | |
participate in the conference <em><?=$contact?></em> | |
<?php } else { ?> | |
communicate with <em><?=$contact?></em> | |
<?php } ?> | |
.</p> | |
<p class="lead"> | |
If you use Android we recommand that you <strong><a href="<?=$target?>">install Conversations</a></strong>, follow the steps to create an account and then come back to this page to | |
<?php if ($muc) { ?> | |
join the conference <em><?=$contact?></em> | |
<?php } else { ?> | |
add <em><?=$contact?></em> to your contact list | |
<?php } ?> | |
by clicking the following link:</p> | |
<p class="text-center"> | |
<a class="btn btn-primary" href="xmpp:<?=htmlentities($jid)?>"> | |
<?php if ($muc) { ?> | |
Join <?=$contact?> | |
<?php } else { ?> | |
Add <?=$contact?> | |
<?php } ?> | |
</a> | |
</p> | |
<p>If you want to know more about Conversations visit the website <a href="https://conversations.im">conversations.im</a> or check it out on <a href="<?=$play?>">Google Play</a>. | |
<br>By the way: Conversations is Free and Open Source software and available on <a href="https://github.com/siacs/Conversations">Github</a>.</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:v