Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ home/ bdapparelinfo/ www/ bjmea-1463dbf457e80c13-admin/ |
|
<?php //require_once("check_session.php");?> <?php require_once("config.php"); $config_obj = new database_config(); $config_obj->database_connect(); $id =$_REQUEST['id']; $image1 =$_REQUEST['id1']; $Title = $_REQUEST['title']; $Pages_name = $_REQUEST['pages_name']; $files_temp=$_FILES['image']['tmp_name']; $image_name=$_FILES['image']['name']; $image_type=$_FILES['image']['type']; $image_size=$_FILES['image']['size']; $t=time(); $iname=$t.$image_name; $files_dir="upload/"; if(copy($files_temp,"$files_dir/$iname")) { $image=$iname; } else{ $image=$image1; } /*////////////////////////////////////////////// $sql = "select * from categories_list where title='".$Title."'"; $ssql = mysql_query($sql); $check = mysql_num_rows($ssql); if($check >= 1) { $ErrorMessage = "This Categories Name already exist. !!! Pleas Chose a Different Categories Name"; header("Location: add_categories.php?ErrorMessage=$ErrorMessage"); } else*/ if(mysql_query("UPDATE categories_list SET title = '$Title',content_pages_name = '$Pages_name',image_name = '$image' WHERE id ='$id'")) { echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=categories_manage.php>"; echo"</head>"; echo"</html> "; } else {echo"Failed to create new section";} ?>