alert('ไม่สามารถแสดงรูปภาพดังกล่าว');window.close();"; $imgid = DecryptNo($imgidencrypt); if(empty($imgid)) echo ""; if(isset($_SESSION['loginusername'])){ $imageflag = webpage_detail_func("flag_image_show_member"); }else{ $imageflag = webpage_detail_func("flag_image_show"); } $magazineinfonoshowcheck = 1; $sql = "select imgReferId, imgReferType, imgFlag, imgPath, imgRating from image where imgFlag > ".webpage_detail_func("flag_image_hide")." and imgFlag <= ".$imageflag." and imgId = ".$imgid; $result = select_data_func($sql); $totalRow = mysql_num_rows($result); if($totalRow>0){ $row = mysql_fetch_array($result); $imgreferid = $row['imgReferId']; $imgrefertype = $row['imgReferType']; $imgpath = $row['imgPath']; $imgrating = $row['imgRating']; if($imgrating > 1) $magazineinfonoshowcheck = 0; }else{ echo ""; exit; } }else{ echo ""; exit; } $pagename = 'imagepreview'; if(isset($_SESSION['loginusername'])){ $magazineflag = webpage_detail_func("flag_magazine_show_member"); }else{ $magazineflag = webpage_detail_func("flag_magazine_show"); } if($imgrefertype == 'CV' ){ $sql = "select magazineinfo.magInfoName, magazineinfo.magInfoId, magazine.magId, magazine.magVolumn, magazine.magNo, magazine.magDate from magazine right join magazineinfo on magazine.maginfoid = magazineinfo.maginfoid and magazineinfo.maginfoflag >= ".webpage_detail_func("flag_magazineinfo_show")." left join cover on magazine.magid = cover.covmagid where magazine.magflag > ".webpage_detail_func("flag_magazine_hide")." and magazine.magflag <= ".$magazineflag." and cover.covid = ".$imgreferid; $errormessage = ""; $imgtype = 'ปก'; }else if($imgrefertype == 'FA' ){ if(isset($_SESSION['loginusername'])){ $fashionflag = webpage_detail_func("flag_fashion_show_member"); }else{ $fashionflag = webpage_detail_func("flag_fashion_show"); } $sql = "select magazineinfo.magInfoName, magazineinfo.magInfoId, magazine.magId, magazine.magVolumn, magazine.magNo, magazine.magDate from magazine right join magazineinfo on magazine.maginfoid = magazineinfo.maginfoid and magazineinfo.maginfoflag >= ".webpage_detail_func("flag_magazineinfo_show")." right join fashion on magazine.magid = fashion.fashmagid where magazine.magflag > ".webpage_detail_func("flag_magazine_hide")." and magazine.magflag <= ".$magazineflag." and fashion.fashflag > ".webpage_detail_func("flag_fashion_hide")." and fashion.fashflag <= ".$fashionflag." and fashion.fashid = ".$imgreferid; $errormessage = ""; $imgtype = 'แฟชั่น'; }else if($imgrefertype == 'AD' ){ if(isset($_SESSION['loginusername'])){ $adflag = webpage_detail_func("flag_ad_show_member"); }else{ $adflag = webpage_detail_func("flag_ad_show"); } $sql = "select magazineinfo.magInfoName, magazineinfo.magInfoId, magazine.magId, magazine.magVolumn, magazine.magNo, magazine.magDate from magazine right join magazineinfo on magazine.maginfoid = magazineinfo.maginfoid and magazineinfo.maginfoflag >= ".webpage_detail_func("flag_magazineinfo_show")." right join advertise on magazine.magid = advertise.admagid where magazine.magflag > ".webpage_detail_func("flag_magazine_hide")." and magazine.magflag <= ".$magazineflag." and advertise.adflag > ".webpage_detail_func("flag_ad_hide")." and advertise.adflag <= ".$adflag." and advertise.adid = ".$imgreferid; $errormessage = ""; $imgtype = 'โฆษณา'; }else if($imgrefertype == 'CN' ){ if(isset($_SESSION['loginusername'])){ $contentflag = webpage_detail_func("flag_content_show_member"); }else{ $contentflag = webpage_detail_func("flag_content_show"); } $sql = "select magazineinfo.magInfoName, magazineinfo.magInfoId, magazine.magId, magazine.magVolumn, magazine.magNo, magazine.magDate from magazine right join magazineinfo on magazine.maginfoid = magazineinfo.maginfoid and magazineinfo.maginfoflag >= ".webpage_detail_func("flag_magazineinfo_show")." right join content on magazine.magid = content.cntmagid where magazine.magflag > ".webpage_detail_func("flag_magazine_hide")." and magazine.magflag <= ".$magazineflag." and content.cntflag > ".webpage_detail_func("flag_content_hide")." and content.cntflag <= ".$contentflag." and content.cntid = ".$imgreferid; $errormessage = ""; $imgtype = 'คอลัมน์'; } $result = select_data_func($sql); $totalRow = mysql_num_rows($result); if($totalRow>0){ $row = mysql_fetch_array($result); $magazineinfoname = stripslashes($row['magInfoName']); $maginfoid = $row['magInfoId']; $magid = $row['magId']; $magissuename = ''; $magissuename .= ''.$magazineinfoname.''; $magissuename .= ' vol. '.$row['magVolumn'].''; $magissuename .= ' no. '.$row['magNo'].''; $magissuename .= ' '.convert_monthEng_func(substr($row['magDate'],5,2)).' '.substr($row['magDate'],0,4); }else{ echo $errormessage; exit; } ?>