04-04-26, 03:01 AM
يعطيك العافيه
هذا الكود
هذا الكود
PHP كود :
<title>الاتصال</title>
<?php require('login.php');?>
<?php if($_SESSION['username']): ?>
<html>
<head>
<style>
input[type=text], select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
text-align: center;
}
input[type=submit] {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
padding: 20px;
}
body {
background-image: url("http://akveo.com/blur-admin/assets/img/blur-bg-blurred.jpg");
}
</style>
</head>
<body>
<div>
<center>
<a href="logout.php"><img src="http://findicons.com/files/icons/2146/realistik_reloaded/128/exit.png" height="42" width="42"></a>
<center>
<hr><br>
<h2 style="padding: 1px;background: rgba(255, 152, 0, 0.84);width: 15%;">تحميل ملف جديد</h2>
<form action="index.php?do=download" method="post">
<input dir="rtl" required type="text" name="link" placeholder="الرابط المباشر للتحميل"><br>
<input dir="rtl" required type="text" name="dir" placeholder="المسار االذي تريد وضع الملف فيه"><br>
<input style="background-color: #00BCD4;" type="submit" value="! ابدا الان">
</form>
<?php
$link = $_POST['link'];
$dir = $_POST['dir'];
$do = $_GET['do'];
if ($do =="download")
{
chdir($dir);
$download = shell_exec("wget $link");
echo $download;
echo "<input type='submit' style='width: 50%;' value='تم التحميل بنجاح الى المجلد المختار'>";
echo "<meta http-equiv='refresh' content='2; url=index.php' />";
}
else{}
?>
<?php endif;?>