Advertisement
Guest User

Untitled

a guest
Mar 19th, 2013
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.19 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="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
  47. <script src="../js/facebox.js" type="text/javascript"></script>
  48. <script src="../js/article.js" type="text/javascript"></script>
  49. <script src="../js/script.js" type="text/javascript"></script>
  50. <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script>
  51. <script type="text/javascript">
  52. jQuery(document).ready(function($) {
  53. $('a[rel*=facebox]').facebox({
  54. loadingImage : '../img/loading.gif',
  55. closeImage : '../img/closelabel.png'
  56. })
  57. });
  58. $(window).bind("load", function() {
  59.  
  60. });
  61.  
  62. $(document).scroll(function() {
  63. var scrollFromTop = $(document).scrollTop();
  64. if (scrollFromTop >= 500) {
  65. $('.postComment').addClass('postCommentFixed');
  66. } else {
  67. $('.postComment').removeClass('postCommentFixed');
  68. }
  69. });
  70. </script>
  71. <script type="text/javascript">
  72. (function() {
  73. var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  74. po.src = 'https://apis.google.com/js/plusone.js';
  75. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  76. })();
  77. </script>
  78.  
  79. <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>
  80.  
  81.  
  82.  
  83. </head>
  84.  
  85. <body>
  86.  
  87. <!-- Container -->
  88. <div class="container">
  89.  
  90. <!-- Content -->
  91. <div class="content">
  92.  
  93. <!-- Navigation -->
  94. <ul class="navigation">
  95. <li class="normal-page"><a class="nav-aboutme" href="/about"><span>ABOUT ME</span></a></li>
  96. <li class="normal-page"><a class="nav-home" href="/"><span>HOME</span></a></li>
  97. <li class="current-page"><a class="nav-blog" href="/post"><span>BLOG</span></a></li>
  98. <li class="normal-page"><a class="nav-portfolio" href="/portfolio"><span>PORTFOLIO</span></a></li>
  99. </ul><!-- /Navigation -->
  100.  
  101. <!-- Portfolio page -->
  102. <div class="maintitle">
  103. <h1>My Blog</h1>
  104. <div class="mainsubtitle">my thoughts into reality</div>
  105. </div>
  106. <div class="separator"></div>
  107.  
  108. <!-- Blog -->
  109. <div class="entry">
  110. <div class="posta">
  111. <h2><?php echo strip_tags(stripslashes($row['news_title'])) ?></h2>
  112. <div class="post-meta">
  113. <span class="author">By <a href="/about"><?php echo $row['news_author'] ?></a></span> |
  114. <span class="date"><?php echo $row['news_date'] ?> | <?php echo $row['news_time'] ?> </span> |
  115. <span class="comments"><a><?php echo $comments ?></a> COMMENT(S) </span>
  116.  
  117. </div>
  118. <div class="post-entry">
  119. <p><?php echo stripslashes($row['news_content']) ?></p><br />
  120. </div>
  121. </div>
  122.  
  123. <div class="bar">
  124. <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>
  125. <g:plusone size="medium" rel="canonical"annotation="bubble" width="25"></g:plusone>
  126. </div>
  127.  
  128.  
  129. <div style="float:right; padding-top:35px;">
  130. <div class="postComment">
  131. <a href="../forms/comment.php?id=<?php echo $article_id; ?>" class="-button silver" rel="facebox"><span class="-paper">Post Comment</span></a>
  132. </div>
  133. </div>
  134.  
  135.  
  136. <!-- Comments -->
  137. <div id="comments">
  138.  
  139. <h3>Article Comments (<?php echo $comments ?>)</h3><br />
  140.  
  141. <div id="new_comment"></div>
  142. <div id="report_comment"></div>
  143.  
  144. <?php
  145. $grab = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "' ORDER BY id DESC");
  146. $comments = mysql_num_rows($grab);
  147.  
  148. if (mysql_num_rows($grab)==0) {
  149. echo "<div class='alert alert-note-x'>Sorry, it looks like their are no comments to be displayed, check back later!</div>";
  150. }
  151.  
  152. while($row = mysql_fetch_array($grab)){
  153. ?>
  154.  
  155. <ul class="comments-list">
  156. <li class="comment">
  157. <div>
  158. <img src="images/photocontent/widget_img_01.jpg" alt="" class="avatar" width="50" height="50" />
  159. <div class="comment-meta">
  160. <a class="/about"><?php echo $row['name'] ?></a>
  161. <p class="date"><?php echo $row['date'] ?></p>
  162. </div>
  163. <div class="comment-entry">
  164. <p><?php echo $row['comment'] ?></p>
  165. </div>
  166. </div>
  167. </li>
  168. </ul>
  169.  
  170.  
  171. <?php } ?>
  172.  
  173. </div><!-- /Comments -->
  174.  
  175. </div><!-- /Blog -->
  176.  
  177. <div class="separator"></div>
  178.  
  179. <!-- Social icons -->
  180. <div class="social">
  181. <ul>
  182.  
  183. </ul>
  184. </div><!-- /Social icons -->
  185. </div><!-- /Content -->
  186. </div><!-- /Container -->
  187.  
  188. <div class="footer-cap"></div><!-- Invisible div. Needed to save static screen during animation -->
  189. <div class="footer">
  190. <p>All Rights Reserved<br>
  191. Kris Sales © 2013</p>
  192. <p>Copyright</p>
  193. </div>
  194. </body>
  195. </html>
  196. <?php } ?>
  197. <?php ob_flush(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement