//goods_num : »óÇ° ¹øÈ£
$good_num = $_GET['pcode'];
$i=0;
$today=$_COOKIE["goods_num"];
$tod2=explode(",", $_COOKIE["goods_num"]); //ÀúÀåµÈ ÄíÅ°°ªÀ» ','·Î ³ª´©¾î ¹è¿·Î ÀúÀå
$tod=array_reverse($tod2); //ÃÖ±Ù ¸ñ·Ï 5°³¸¦ »Ì±â À§ÇØ ¹è¿À» ÃֽŠ°ÍºÎÅÍ·Î ¹Ý´ë·Î Á¤·ÄÇØÁØ´Ù.
##Áߺ¹À» ¸·±â À§ÇØ ÃÖ±Ù 5°³ÀÇ ÄíÅ°°ª Áß¿¡ »óÇ° ¹øÈ£°¡ ÀÖ´Â Áö °Ë»çÇÏ¿© ÀÖÀ¸¸é save °ªÀ» no·Î ¼³Á¤
while($i<5)
{ //Ãâ·ÂÇÒ »óÇ° ¸ñ·ÏÀÇ ¼ö ¼³Á¤
if($pcode==$tod[$i])
{
$save=no;
}
$i++;
}
##ÄíÅ°°ªÀÌ ¾øÀ» °æ¿ì Áï óÀ½ ÀúÀåÇÏ´Â °æ¿ì
if($_COOKIE["goods_num"]=="")
{
setcookie("goods_num", $_GET["pcode"], time() + 86400,"/");
}
##ÀúÀåµÈ ÄíÅ°°ªÀÌ Á¸ÀçÇÏ°í, Áߺ¹µÈ °ªÀÌ ¾Æ´Ñ °æ¿ì
if($_COOKIE["goods_num"] != "" & $save != no){
setcookie("goods_num" , $today. "," . $_GET["pcode"] , time() + 86400, "/");
// ±âÁ¸¿¡ ÀÖ´ø ÄíÅ°°ª¿¡ ','¸¦ ºÙÀÌ°í °ªÀ» °è¼Ó µ¡ºÙ¿©¼ ÀúÀåÇØÁØ´Ù.
// 11,27,35,47,5 °ú °°Àº Çü½ÄÀ¸·Î »óÇ°¹øÈ£°¡ ÀúÀåµÈ´Ù.
}
include $DOCUMENT_ROOT."/form_begin.php";
if($state >= 0) {
if(!$orname && !$orsun) $order = " order by updatetime desc";
else $order = " order by $orname $orsun";
if($menu=="index") {
$result = $dalib->selectSQLAll("select * from $Table[Product] where $kind = '1' $order");
$rnumPN = $result[rnum];
}elseif($menu=="search") {
$result = $dalib->selectSQLAll("select * from $Table[Product] where pname like '%$search%' or pcompany like '%$search%' $order");
$rnumPN = $result[rnum];
}else {
$result = $dalib->selectSQLAll("select * from $Table[Product] where bigcate ='$bigcate' and smcate = '$smcate' $order");
$rnumPN = $result[rnum];
}
if($mode=="prev") {
@mysql_data_seek($result[result],$state);
$r_prev = mysql_fetch_array($result[result]);
$pcode = $r_prev[pcode];
}elseif($mode=="next") {
@mysql_data_seek($result[result],$state);
$r_next = @mysql_fetch_array($result[result]);
$pcode = $r_next[pcode];
}
$prev_state = $state - 1;
$next_state = $state + 1;
}
$r = $dalib->selectSQLField("select bigcatename from $Table[Bigcategory] where bigcate ='$bigcate'");
$r2 = $dalib->selectSQLField("select smcatename from $Table[Smcategory] where smcate ='$smcate'");
$bigcatename = $r[bigcatename];
$smcatename = $r2[smcatename];
if($smcatename=="") $smcatenameTitle = $r2[smcatename];
else $smcatenameTitle = $smcatename;
$r = $dalib->selectSQLField("select * from $Table[Product] where pcode = '$_GET[pcode]'");
$pname = stripslashes($r[pname]);
$pcompany = stripslashes($r[pcompany]);
$pinfo = $r[pinfo];
$pbuylimit = stripslashes($r[pbuylimit]);
$selfStock = $r[selfStock];
$self_sale = $r[sale];
switch ($pcompany){
case SHIMANO : $affiPerSale = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale = $RMANAGE[etcaffiPerSale];
}
/*
if($r[persale]>0){
$psellprice = round($r[pprice]*$affiSale*(1-($r[persale]/100)),-3);
}else{
$psellprice = round($r[pprice]*$affiSale*(1-($r[persale]/100)),-3);
}
*/
$rClient = $dalib->selectSQLField("select client from $Table[Product] where pcode='$pcode'");
if($rClient[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table = "domefishing.Barcode";
}elseif($rClient[client]=="À±¼ºÁ¶±¸"){
$_Table = "domefishing.ShimanoBarcode";
}else{
$_Table = "$Table[Product]";
}
if($_Table == "$Table[Product]"){
$psellprice = $r[psellprice];
$totalStock = $r[stock_amount];
$rowSale = $dalib->selectSQLField("select sale from $_Table where pcode='$r[pcode]'");
}else{
$result = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r[pcode]'");
if($result[rnum]>0) {
$row = @mysql_fetch_array($result[result]);
for($loop=1;$loop<=36;$loop++) {
if($row["k_".$loop]=="") continue;
$cWhere .= "jancode='".$row["k_".$loop]."' or ";
}
$cWhere = substr($cWhere, 0, -3);
$rPs = $dalib->selectSQLField("select MIN(psellprice) as psellprice, MAX(sale) as sale from $_Table where ($cWhere) and psellprice>0");
$psellprice = $rPs[psellprice];
$resultStock = $dalib->selectSQLAll("select amount, bonsaAmount from $_Table where ($cWhere)");
while($rs = mysql_fetch_array($resultStock[result])){
$totalStock += $rs[amount]+$rs[bonsaAmount];
}
if($self_sale>0){
$rowSale = $dalib->selectSQLField("select sale from $Table[Product] where jancode='$r[jancode]'");
}else{
$rowSale = $dalib->selectSQLField("select sale from $_Table where jancode='$r[jancode]'");
}
}else{
$psellprice = $r[psellprice];
$rPs = $dalib->selectSQLField("select amount, bonsaAmount from $_Table where pcode = '$r[pcode]'");
$totalStock = $rPs[amount]+ $rPs[bonsaAmount];
if($self_sale>0){
$rowSale = $dalib->selectSQLField("select sale from $Table[Product] where pcode='$r[pcode]'");
}else{
$rowSale = $dalib->selectSQLField("select sale from $_Table where pcode='$r[pcode]'");
}
}
}
//$rowSale = $dalib->selectSQLField("select sale from $_Table where jancode='$r[jancode]'");
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
//if($rowSale[sale]>0) $affiPerSale = 0;
//$psellprice = floor(($psellprice*(1-($rowSale[sale]/100))-$psellprice/100*$affiPerSale)/100)*100;
$psellprice = floor($psellprice*(1-($affiPerSale/100))*(1-($rowSale[sale]/100)));
}else{
$psellprice = $psellprice;
}
# »óÇ°Äڵ尡 À߸øµÇ¾ú°Å³ª »óÇ°ÀÌ µðºñ³»¿ë¿¡ ¾øÀ»°æ¿ì
if($r[srlno]=="") $fulib->alertBack("À߸øµÈ »óÇ°ÄÚµåÀ̰ųª ÇöÀç ¼ºñ½ºÇÏÁö ¾Ê´Â »óÇ°ÀÔ´Ï´Ù.");
if($totalStock < 1) $STOCK_IMG = " ";
if($r[html] == "0") {
$pcontents = str_replace(" "," ",$r[pcontents]) ;
$pcontents = nl2br(stripslashes($pcontents)) ;
}elseif($r[html] =="1") {
$pcontents = stripslashes($r[pcontents]);
}
$rstock = $dalib->selectSQLField("select * from $Table[ProductStockItemDetail] where pcode = '$_GET[pcode]' and kind = '1'");
$rstock2 = $dalib->selectSQLField("select * from $Table[ProductStockItemDetail] where pcode = '$_GET[pcode]' and kind = '2'");
$rstock3 = $dalib->selectSQLField("select * from $Table[ProductStockSetting] where pcode = '$_GET[pcode]'");
# ¹è¼ÛÁ¤º¸
$r_send = $dalib->selectSQLField("select sendkind, sendcontent from $Table[ManageInfo]");
if($r_send[sendkind] == "0") {
$sendcontent = str_replace(" "," ",$r_send[sendcontent]) ;
$sendcontent = nl2br(stripslashes($sendcontent)) ;
}elseif($r_send[sendkind] =="1") {
$sendcontent = stripslashes($r_send[sendcontent]);
}
# »óÇ°º° Åë°è
if($r[srlno] != "" and $now != "ad") {
$basedate = date("Ym");
$r_stat_total = $dalib->selectSQLField("select srlno from $Table[ProductStat] where pcode = '$pcode' and basedate = 'total'");
if($r_stat_total[0]=="") {
$insertsql = "insert into $Table[ProductStat] set pcode = '$pcode',
pname = '$pname',
basedate = 'total',
view = '1'";
$dalib->directQuery($insertsql);
}else {
$dalib->directQuery("update $Table[ProductStat] set view = view + 1 where pcode = '$pcode' and basedate = 'total'");
}
$r_stat_view = $dalib->selectSQLField("select srlno from $Table[ProductStat] where pcode = '$pcode' and basedate = '$basedate'");
if($r_stat_view[0]=="") {
$insertsql = "insert into $Table[ProductStat] set pcode = '$pcode',
pname = '$pname',
basedate = '$basedate',
view = '1'";
$dalib->directQuery($insertsql);
}else {
$dalib->directQuery("update $Table[ProductStat] set view = view + 1 where pcode = '$pcode' and basedate = '$basedate'");
}
}
if($mode=="recom") {
if($find=="precom") $PreTitle .= "Ãßõ»óÇ° > ";
if($find=="pnew") $PreTitle .= "½Å»óÇ° > ";
if($find=="pbest") $PreTitle .= "º£½ºÆ® »óÇ° > ";
if($find=="ppopu") $PreTitle .= "Àαâ»óÇ° > ";
}elseif($menu=="search") {
$PreTitle .= "'$search' °Ë»ö > ";
}elseif($menu=="symp") {
$PreTitle = "$SYMP_TITLE > ";
}else {
if($bigcatename != "") $PreTitle .= "$bigcatename > ";
if($smcatenameTitle !="") $PreTitle .= "$smcatenameTitle > ";
}
$p_sale = "pcode_sale_".$pcode;
?>
if(file_exists($OpenMiddleImgPath.$r[p_image02]) and strlen($r[p_image01]) > 5){
?>
}else{
?>
}?>
', 100, 0, 700, 600, 0, 0, 0, 0, 0);" onFocus="this.blur()">
if($r['p_image04']!="" && $r['p_image05']!="")
{
$img_count = 3;
}else if($r['p_image04']!="" && $r['p_image05']==""){
$img_count = 2;
}else if($r['p_image04']=="" && $r['p_image05']==""){
$img_count = 0;
}
for($i=3;$i<=$img_count;$i++)
{
?>
if(file_exists($OpenBigImgPath.$r[p_image0.$i])){
?>
}else{
?>
}?>
}?>
$result = $dalib->selectSQLField("select bigcate, smcate, thirdcate from $Table[Product] where pcode='$pcode'");
$r_bigcate=$r['bigcate'];
$r_smcate=$r['smcate'];
$r_thirdcate=$r['thirdcate'];
$r_cateorder = $r['cateorder'];
$result_max = $dalib->selectSQLField("select max(cateorder) as max_cateorder, min(cateorder) as min_cateorder from $Table[Product] where bigcate='$r_bigcate' and smcate='$r_smcate' and thirdcate='$r_thirdcate'");
$max_cateorder = $result_max['max_cateorder'];
$min_cateorder = $result_max['min_cateorder'];
if($r_cateorder==$min_cateorder){
$prev = "";
}else{
$result2=$dalib->selectSQLField("select pcode from $Table[Product] where bigcate='$r_bigcate' and smcate='$r_smcate' and thirdcate='$r_thirdcate' and cateorder=$r_cateorder-1");
if($result2){
$prev = " ";
}
}
if($r_cateorder==$max_cateorder){
$next = "";
}else{
$result3=$dalib->selectSQLField("select pcode from $Table[Product] where bigcate='$r_bigcate' and smcate='$r_smcate' and thirdcate='$r_thirdcate' and cateorder=$r_cateorder+1");
if($result3){
$next = " ";
}
}
$cate_list = " ";
echo "
";
?>
if($r[pnew]=="1") {?>
}
if($r[ppopu]=="1") {?>
}
if($r[pbest]=="1") {?>
}?>
}?>
}?>
}?>
/
-
for($loop=1;$loop<=36;$loop++) {
if($rstock["k_".$loop]=="") continue;
?>
}?>
global $value;
$value = 1;
for($nLoop=1;$nLoop<=36;$nLoop++) {
if($rstock2["k_".$nLoop]=="") continue;
?>
for($loop=1;$loop<=36;$loop++) {
$value--;
$value++;
$Count++;
if($rstock["k_".$loop]=="") continue;
$item01 = $rstock["k_".$loop];
$item02 = $rstock2["k_".$nLoop];
$jancode = $rstock3["k_".$value];
if($_Table == "$Table[Product]"){
$jcode = $dalib->selectSQLField("select stock_amount, psellprice, sale from $_Table where pcode='$pcode'");
$totalAmount = $jcode[stock_amount];
if(eregi("#",$jancode)){
$optionPrice = explode("#",$jancode);
$jcode[psellprice] = $optionPrice[1];
}
}else{
//echo ("select amount, bonsaAmount, psellprice, sale from $_Table where jancode='$jancode'");
$jcode = $dalib->selectSQLField("select amount, bonsaAmount, psellprice, sale from $_Table where jancode='$jancode'");
$totalAmount = $jcode[amount] + $jcode[bonsaAmount];
}
//$jcode = $dalib->selectSQLField("select amount, bonsaAmount, psellprice, sale from $_Table where jancode='$jancode'");
if($self_sale>0){
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
//$psellprice = floor(($jcode[psellprice]*(1-($jcode[sale]/100))-$jcode[psellprice]/100*$affiPerSale)/100)*100;
$psellprice = floor($jcode[psellprice]*(1-($affiPerSale/100))*(1-($rowSale[sale]/100)));
}else{
$psellprice = $jcode[psellprice];
}
}else{
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
//$psellprice = floor(($jcode[psellprice]*(1-($jcode[sale]/100))-$jcode[psellprice]/100*$affiPerSale)/100)*100;
$psellprice = floor($jcode[psellprice]*(1-($affiPerSale/100))*(1-($jcode[sale]/100)));
}else{
$psellprice = $jcode[psellprice];
}
}
$item = $item01."#".$item02."#".$value."#".$jancode."#".$psellprice;
//$totalAmount = $jcode[amount] + $jcode[bonsaAmount];
if($totalAmount>0 and strlen($jancode)>0 ){
if($r[pcompany]=="DAIWA" || $r[pcompany]=="SHIMANO"){
$STATE = " ";
}else{
$STATE = " ";
}
}else{
if(strlen($jancode)>=5) $STATE = "X";
else $STATE = "-";
}
/*
if($rstock3["k_".$Count]>0) $STATE = "
$value++;
}
?>
}?>
}?>
if($menu=="search") $url = "../search/search.php?page=$page&search=$search&orname=$orname&orsun=$orsun";
else $url = "/index.php";
?>
}else{?>
}?>
$relation_pcode = substr($pcode,0,-1);
$result = $dalib->selectSQLAll("select * from $Table[Product] where pcode like '$relation_pcode%' and pcode not like '$pcode' and display = '1' and completion='1' and (pcompany='DAIWA' || pcompany='SHIMANO') order by pname desc limit 0, 4");
$COL = 4; //°¡·Î
$ROW = 1; //¼¼·Î
for ($row = 0; $row <= $ROW-1; $row++) {
$beginlist = $row*$COL;
$endlist = $row*$COL+$COL-1;
?>
for ($col = $beginlist; $col <= $endlist; $col++) {
@mysql_data_seek($result[result],$col);
$r = @mysql_fetch_array($result[result]);
$pname = stripslashes($r[pname]);
$pcompany = stripslashes($r[pcompany]);
//$affiSale = $r[psellprice]/10; // ȸ¿ø±¸¸Å½Ã 10%ÇÒÀÎ, ¿ø·¡ ºÎ³¬È¸¿ø ÇÒÀÎÇÒ·Á±¸ ÇßÀ½
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
$psellprice = floor(($r[psellprice]*(1-($r[sale]/100))-$r[psellprice]/100*$affiPerSale)/100)*100;
}else{
$psellprice = $r[psellprice];
}
if($pname=="") {
?>
}else{
$img_info = @getimagesize($OpenSmallImgPath.$r[p_image01]);
if($img_info[0] > 0 && $img_info[1] > 0){
if($img_info[0]>=$img_info[1]){
$small_width = "100";
$small_height = $small_width*$img_info[1]/$img_info[0];
}else{
$small_height = "100";
$small_width = $small_height*$img_info[0]/$img_info[1];
}
}else{
$small_height = "100";
$small_width = "100";
}
if($r[sale]>0) {
$sale = '';
}else{
$sale = "";
}
?>
}
}
?>
}?>
//$pattern = '/^ ";
//echo $pcontents;
//}else{
echo $pcontents;
//}
?>
¹è¼ÛÁö¿ª : Àü±¹
¹è¼Ûºñ : 10¸¸¿øÀÌ»ó ±¸¸Å½Ã ¹«·á¹è¼Û ÀÔ´Ï´Ù.
(µµ¼,»ê°£,¿ÀÁö ÀϺÎÁö¿ªÀº ¹è¼Ûºñ°¡ Ãß°¡µÉ ¼ö ÀÖ½À´Ï´Ù.)
Æò±Õ¹è¼ÛÀÏ : ÀÔ±ÝÈ®ÀÎÈÄ Æò±Õ ´çÀÏ,1,2ÀÏ ÀÌÈÄ¿¡ ¹è¼ÛµË´Ï´Ù.
- ¹è¼ÛÀº 15½Ã ÀÌÀü ÁÖ¹®¿¡ ÇÑ¿¡ ´çÀÏ ¶Ç´Â ÀÍÀÏ ¹è¼ÛµË´Ï´Ù.
- Åä¿äÀÏ/°øÈÞÀÏÀº ¹è¼Û±â°£¿¡ Æ÷ÇÔµÇÁö ¾Ê½À´Ï´Ù.
- µµ¼/»ê°£Áö¿ªÀº 2~3ÀÏ Á¤µµ Ãß°¡ ¼Ò¿äµË´Ï´Ù.
- ºÒ°¡Ç×·ÂÀû(ÀϽÃÇ°Àý, õÀçÁöº¯,¸íÀýµîÀÇ ÅùèÆøÁֽõî)ÀÎ »çÀ¯·Î ¹è¼ÛÀÌ ´Ù¼Ò ´Ê¾îÁú¼ö ÀÖ½À´Ï´Ù.
±³È¯ ¹× ¹ÝÇ°ÀÌ °¡´ÉÇÑ °æ¿ì :
- »óÇ°À» °ø±Þ ¹ÞÀ¸½Å ³¯·ÎºÎÅÍ 7ÀÏÀ̳»
- °ø±Þ ¹ÞÀ¸½Å »óÇ° ¹× ¿ë¿ªÀÇ ³»¿ëÀÌ Ç¥½Ã, ±¤°í ³»¿ë°ú ´Ù¸£°Å³ª ´Ù¸£°Ô ÀÌÇàµÈ °æ¿ì¿¡´Â °ø±Þ ¹ÞÀº ³¯·ÎºÎÅÍ 1¿ù À̳»,
±× »ç½ÇÀ» ¾Ë°Ô µÈ ³¯ ¶Ç´Â ¾Ë ¼ö ÀÖ¾ú´ø ³¯·ÎºÎÅÍ 1ÁÖÀÏ À̳»
±³È¯ ¹× ¹ÝÇ°ÀÌ ºÒ°¡´ÉÇÑ °æ¿ì :
- °í°´´ÔÀÇ Ã¥ÀÓ ÀÖ´Â »çÀ¯·Î »óÇ°ÀÌ ¸ê½Ç ¶Ç´Â ÈÑ¼ÕµÈ °æ¿ì.
- Æ÷ÀåÀ» °³ºÀÇÏ¿´°Å³ª Æ÷ÀåÀÌ ÈÑ¼ÕµÇ¾î »óÇ°°¡Ä¡°¡ ÇöÀúÈ÷ »ó½ÇµÈ °æ¿ì
- Æ÷Àå °³ºÀ ÈÄ ¼³Ä¡ ȤÀº »ç¿ëÇÏ¿© »óÇ°°¡Ä¡°¡ ÇöÀúÈ÷ »ó½ÇµÈ °æ¿ì ¹ÝÇ°, ȯºÒÀÌ µÇÁö ¾Ê½À´Ï´Ù.
- °í°´ º¯½É¿¡ ÀÇÇÑ ¹ÝÇ°, ±³È¯½Ã¿¡´Â °í°´²²¼ ¹è¼Û·á¸¦ ºÎ´ãÇÏ¼Å¾ß ÇÕ´Ï´Ù.
´Ü, »óÇ°ºÒ·®, ÆļÕ, ÁÖ¹®³»¿ª°ú ´Ù¸¥ »óÇ°ÀÌ ¹è¼ÛµÇ¾úÀ» °æ¿ì ¹«·áÀÔ´Ï´Ù.
- ¹Ý¼Û½Ã ¹Ýµå½Ã ÇØ´ç °í°´¼¾ÅÍ·Î ¹ÝÇ°»ó´ã Á¢¼öÈÄ »ó´ã¿øÀÇ ¾È³»¿¡ µû¶ó ¹Ý¼Ûó¸®ÇØÁÖ¼Å¾ß ¹Ýǰó¸® °¡´ÉÇÕ´Ï´Ù.
!!!! »óÇ°À» °ø±Þ¹ÞÀ¸½Å ³¯·ÎºÎÅÍ 15ÀÏÀÌ»ó³Ñ¾î°¬À» °æ¿ì ¾î¶² °³ÀÎÀûÀÎ »çÀ¯·Îµµ ±³È¯ ¹× ¹ÝÇ° ¾ÈµË´Ï´Ù.!!