$product="active"; $caller1="open"; $prod_add="active"; require_once '../template/superadmin/action_connection.php' ; include("../settings/adminsession.php"); session_start(); $id=$_REQUEST['id']; $Query_last_data = "SELECT * from shop_product where product_id='$id' "; $name_last_data=$DB->query($Query_last_data); $row_12_123=mysql_fetch_array($name_last_data); $des=trim(addslashes($row_12_123['description'])); $manufacturer_id=$row_12_123['manufacturer_id']; $tax_class_id=$row_12_123['tax_class_id']; $quantity=$row_12_123['quantity']; $vstatus=$row_12_123['vstatus']; $stock_status_id=$row_12_123['stock_status_id']; $ean=$row_12_123['ean']; $used_for=trim(addslashes($_REQUEST['used_for'])); ?> if(isset($_POST['sumbit'])) { if ($_REQUEST["form_action"] == "Insert") { if($_FILES['mast']['name']!="") { $size = 190; // the thumbnail height $filedir = '../../default/s-img/'; // the directory for the original image $thumbdir = '../../default/s-img/'; // the directory for the thumbnail image $maxfile = '200000000000'; $mode = '0666'; echo $userfile_name = $_FILES['mast']['name']; $userfile_tmp = $_FILES['mast']['tmp_name']; //$userfile_name = $_FILES['uploadFile']['name']; //$userfile_tmp = $_FILES['uploadFile']['tmp_name']; $getExt = explode ('.', $userfile_name); $rand_name = md5(rand(000,999)); /* $prod_img = $filedir.$mysql_insert_id.$i.$getExt[0].".".$getExt[1];*/ $new_file_name = $userfile_name; //exit(); $mysql_insert_id=$_REQUEST['id']; $new_file_name = str_replace('&','and',$new_file_name); $new_file_name = str_replace('#','',$new_file_name); $new_file_name = str_replace('+','',$new_file_name); $new_file_name = str_replace("'", '', $new_file_name); $new_file_name = str_replace(' ','',$new_file_name); $new_file_name_3730=$new_file_name; $new_file_name=($mysql_insert_id.$new_file_name); $prod_img = $filedir.$new_file_name; // original_images/456546565465465464jhh.jpg $items[] = $prod_img; $prod_img_thumb = $thumbdir.$getExt[0].".".$getExt[1]; move_uploaded_file($userfile_tmp, $prod_img); $upload_img = "UPDATE shop_product SET image='".$new_file_name."' WHERE product_id='".$mysql_insert_id."'"; $DB->query($upload_img); // $upload_img = mysql_query("UPDATE shop_product SET image='".$new_file_name."' WHERE id='".$mysql_insert_id."'"); } date_default_timezone_set('Asia/Kolkata'); $date_ss = date('Y-m-d H:i:s ', time()); $tablename = "`tbl_doctor_appointment`"; $date=trim(addslashes($_REQUEST['date'])); $date = date("Y-m-d", strtotime($date)); $product_name=trim(addslashes($_REQUEST['product_name'])); $price=trim(addslashes($_REQUEST['price'])); $sell_price=trim(addslashes($_REQUEST['sell_price'])); $category=trim(addslashes($_REQUEST['category'])); $job_description=trim(addslashes($_REQUEST['job_description'])); $sp_ins=trim(addslashes($_REQUEST['sp_ins'])); $int_price=trim(addslashes($_REQUEST['int_price'])); $weight=trim(addslashes($_REQUEST['weight'])); $disease=0; $used_for=trim(addslashes($_REQUEST['used_for'])); $dosage=trim(addslashes($_REQUEST['dosage'])); $one_line=trim(addslashes($_REQUEST['one_line'])); $company=trim(addslashes($_REQUEST['company'])); $ean=trim(addslashes($_REQUEST['ean'])); $videocode=trim(addslashes($_REQUEST['videocode'])); $Query="UPDATE shop_product SET name='".$product_name."',v_id='". $videocode."',price='". $price."' WHERE `product_id`='".$_REQUEST['id']."'"; $DB->query($Query); header("location:view_video.php?sucess=sucess"); } } ?>