0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
[
Home
]
File: make_offer.php
<? require('includes/config.php'); $catalog_id=$_GET['cat']; $product_id=$_GET['product_id']; $q_catalog="select * from catalog where catalog_id='".$catalog_id."'"; $r_catalog=mysql_query($q_catalog); $row_catalog=mysql_fetch_array($r_catalog); $q_product_list="select * from product_details where catalog_id='".$catalog_id."' and `product_id`='".$product_id."'"; $r_product_list=mysql_query($q_product_list); $row_product_list=mysql_fetch_array($r_product_list); $q_small_image="select * from configuration where configuration_id='6'"; $r_small_image=mysql_query($q_small_image); $row_small_image=mysql_fetch_array($r_small_image); $width_height=explode("x",$row_small_image['configuration_value']); $small_width=(int)$width_height[0]/2; $small_height=(int)$width_height[1]/2; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #006699; } .style2 {color: #FF0000} body { background-color: #E1F0FF; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .style3 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #006699; font-weight: bold; } .style4 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #ffffff; font-weight: bold; } --> </style> </head> <body> <? if($_POST['Submit']=="Make Offer" && $_POST['offer_price']!='' && $_POST['name']!='' && $_POST['email']!='') { $_SESSION['msg']=''; if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", trim($_POST['email']))) { $_SESSION['msg']=$_SESSION['msg']."Email Address is not in proper format<br>"; } else { include('submit_make_offer.php'); exit(); } } ?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="23" colspan="2" align="left" valign="middle" background="images/button-back.jpg" class="style4" style="padding:5px;"><?=$row_catalog['catalog_name']?> >> <?=$row_product_list['product_name']?></td> </tr> <tr> <td align="center" valign="middle" style="padding:10px;" width="<?=$small_width?>"> <img src="<?=$row_product_list['product_main_image_path']?>" width="<?=$small_width?>" height="<?=$small_height?>" border="1" alt="<?=$row_product_list['product_small_description']?>"> </td> <td align="left" valign="top" class="style3" style="padding:10px;"><?=str_replace("<p>","",$row_product_list['product_small_description'])?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><form id="form1" name="form1" method="post" action="" style="margin:0px;"> <table width="400" border="0" cellspacing="0" cellpadding="1" style="border:1px solid #006699"> <tr> <td width="155" align="right" valign="middle" class="style1"><span class="style1">Product Current Price </span>: </td> <td width="245" align="left" valign="middle" class="style3">$ <?=$row_product_list['product_price']?></td> </tr> <tr> <td align="right" valign="middle" class="style1">Your Offer Price </td> <td align="left" valign="middle" class="style1"><input name="offer_price" type="text" class="style1" id="offer_price" value="<?=$_POST['offer_price']?>" /></td> </tr> <tr> <td align="right" valign="middle" class="style1">Your Name </td> <td align="left" valign="middle" class="style1"><input name="name" type="text" class="style1" id="name" value="<?=$_POST['name']?>" /></td> </tr> <tr> <td align="right" valign="middle" class="style1">Your Email </td> <td align="left" valign="middle" class="style1"><input name="email" type="text" class="style1" id="email" value="<?=$_POST['email']?>" /></td> </tr> <tr> <td align="right" valign="middle" class="style1">Contact No. </td> <td align="left" valign="middle" class="style1"><input name="contact" type="text" class="style1" id="contact" value="<?=$_POST['contact']?>" /></td> </tr> <tr> <td align="right" valign="middle" class="style1"><input name="cat" type="hidden" id="cat" value="<?=$_GET['cat']?>" /> <input name="product_id" type="hidden" id="product_id" value="<?=$_GET['product_id']?>" /></td> <td align="left" valign="middle" class="style1"><input name="Submit" type="submit" class="style1" value="Make Offer" /></td> </tr> </table> </form> </td> </tr> </table> </body> </html>