<?php
/**
 * Project:        M.VuiZ.Net
 * Author:         nampt.me <admin@vuiz.net>
 * Copyright:      © 2025 vuiz.net All rights reserved.
 */
	$key = 'Tool Get Link Download MediaFire.Com';
	$mkey = 'Tool Get Direct Link Generator MediaFire.Com, get link tải nhanh cho mediafire link import';
	include '../../template/header.php';
?>

	<div class="col-right-xs">
		<div class="mainblok">
			<div class="phdr">
					<div vocab="https://schema.org/" typeof="BreadcrumbList">
						<span property="itemListElement" typeof="ListItem">
							<a href="/"  property="item" typeof="WebPage">
								<i class="fa fa-home"></i> <span property="name">Home</span>
							</a>
							<meta property="position" content="1">
						</span>
						<i class="fa fa-angle-right"></i>
						<span property="itemListElement" typeof="ListItem">
							<a href="/getlink/"  property="item" typeof="WebPage">
								<i class="fa fa-chain-broken"></i> <span property="name">GetLink</span>
							</a>
							<meta property="position" content="2">
						</span>
						<i class="fa fa-angle-right"></i>
						<span property="itemListElement" typeof="ListItem">
							<span property="name">Tool Get Link MediaFire.Com</span>
							<meta property="position" content="3">
						</span>
					</div>
			</div>
			<div class="newsx">Tool cho phép bạn lấy Direct Link MediaFire.Com. Direct link là dạng link download trực tiếp, có nghĩa là khi bạn bấm vào đường link đó nó sẽ tự động tải xuống ngay, có thể dùng để import file.</div>
			<div class="menu">
				<strong>Link hỗ trợ:</strong><br />
				https://www.mediafire.com/file/jtg2pegbalyjybv/JohnCms-7.1.0-Mod-by-MrT98-Lite.zip<br />
				<form role="form" class="form-horizontal" id="form" method="post" onSubmit="return false;">
					<input type="text" name="mediafire" id="mediafire" placeholder="https://www.mediafire.com/file/jtg2pegbalyjybv/JohnCms-7.1.0-Mod-by-MrT98-Lite.zip">
					<input type="submit" id="submit" value="Lấy Direct Link" name="submit" />
				</form>
			</div>
			<div id="DirectLink"></div>
		</div>

<?php require '../list.php'; ?>
	</div>
	<div class="col-left-xs">
<?php require '../../tools/toolslist.php'; ?>
	</div>
	<div class="clear"></div>

<script>
$(document).ready(function(){
	$("#submit").click(function(){
		$("#submit").addClass('disabled');
		$("#DirectLink").hide().html('<div class="gmenu" style="text-align: center;"><img src="/template/images/loading.svg" /></div>').slideDown('slow');
		var form = $('#form')[0];
		var formData = new FormData(form);
		$.ajax({
			url: "api.php",
			type: "POST",
			data:  formData,
			contentType: false,
			cache: false,
			processData:false,
			success: function(rs)
			{
				res = JSON.parse(rs);
				if(res.success){
					$("#submit").removeClass('disabled');
					$("#DirectLink").hide().html('<div class="menu">Download: <a class="download" rel="noreferrer noopener" target="_blank" href="'+res.success.url+'">'+res.success.name+'</a><br/><input type="text" value="'+res.success.url+'"></div>').slideDown('slow');
				}
				if(res.error){
					$("#submit").removeClass('disabled');
					$("#DirectLink").hide().html('<div class="gmenu" style="text-align: center;"><i style="color:red">'+res.error+'</i></div>').slideDown('slow');
				}
			},
			error: function() 
			{
				$("#DirectLink").hide().html('<div class="gmenu" style="text-align: center;"><i style="color:red">Có lỗi hệ thống, vui lòng kiểm tra lại!</i></div>').slideDown('slow');
			}
		});
		$("#mediafire").attr("placeholder", $("#mediafire").val()).val("");
	});
});

</script>

<?php
	require '../../template/footer.php';
?>
