<?php
@session_name('xTempMail');
@session_start();

$domain = str_replace("www.","",$_SERVER["HTTP_HOST"]);
$ThisEmail = $_SESSION['email'];
$Login = explode("@", $ThisEmail);

$allowed_lang = array('en','id');
if ((isset($_COOKIE['language']) && $_COOKIE['language'] != '')) {
	if (in_array($_COOKIE['language'], $allowed_lang)) {
		$xlang = $_COOKIE['language'];
	}else{ $xlang = "en"; }
}else{ $xlang = "en"; }

$lang = array(
	'en' => $lang = array(
		'Change e-mail address - Temp Mail',
		'Temp Mail',
		'provides the ability to change your temporary email address on this page.',
		'To change the email address, please enter the desired E-mail address and then click on Save.',
		'Save'
	),
	'id' => $lang = array(
		'Ubah alamat email - Temp Mail',
		'Temp Mail',
		'Memberikan kemampuan untuk mengubah alamat email sementara Anda di halaman ini.',
		'Untuk mengubah alamat email, silakan masukkan alamat email yang diinginkan dan kemudian klik Simpan.',
		'Menyimpan'
	)
);
?>
<div id="change">
	<div id="change_title"><?=$lang[$xlang][0]?></div>
	<div id="change_content"><b><?=$lang[$xlang][1]?></b> <?=$lang[$xlang][2]?><br>
	<?=$lang[$xlang][3]?>
	</div>


	<table>
		<tr>
			<td>Login</td>
			<td><input type="text" id="login_change" value="<?=$Login[0]?>"></td>
		</tr>
		<tr>
			<td>Domain</td>
			<td><select id="domain_change">
				<option value="<?=$domain?>"><?=$domain?></option>
				<option value="owlsquad.org">owlsquad.org</option>
				<option value="cumaiseng.jp">cumaiseng.jp</option>
				<option value="cuma.website">cuma.website</option>
				<!-- <option value="newdomain5.com">newdomain5.com</option> -->
			</select></td>
		</tr>
		<tr>
			<td></td>
			<td><button id="save_change"><?=$lang[$xlang][4]?></button></td>
		</tr>
	</table>
</div>