decid($prid):''; $rprid = isset($prid)?$com_obj->decid(addslashes($prid)):''; $fetid= $_GET['prid']; if($prid=="") { echo ""; exit; } $db->insertrec("update product set viewcount=viewcount+1 where id='$rprid'"); $Prd_Det=$db->singlerec("select product.*,company.*,register.* from product,company,register where (product.userid=company.user_id) and product.userid=register.id and product.id='$rprid' group by product.id"); if($Prd_Det['id']==""){ //echo ""; echo ""; exit; } if($Prd_Det['mem_pack']=="0") $mem="Free Member"; else if($Prd_Det['mem_pack']=="1") $mem="Silver Member"; else if($Prd_Det['mem_pack']=="2") $mem="Gold Member"; else if($Prd_Det['mem_pack']=="3") $mem="Diamond Member"; else if($Prd_Det['mem_pack']=="4") $mem="Platinum Member"; $imem=explode(" ", $mem); $imem=strtolower($imem[0]); $imem="$imem.png"; $cat=$db->singlerec("select category_name from category where id='".$Prd_Det['prod_category']."'"); $count=$db->singlerec("select count(*) from product where userid='".$Prd_Det['user_id']."'"); $userid=$Prd_Det['user_id']; $vcount=$db->singlerec("select count(id) from votes where product_id='$rprid' AND type='1' AND action = 'vote'"); $uvcount=$db->singlerec("select count(id) from votes where product_id='$rprid' AND type='1' AND action = 'unvote'"); $upd = isset($upd)?$upd:''; $revsubmit = isset($revsubmit)?$revsubmit:''; $id = isSet($id) ? $id : '' ; $act = isSet($act) ? $act : '' ; $page = isSet($page) ? $page : '' ; $Message = isSet($Message) ? $Message : '' ; $reviewername = isSet($reviewername) ? $reviewername : '' ; $title = isSet($title) ? $title : '' ; $rate = isSet($rate) ? $rate : '' ; $review_details = isSet($review_details) ? $review_details : '' ; $crctdate = isSet($crctdate) ? $crctdate : '' ; $img = isSet($img) ? $img : '' ; $ImgExt = isSet($ImgExt) ? $ImgExt : '' ; $UsrImg = isSet($UsrImg) ? $UsrImg : '' ; if($revsubmit) { $crcdt = time(); $title = trim(addslashes($title)); $rate = trim(addslashes($rate)); $review_details = trim(addslashes($review_details)); $checkStatus = $db->check1column("reviews","title",$title); if($upd == 2) $checkStatus = 0; if($_FILES['UsrImg']['tmp_name'] != "" && $_FILES['UsrImg']['tmp_name'] != "null") { $fpath = $_FILES['UsrImg']['tmp_name'] ; $fname = $_FILES['UsrImg']['name'] ; $getext = substr(strrchr($fname, '.'), 1); $ImgExt = strtolower($getext); } if($ImgExt=="jpg" || $ImgExt == "jpeg" || $ImgExt == "gif" || $ImgExt == "png" || $ImgExt == ''){ if($checkStatus == 0){ $set = "title = '$title'"; $set.= ",reviewername = '$reviewername'"; $set.= ",rate = '$rate'"; $set.= ",review_details = '$review_details'"; $set.= ",item_id = '$rprid'"; $set.= ",type = '1'"; $set .= ",crctdate = NOW()"; $set .= ",active_status = '0'"; $idvalue = $db->insertid("insert into reviews set $set"); if($_FILES['UsrImg']['tmp_name'] != "" && $_FILES['UsrImg']['tmp_name'] != "null") { $fpath = $_FILES['UsrImg']['tmp_name'] ; $fname = $_FILES['UsrImg']['name'] ; $getext = substr(strrchr($fname, '.'), 1); $ext = strtolower($getext); $NgImg= $idvalue.".".$ext; $set_img = "img = '$NgImg'" ; $des = "uploads/reviews/$NgImg"; move_uploaded_file($fpath,$des) ; $iimg=$db->insertrec("select img from reviews where id='$idvalue'"); $db->insertrec("update reviews set $set_img where id='$idvalue'"); } echo ""; @header("location:product-detai?act=revsucc"); exit; } else { $id = $idvalue; $Message = "$title Already Exists"; } } else{ $id = $idvalue; $Message = "kindly upload jpg,gif,png image format only"; } } $prdName=$Prd_Det['prod_name']; ?>

:
:
:

:

:

: ( )

: