Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 8.22 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <? include('config/db_con.php'); ?>
  2. <?
  3.   if($_GET['like']){
  4.       $nl = $_GET['like'];
  5.       mysql_connect("$host", "$username", "$password")or die("cannot connect");
  6.       mysql_select_db("$db_name")or die("cannot select DB");
  7.       $re = mysql_query("SELECT * FROM `like` WHERE id = '$nl'") or die (mysql_error());
  8.       $s = mysql_fetch_array($re);
  9.       $id = $s['id'];
  10.           $rock = $s['like'];
  11.       $current_time = date("Ymdhis");
  12.       $update_view = $s['count'] + 1;
  13.       mysql_query("UPDATE `like` SET count = '$update_view', last_view='$current_time' WHERE id = '$id'")  or die(mysql_error());
  14.       if($rock == ""){
  15.           header('location: index.php');
  16.       }
  17.   }
  18. ?>
  19. <? include('header.php'); ?>
  20. <meta property="og:title" content="<? echo stripslashes($rock); ?>"/>
  21.         <div class="content">
  22. <div class="ad">
  23.                         <div class="ad_boxr">
  24.  <!-- Begin BidVertiser code -->
  25. <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=323889&bid=800426" type="text/javascript"></SCRIPT>
  26. <noscript><a href="http://www.bidvertiser.com">advertising</a></noscript>
  27. <!-- End BidVertiser code -->
  28.                 </div>
  29.                         <div class="ad_boxr">
  30.  <!-- Begin BidVertiser code -->
  31. <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=323889&bid=800426" type="text/javascript"></SCRIPT>
  32. <noscript><a href="http://www.bidvertiser.com">advertising</a></noscript>
  33. <!-- End BidVertiser code -->
  34.                         </div>
  35.                         <div class="ad_boxr">
  36.  <!-- Begin BidVertiser code -->
  37. <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=323889&bid=800426" type="text/javascript"></SCRIPT>
  38. <noscript><a href="http://www.bidvertiser.com">advertising</a></noscript>
  39. <!-- End BidVertiser code -->
  40.  
  41.                                 </div>
  42.             </div>
  43.                         <div class="like_box">
  44.                         <div class="t"></div>
  45.                                 <div class="c">
  46.                                   <p>
  47.                               <? if($s['type'] == youtube){ ?>
  48.                               <object style="height: 344px; width: 425px">
  49.                                                                 <param name="movie" value="<? echo stripslashes($s['youtube']);?>">
  50.                                                                 <param name="allowFullScreen" value="true">
  51.                                                                 <param name="allowScriptAccess" value="always">
  52.                                                                 <embed src="<? echo stripslashes($s['youtube']);?>" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344">
  53.                                 </object>
  54.                               <? }else{ ?>
  55.                                 <? echo stripslashes($s['like']); ?>
  56.                                 <? }
  57.  
  58.  ?>
  59.                                 </p>
  60.                                         <div style="float:left; padding-left:15px; margin-top:20px;">
  61. <fb:like href="<?echo $site;?>like.php?like=<? echo $s['id']; ?>" show_faces="false" font="arial"></fb:like>
  62.  
  63.                                 </div>
  64. <?
  65. // PREVIOUS LIKE BUTTON BY MrRawer 19/06/2010
  66.                 $st = $_REQUEST['like'];
  67.                 $page_nump = $st;
  68.                 $page_nump -= 1;
  69.                 if($page_nump < 0)
  70.         {
  71.                 $page_num = 28;
  72.         }
  73.                 elseif($page_nump > 28)
  74.         {
  75.                 $page_nump = 1;
  76.         }
  77.                 if($st > 0){
  78.                 print '<h1><a href="like.php?like=' . $page_nump . '"><img src="images/Prev.bmp" align="Left"/></a></h1>';
  79.         }
  80. // PREVIOUS LIKE BUTTON BY MrRawer 19/06/2010
  81. // NEXT LIKE BUTTON BY MrRawer 19/06/2010
  82.                 $st = $_REQUEST['like'];
  83.                 $page_num = $st;
  84.                 $page_num += 1;
  85.                 if($page_num > 28)
  86.         {
  87.                 $page_num = 1;
  88.         }
  89.                 elseif($page_num < 0)
  90.         {
  91.                 $page_num = 28;
  92.         }
  93.                 if($st > 0){
  94.                 print '<center><h1><a href="like.php?like=' . $page_num . '"><img src="images/Next.bmp" align="Right"/></a></h1></center>';
  95.         }
  96. // NEXT LIKE BUTTON BY MrRawer 19/06/2010
  97. ?>
  98.                             </div>
  99.                         <div class="b"></div>
  100.                     </div>
  101.                         <div class="hd_bg">
  102.                         <h1><a href="#">Comments</a></h1>
  103.                 </div>
  104.                         <div class="box_bg">
  105.                       <div style="float:left;padding-left:15px;width:610px;">
  106.                         <div class="comm">
  107. <fb:comments width="610"></fb:comments>
  108.                         </div>
  109.                         </div>
  110.                         </div>
  111.                         <div class="bt_box">
  112.                        
  113.                         </div>
  114.                         <div class="hd_bg">
  115.                         <h1><a href="top.php">Top Like</a></h1>
  116.                 </div>
  117.                         <div class="box_bg">
  118.                         <div class="box_con">
  119.                         <?
  120.                         include('config/db_con.php');
  121.                         mysql_connect("$host", "$username", "$password")or die("cannot connect");
  122.                         mysql_select_db("$db_name")or die("cannot select DB");
  123.                         $top = "SELECT * FROM `like` ORDER BY count DESC LIMIT 0, 5";
  124.                         $new = mysql_query($top) or die(mysql_error());
  125.                         while($rows = mysql_fetch_array($new)){
  126.                         ?>
  127.                             <div style="clear:left;">
  128.                             <div style="float:left;">
  129.                             <fb:like layout="button_count" class="like_button" href="<?echo $site;?>like.php?like=<? echo $rows['id']; ?>"></fb:like>
  130.                             </div>
  131.                             <a href="<?echo $site;?>like.php?like=<? echo $rows['id']; ?>"><? echo stripslashes($rows['like']);?></a>
  132.                             </div>
  133.                         <?
  134.                         }
  135.  
  136.                         ?>
  137.                         </div>
  138.                     </div>
  139.                         <div class="bt_box">
  140.                        
  141.                         </div>
  142.                         <div class="hd_bg">
  143.                         <h1><a href="recent.php">Recent Like</a></h1>
  144.                 </div>
  145.                         <div class="box_bg">
  146.                         <div class="box_con">
  147.                         <?
  148.                         $top2 = "SELECT * FROM `like` ORDER BY last_view DESC LIMIT 0, 5";
  149.                         $new2 = mysql_query($top2) or die(mysql_error());
  150.                         while($rows2 = mysql_fetch_array($new2)){
  151.                         ?>
  152.                             <div style="clear:left;">
  153.                             <div style="float:left;">
  154.                             <fb:like layout="button_count" class="like_button" href="<?echo $site;?>like.php?like=<? echo $rows2['id']; ?>"></fb:like>
  155.                             </div>
  156.                             <a href="<?echo $site;?>like.php?like=<? echo $rows2['id']; ?>"><? echo stripslashes($rows2['like']);?></a>
  157.                             </div>
  158.                         <?
  159.                         }
  160.                         ?>
  161.                         </div>
  162.                     </div>
  163.                         <div class="bt_box">
  164.                        
  165.                         </div>
  166.                         <div class="hd_bg">
  167.                         <h1><a href="new.php">Newest Like</a></h1>
  168.                 </div>
  169.                         <div class="box_bg">
  170.                         <div class="box_con">
  171.                         <?
  172.                         $top3 = "SELECT * FROM `like` ORDER BY id DESC LIMIT 0, 5";
  173.                         $new3 = mysql_query($top3) or die(mysql_error());
  174.                         while($rows3 = mysql_fetch_array($new3)){
  175.                         ?>
  176.                             <div style="clear:left;">
  177.                             <div style="float:left;">
  178.                             <fb:like layout="button_count" class="like_button" href="<?echo $site;?>like.php?like=<? echo $rows3['id']; ?>"></fb:like>
  179.                             </div>
  180.                             <a href="<?echo $site;?>like.php?like=<? echo $rows3['id']; ?>"><? echo stripslashes($rows3['like']);?></a>
  181.                             </div>
  182.                         <?
  183.                         }
  184.                         ?>
  185.                         </div>
  186.                     </div>
  187.                         <div class="bt_box">
  188.                        
  189.                         </div>
  190.         </div>
  191.         </div>
  192. <? include('footer.php'); ?>
  193. </body>
  194. </html>