منتديات النخبة
إضافة إهداء drkmoon [ الجنسية : سعودية ] كيف الومك والخطا ماهو خطاك الخطا من قلبي الي دلعك قلبي الي كل ماتطلب عطاك وطلعك فوق السحاب ودلعك | شَـــنَــكَــوٍتَ [ الجنسية : كويتي ] شـلـونـكـم شـخـبـركـم انشاله كلكم تمام | احزان شهرزاد الجنسية : إماراتية ] اللهم ارحمها واغفر لها | الــبــيــرق الجنسية : سعودي ] اللهم نسألك العفو والعافيه | drkmoon [ الجنسية : سعودي ] اخواني الاعزاء .. سيتوقف المنتدى غدا السبت لمدة 12 ساعه بسبب تحديثات في السيرفر ويعاد ان شااء الله فور التحديثات ..هذا للتنويه

مركز تحميل النخبة

أدوات النخبة :  |  قص الصور  |  تحويل WebP  |  ضغط الصور  |  تغيير الحجم  |  علامة مائية  |  مولد Favicon
✦ اضغط هنا للانتقال إلى استايل النخبة 2010 ✦

العودة   منتدى النخبة > °o.O ( مـنـتـديــات الـنخـبـة الـعـامـــة ) O.o° > مكتبة النخبة التقنية

مكتبة النخبة التقنية للستايلات والأكواد والهاكات للمنتديات والسكربتات

إضافة رد
 
أدوات الموضوع إبحث في الموضوع تقييم الموضوع انواع عرض الموضوع
قديم 06-23-2026, 12:02 PM   #1
admin
★ ZMZM ★
 
admin
 
تاريخ التسجيل: Jun 2005
المشاركات: 24
افتراضي مركز تحميل بدون قاعده بيانات وسهل التركيب خفيف ويوجد مثال

السلام عليكم ورحمة الله وبركاتة





أنشئ ملف index.php داخل: up

ونحط الكود كامل داخل ملف index.php

اقتباس:
<?php
$uploadDir = "uploads/";

if (!file_exists($uploadDir)) {
mkdir($uploadDir, 0755, true);
}

$message = "";

if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['image'])) {
$allowed = array('jpg','jpeg','png','gif');
$fileName = $_FILES['image']['name'];
$tmpName = $_FILES['image']['tmp_name'];
$ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));

if (in_array($ext, $allowed)) {
$newName = time() . rand(1000,9999) . "." . $ext;
$target = $uploadDir . $newName;

if (move_uploaded_file($tmpName, $target)) {
$url = "https://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/uploads/" . $newName;

$message = '
<div class="success">
تم رفع الصورة بنجاح
<br><br>
الرابط المباشر:
<input type="text" value="'.$url.'" onclick="this.select();">
<br>
كود المنتدى:
<input type="text" value="[IMG]'.$url.'[/IMG]" onclick="this.select();">
</div>';
}
} else {
$message = '<div class="error">الصيغة غير مسموحة، المسموح JPG / PNG / GIF فقط</div>';
}
}
?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="utf-8">
<title>مركز تحميل النخبة</title>

<style>
body{
margin:0;
background:#e7dcc6;
font-family:Tahoma, Arial;
font-size:12px;
color:#4b3621;
}

.wrapper{
width:760px;
margin:25px auto;
background:#f8f1df;
border:1px solid #b49b72;
}

.header{
background:#d8c49b;
border-bottom:1px solid #b49b72;
padding:10px;
text-align:center;
}

.header h1{
margin:0;
font-size:24px;
color:#5b3b17;
}

.header span{
display:block;
margin-top:4px;
color:#7a5a2a;
font-weight:bold;
}

.banner{
text-align:center;
padding:12px;
background:#fff8e8;
border-bottom:1px solid #c7ad7d;
}

.banner img{
max-width:468px;
height:auto;
border:0;
}

.nav{
background:#b89458;
color:#fff;
padding:7px;
text-align:center;
font-weight:bold;
}

.nav a{
color:#fff;
text-decoration:none;
margin:0 10px;
}

.box{
margin:18px;
border:1px solid #b49b72;
background:#fffaf0;
}

.box-title{
background:#d8c49b;
padding:8px;
font-weight:bold;
color:#5b3b17;
border-bottom:1px solid #b49b72;
}

.box-content{
padding:20px;
text-align:center;
}

input[type=file]{
background:#fff;
border:1px solid #b49b72;
padding:6px;
width:330px;
}

input[type=submit]{
background:#8b5e23;
color:#fff;
border:1px solid #5b3b17;
padding:7px 28px;
cursorointer;
font-weight:bold;
}

input[type=text]{
width:90%;
margin-top:6px;
direction:ltr;
text-align:left;
padding:6px;
border:1px solid #b49b72;
}

.success{
margin:18px;
padding:12px;
background:#eef8df;
border:1px solid #7ca35c;
color:#2d5b12;
text-align:center;
}

.error{
margin:18px;
padding:12px;
background:#f8dddd;
border:1px solid #a94442;
color:#8a1f1f;
text-align:center;
}

.footer{
text-align:center;
padding:10px;
background:#d8c49b;
border-top:1px solid #b49b72;
color:#5b3b17;
}
</style>
</head>

<body>

<div class="wrapper">

<div class="header">
<h1>مركز تحميل النخبة</h1>
<span>ZMZM.NET Upload Center</span>
</div>

<div class="banner">
<a href="https://zmzm.net/vb">
<img src="banner.gif" alt="منتديات النخبة">
</a>
</div>

<div class="nav">
<a href="https://zmzm.net">الرئيسية</a>
|
<a href="https://zmzm.net/vb">منتديات النخبة</a>
</div>

<?php echo $message; ?>

<div class="box">
<div class="box-title">رفع صورة جديدة</div>
<div class="box-content">
<form method="post" enctype="multipart/form-data">
<p>اختر الصورة من جهازك</p>
<input type="file" name="image" required>
<br><br>
<input type="submit" value="رفع الصورة">
</form>
</div>
</div>

<div class="footer">
مركز تحميل النخبة - لحفظ صور أرشيف منتديات النخبة
</div>

</div>

</body>
</html>
بعدها:

أنشئ مجلد اسمه uploads داخل مجلد up.
أعطه صلاحية 755 أو 775.


افتح:
https://xxxxx.com/up

مثال لمركز التحميل
https://zmzm.net/up


رفع صور للمنتديات, تحميل الصور للمنتديات, صور vBulletin, مركز تحميل عربي مجاني, رفع الصور المتحركة GIF
admin غير متواجد حالياً   رد مع اقتباس
إضافة رد

أدوات الموضوع إبحث في الموضوع
إبحث في الموضوع:

البحث المتقدم
انواع عرض الموضوع تقييم هذا الموضوع
تقييم هذا الموضوع:

تعليمات المشاركة
تستطيع إضافة مواضيع جديدة
تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع


تأسيس شبكة النخبة
منذ 8 / 6 / 2004
─────────────────────
مضى على تأسيس شبكة النخبة
سنة  |  شهر  |  يوم


منتديات النخبة - ZMZM.NET
أرشيف يحفظ ذكريات ومواضيع منتديات النخبة القديمة
جميع المشاركات والمواد المنشورة محفوظة لأصحابها، ويُعاد نشرها لأغراض الأرشفة والتوثيق فقط.
© 2004 - 2026 شبكة ومنتديات النخبة - جميع الحقوق محفوظة
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. TranZ By Almuhajir
© 2026 ZMZM.NET - أرشيف منتديات النخبة