Need help with oldupdates.php

Discussion in 'PHP' started by byllan, May 1, 2012.

  1. #1
    Hello i got a script i did and i need it show old updates by date! And who made the update and date

    apelsinen.com/?p=oldupdates

    3.imgland.net/7F2is.jpg

    pastebin.com/TDV6gCee

    oldupdates.php
     <center><b>Old Updates</b></center><br><table width="400" border="0" align="center" cellpadding="3" cellspacing="1"><tr><td><strong><h3>WARNING!<h3>Those who have <img  src="images/filter/red.png" width="10" height="10">at  the links may contain pornography or anything that is not appropriate for less! YOU LOOK AT YOUR OWN RISK!</strong></td></tr></table><br><table><tr><th  scope="col">Type</th><th  scope="col">Link</th><th  scope="col">Filter</th><th  scope="col">User</th><th scope="col">Date</th></tr><?php
    $date = date('Y-m-d');$link_table = "";$updaters ="";$comments ="Comments:0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";$rate ="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img  src='images/rate/notrated.gif' width ='23'>";$clicks ="Clicks:0";$updaters = array();$sql  = "SELECT `upp_links`.`link`, `upp_links`.`besk`, `upp_links`.`date`,  `upp_links`.`type`, `upp_links`.`click`, `upp_links`.`filter`,  `upp_links`.`cat`, `users`.`user`, `upp_links`.`updater_id`,  upp_links.id FROM `upp_links`, `users` WHERE `upp_links`.`tipsare` =  `users`.`id` AND `upp_links`.`date` = '{$date}' ORDER BY id DESC";//$sql = "SELECT * FROM `upp_links` ORDER BY `upp_links`.`date` DESC LIMIT 0 , 30";//$sql = "SELECT * FROM `upp_links` WHERE `id` = 1 AND `date` = \'2012-04-19\' LIMIT 0, 30 "; $result = mysql_query($sql);while($rad = mysql_fetch_array($result)){$type = $rad['type'];$cat = $rad['cat'];$link_id = $rad['id'];if ($rad['filter'] == false)        {        $filter = "images/filter/green.png";        }        else        {        $filter = "images/filter/red.png";        }$query = mysql_query("SELECT * FROM upp_links WHERE id='{$link_id}'");$row = mysql_fetch_array($query);
    $link_table  .= '<tr><td><img  src="'.$type_nr[$type].'"</td><td><a  href="/pages/out.php?id='.$row['id'].'" id="start_link"  target="_blank">'.$rad['besk'].'</a><br>'.$comments.'Klick: '.$row['click'].''.$rate.'</td><td><img  src="'.$filter.'"  width="10"height="10"></td><td>'.$rad['user'].'</td><td>'.$rad['date'].'</td>';echo "<b>Date: By:</b>";}foreach ($updaters as $key => $value) {$sql = "SELECT `user`, `id` FROM `users` WHERE `users`.`id` = {$key}";$result = mysql_query($sql);if (!$result) { die('Invalid query: ' . mysql_error()); }        while ($rad = mysql_fetch_array($result)){                        //var_dump($rad);        echo $rad[1] . "::" . $rad[0] . "<br><br>";        }        //echo $value;}// Visa vilka som uppdaterat och hur många//var_dump($updaters);//echo $updaters;echo $link_table;?> </table>
    PHP:
     
    byllan, May 1, 2012 IP
  2. byllan

    byllan Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Anyone? :D
     
    byllan, May 2, 2012 IP