Advertisement
Guest User

Untitled

a guest
Mar 19th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.87 KB | None | 0 0
  1. <?php
  2. ob_start();
  3. require_once('../blog/inc/config.php');
  4. $article_id = mysql_real_escape_string($_GET['id']);
  5. $comment_id = mysql_real_escape_string($_GET['id']);
  6. ?>
  7. <?php
  8. $amount_get = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "'"); $comments = mysql_num_rows($amount_get);
  9. $grab = mysql_query("SELECT * FROM articles WHERE id='" . mysql_real_escape_string($_GET['id']) . "' LIMIT 1");
  10.  
  11. $article = strip_tags(stripslashes($row['news_title']));
  12. $news_day =$row['news_day'];
  13. $news_month =$row['news_month'];
  14. $news_year =$row['news_year'];
  15. $news_date = $row['news_date'];
  16. $news_time = $row['news_time'];
  17.  
  18. if (mysql_num_rows($grab)==0) {
  19. echo "<h1>Error</h1>";
  20. echo "Lol";
  21. }
  22.  
  23. while($row = mysql_fetch_array($grab)){
  24. ?>
  25. <!DOCTYPE html>
  26. <html lang="en">
  27.  
  28. <head>
  29. <meta charset="UTF-8">
  30. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  31. <meta name="description" content="<?php echo $row['desc'] ?>">
  32. <meta name="author" content="<?php echo $row['news_author'] ?>">
  33. <meta name="keywords" content="<?php echo $row['meta_keys'] ?>">
  34.  
  35. <title>kris sales &raquo; <?php echo strip_tags(stripslashes($row['news_title'])) ?></title
  36.  
  37. <link rel="shortcut icon" href="../images/favicon.png" type="image/png">
  38.  
  39. <link rel="stylesheet" href="../css/main.css" media="screen">
  40. <link rel="stylesheet" href="../css/prettyPhoto.css" media="screen">
  41. <link rel="stylesheet" href="../css/facebox.css" media="screen">
  42.  
  43.  
  44. <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700' rel='stylesheet' type='text/css'>
  45.  
  46. <script src="../js/jquery-1.8.3.min.js"></script>
  47. <script src="../js/facebox.js"></script>
  48.  
  49. <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script>
  50. <script type="text/javascript">
  51. jQuery(document).ready(function($) {
  52. $('a[rel*=facebox]').facebox({
  53. loadingImage : '../img/loading.gif',
  54. closeImage : '../img/closelabel.png'
  55. })
  56. });
  57. $(window).bind("load", function() {
  58.  
  59. });
  60.  
  61. $(document).scroll(function() {
  62. var scrollFromTop = $(document).scrollTop();
  63. if (scrollFromTop >= 500) {
  64. $('.postComment').addClass('postCommentFixed');
  65. } else {
  66. $('.postComment').removeClass('postCommentFixed');
  67. }
  68. });
  69. </script>
  70. <script type="text/javascript">
  71. (function() {
  72. var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  73. po.src = 'https://apis.google.com/js/plusone.js';
  74. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  75. })();
  76. </script>
  77.  
  78. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  79.  
  80. </head>
  81.  
  82. <body>
  83.  
  84. <!-- Container -->
  85. <div class="container">
  86.  
  87. <!-- Content -->
  88. <div class="content">
  89.  
  90. <!-- Navigation -->
  91. <ul class="navigation">
  92. <li class="normal-page"><a class="nav-aboutme" href="/about"><span>ABOUT ME</span></a></li>
  93. <li class="normal-page"><a class="nav-home" href="/"><span>HOME</span></a></li>
  94. <li class="current-page"><a class="nav-blog" href="/post"><span>BLOG</span></a></li>
  95. <li class="normal-page"><a class="nav-portfolio" href="/portfolio"><span>PORTFOLIO</span></a></li>
  96. </ul><!-- /Navigation -->
  97.  
  98. <!-- Portfolio page -->
  99. <div class="maintitle">
  100. <h1>My Blog</h1>
  101. <div class="mainsubtitle"></div>
  102. </div>
  103. <div class="separator"></div>
  104.  
  105. <!-- Blog -->
  106. <div class="entry">
  107. <div class="posta">
  108. <h2><?php echo strip_tags(stripslashes($row['news_title'])) ?></h2>
  109. <div class="post-meta">
  110. <span class="author">By <a href="/about"><?php echo $row['news_author'] ?></a></span> |
  111. <span class="date"><?php echo $row['news_date'] ?> | <?php echo $row['news_time'] ?> </span> |
  112. <span class="comments"><a><?php echo $comments ?></a> COMMENT(S) </span>
  113.  
  114. </div>
  115. <div class="post-entry">
  116. <p><?php echo stripslashes($row['news_content']) ?></p><br />
  117. </div>
  118. </div>
  119.  
  120. <div class="bar">
  121. <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-counturl="" data-text="<?php echo strip_tags(stripslashes($row['news_title'])) ?>" data-count="horizontal" data-via="kristhecaptain">Tweet</a>
  122. <g:plusone size="medium" rel="canonical"annotation="bubble" width="25"></g:plusone>
  123. </div>
  124.  
  125.  
  126. <div style="float:right; padding-top:35px;">
  127. <div class="postComment">
  128. <a href="../forms/comment.php?id=<?php echo $article_id; ?>" class="-button silver" rel="facebox"><span class="-paper">Post Comment</span></a>
  129. </div>
  130. </div>
  131.  
  132.  
  133. <!-- Comments -->
  134. <div id="comments">
  135.  
  136. <h3>Article Comments (<?php echo $comments ?>)</h3><br />
  137.  
  138. <div id="new_comment"></div>
  139. <div id="report_comment"></div>
  140.  
  141. <?php
  142. $grab = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "' ORDER BY id DESC");
  143. $comments = mysql_num_rows($grab);
  144.  
  145. if (mysql_num_rows($grab)==0) {
  146. echo "<div class='alert alert-note-x'>Sorry, it looks like their are no comments to be displayed, check back later!</div>";
  147. }
  148.  
  149. while($row = mysql_fetch_array($grab)){
  150. ?>
  151.  
  152. <ul class="comments-list">
  153. <li class="comment">
  154. <div>
  155. <img src="images/photocontent/widget_img_01.jpg" alt="" class="avatar" width="50" height="50" />
  156. <div class="comment-meta">
  157. <a class="/about"><?php echo $row['name'] ?></a>
  158. <p class="date"><?php echo $row['date'] ?></p>
  159. </div>
  160. <div class="comment-entry">
  161. <p><?php echo $row['comment'] ?></p>
  162. </div>
  163. </div>
  164. </li>
  165. </ul>
  166.  
  167.  
  168. <?php } ?>
  169.  
  170. </div><!-- /Comments -->
  171.  
  172. </div><!-- /Blog -->
  173.  
  174. <div class="separator"></div>
  175.  
  176. <!-- Social icons -->
  177. <div class="social">
  178. <ul>
  179.  
  180. </ul>
  181. </div><!-- /Social icons -->
  182. </div><!-- /Content -->
  183. </div><!-- /Container -->
  184.  
  185. <div class="footer-cap"></div><!-- Invisible div. Needed to save static screen during animation -->
  186. <div class="footer">
  187.  
  188. <p>Copyright</p>
  189. </div>
  190. </body>
  191. </html>
  192. <?php } ?>
  193. <?php ob_flush(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement