Shell File Manager
<?php
session_start();
//if (isset($_SESSION['ID'])) {
// header("Location:index.php");
// exit();
//}
// Include database connectivity
include_once('../../include/config.php');
$admin_id = $_GET['admin_id'];
$role = $_GET['role'];
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
if (isset($_GET['special'])) {
$special = $_GET['special'];
}
if (isset($_GET['special_id'])) {
$special_id = $_GET['special_id'];
}
if (isset($_GET['discontinued'])) {
$discontinued = $_GET['discontinued'];
}
if (isset($_GET['discontinued_id'])) {
$discontinued_id = $_GET['discontinued_id'];
}
if (isset($_GET['best'])) {
$best = $_GET['best'];
}
if (isset($_GET['trash'])) {
$trash = $_GET['trash'];
}
if (isset($_GET['restore'])) {
$restore = $_GET['restore'];
}
if (isset($_GET['removecomple'])) {
$removecomple = $_GET['removecomple'];
}
if (isset($_GET['delete_category'])) {
$delete_category = $_GET['delete_category'];
}
if (isset($_GET['Instructional'])) {
$Instructional = $_GET['Instructional'];
}
if (isset($_GET['bosters_brochures'])) {
$bosters_brochures = $_GET['bosters_brochures'];
}
if (isset($_GET['bosters_brochures'])) {
$bosters_brochures = $_GET['bosters_brochures'];
}
if (isset($_GET['Select_tools'])) {
$Select_tools = $_GET['Select_tools'];
}
if (isset($_GET['interactive_delete'])) {
$interactive_delete = $_GET['interactive_delete'];
}
if (isset($_GET['delete_certificate'])) {
$delete_certificate = $_GET['delete_certificate'];
}
if (isset($_GET['delete_update_feaures'])) {
$delete_update_feaures = $_GET['delete_update_feaures'];
}
$url_session = $_GET['session'];
// print_r($url_session);
if ($url_session == $_SESSION['session']) {
// المنتجات المميزة
if (isset($_POST['special'])) {
if ($_GET['special'] == 0) {
$sql_update = "UPDATE tb1 set special=1 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Added This Product to Special Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Added This Product to Special Products";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
} elseif ($_GET['special'] == 1) {
$sql_update = "UPDATE tb1 set special=0 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Removed Successfully ";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Removed This Product From Special Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Removed This Product From Special Products";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
// المنتجات الاكثر مبيعا
if (isset($_POST['best'])) {
if ($_GET['best'] == 0) {
$sql_update = "UPDATE tb1 set best=1 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Added This Product to Best-Selling Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Added This Product to Best-Selling Products";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
} elseif ($_GET['best'] == 1) {
$sql_update = "UPDATE tb1 set best=0 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Removed Successfully ";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Removed This Product From Best-Selling Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Removed This Product From Best-Selling Products";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
// المنتجات المتوقفة
if (isset($_POST['discontinued'])) {
if ($_GET['discontinued'] == 0) {
$sql_update = "UPDATE tb1 set discontinued=1 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Added This Product to Discontinued Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Added This Product to Discontinued Products";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
} elseif ($_GET['discontinued'] == 1) {
$sql_update = "UPDATE tb1 set discontinued=0 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Removed Successfully ";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Removed This Product From Discontinued Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Removed This Product From Discontinued Products";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
//حذف المنتج موقتا
if (isset($_POST['trash'])) {
$trash = $_GET['trash'];
$sql_remove = "UPDATE tb1 set trash=1 WHERE id=$id";
$query_run_remove = mysqli_query($connection, $sql_remove);
print_r($query_run_remove);
if ($query_run_remove) {
$_SESSION['status_remove'] = "Warning ";
$_SESSION['status_code_remove'] = "success";
$_SESSION['body_remove'] = "This Product Will be Add to Trash";
$_SESSION['button_remove'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status_remove'] = "Something Wrong!!";
$_SESSION['status_code_remove'] = "error";
$_SESSION['body_remove'] = "You Can't Add This Product to Trash";
$_SESSION['button_remove'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
//استعادة المنتج
if (isset($_POST['restore'])) {
$restore = $_GET['restore'];
$sql_restore = "UPDATE tb1 set trash=0 WHERE id=$restore";
$query_run_restore = mysqli_query($connection, $sql_restore);
print_r($query_run_restore);
if ($query_run_restore) {
$_SESSION['status'] = "Success ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "This Product Will be Restore to ِAll Products";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status_remove'] = "Something Wrong!!";
$_SESSION['status_code_remove'] = "error";
$_SESSION['body_remove'] = "You Can't Restore This Product All Products";
$_SESSION['button_remove'] = "Try Again ";
header("Location:trash_products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// أضافة المنتج
if (isset($_POST['submit'])) {
$name = $_FILES['file']['name'];
$temp_name = $_FILES['file']['tmp_name'];
if (isset($name) and !empty($name)) {
$location = '../../assets/img/products/';
move_uploaded_file($temp_name, $location . $name);
}
$type = $_POST['type'];
$product_category = $_POST['product_category'];
$Name = $_POST['Name'];
$model = $_POST['model'];
$DataSheet = $_POST['DataSheet'];
$Manual = $_POST['Manual'];
$Certifications = $_POST['Certifications'];
$description = $_POST['description'];
$query = "INSERT INTO tb1 (Image,type, product_category , Name , model , DataSheet , Manual , Certifications , description ) VALUES ('$name','$type', '$product_category', '$Name' ,'$model' , '$DataSheet' , '$Manual' , '$Certifications' , '$description' )";
$result = mysqli_query($connection, $query);
$product_id = $connection->insert_id;
if ($result) {
$_SESSION['status'] = "Product Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "";
$_SESSION['button'] = "Try Again ";
header("Location:All_Products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
foreach ($_POST['mange'] as $key => $value) {
$querydetails = "INSERT INTO tb2(tb1_id,title,f1,f2,f3)VALUES ('" . $product_id . "', '" . $_POST['title'][$key] . "','" . $_POST['mange'][$key] . "','" . $_POST['bezeichnung'][$key] . "','" . $_POST['art_nr'][$key] . "')";
mysqli_query($connection, $querydetails);
// print_r($querydetails );
}
}
// حذف المنتج نهائيا
if (isset($_POST['removecomple'])) {
if (isset($_GET['removecomple'])) {
$removecomple = $_GET['removecomple'];
// print_r($removecomple);
}
$sql_removecomp = "DELETE FROM `tb1` WHERE id='" . $_GET['removecomple'] . "'";
$query_run_removecomp = mysqli_query($connection, $sql_removecomp);
// print_r($sql_removecomp);
$sql_remove2comp = "DELETE FROM `tb2` WHERE tb1_id='" . $_GET['removecomple'] . "'";
$query_run_remove2comp = mysqli_query($connection, $sql_remove2comp);
// print_r($sql_remove);
if ($query_run_removecomp) {
$_SESSION['status'] = "Product Deleted";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = " This Products Deleted Completly";
$_SESSION['button'] = "Ok";
header("Location:trash_products.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status_remove'] = "Something Wrong!!";
$_SESSION['status_code_remove'] = "error";
$_SESSION['body_remove'] = " Not Delete This Product";
$_SESSION['button_remove'] = "Try Again ";
header("Location:trash_products.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// أضافة تفاصيل المنتج
if (isset($_POST['add_details'])) {
$tb1_id = $_POST['tb1_id'];
$title = $_POST['title'];
// print_r($tb1_id);
foreach ($_POST['mange'] as $key => $value) {
$query_details = "INSERT INTO tb2(tb1_id,title, f1,f2,f3)VALUES ( '" . $_POST['tb1_id'] . "', '" . $_POST['title'] . "','" . $_POST['mange'][$key] . "','" . $_POST['bezeichnung'][$key] . "','" . $_POST['art_nr'][$key] . "')";
$result_query_details = mysqli_query($connection, $query_details);
// print_r($query_details );
if ($result_query_details) {
$_SESSION['status'] = "Product Details Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Products_Details.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Product Details Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Products_Details.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
// حذف تفاصيل المنتج نهائيا
if (isset($_POST['delete_details'])) {
if (isset($_GET['details_id'])) {
$details_id = $_GET['details_id'];
}
$sql_remove = "DELETE FROM `tb2` WHERE id='" . $_GET['details_id'] . "'";
$query_run_remove = mysqli_query($connection, $sql_remove);
print_r($query_run_remove);
if ($query_run_remove) {
$_SESSION['status_remove'] = "Warning";
$_SESSION['status_code_remove'] = "success";
$_SESSION['body_remove'] = "This Product Details Will be Deleted Completely ";
$_SESSION['button_remove'] = "Ok";
header("Location:Products_Details.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status_remove'] = "Warning";
$_SESSION['status_code_remove'] = "error";
$_SESSION['body_remove'] = "This Product Details Will be Not Deleted Completely";
$_SESSION['button_remove'] = "Ok";
header("Location:Products_Details.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
if (isset($_POST['delete_update_feaures'])) {
if (isset($_GET['delete_update_feaures'])) {
$delete_update_feaures = $_GET['delete_update_feaures'];
// print_r($delete_update_feaures);
}
$sql_remove_fe = "UPDATE tb2 set f1='' WHERE id='" . $_GET['delete_update_feaures'] . "'";
$query_run_remove_fe = mysqli_query($connection, $sql_remove_fe);
// print_r($sql_remove_fe);
if ($query_run_remove_fe) {
$_SESSION['status_remove'] = "Warning";
$_SESSION['status_code_remove'] = "success";
$_SESSION['body_remove'] = "This Product Details Will be Deleted Completely ";
$_SESSION['button_remove'] = "Ok";
header("Location:Products_Details.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status_remove'] = "Warning";
$_SESSION['status_code_remove'] = "error";
$_SESSION['body_remove'] = "This Product Details Will be Not Deleted Completely";
$_SESSION['button_remove'] = "Ok";
header("Location:Products_Details.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// المنتجات المميزة
if (isset($_POST['special_id'])) {
if ($_GET['special_id'] == 0) {
$sql_update = "UPDATE tb1 set special=1 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Added This Product to Special Products";
$_SESSION['button'] = "Ok";
header("Location:Special.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Added This Product to Special Products";
$_SESSION['button'] = "Try Again ";
header("Location:Special.php?admin_id=$admin_id&role=$role&session=$url_session");
}
} elseif ($_GET['special_id'] == 1) {
$sql_update = "UPDATE tb1 set special=0 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Removed Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Removed This Product From Special Products";
$_SESSION['button'] = "Ok";
header("Location:Special.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Not Removed This Product From Special Products";
$_SESSION['button'] = "Try Again ";
header("Location:Special.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
// المنتجات الاكثر مبيعا
if (isset($_POST['best_id'])) {
if ($_GET['best_id'] == 0) {
$sql_update = "UPDATE tb1 set best=1 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Added This Product to Best-Selling Products";
$_SESSION['button'] = "Ok";
header("Location:Best.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Added This Product to Best-Selling Products";
$_SESSION['button'] = "Try Again ";
header("Location:Best.php?admin_id=$admin_id&role=$role&session=$url_session");
}
} elseif ($_GET['best_id'] == 1) {
$sql_update = "UPDATE tb1 set best=0 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Removed Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Removed This Product From Best-Selling Products";
$_SESSION['button'] = "Ok";
header("Location:Best.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Removed This Product From Best-Selling Products";
$_SESSION['button'] = "Try Again ";
header("Location:Best.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
// المنتجات المتوقفة
if (isset($_POST['discontinued_id'])) {
if ($_GET['discontinued_id'] == 0) {
$sql_update = "UPDATE tb1 set discontinued=1 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Added This Product to Discontinued Products";
$_SESSION['button'] = "Ok";
header("Location:Discontinued.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Added This Product to Discontinued Products";
$_SESSION['button'] = "Try Again ";
header("Location:Discontinued.php?admin_id=$admin_id&role=$role&session=$url_session");
}
} elseif ($_GET['discontinued_id'] == 1) {
$sql_update = "UPDATE tb1 set discontinued=0 WHERE id=$id";
$query_run_update = mysqli_query($connection, $sql_update);
print_r($sql_update);
if ($query_run_update) {
$_SESSION['status'] = "Removed Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "You Removed This Product From Discontinued Products";
$_SESSION['button'] = "Ok";
header("Location:Discontinued.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Something Wrong!!";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "You Not Removed This Product From Discontinued Products";
$_SESSION['button'] = "Try Again ";
header("Location:Discontinued.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
}
// أضافة كاتيكوري
if (isset($_POST['Add_category'])) {
$name = $_POST['name'];
$type = $_POST['type'];
$sub_description = $_POST['sub_description'];
$page_description = $_POST['page_description'];
$Added_date = $_POST['Added_date'];
$query_category = "INSERT INTO product_categories(image, name,type,sub_description,page_description,Added_date )VALUES ( '', '$name', '$type' , '$sub_description', '$page_description', '$Added_date' )";
$result_query_category = mysqli_query($connection, $query_category);
// print_r($query_details );
if ($result_query_category) {
$_SESSION['status'] = " Category Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Categories.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Category Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Categories.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// حذف كاتيكوري نهائيا
if (isset($_POST['delete_category'])) {
$sql_remove_category = "DELETE FROM `product_categories` WHERE id=$delete_category";
$query_run_remove_category = mysqli_query($connection, $sql_remove_category);
// print_r($sql_remove);
if ($query_run_remove_category) {
$_SESSION['status_remove'] = "Warning";
$_SESSION['status_code_remove'] = "success";
$_SESSION['body_remove'] = "This Category Will be Deleted ";
$_SESSION['button_remove'] = "Ok";
header("Location:Categories.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status_remove'] = "Warning";
$_SESSION['status_code_remove'] = "error";
$_SESSION['body_remove'] = "This Category Will be Not Deleted";
$_SESSION['button_remove'] = "Ok";
header("Location:Categories.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// أضافة انستريكشنال
if (isset($_POST['add_Instructional'])) {
$query_Instructional = "INSERT INTO instructional_videos(video_name,video_link,Added_date)VALUES ( '" . $_POST['video_name'] . "', '" . $_POST['video_link'] . "','" . $_POST['Added_date'] . "')";
$result_query_Instructional = mysqli_query($connection, $query_Instructional);
// print_r($query_details );
if ($result_query_Instructional) {
$_SESSION['status'] = " Instructional Video Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Instructional.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Instructional Video Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Instructional.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// حذف انستريكشنال نهائيا
if (isset($_POST['Instructional'])) {
$sql_remove_Instructional = "DELETE FROM `instructional_videos` WHERE id=$Instructional";
$query_run_remove_Instructional = mysqli_query($connection, $sql_remove_Instructional);
// print_r($sql_remove);
if ($query_run_remove_Instructional) {
$_SESSION['status'] = " Instructional Video Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Instructional.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = " Instructional Video Not Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Instructional.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// أضافة بورجس فديو
if (isset($_POST['add_bosters_brochures'])) {
$query_bosters_brochures = "INSERT INTO bosters_brochures(file_name,file,Added_date)VALUES ( '" . $_POST['file_name'] . "', '" . $_POST['file'] . "','" . $_POST['Added_date'] . "')";
$result_bosters_brochures = mysqli_query($connection, $query_bosters_brochures);
// print_r($query_details );
if ($result_bosters_brochures) {
$_SESSION['status'] = "Bosters Brochures Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Brochures.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Bosters Brochures Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Brochures.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// حذف بورجس نهائيا
if (isset($_POST['bosters_brochures'])) {
$sql_remove_bosters_brochures = "DELETE FROM `bosters_brochures` WHERE id=$bosters_brochures";
$query_run_remove_bosters_brochures = mysqli_query($connection, $sql_remove_bosters_brochures);
// print_r($sql_remove);
if ($query_run_remove_bosters_brochures) {
$_SESSION['status'] = "Bosters Brochures Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Brochures.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Bosters Brochures Not Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Brochures.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// أضافة سيليكت تولس
if (isset($_POST['sellect_tools_add'])) {
$sellect_tools = "INSERT INTO selecttools(tb1_id , product_type , product_lens , product_resolution , product_ir_distance , product_environment , product_category)VALUES ( '" . $_POST['tb1_id'] . "', '" . $_POST['product_type'] . "','" . $_POST['product_lens'] . "' ,'" . $_POST['product_resolution'] . "' ,'" . $_POST['product_ir_distance'] . "','" . $_POST['product_environment'] . "','" . $_POST['product_category'] . "')";
$sellect_tools_run = mysqli_query($connection, $sellect_tools);
// print_r($query_details );
if ($sellect_tools_run) {
$_SESSION['status'] = "Select Tools Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Select_Tools.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Select Tools Not Added Successfully ";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Select_Tools.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// حذف سيليكت تولس نهائيا
if (isset($_POST['Select_tools'])) {
$sellect_tools_remove = "DELETE FROM `selecttools` WHERE select_id=$Select_tools";
$sellect_tools_remove_run = mysqli_query($connection, $sellect_tools_remove);
print_r($sellect_tools_remove_run);
if ($sellect_tools_remove_run) {
$_SESSION['status'] = "Select Tools Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Select_Tools.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Select Tools Not Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Select_Tools.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// حذف انتيركتف برودوكت نهائيا
if (isset($_POST['interactive_delete'])) {
$interactive_delete_remove = "DELETE FROM `interactive_product_selection` WHERE id=$interactive_delete";
$interactive_delete_remove_run = mysqli_query($connection, $interactive_delete_remove);
// print_r($sellect_tools_remove_run);
if ($interactive_delete_remove_run) {
$_SESSION['status'] = "Interactive Product Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:interactive.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Interactive Product Not Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:interactive.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// حذف شهادة نهائيا
if (isset($_POST['delete_certificate'])) {
$delete_certificate = "DELETE FROM `certifications` WHERE certificate_id=$delete_certificate";
$delete_certificate_run = mysqli_query($connection, $delete_certificate);
// print_r($sellect_tools_remove_run);
if ($delete_certificate_run) {
$_SESSION['status'] = "Certificates Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Certificates.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Certificates Not Deleted Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Certificates.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
// أضافة شهادة
if (isset($_POST['add_certificate'])) {
$certifications = "INSERT INTO certifications(user_id , result , name , certificate_date )VALUES ( '" . $_POST['user_id'] . "', '" . $_POST['result'] . "','" . $_POST['name'] . "' ,'" . $_POST['certificate_date'] . "' )";
$certifications_run = mysqli_query($connection, $certifications);
// print_r($query_details );
if ($certifications_run) {
$_SESSION['status'] = "Certificate Added Successfully ";
$_SESSION['status_code'] = "success";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Certificates.php?admin_id=$admin_id&role=$role&session=$url_session");
} else {
$_SESSION['status'] = "Certificate Not Added Successfully ";
$_SESSION['status_code'] = "error";
$_SESSION['body'] = "";
$_SESSION['button'] = "Ok";
header("Location:Certificates.php?admin_id=$admin_id&role=$role&session=$url_session");
}
}
} else {
include 'login_error.php';
}
Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]