Top Poster Today 4 Lava

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Top Poster Today 4 Lava

    5 people wanted this here it is
    if you want more to the list u knw what to do
    add this to index.php

    PHP Code:
    ////////////////////////////top poster today
    if($page=="" || $page<=0)$page=1;
        
    $today time();
        
    $today -= (24*60*60);
        
    $noi mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid)  FROM ibwf_posts WHERE dtpost>'".$today."';"));
        
    $num_items $noi[0]; //changable
        
    $items_per_page1;
        
    $num_pages ceil($num_items/$items_per_page);
        if((
    $page>$num_pages)&&$page!=1)$page$num_pages;
        
    $limit_start = ($page-1)*$items_per_page;

        
    //changable sql


            
    $sql "SELECT uid, COUNT(*) as nops FROM ibwf_posts  WHERE dtpost>'".$today."'  GROUP BY uid ORDER BY nops DESC LIMIT $limit_start$items_per_page";


       
        
    $items mysql_query($sql);
        echo 
    mysql_error();
        if(
    mysql_num_rows($items)>0)
        {
        while (
    $item mysql_fetch_array($items))
        {
            
    $unick getnick_uid($item[0]);
          
    $lnk "<b>Top Poster Today</b> <a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$unick</a>  <b>P</b> <a href=\"lists.php?action=uposts&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>";
          echo 
    "$lnk<br/>";
        }
        }


    ///////////////////////////// 


    ....................................
    http://photomag.lk/
    ....................................


    #2
    something like this?

    Code:
    ////////////////////////////top poster today 
    elseif($action==topposter){
    
    if($page=="" || $page<=0)$page=1; 
        $today = time(); 
        $today -= (24*60*60); 
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT uid)  FROM ibwf_posts WHERE dtpost>'".$today."';")); 
        $num_items = $noi[0]; //changable 
        $items_per_page= 1; 
        $num_pages = ceil($num_items/$items_per_page); 
        if(($page>$num_pages)&&$page!=1)$page= $num_pages; 
        $limit_start = ($page-1)*$items_per_page; 
    
        //changable sql 
    
    
            $sql = "SELECT uid, COUNT(*) as nops FROM ibwf_posts  WHERE dtpost>'".$today."'  GROUP BY uid ORDER BY nops DESC LIMIT $limit_start, $items_per_page"; 
    
    
        
        $items = mysql_query($sql); 
        echo mysql_error(); 
        if(mysql_num_rows($items)>0) 
        { 
        while ($item = mysql_fetch_array($items)) 
        { 
            $unick = getnick_uid($item[0]); 
          $lnk = "<b>Top Poster Today</b> <a href=\"index.php?action=viewuser&amp;who=$item[0]&amp;sid=$sid\">$unick</a>  <b>P</b> <a href=\"lists.php?action=uposts&amp;who=$item[0]&amp;sid=$sid\">$item[1]</a>"; 
          echo "$lnk<br/>"; 
        } 
        } 
    }
    action=topposter&amp;sid=$sid

    ?

    Comment


      #3
      thanx for no thanx grrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr


      ....................................
      http://photomag.lk/
      ....................................

      Comment

      Working...
      X