query("update car_regi set status=4 where idx=$idx"); } if($dellmode){ $dbconn->query("select img1, img2, img3 from car_regi where idx=$idx"); if($dbconn->next_record()){ $delphoto1 = $dbconn->f("img1"); $delphoto2 = $dbconn->f("img2"); $delphoto3 = $dbconn->f("img3"); } ###### 업체기본이미지를 삭제한다. ######## $savedir = "./carimg"; if($delphoto1){ $del_img_name = "$savedir/$delphoto1"; unlink($del_img_name); } if($delphoto2){ $del_img_name = "$savedir/$delphoto2"; unlink($del_img_name); } if($delphoto3){ $del_img_name = "$savedir/$delphoto3"; unlink($del_img_name); } $dbconn->query("delete from car_regi where idx=$idx"); $lib->move_url("/car/car_all_l.html?page=$page&dmode=$dmode&searchv=$searchv&sneworused=$sneworused&smaker=$smaker&smodel=$smodel&svtype=$svtype&sprice=$sprice"); exit; } $table="car_regi"; $code_table="codes"; $query = "select a.idx as idx, a.user_id as user_id, a.user_grade, a.name as regi_name, a.email as email"; $query = $query. " ,a.phone as phone, a.addr as addr ,a.city as city,a.state as state, a.zip as zip, a.neworused "; $query = $query. ", a.maker as maker_idx, a.othermaker, code1.code_name as maker "; $query = $query. " ,a.model as model_idx ,a.othermodel, code2.code_name as model "; $query = $query. " ,a.grade as grade, prodyear,price, distance, vtype, gear, engine, fuel, door "; $query = $query. " ,quota,cc,extcolor,intcolor,carcity,carhwy,maxspeed,hpower,warranty "; $query = $query. " ,carquality,clash,caroption,img1,img2,img3,note,a.status,a.r_date"; $query = $query. " from $table a "; $query = $query. " inner join $code_table code1 on a.maker = code1.code_idx"; $query = $query. " inner join $code_table code2 on a.model = code2.code_idx"; $query = $query. " and idx=$idx "; $query = $query. " order by a.r_date desc "; $dbconn->query($query); $dbconn->next_record(); $idx = $dbconn->f("idx"); $r_name = $dbconn->f("regi_name"); $user_id = $dbconn->f("user_id"); $user_grade = $dbconn->f("user_grade"); $rphone = $dbconn->f("phone"); $remail = $dbconn->f("email"); $addr = $dbconn->f("addr"); $city = $dbconn->f("city"); $state = $dbconn->f("state"); $zip = $dbconn->f("zip"); $neworused = $dbconn->f("neworused"); switch ($neworused) { case ("1") : $newment = "신차 매물"; break; case ("2") : $newment = "중고차 매물"; break; } $maker = $dbconn->f("maker"); $maker_idx = $dbconn->f("maker_idx"); if($maker_idx=="1") $maker= $dbconn->f("othermaker"); $model = $dbconn->f("model"); $model_idx = $dbconn->f("model_idx"); if($model_idx=="1") $model=$dbconn->f("othermodel"); $prodyear = $dbconn->f("prodyear"); $price = number_format($dbconn->f("price")); $distance = number_format($dbconn->f("distance")); $vtype = $dbconn->f("vtype"); $grade = $dbconn->f("grade"); $gear = $dbconn->f("gear"); $engine = $dbconn->f("engine"); $fuel = $dbconn->f("fuel"); $door = $dbconn->f("door"); $quota = $dbconn->f("quota"); $cc = $dbconn->f("cc"); $extcolor = $dbconn->f("extcolor"); $intcolor = $dbconn->f("intcolor"); $carcity = $dbconn->f("carcity"); $carhwy = $dbconn->f("carhwy"); $maxspeed = $dbconn->f("maxspeed"); $warranty = $dbconn->f("warranty"); $carquality = $dbconn->f("carquality"); $clash = $dbconn->f("clash"); switch ($clash) { case ("Y") : $clash = "사고"; break; case ("N") : $clash = "무사고"; break; } $caroption = $dbconn->f("caroption"); if($caroption){ $tmpopt = split(":",$caroption); $i=0; $dbconn2 = new cjDB; $optval=""; while($tmpopt[$i]){ $dbconn2->query("select code_name from codes where code_idx=$tmpopt[$i]"); if($dbconn2->next_record()){ if($i%5==0 && $i != 0){ $optval = $optval. $dbconn2->f("code_name")."
"; }else{ $optval = $optval. $dbconn2->f("code_name")."    "; } } $i++; } $dbconn2->disconnect(); } $status = $dbconn->f("status"); if($status=="4") $rphone = "판매완료"; $note = nl2br(stripslashes($dbconn->f("note"))); $r_date=date("m-d-y",$dbconn->f("r_date")); $img1 = $dbconn->f("img1"); $img2 = $dbconn->f("img2"); $img3 = $dbconn->f("img3"); //************************************************************************************// $photo = $dbconn->f("img1"); $img_h=90; $img_w=100; if($photo){ $photo="carimg/".$photo; $imgsize=GetImageSize($photo); $imgh = $imgsize[1]; $imgw = $imgsize[0]; if($imgsize[1] > $imgsize[0]){ //********************************* 세로큼 if($imgsize[1] > $img_h){ $ratio=$img_h/$imgsize[1]; $imgsize[1] = $img_h; $imgsize[0] = $imgsize[0]*$ratio; } }else{ if($imgsize[0] > $img_w){ $ratio=$img_w/$imgsize[0]; $imgsize[0] = $img_w; $imgsize[1] = $imgsize[1]*$ratio; } } } $photo2 = $dbconn->f("img2"); if($photo2){ $photo2="carimg/".$photo2; $imgsize2=GetImageSize($photo2); $imgh2 = $imgsize2[1]; $imgw2 = $imgsize2[0]; if($imgsize2[1] > $imgsize2[0]){ //********************************* 세로큼 if($imgsize2[1] > $img_h){ $ratio2=$img_h/$imgsize2[1]; $imgsize2[1] = $img_h; $imgsize2[0] = $imgsize2[0]*$ratio2; } }else{ if($imgsize2[0] > $img_w){ $ratio2=$img_w/$imgsize2[0]; $imgsize2[0] = $img_w; $imgsize2[1] = $imgsize2[1]*$ratio2; } } } $photo3 = $dbconn->f("img3"); if($photo3){ $photo3="carimg/".$photo3; $imgsize3=GetImageSize($photo3); $imgh3 = $imgsize3[1]; $imgw3 = $imgsize3[0]; if($imgsize3[1] > $imgsize3[0]){ //********************************* 세로큼 if($imgsize3[1] > $img_h){ $ratio3=$img_h/$imgsize[1]; $imgsize3[1] = $img_h; $imgsize3[0] = $imgsize3[0]*$ratio; } }else{ if($imgsize3[0] > $img_w){ $ratio3=$img_w/$imgsize3[0]; $imgsize3[0] = $img_w; $imgsize3[1] = $imgsize3[1]*$ratio3; } } } //************************************************************************ // 이전글, 다음글 구하기 $dbconn6 = new cjDB; $nextno = 0; $prevno = 0; $temp = 0; $query6 = "SELECT a.idx, a.r_date "; $query6 = $query6. " FROM car_regi a "; $query6 = $query6. " inner join member m on a.user_id = m.user_id"; if($dmode=="C" || $ret_prog=="main"){ $query6 = $query6. " and m.grade2='C' and m.status=1"; } if($dmode=="G"){ $query6 = $query6. " and m.grade2!='C'"; } if($ret_prog=="car_myhome.html"){ $query6 = $query6. " and a.user_id = '$login_id' "; } if($ret_prog=="car_myhome.html"){ $query6 = $query6. " and a.user_id = '$login_id' "; } if($searchv){ /********************검색쿼리시작**********************************/ if($sneworused && ($sneworused!="3")){ $query6 = $query6. " and a.neworused = $sneworused "; } if($smaker){ $query6 = $query6. " and a.maker = $smaker "; } if($smoel){ $query6 = $query6. " and a.model = $smodel "; } if($svtype){ $query6 = $query6. " and a.vtype = '$svtype' "; } if($sprice){ $tmpspay = split(":",$sprice); $query6 = $query6. " and ( a.price >= $tmpspay[0] and a.price <= $tmpspay[1] ) "; } /********************검색쿼리 끝**********************************/ } $query6 = $query6." order by a.r_date desc"; $dbconn6->query($query6); $dbconn6->next_record(); while($dbconn6->f("idx")){ if($idx == $dbconn6->f("idx")){ $nextno = $temp; $dbconn6->next_record(); if($dbconn6->f("idx")){ $prevno = $dbconn6->f("idx"); }else{ $dbconn6->pre_record(); } break; }else{ $temp = $dbconn6->f("idx"); } $dbconn6->next_record(); } $dbconn6->disconnect(); // 이전글 구하기 끝 //***************************************************************** ?> "findchicago.com" 에 오신 것을 환영합니다.
Home > 자동차 > 상세화면
※ 안내말
등록하기
수정 "; } echo $modilink."  "; if(($login_grade=="A") || (($user_id == $login_id) && ($status == "1"))){ ?> 판매완료   삭제