![]() |
||
ob_start(); //ini_set('display_errors','On'); include ('includer/conn.php'); include_once ('includer/functions.inc.php'); //session_start();*/ $conn = db(); ?> $id=$_REQUEST['id']; $result=mysqli_query($conn,"select * from items where id=$id"); $row=mysqli_fetch_array($result); extract($row); $result_brand=mysqli_query($conn,"select * from brand where bid=$bid"); $row_brand=mysqli_fetch_array($result_brand); $brand_name=$row_brand[1]; $brand=strtolower($brand_name); $result_brand=mysqli_query($conn,"select * from categories where id=$cid"); $row_brand=mysqli_fetch_array($result_brand); $cat_name=$row_brand[1]; $cat=$row_brand['url_prefix']; $name=str_replace(" ","-",$model); $name=str_replace("/","-",$name); $name=str_replace("(New)","",$name); $name=str_replace("New","",$name); $nameUrl=$item_name; $nameUrl=str_replace(" ","-",$nameUrl); $nameUrl=str_replace("_","-",$nameUrl); $nameUrl=str_replace("/","-",$nameUrl); if ($delivery_option=='') $delivery_option='Same Day Delivery'; if ($stock=='') $stock='Available'; if ($row['new']==0) $new='Used'; else $new='New'; $url1="laptops/".$row[0]."/".$name.".html"; $check=mysqli_query($conn,"update items set total_viewed_time=total_viewed_time+1 where id=$id"); $today=date('Y-m-d',time()); $counter=mysqli_fetch_array(mysqli_query($conn,"select count(*) from items_daily_hit_stat where item_id=$id and date1='$today'")); if ($counter[0]>0) $check=mysqli_query($conn,"update items_daily_hit_stat set counter=counter+1 where item_id=$id and date1='$today'"); else $check=mysqli_query($conn,"insert into items_daily_hit_stat (item_id, date1, counter) values ($id,'$today',1);"); //insert hit record for wallpapers $user_add=$_SERVER['REMOTE_ADDR']; $t=getdate(); $today=date('Y-m-d H:i:s',$t[0]); $date1 =$today; $result=mysqli_query($conn,"insert into stat_lap_model value ('','$date1','$user_add','".$_REQUEST['id']."');"); if ($result==false) echo mysqli_error(); if(isset($_GET['processed'])) { $id=$_GET['id']; extract($_POST); if( $_SESSION['security_code'] == $security_code && !empty($_SESSION['security_code'] ) ) { // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. unset($_SESSION['security_code']); $user_review=mysqli_real_escape_string($user_review); $user_review=stripcslashes($user_review); //echo "
"; var_dump($_SERVER); echo "";exit; $qry="insert into review (review_desc,review_posted_by,review_post_date,review_viewedBy_Admin,review_item_id,review_item_for) values('".$user_review."','".$user_name."','".time()."','no','".$_GET['id']."','laptop')"; // echo '