function pdfFile() { $link = pdfInfo('link'); $hits = pdfInfo('pdfed'); if (substr_count($link, "http://") > 0) { $file = "{$link}"; } else { $file = FUrl . "{$link}"; } /********** update pdfed hist ************/ if (!file_exists($file)) { $file = "http://" . siteConfig('site_url') . "{$link}"; } header("Content-Disposition: attachment; filename=\"" . basename($file) . "\""); header("Content-Length: " . filesize($file)); header("Content-Type: application/octet-stream;"); readfile($file); }
$author_reply = str_replace("\n", "<br>", $author_reply); $author_reply = str_replace("[b]", "<b>", $author_reply); $author_reply = str_replace("[/b]", "</b>", $author_reply); $author_reply = str_replace("[i]", "<i>", $author_reply); $author_reply = str_replace("[/i]", "</i>", $author_reply); $author_reply = str_replace("[u]", "<u>", $author_reply); $author_reply = str_replace("[/u]", "</u>", $author_reply); if ($com['status'] == 0) { $sts = 'hidden'; } else { $sts = ''; } echo "<div class='inner-comment{$s} {$sts}' id='comment-{$no}'>"; echo "<div class='avatar-comment'>{$img}</div>"; echo "<div class='right-comment'><span class='title'>{$com['title']}</span> by {$name} on {$com['date']}<div class='main-comment'><span><i><a href='" . getLink() . "#comment-{$no}' title='comment permalink'>#{$no}</a></i></span> {$comment} "; if (USER_ID == pdfInfo('author_id')) { ?> <form method="post"> <input type="hidden" value="<?php echo $com['id']; ?> " name="id"> <b>Your reply here : </b><br> <textarea name="text" rows="4" style="max-width:96.5%; min-width:96.5%" placeholder="Your reply here!"><?php echo $com['author_reply']; ?> </textarea> <br> <input style=" cursor:pointer" type="submit" value="Send Now" class="button" name="reply"> <?php if ($com['status'] == 1) {
<?php include_once '../connection/connection.php'; function pdfInfo($id) { $connection = connect(); $data = 'select * from product inner join user on product.userEmail=user.email where product.productId=' . $id; $execute = $connection->query($data); $result = $execute->fetch_object(); return $result; } $id = $_REQUEST['id']; $result = pdfInfo($id); ?> <html> <head> <link rel="stylesheet" type="text/css" href="../css/style.css"> </head> <body> <div class=Header> </div> <div> <img src="../product/<?php echo $result->productImage; ?> " width="200px" height="200px"></div> PRODUCT NAME : <?php echo $result->productName . "<br/>"; ?> PRICE : <?php echo $result->productPrice . "<br/>"; ?>