<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<?php
$ip = getenv ("REMOTE_ADDR"); // get the ip number of the user
//echo "Your IP is: $ip\n";
?>
<script type="text/javascript">
var myip = "<?echo $ip;?>"
var myoctet = myip.split('\.');
function redirect_mail() {
if(myoctet[0] == 192 & myoctet[1] == 168 & myoctet[2] == 1)
{
window.location = "
https://mail.mydomain.ru/";
}
else
{
window.location = "
https://mail.mydomain.ru:15443/";
}
}
function redirect_owncloud(){
if(myoctet[0] == 192 & myoctet[1] == 168 & myoctet[2] == 1)
{
window.location = "
http://www.mydomain.ru/html/owncloud/";
}
else
{
window.location = "
http://mydomain.ru/html/owncloud/";
}
}
</script>
</head>
<body>
<p style="text-align: center">
<br>
<br>
<br>
<br>
<br>
<br>
<input type="button" style="width:600px;height:100px;font-size:400%;background:url(/html/img/mail.png) no-repeat left" onclick="redirect_mail()" value="MAIL" >
<input type="button" style="width:700px;height:100px;font-size:400%;background:url(/html/img/owncloud.png) no-repeat left" onclick="redirect_owncloud()" value="OWNCLOUD" >
</body>
</html>