switch ($r_ppopu[pcompany]){
case SHIMANO : $affiPerSale = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale = $RMANAGE[etcaffiPerSale];
}
switch ($r2_ppopu[pcompany]){
case SHIMANO : $affiPerSale2 = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale2 = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale2 = $RMANAGE[etcaffiPerSale];
}
switch ($r3_ppopu[pcompany]){
case SHIMANO : $affiPerSale3 = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale3 = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale3 = $RMANAGE[etcaffiPerSale];
}
if($result_ppopu[rnum] > 2) {
$rClient = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r_ppopu[pcode]'");
if($rClient[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table = "domefishing.Barcode";
}elseif($rClient[client]=="À±¼ºÁ¶±¸"){
$_Table = "domefishing.ShimanoBarcode";
}else{
$_Table = "$Table[Product]";
}
$rClient2 = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r_ppopu2[pcode]'");
if($rClient2[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table2 = "domefishing.Barcode";
}elseif($rClient2[client]=="À±¼ºÁ¶±¸"){
$_Table2 = "domefishing.ShimanoBarcode";
}else{
$_Table2 = "$Table[Product]";
}
$rClient3 = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r_ppopu3[pcode]'");
if($rClient3[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table3 = "domefishing.Barcode";
}elseif($rClient3[client]=="À±¼ºÁ¶±¸"){
$_Table3 = "domefishing.ShimanoBarcode";
}else{
$_Table3 = "$Table[Product]";
}
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y") {
if($_Table == "$Table[Product]"){
$minPsellprice = $r_ppopu[psellprice];
$minPsellprice2 = $r_ppopu2[psellprice];
$minPsellprice3 = $r_ppopu3[psellprice];
}else{
$Mresult = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r_ppopu[pcode]'");
if($Mresult[rnum]>0) {
$row = @mysql_fetch_array($Mresult[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 from $_Table where ($cWhere) and psellprice > 0");
$minPsellprice = $rPs[psellprice];
}else{
$minPsellprice = $r_ppopu[psellprice];
}
$Mresult2 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r2_ppopu[pcode]'");
if($Mresult2[rnum]>0) {
$row2 = @mysql_fetch_array($Mresult2[result]);
for($loop2=1;$loop2<=20;$loop2++) {
if($row2["k_".$loop2]=="") continue;
$cWhere2 .= "jancode='".$row2["k_".$loop2]."' or ";
}
$cWhere2 = substr($cWhere2, 0, -3);
$rPs2 = $dalib->selectSQLField("select MIN(psellprice) as psellprice2 from $_Table2 where ($cWhere2) and psellprice > 0");
$minPsellprice2 = $rPs2[psellprice2];
}else{
$minPsellprice2 = $r2_ppopu[psellprice];
}
$Mresult3 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r3_ppopu[pcode]'");
if($Mresult3[rnum]>0) {
$row3 = @mysql_fetch_array($Mresult3[result]);
for($loop3=1;$loop3<=20;$loop3++) {
if($row3["k_".$loop3]=="") continue;
$cWhere3 .= "jancode='".$row3["k_".$loop3]."' or ";
}
$cWhere3 = substr($cWhere3, 0, -3);
$rPs3 = $dalib->selectSQLField("select MIN(psellprice) as psellprice3 from $_Table3 where ($cWhere3) and psellprice > 0");
$minPsellprice3 = $rPs3[psellprice3];
}else{
$minPsellprice3 = $r3_ppopu[psellprice];
}
}
$r_ppopu_psellprice = floor(($minPsellprice*(1-($r_ppopu[persale]/100))-$minPsellprice/100*$affiPerSale)/100)*100;
$r2_ppopu_psellprice = floor(($minPsellprice2*(1-($r2_ppopu[persale]/100))-$minPsellprice2/100*$affiPerSale2)/100)*100;
$r3_ppopu_psellprice = floor(($minPsellprice3*(1-($r3_ppopu[persale]/100))-$minPsellprice3/100*$affiPerSale3)/100)*100;
$member_sale_txt = "ȸ¿øƯ°¡";
}else{
$r_ppopu_psellprice = $r_ppopu[psellprice]*(1-($r_ppopu[persale]/100));
$r2_ppopu_psellprice = $r2_ppopu[psellprice]*(1-($r2_ppopu[persale]/100));
$r3_ppopu_psellprice = $r3_ppopu[psellprice]*(1-($r3_ppopu[persale]/100));
}
$cWhere = "";
$cWhere2 = "";
$cWhere3 = "";
?>
"> |
"> |
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
echo("".number_format($r_ppopu[psellprice])."¿ø(".number_format($r_ppopu[psellprice]/100*$affiPerSale)."ÇÒÀÎ) ");
}
?>=$member_sale_txt?> =number_format($r_ppopu_psellprice);?> ¿ø |
|
|
|
|
"> |
"> |
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
echo("".number_format($r2_ppopu[psellprice])."¿ø(".number_format($r2_ppopu[psellprice]/100*$affiPerSale2)."ÇÒÀÎ) ");
}
?>
=$member_sale_txt?> =number_format($r2_ppopu_psellprice);?> ¿ø
|
|
|
|
|
|
"> |
"> |
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y"){
echo("".number_format($r3_ppopu[psellprice])."¿ø(".number_format($r3_ppopu[psellprice]/100*$affiPerSale3)."ÇÒÀÎ) ");
}
?>
=$member_sale_txt?>=number_format($r3_ppopu_psellprice);?> ¿ø
|
|
|
|
|
}?>
|
|
$loop='';
while($r = mysql_fetch_array($result2[result])) {
$loop++;
if($r[smcate]=="$smcate") $SMTITLE = " $r[smcatename] ";
else $SMTITLE = "$r[smcatename]";
?>
}?>
|
}elseif($mode != "recom" && $smcate!="") {?>
|
}?>
|
$loop='';
while($r = mysql_fetch_array($result2[result])) {
$loop++;
if($r[smcate]=="$smcate") $SMTITLE = " $r[smcatename] ";
else $SMTITLE = "$r[smcatename]";
?>
}?>
|
|
|
$loop='';
while($r = mysql_fetch_array($result3[result])) {
$loop++;
if($r[pcompany]=="$pcompany") $THIRDTITLE = " $r[pcompany] ";
else $THIRDTITLE = "$r[pcompany]";
?>
}?>
|
|
|
|
}?>
for($nLoop=$startRecord;$nLoop<=$endRecord-1;$nLoop++) {
@mysql_data_seek($result[result],$nLoop);
$r = @mysql_fetch_array($result[result]);
@mysql_data_seek($result[result],$nLoop+1);
$r2 = @mysql_fetch_array($result[result]);
@mysql_data_seek($result[result],$nLoop+2);
$r3 = @mysql_fetch_array($result[result]);
@mysql_data_seek($result[result],$nLoop+3);
$r4 = @mysql_fetch_array($result[result]);
$pname = $r[pname];
$pname2 = $r2[pname];
$pname3 = $r3[pname];
$pname4 = $r4[pname];
$eng_pname = $r[eng_pname];
$eng_pname2 = $r2[eng_pname];
$eng_pname3 = $r3[eng_pname];
$eng_pname4 = $r4[eng_pname];
$pcompany = $r[pcompany];
$pcompany2 = $r2[pcompany];
$pcompany3 = $r3[pcompany];
$pcompany4 = $r4[pcompany];
switch ($pcompany){
case SHIMANO : $affiPerSale = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale = $RMANAGE[etcaffiPerSale];
}
switch ($pcompany2){
case SHIMANO : $affiPerSale2 = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale2 = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale2 = $RMANAGE[etcaffiPerSale];
}
switch ($pcompany3){
case SHIMANO : $affiPerSale3 = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale3 = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale3 = $RMANAGE[etcaffiPerSale];
}
switch ($pcompany4){
case SHIMANO : $affiPerSale4 = $RMANAGE[shimanoaffiPerSale];
break;
case DAIWA : $affiPerSale4 = $RMANAGE[daiwaaffiPerSale];
break;
default : $affiPerSale4 = $RMANAGE[etcaffiPerSale];
}
$rClient = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r[pcode]'");
if($rClient[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table = "domefishing.Barcode";
}elseif($rClient[client]=="À±¼ºÁ¶±¸"){
$_Table = "domefishing.ShimanoBarcode";
}else{
$_Table = "$Table[Product]";
}
$rClient2 = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r2[pcode]'");
if($rClient2[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table2 = "domefishing.Barcode";
}elseif($rClient2[client]=="À±¼ºÁ¶±¸"){
$_Table2 = "domefishing.ShimanoBarcode";
}else{
$_Table2 = "$Table[Product]";
}
$rClient3 = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r3[pcode]'");
if($rClient3[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table3 = "domefishing.Barcode";
}elseif($rClient3[client]=="À±¼ºÁ¶±¸"){
$_Table3 = "domefishing.ShimanoBarcode";
}else{
$_Table3 = "$Table[Product]";
}
$rClient4 = $dalib->selectSQLField("select client, sale from $Table[Product] where pcode='$r4[pcode]'");
if($rClient4[client]=="Çѱ¹´ÙÀÌ¿ÍÁ¤°ø"){
$_Table4 = "domefishing.Barcode";
}elseif($rClient4[client]=="À±¼ºÁ¶±¸"){
$_Table4 = "domefishing.ShimanoBarcode";
}else{
$_Table4 = "$Table[Product]";
}
if($_COOKIE[$CookieIDName]!="" or $RMANAGE[member_sale_ok]=="Y") {
if($_Table == "$Table[Product]"){
$minPsellprice = $r[psellprice];
$minPsellprice2 = $r2[psellprice];
$minPsellprice3 = $r3[psellprice];
$minPsellprice4 = $r4[psellprice];
}else{
$Mresult = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r[pcode]'");
if($Mresult[rnum]>0) {
$row = @mysql_fetch_array($Mresult[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");
$minPsellprice = $rPs[psellprice];
}else{
$minPsellprice = $r[psellprice];
}
//echo ("select * from $Table[ProductStockSetting] where pcode = '$r2[pcode]'"); exit;
$Mresult2 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r2[pcode]'");
if($Mresult2[rnum]>0) {
$row2 = @mysql_fetch_array($Mresult2[result]);
for($loop2=1;$loop2<=20;$loop2++) {
if($row2["k_".$loop2]=="") continue;
$cWhere2 .= "jancode='".$row2["k_".$loop2]."' or ";
}
$cWhere2 = substr($cWhere2, 0, -3);
$rPs2 = $dalib->selectSQLField("select MIN(psellprice) as psellprice2, MAX(sale) as sale2 from $_Table2 where ($cWhere2) and psellprice > 0");
$minPsellprice2 = $rPs2[psellprice2];
}else{
$minPsellprice2 = $r2[psellprice];
}
$Mresult3 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r3[pcode]'");
if($Mresult3[rnum]>0) {
$row3 = @mysql_fetch_array($Mresult3[result]);
for($loop3=1;$loop3<=20;$loop3++) {
if($row3["k_".$loop3]=="") continue;
$cWhere3 .= "jancode='".$row3["k_".$loop3]."' or ";
}
$cWhere3 = substr($cWhere3, 0, -3);
$rPs3 = $dalib->selectSQLField("select MIN(psellprice) as psellprice3, MAX(sale) as sale3 from $_Table3 where ($cWhere3) and psellprice > 0");
$minPsellprice3 = $rPs3[psellprice3];
}else{
$minPsellprice3 = $r3[psellprice];
}
$Mresult4 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r4[pcode]'");
if($Mresult4[rnum]>0) {
$row4 = @mysql_fetch_array($Mresult4[result]);
for($loop4=1;$loop4<=20;$loop4++) {
if($row4["k_".$loop4]=="") continue;
$cWhere4 .= "jancode='".$row4["k_".$loop4]."' or ";
}
$cWhere4 = substr($cWhere4, 0, -3);
$rPs4 = $dalib->selectSQLField("select MIN(psellprice) as psellprice4, MAX(sale) as sale4 from $_Table4 where ($cWhere4) and psellprice > 0");
$minPsellprice4 = $rPs4[psellprice4];
}else{
$minPsellprice4 = $r4[psellprice];
}
}
/*
$psellprice = floor(($minPsellprice*(1-($r[persale]/100))-$minPsellprice/100*$affiPerSale)/100)*100;
$psellprice2 = floor(($minPsellprice2*(1-($r2[persale]/100))-$minPsellprice2/100*$affiPerSale2)/100)*100;
$psellprice3 = floor(($minPsellprice3*(1-($r3[persale]/100))-$minPsellprice3/100*$affiPerSale3)/100)*100;
$psellprice4 = floor(($minPsellprice4*(1-($r4[persale]/100))-$minPsellprice4/100*$affiPerSale4)/100)*100;
$psellprice = floor($minPsellprice*(1-($affiPerSale/100))*(1-($rPs[sale]/100)));
$psellprice2 = floor($minPsellprice2*(1-($affiPerSale2/100))*(1-($rPs2[sale2]/100)));
$psellprice3 = floor($minPsellprice3*(1-($affiPerSale3/100))*(1-($rPs3[sale3]/100)));
*/
if($rClient[sale]>0) $psellprice = floor($minPsellprice*(1-($affiPerSale/100))*(1-($rClient[sale]/100)));
else $psellprice = floor($minPsellprice*(1-($affiPerSale/100))*(1-($rPs[sale]/100)));
if($rClient2[sale]>0) $psellprice2 = floor($minPsellprice2*(1-($affiPerSale2/100))*(1-($rClient2[sale]/100)));
else $psellprice2 = floor($minPsellprice2*(1-($affiPerSale2/100))*(1-($rPs2[sale2]/100)));
if($rClient3[sale]>0) $psellprice3 = floor($minPsellprice3*(1-($affiPerSale3/100))*(1-($rClient3[sale]/100)));
else $psellprice3 = floor($minPsellprice3*(1-($affiPerSale3/100))*(1-($rPs3[sale3]/100)));
if($rClient4[sale]>0) $psellprice4 = floor($minPsellprice4*(1-($affiPerSale4/100))*(1-($rClient4[sale]/100)));
else $psellprice4 = floor($minPsellprice4*(1-($affiPerSale4/100))*(1-($rPs4[sale4]/100)));
$member_sale_txt = "ȸ¿øƯ°¡";
}else{
if($_Table == "$Table[Product]"){
$minPsellprice = $r[psellprice];
$minPsellprice2 = $r2[psellprice];
$minPsellprice3 = $r3[psellprice];
$minPsellprice4 = $r4[psellprice];
}else{
$Mresult = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r[pcode]'");
if($Mresult[rnum]>0) {
$row = @mysql_fetch_array($Mresult[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 from $_Table where ($cWhere) and psellprice > 0");
$minPsellprice = $rPs[psellprice];
}else{
$minPsellprice = $r[psellprice];
}
//echo ("select * from $Table[ProductStockSetting] where pcode = '$r2[pcode]'"); exit;
$Mresult2 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r2[pcode]'");
if($Mresult2[rnum]>0) {
$row2 = @mysql_fetch_array($Mresult2[result]);
for($loop2=1;$loop2<=20;$loop2++) {
if($row2["k_".$loop2]=="") continue;
$cWhere2 .= "jancode='".$row2["k_".$loop2]."' or ";
}
$cWhere2 = substr($cWhere2, 0, -3);
$rPs2 = $dalib->selectSQLField("select MIN(psellprice) as psellprice2 from $_Table2 where ($cWhere2) and psellprice > 0");
$minPsellprice2 = $rPs2[psellprice2];
}else{
$minPsellprice2 = $r2[psellprice];
}
$Mresult3 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r3[pcode]'");
if($Mresult3[rnum]>0) {
$row3 = @mysql_fetch_array($Mresult3[result]);
for($loop3=1;$loop3<=20;$loop3++) {
if($row3["k_".$loop3]=="") continue;
$cWhere3 .= "jancode='".$row3["k_".$loop3]."' or ";
}
$cWhere3 = substr($cWhere3, 0, -3);
$rPs3 = $dalib->selectSQLField("select MIN(psellprice) as psellprice3 from $_Table3 where ($cWhere3) and psellprice > 0");
$minPsellprice3 = $rPs3[psellprice3];
}else{
$minPsellprice3 = $r3[psellprice];
}
$Mresult4 = $dalib->selectSQLAll("select * from $Table[ProductStockSetting] where pcode = '$r4[pcode]'");
if($Mresult4[rnum]>0) {
$row4 = @mysql_fetch_array($Mresult4[result]);
for($loop4=1;$loop4<=20;$loop4++) {
if($row4["k_".$loop4]=="") continue;
$cWhere4 .= "jancode='".$row4["k_".$loop4]."' or ";
}
$cWhere4 = substr($cWhere4, 0, -3);
$rPs4 = $dalib->selectSQLField("select MIN(psellprice) as psellprice4 from $_Table4 where ($cWhere4) and psellprice > 0");
$minPsellprice4 = $rPs4[psellprice4];
}else{
$minPsellprice4 = $r4[psellprice];
}
}
/*
$psellprice = $minPsellprice*(1-($r[persale]/100));
$psellprice2 = $minPsellprice2*(1-($r2[persale]/100));
$psellprice3 = $minPsellprice3*(1-($r3[persale]/100));
$psellprice4 = $minPsellprice4*(1-($r4[persale]/100));
*/
if($rClient[sale]>0) $psellprice = floor($minPsellprice*(1-($affiPerSale/100))*(1-($rClient[sale]/100)));
else $psellprice = floor($minPsellprice*(1-($affiPerSale/100))*(1-($rPs[sale]/100)));
if($rClient2[sale]>0) $psellprice2 = floor($minPsellprice2*(1-($affiPerSale2/100))*(1-($rClient2[sale]/100)));
else $psellprice2 = floor($minPsellprice2*(1-($affiPerSale2/100))*(1-($rPs2[sale2]/100)));
if($rClient3[sale]>0) $psellprice3 = floor($minPsellprice3*(1-($affiPerSale3/100))*(1-($rClient3[sale]/100)));
else $psellprice3 = floor($minPsellprice3*(1-($affiPerSale3/100))*(1-($rPs3[sale3]/100)));
if($rClient4[sale]>0) $psellprice4 = floor($minPsellprice4*(1-($affiPerSale4/100))*(1-($rClient4[sale]/100)));
else $psellprice4 = floor($minPsellprice4*(1-($affiPerSale4/100))*(1-($rPs4[sale4]/100)));
}
if($r[stock_amount]<1) $STOCK_IMG = "";
else $STOCK_IMG = "";
if($r2[stock_amount]<1) $STOCK_IMG2 = "";
else $STOCK_IMG2 = "";
if($r3[stock_amount]<1) $STOCK_IMG3 = "";
else $STOCK_IMG3 = "";
if($r4[stock_amount]<1) $STOCK_IMG4 = "";
else
?>
|
|
$nLoop = $nLoop + 3;
$cWhere = "";
$cWhere2 = "";
$cWhere3 = "";
$cWhere4 = "";
$rPs[sale] = "";
$rPs2[sale2] = "";
$rPs3[sale3] = "";
$rPs4[sale4] = "";
}
?>
|
|
|
|
|