diff --git a/admin/bulkupload.html b/admin/bulkupload.html new file mode 100644 index 0000000000000000000000000000000000000000..b53b46523f4dea827e89fe71cd5d0291e6f319d6 --- /dev/null +++ b/admin/bulkupload.html @@ -0,0 +1,49 @@ + + + + + + + + +
+
+
+
+
+ + Bulk Upload of Blood Data + +
+ +
+ +
+
+ +
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ + diff --git a/admin/bulkupload.php b/admin/bulkupload.php new file mode 100644 index 0000000000000000000000000000000000000000..58a2628dddffad3dad3aa15a58fbb78345ad1fc7 --- /dev/null +++ b/admin/bulkupload.php @@ -0,0 +1,47 @@ + 0) + { + $file = fopen($filename, "r"); + while (($getData = fgetcsv($file, 10000, ",")) !== FALSE) + { + $sql = "INSERT into bloo (`id`, `uname`, `blood`, `age`, `mobile`, `city`, `dd`) + values ('$getData[0]','$getData[1]','$getData[2]','$getData[3]','$getData[4]','$getData[5]','$getData[6]')"; + $result = mysqli_query($con, $sql); + if(!isset($result)) + { + echo ""; + } + else { + echo ""; + } + } + + fclose($file); + } + } + if(isset($_POST["Export"])){ + + header('Content-Type: text/csv; charset=utf-8'); + header('Content-Disposition: attachment; filename=data.csv'); + $output = fopen("php://output", "w"); + fputcsv($output, array('ID', 'Donor Name', 'Blood Group', 'Age', 'Mobile', 'City', 'Last Donated Months')); + $query = "SELECT * from bloo ORDER BY id DESC"; + $result = mysqli_query($con, $query); + while($row = mysqli_fetch_assoc($result)) + { + fputcsv($output, $row); + } + fclose($output); } + ?> \ No newline at end of file diff --git a/admin/dashboard.php b/admin/dashboard.php index c78800dc01bd60f028a17b791ffdd3ad5f1e7076..417169bb8eff47239cdaac5e588c1c2d5726b7d1 100644 --- a/admin/dashboard.php +++ b/admin/dashboard.php @@ -15,6 +15,10 @@ include("auth.php"); //include auth.php file on all secure pages ?>

Home

Insert New Record

View Records

+

View Records of Requested person and Donated person deatils

+

Donor and Blood Requiested Person Details

+

To Bulk Upload the Data

+
diff --git a/admin/insertintodonor.php b/admin/insertintodonor.php new file mode 100644 index 0000000000000000000000000000000000000000..ba3531a862afed58486c86d8a59cec87c3d41e8b --- /dev/null +++ b/admin/insertintodonor.php @@ -0,0 +1,47 @@ +
View Inserted Record"; +} +?> + + + + +Insert New Record + + + +
+

Dashboard | View Records | Logout

+ +
+

Insert New Record

+ + +

+

+

+

+

+

+

+ +

+
+
+ + diff --git a/admin/view1.php b/admin/view1.php new file mode 100644 index 0000000000000000000000000000000000000000..9499d778356b77785eea5db8cc9a8cb8d406a23f --- /dev/null +++ b/admin/view1.php @@ -0,0 +1,38 @@ + + + + + +Update Record + + + +
+

Home | Insert New Record | Logout

+

View Records

+ + + + + + + + + +
Requested Person NameRequested Blood GroupDonor NameDonated dateHospital Name
+ +
+ +