GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/
Upload File :
Current File : /home/serb/www/review.php

<? session_start();
 include("lib/globals.php");
 include("lib/common.php");
 include("lib/functions.php");
 ?>
 <? 
if($_POST)
{
	$sql_prlid="select * from massageparlor where id='".$_GET['parlor_id']."'";	
	$res_prlid=execute_query($sql_prlid);
	$row_prlid=mysql_fetch_array($res_prlid);
	
	$date=date('Y-m-d');
	$desc=addslashes($_POST['userComent']);
	$ins="INSERT INTO parlor_review(id,parlor_id,user_id,rating,coment,date) VALUES('','".$row_prlid['id']."','".$_SESSION['userid']."','".$_POST['userRating']."','$desc','$date')";
	execute_query($ins);
	$no_of_review=$row_prlid['review_count'];
	$update_review=$no_of_review + 1;
	$sql_updatereview="update massageparlor set  review_count='$update_review' where id='".$_GET['parlor_id']."'";
	execute_query($sql_updatereview);
	?>
    <script language="javascript">
    	location.href="massageparlor-details.php?parlor_id=<?=$row_prlid['id']?>&city_id=<?=$row_prlid['city_id']?>";
    </script>
    <?
}
?>
<? include "includes/header_top.php";?>
<script language="javascript">
	function validate()
	{
		
				
		if(document.review_frm.userName.value=="")
		{
			alert("Enter your username");
			document.review_frm.userName.focus();
			return false;
		}
		
		if(document.review_frm.userComent.value=="")
		{
			alert("Enter Coment/Notes Code");
			document.review_frm.userComent.focus();
			return false;
		}
		
		
		/*if(document.f1.check.checked!=true)
		{
			alert("You need to check your age.");
			return false;
		}*/
	}
</script>
<body>

<? include "includes/header.php";?>
<div class="wrapper">
 <div class="inside_wrapper">   
 	<div class="inside_wrp_top">
    	<div class="insd_wr_top">Post Your Review</div>
        <div class="insd_wr_mid">
        	<? $sql_prlid="select * from massageparlor where id='".$_GET['porlar_id']."'";
				 $res_prlid=execute_query($sql_prlid);
	  			 $row_prlid=mysql_fetch_array($res_prlid);
				 ?>
        <p style="font-size:18px; font-family:Arial, Helvetica, sans-serif; font:bold; padding-top:10px; text-align:center;">You are about to leave a review for <?=$row_prlid['name']?> </p>
        	<form action="<?=$_SERVER['PHP_SELF'] ?>?parlor_id=<?=$row_prlid['id']?>" method="post" name="review_frm" style="margin: 0px; padding: 0px;" onSubmit="return validate();">
		<input name="submit_form" value="1" type="hidden">
		<table class="join_table2" border="0" cellpadding="0" cellspacing="0">
         <tr>
          <td>Name :</td>
          <td>&nbsp;<input name="userName" id="uname" value=<?=$_SESSION['user']?> class="main_input"  type="text"><br/>           
          </td>
          <td></td>
         </tr>
         <tr>
          <td>Rating :</td>
          <td>&nbsp;<select name="userRating" id="userrati" class="main_input">         
                     <option selected="selected"  value="1">1</option>
                     <option  value="2">2</option>
                     <option  value="3">3</option>
                     <option  value="4">4</option>
                     <option  value="5">5</option>             
                    </select><br/>           
          </td>
          <td></td>
         </tr>
         <tr>
          <td>Coments/Note :</td>
          <td><textarea name="userComent" style="width:300px; height:150px; margin-left:5px;"></textarea><br/>          
          </td>
          <td></td>
         </tr>
         <tr>
              <td></td>
              <td></td>
         </tr>
    
                
         <tr>
          <td></td>
          <td>
           <input src="images/submit.png" type="image"  style="margin-left:20px;"/>
          </td>
          <td></td>
         </tr>
         <tr>
          <td></td>
          <td></td>
          <td></td>
         </tr>
         <tr>
          <td></td>
          <td></td>
          <td></td>
         </tr>
        </table>
      </form>
        
        </div>
        <div class="insd_wr_bottom"></div>
    </div>
 
 
 
 
   
     <!--<div class="upload_pic">			
        <h1>Post Your Review</h1>
        <div align="center">
         <? $sql_prlid="select * from massageparlor where id='".$_GET['porlar_id']."'";
				 $res_prlid=execute_query($sql_prlid);
	  			 $row_prlid=mysql_fetch_array($res_prlid);
				 ?>
        <p style="font-size:18px; font-family:Arial, Helvetica, sans-serif; font:bold; padding-top:10px;">You are about to leave a review for <?=$row_prlid['name']?> </p>
     <form action="<?=$_SERVER['PHP_SELF'] ?>?parlor_id=<?=$row_prlid['id']?>" method="post" name="review_frm" style="margin: 0px; padding: 0px;" onSubmit="return validate();">
		<input name="submit_form" value="1" type="hidden">
		<table class="join_table" border="0" cellpadding="0" cellspacing="0">
         <tr>
          <td>Name :</td>
          <td>&nbsp;<input name="userName" id="uname" value=<?=$_SESSION['user']?> class="main_input"  type="text"><br/>           
          </td>
          <td></td>
         </tr>
         <tr>
          <td>Rating :</td>
          <td>&nbsp;<select name="userRating" id="userrati" class="main_input">         
                     <option selected="selected"  value="1">1</option>
                     <option  value="2">2</option>
                     <option  value="3">3</option>
                     <option  value="4">4</option>
                     <option  value="5">5</option>             
                    </select><br/>           
          </td>
          <td></td>
         </tr>
         <tr>
          <td>Coments/Note :</td>
          <td><textarea name="userComent" style="width:300px; height:150px; margin-left:5px;"></textarea><br/>          
          </td>
          <td></td>
         </tr>
         <tr>
              <td></td>
              <td></td>
         </tr>
    
              </tbody>
          </table>
          </td>
          <td></td>
         </tr>         
         <tr>
          <td></td>
          <td>
           <input src="images/submit.png" type="image" width="100" height="32" style="margin-left:20px;"/>
          </td>
          <td></td>
         </tr>
         <tr>
          <td></td>
          <td></td>
          <td></td>
         </tr>
         <tr>
          <td></td>
          <td></td>
          <td></td>
         </tr>
        </table>
      </form>
   </div> 
  </div>-->
     </div>
     
  </div>
</div>
<br class="spacer" />

<? include "includes/footer.php";?>

./BlackJoker Mini Shell 1.0