Two things... dll and Administrators on ranking

Results 1 to 18 of 18
  1. #1
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Two things... dll and Administrators on ranking

    Well, i need first at all, a DLL that makes a search in the windows processes that are running at the moment, have a list of "blocked processes" and if a process is on that "blacklist" shows up, close the program, and gunz... how can i get that?

    --

    The another thing is that i want to remove the administrators, moderators and well... ugrades 255, 254, 253 and 252 from the Ranking, and top5.. any help?

    (I searched with no results, if u can give me the link, or the solution, it'll be nice)

    Thanks for reading, and sorry 4 my eng.


  2. #2
    I like pie OJuice is offline
    MemberRank
    Jul 2011 Join Date
    205Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by MAJ View Post
    Well, i need first at all, a DLL that makes a search in the windows processes that are running at the moment, have a list of "blocked processes" and if a process is on that "blacklist" shows up, close the program, and gunz... how can i get that?

    --

    The another thing is that i want to remove the administrators, moderators and well... ugrades 255, 254, 253 and 252 from the Ranking, and top5.. any help?

    (I searched with no results, if u can give me the link, or the solution, it'll be nice)

    Thanks for reading, and sorry 4 my eng.
    in php?

    just go to it and do something like this. use a function or w.e to get the ugrade.
    PHP Code:
    <?php
    function get_ugrade($user_id) {
         
    $safe_userid anti_sql($user_id); //some string escaping thing
         
    $query "SELECT * FROM accounts WHERE id == '{$safe_userid}' LIMIT 1";
         
    $result mssql_query($query);
         if(
    mssql_fetch_assoc($result)) {
               
    $ugrade $result['UGrade'];
               return 
    $ugrade;
         } else {
              return 
    false;
         }
    }

    ?>
    PHP Code:
    <?php
    $ugrade 
    == get_ugrade($userid);
     if(
    $ugrade == 255 || $ugrade == 254 || $ugrade == 252) {
          
    // dont display
     
    } else {
          
    // post the ranking 
     
    }
    ?>
    Last edited by OJuice; 14-08-13 at 08:14 PM.

  3. #3
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Re: Two things... dll and Administrators on ranking

    It already have something to check the UgradeID, but what it does, it's that if the UgradeID is 255 color of the name is red, and then with the other ranges...

    What should I change?

    PHP Code:
    $selugid1 odbc_fetch_object(odbc_exec($con,"SELECT * FROM Account WHERE AID='".$char->AID."'"));
            if(
    $selugid1->UGradeID == $admin){
              echo 
    '<font color="'.$admin_col.'">'.substr($char->Name012).'</font>';
            }elseif(
    $selugid1->UGradeID == $gm){
              echo 
    '<font color="'.$gm_col.'">'.substr($char->Name012).'</font>';
            }elseif(
    $selugid1->UGradeID == $dev){
              echo 
    '<font color="'.$dev_col.'">'.substr($char->Name012).'</font>';
            }elseif(
    $selugid1->UGradeID == $banned){
              echo 
    '<font color="'.$banned_col.'">'.substr($char->Name012).'</font>';
            }elseif(
    $selugid1->UGradeID == $member){
              echo 
    '<font color="'.$member_col.'">' 
    what should I put on those

    "if($selugid1->UGradeID == $admin){
    echo '<font color="'.$admin_col.'">'.substr($char->Name, 0, 12).'</font>';
    }elseif($selugid1->UGradeID == $gm){
    echo '<font color="'.$gm_col.'">'.substr($char->Name, 0, 12).'</font>';
    }elseif($selugid1->UGradeID == $dev){
    echo '<font color="'.$dev_col.'">'.substr($char->Name, 0, 12).'</font>';
    }elseif($selugid1->UGradeID == $banned){
    echo '<font color="'.$banned_col.'">'.substr($char->Name, 0, 12).'</font>';
    }elseif($selugid1->UGradeID == $member){
    echo '<font color="'.$member_col.'">' "

  4. #4
    I like pie OJuice is offline
    MemberRank
    Jul 2011 Join Date
    205Posts

    Re: Two things... dll and Administrators on ranking

    that is not a ranking at all.

    I also have learned ODBC works much differently with fetching arrays then mssql so I cannot help you with that
    Last edited by OJuice; 14-08-13 at 08:57 PM.

  5. #5
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: Two things... dll and Administrators on ranking

    To remove the staff grades from the ranking you would have to do something like this;
    PHP Code:
    "SELECT * FROM Account WHERE UGradeID != 255 AND UGradeID != 254 AND UGradeID != 253 AND UGradeID != 252" 
    Not currently coding any website so I don't remember how the SQL query works. Actually, it has been a while. Someone verify my codes.

  6. #6
    Pee Aitch Pee Dave is offline
    MemberRank
    Mar 2011 Join Date
    The NetherlandsLocation
    722Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by Anju View Post
    To remove the staff grades from the ranking you would have to do something like this;
    PHP Code:
    "SELECT * FROM Account WHERE UGradeID != 255 AND UGradeID != 254 AND UGradeID != 253 AND UGradeID != 252" 
    Not currently coding any website so I don't remember how the SQL query works. Actually, it has been a while. Someone verify my codes.
    Query will work just fine.

  7. #7
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Re: Two things... dll and Administrators on ranking

    What i wanted to say is that I have to change the condition on the IF, to, if the ugradeid appears, not show those users.

    "How can I say NOT SHOW" on codes? ._.
    Last edited by MAJ; 14-08-13 at 10:49 PM.

  8. #8
    Unleashed jumparound is offline
    MemberRank
    Feb 2008 Join Date
    UtrechtLocation
    499Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by MAJ View Post
    What i wanted to say is that I have to change the condition on the IF, to, if the ugradeid appears, not show those users.

    "How can I say NOT SHOW" on codes? ._.
    in the above query. != means 'is not'. That means when you echo or print this out, you will get everything except for those Ugrades.

  9. #9
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by Anju View Post
    To remove the staff grades from the ranking you would have to do something like this;
    PHP Code:
    "SELECT * FROM Account WHERE UGradeID != 255 AND UGradeID != 254 AND UGradeID != 253 AND UGradeID != 252" 
    Not currently coding any website so I don't remember how the SQL query works. Actually, it has been a while. Someone verify my codes.
    Might rather use
    PHP Code:
    SELECT FROM Account WHERE UGradeID 252 

  10. #10
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Re: Two things... dll and Administrators on ranking

    Tryied with those, but I just get the colors in white, like the members, not remove the staff from the rank :S

  11. #11
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by MAJ View Post
    The another thing is that i want to remove the administrators, moderators and well... ugrades 255, 254, 253 and 252 from the Ranking, and top5.. any help?
    Quote Originally Posted by MAJ View Post
    Tryied with those, but I just get the colors in white, like the members, not remove the staff from the rank :S
    The query provided by Solaire will work perfect for what you wanted in the first post. If you meant something else, please be more clear.

  12. #12
    I like pie OJuice is offline
    MemberRank
    Jul 2011 Join Date
    205Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by MAJ View Post
    Tryied with those, but I just get the colors in white, like the members, not remove the staff from the rank :S
    ur code doesn't do ranking, you have the wrong code... that code is for the color output depending on ugrade

  13. #13
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Re: Two things... dll and Administrators on ranking

    Well, then i want to REMOVE members from the ranking, depending the ugrade...

  14. #14
    I like pie OJuice is offline
    MemberRank
    Jul 2011 Join Date
    205Posts

    Re: Two things... dll and Administrators on ranking

    Quote Originally Posted by MAJ View Post
    Well, then i want to REMOVE members from the ranking, depending the ugrade...
    then post the ranking section for us

  15. #15
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Re: Two things... dll and Administrators on ranking

    This is all the code:

    PHP Code:
       <!-- Rankings -->
        <div class="tbl_head">
          <div class="tbl_title">
          <?php
           
    if($do == ""){ echo "Player Rankings"; }
           elseif(
    $do == "clan"){ echo "Clan Rankings"; }
          
    ?>  
           <?php if($do == ""){ ?>
            <div id="cclink"><font color="#0db721">&raquo;</font> <a href="index.php?act=rankings&do=clan">Clan Rankings</a></div>
           <?php }elseif($do == "clan"){ ?>
            <div id="cclink"><font color="#0db721">&raquo;</font> <a href="index.php?act=rankings">Character Rankings</a></div>
           <?php ?>
          </div>
        </div>
        <div class="tbl_body">
          <div class="tbl_pos" style="min-height:250px;">
          
          <?php if($do == ""){ ?>
            <!-- Player Rankings -->
              <table width="430" border="0" style="text-align:center;">
               <tr>
                 <td class="rktcol">#</td><td class="rktcol">Name</td><td class="rktcol">Level</td>
                 <td class="rktcol">Sex</td><td class="rktcol">EXP</td><td class="rktcol">Kills</td><td class="rktcol">Deaths</td>
               </tr>
               <?php 
                $limit 
    25;
                
                
    $queryq "SELECT COUNT(*) as num FROM Character WHERE DeleteFlag='0'";
                
    $total_pages odbc_fetch_object(odbc_exec($con,$queryq));
                
    $total_pages $total_pages->num;
        
                
    $stages 3;
                
    $page anti_injection($_GET['page']);
                if(
    $page){
                 
    $start = ($page 1) * $limit
                }else{
                  
    $start 0;    
                } 
              
              
    $sqlplayer odbc_exec($con,"SELECT TOP $limit * FROM Character WHERE CID not in (SELECT TOP $start CID FROM Character ORDER BY XP DESC) AND DeleteFlag='0' ORDER BY Level DESC,XP DESC,KillCount DESC,DeathCount DESC");
              if(
    odbc_num_rows($sqlplayer)<>0){
              
    $count=1+$start;
               while(
    $char odbc_fetch_object($sqlplayer)){
                echo 
    '<tr class="q2" style="font-size:10px;height:18px;"><td>'.$count.'.</td>';
                echo 
    '<td><a href="index.php?act=profile&aid='.$char->AID.'">';
                 
    $selugid odbc_fetch_object(odbc_exec($con,"SELECT * FROM Account WHERE AID='".$char->AID."'"));
                 if(
    $selugid->UGradeID == $admin){
                   echo 
    '<font color="'.$admin_col.'">'.$char->Name.'</font>';
                 }elseif(
    $selugid->UGradeID == $gm){
                   echo 
    '<font color="'.$gm_col.'">'.$char->Name.'</font>';
                 }elseif(
    $selugid->UGradeID == $dev){
                   echo 
    '<font color="'.$dev_col.'">'.$char->Name.'</font>';
                 }elseif(
    $selugid->UGradeID == $banned){
                   echo 
    '<font color="'.$banned_col.'">'.$char->Name.'</font>';
                 }elseif(
    $selugid->UGradeID == $member){
                   echo 
    '<font color="'.$member_col.'">'.$char->Name.'</font>';
                 }else{
                   echo 
    '<font color="'.$member_col.'">'.$char->Name.'</font>';
                 }
                echo 
    '</a></td>';
                echo 
    '<td>'.$char->Level.'</td>';
                if(
    $char->Sex == "1"){
                 echo 
    '<td>Female</td>';
                }else{
                 echo 
    '<td>Male</td>';
                }
                echo 
    '<td>'.$char->XP.'</td>';
                echo 
    '<td>'.$char->KillCount.'</td>';
                echo 
    '<td>'.$char->DeathCount.'</td></tr>';
                
    $count++;
               }
              }else{
               echo 
    "<tr><td></td></tr>";
              }
               echo 
    "<tr><td></td></tr><tr><td colspan='7'><br /><div class='light_dark_line'></div></td></tr>";
               echo 
    "<tr><td></td></tr><tr><td colspan='7'>
               <font color='"
    .$admin_col."'><b>Administrator</b></font> &bull; <font color='".$gm_col."'><b>GameMaster</b></font>
               &bull; <font color='"
    .$dev_col."'><b>Developer</b></font> &bull; <font color='".$member_col."'><b>Member</b></font>
               &bull; <font color='"
    .$banned_col."'><b>Banned</b></font></div></td></tr>";
              
             
    ?>
            <!-- End Of Player Rankings -->
            <?php ?>
            
            <?php if($do == "clan"){ ?>
            <!-- Clan Rankings -->
              <table width="430" border="0" style="text-align:center;">
               <tr>
                 <td class="rktcol">#</td><td class="rktcol">Name</td><td class="rktcol">Leader</td>
                 <td class="rktcol">Points</td><td class="rktcol">Wins</td><td class="rktcol">Losses</td><td class="rktcol">Draws</td>
               </tr>
               <?php 
               $target 
    "&act=clan";
               
                
    $limit 25;
                
                
    $queryq "SELECT COUNT(*) as num FROM Clan WHERE DeleteFlag='0'";
                
    $total_pages odbc_fetch_object(odbc_exec($con,$queryq));
                
    $total_pages $total_pages->num;
        
                
    $stages 3;
                
    $page anti_injection($_GET['page']);
                if(
    $page){
                 
    $start = ($page 1) * $limit
                }else{
                  
    $start 0;    
                } 
              
              
    $sqlplayer odbc_exec($con,"SELECT TOP $limit * FROM Clan WHERE CLID not in (SELECT TOP $start CLID FROM Clan ORDER BY Point DESC) AND DeleteFlag='0' ORDER BY Point DESC,Wins DESC, Losses DESC,Draws DESC");
              if(
    odbc_num_rows($sqlplayer)<>0){
              
    $count=1+$start;
               while(
    $clan odbc_fetch_object($sqlplayer)){
                echo 
    '<tr class="q2" style="font-size:10px;height:18px;"><td>'.$count.'.</td>';
                echo 
    '<td class="asas"><a href="index.php?act=clanp&clid='.$clan->CLID.'">'.$clan->Name.'</a></td>';
                
    $sqlgetleader odbc_exec($con"SELECT * FROM Character WHERE CID='".$clan->MasterCID."'");
                
    $leader odbc_fetch_object($sqlgetleader);
                echo 
    '<td class="asas"><a href="index.php?act=profile&aid='.$leader->AID.'">'.$leader->Name.'</a></td>';
                echo 
    '<td>'.$clan->Point.'</td>';
                echo 
    '<td>'.$clan->Wins.'</td>';
                echo 
    '<td>'.$clan->Losses.'</td>';
                echo 
    '<td>'.$clan->Draws.'</td></tr>';
                
    $count++;
               }
              }else{
               echo 
    "<tr><td></td></tr>";
              }
              
             
    ?>
            <!-- End Of Clan Rankings -->
            <?php ?>
            
            <?php
               
    echo "<tr><td></td></tr><tr><td colspan='7'><div class='light_dark_line'></div></td></tr>";
            
    //Paginate Start
            
    if ($page == 0){$page 1;}
            
    $prev $page 1;    
            
    $next $page 1;                            
            
    $lastpage ceil($total_pages/$limit);        
            
    $LastPagem1 $lastpage 1;                    
        
            
    $paginate '';
            if(
    $lastpage 1){    
             
    $paginate .= "<div class='paginate'>";
            
    // Previous
            
    if ($page 1){
                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$prev'>Prev</a>";
            }else{
                
    $paginate.= "<span class='disabled'>Prev</span>";    }
                
            
    // Pages    
            
    if ($lastpage + ($stages 2)){    
            for (
    $counter 1$counter <= $lastpage$counter++){
             if (
    $counter == $page){
              
    $paginate.= "<span class='current'>$counter</span>";
             }else{
              
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";}                    
             }
             }elseif(
    $lastpage + ($stages 2)){
            
    // Beginning only hide later pages
            
    if($page + ($stages 2)){
            for (
    $counter 1$counter + ($stages 2); $counter++){
            if (
    $counter == $page){
             
    $paginate.= "<span class='current'>$counter</span>";
            }else{
             
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";}                    
            }
            
    $paginate.= "...";
            
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$LastPagem1'>$LastPagem1</a>";
            
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$lastpage'>$lastpage</a>";    
            
    // Middle hide some front and some back        
            
    }elseif($lastpage - ($stages 2) > $page && $page > ($stages 2)){
                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=1'>1</a>";
              
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=2'>2</a>";
              
    $paginate.= "...";
            for (
    $counter $page $stages$counter <= $page $stages$counter++){
              if (
    $counter == $page){
                
    $paginate.= "<span class='current'>$counter</span>";
            }else{
                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";}                    
            }
                
    $paginate.= "...";
                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$LastPagem1'>$LastPagem1</a>";
                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$lastpage'>$lastpage</a>";        
           }else{
             
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=1'>1</a>";
             
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=2'>2</a>";
             
    $paginate.= "...";
           for (
    $counter $lastpage - (+ ($stages 2)); $counter <= $lastpage$counter++){
           if (
    $counter == $page){
            
    $paginate.= "<span class='current'>$counter</span>";
           }else{
              
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";}                    
           }
           }
           }            
            
    // Next
           
    if ($page $counter 1){ 
                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$next'>Next</a>";
           }else{
                
    $paginate.= "<span class='disabled'>Next</span>";
           }    
           
    $paginate.= "</div>";
            }
            
    //Paginate End
            
    echo "<tr><td align='center' colspan='7'>";

            echo 
    "</td></tr><tr><td align='center' colspan='7'>";
             echo 
    $paginate;
              echo 
    "</td></tr>";
                
               
    ?>
              </table>
            
            </div>
          </div>
          <div class="tbl_footer"></div><p />
       <!-- End Of Rankings -->

  16. #16
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: Two things... dll and Administrators on ranking

    If you're wanting all the staff removed and the banned removed (why waste space on banned members?) then this code should work for you:
    PHP Code:
    <!-- Rankings -->
    <div class="tbl_head">
        <div class="tbl_title">
            <?php
                
    if($do == ""){ echo "Player Rankings"; }
                elseif(
    $do == "clan"){ echo "Clan Rankings"; }
                if(
    $do == ""){
            
    ?>
                    <div id="cclink"><font color="#0db721">&raquo;</font> <a href="index.php?act=rankings&do=clan">Clan Rankings</a></div>
            <?php 
                
    }elseif($do == "clan"){ ?>
                    <div id="cclink"><font color="#0db721">&raquo;</font> <a href="index.php?act=rankings">Character Rankings</a></div>
            <?php
                
    }
            
    ?>
        </div>
    </div>
    <div class="tbl_body">
        <div class="tbl_pos" style="min-height:250px;">
            <?php if($do == ""){ ?>
            <!-- Player Rankings -->
                <table width="430" border="0" style="text-align:center;">
                    <tr>
                        <td class="rktcol">#</td><td class="rktcol">Name</td><td class="rktcol">Level</td>
                        <td class="rktcol">Sex</td><td class="rktcol">EXP</td><td class="rktcol">Kills</td><td class="rktcol">Deaths</td>
                    </tr>
                    <?php
                    $limit 
    25;
                    
    $queryq "SELECT COUNT(*) as num FROM Character WHERE DeleteFlag='0'";
                    
    $total_pages odbc_fetch_object(odbc_exec($con,$queryq));
                    
    $total_pages $total_pages->num;
                    
    $stages 3;
                    
    $page anti_injection($_GET['page']);
                    if(
    $page){
                        
    $start = ($page 1) * $limit;
                    }else{
                        
    $start 0;
                    }
                    
    $sqlplayer odbc_exec($con,"SELECT TOP $limit * FROM Character WHERE CID not in (SELECT TOP $start CID FROM Character ORDER BY XP DESC) AND DeleteFlag='0' AND UGradeID < 253 ORDER BY Level DESC,XP DESC,KillCount DESC,DeathCount DESC");
                    if(
    odbc_num_rows($sqlplayer)<>0){
                        
    $count=1+$start;
                        while(
    $char odbc_fetch_object($sqlplayer)){
                            echo 
    '<tr class="q2" style="font-size:10px;height:18px;"><td>'.$count.'.</td>';
                            echo 
    '<td><a href="index.php?act=profile&aid='.$char->AID.'">';
                            
    $selugid odbc_fetch_object(odbc_exec($con,"SELECT * FROM Account WHERE AID='".$char->AID."' AND UGradeID < 253"));
                            if(
    $selugid->UGradeID == $member){
                                echo 
    '<font color="'.$member_col.'">'.$char->Name.'</font>';
                            }
                            echo 
    '</a></td>';
                            echo 
    '<td>'.$char->Level.'</td>';
                            if(
    $char->Sex == "1"){
                                echo 
    '<td>Female</td>';
                            }else{
                                echo 
    '<td>Male</td>';
                            }
                            echo 
    '<td>'.$char->XP.'</td>';
                            echo 
    '<td>'.$char->KillCount.'</td>';
                            echo 
    '<td>'.$char->DeathCount.'</td></tr>';
                            
    $count++;
                        }
                    }else{
                        echo 
    "<tr><td></td></tr>";
                    }
                    echo 
    "<tr><td></td></tr><tr><td colspan='7'><br /><div class='light_dark_line'></div></td></tr>";
                    echo 
    "<tr><td></td></tr><tr><td colspan='7'>
                    <font color='"
    .$member_col."'><b>Member</b></font>
                    </div></td></tr>"
    ;
                    
    ?>
            <!-- End Of Player Rankings -->
            <?php
            
    }
            if(
    $do == "clan"){ ?>
                <!-- Clan Rankings -->
                <table width="430" border="0" style="text-align:center;">
                    <tr>
                        <td class="rktcol">#</td><td class="rktcol">Name</td><td class="rktcol">Leader</td>
                        <td class="rktcol">Points</td><td class="rktcol">Wins</td><td class="rktcol">Losses</td><td class="rktcol">Draws</td>
                    </tr>
                    <?php
                        $target 
    "&act=clan";
                        
    $limit 25;
                        
    $queryq "SELECT COUNT(*) as num FROM Clan WHERE DeleteFlag='0'";
                        
    $total_pages odbc_fetch_object(odbc_exec($con,$queryq));
                        
    $total_pages $total_pages->num;
                        
    $stages 3;
                        
    $page anti_injection($_GET['page']);
                        if(
    $page){
                            
    $start = ($page 1) * $limit;
                        }else{
                            
    $start 0;
                        }
                        
    $sqlplayer odbc_exec($con,"SELECT TOP $limit * FROM Clan WHERE CLID not in (SELECT TOP $start CLID FROM Clan ORDER BY Point DESC) AND DeleteFlag='0' ORDER BY Point DESC,Wins DESC, Losses DESC,Draws DESC");
                        if(
    odbc_num_rows($sqlplayer)<>0){
                            
    $count=1+$start;
                            while(
    $clan odbc_fetch_object($sqlplayer)){
                                echo 
    '<tr class="q2" style="font-size:10px;height:18px;"><td>'.$count.'.</td>';
                                echo 
    '<td class="asas"><a href="index.php?act=clanp&clid='.$clan->CLID.'">'.$clan->Name.'</a></td>';
                                
    $sqlgetleader odbc_exec($con"SELECT * FROM Character WHERE CID='".$clan->MasterCID."'");
                                
    $leader odbc_fetch_object($sqlgetleader);
                                echo 
    '<td class="asas"><a href="index.php?act=profile&aid='.$leader->AID.'">'.$leader->Name.'</a></td>';
                                echo 
    '<td>'.$clan->Point.'</td>';
                                echo 
    '<td>'.$clan->Wins.'</td>';
                                echo 
    '<td>'.$clan->Losses.'</td>';
                                echo 
    '<td>'.$clan->Draws.'</td></tr>';
                                
    $count++;
                            }
                        }else{
                            echo 
    "<tr><td></td></tr>";
                        }
                    
    ?>
                    <!-- End Of Clan Rankings -->
            <?php
            
    }
            echo 
    "<tr><td></td></tr><tr><td colspan='7'><div class='light_dark_line'></div></td></tr>";
            
    //Paginate Start
            
    if ($page == 0){$page 1;}
            
    $prev $page 1;
            
    $next $page 1;
            
    $lastpage ceil($total_pages/$limit);
            
    $LastPagem1 $lastpage 1;
            
    $paginate '';
            if(
    $lastpage 1){
                
    $paginate .= "<div class='paginate'>";
                
    // Previous
                
    if ($page 1){
                    
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$prev'>Prev</a>";
                }else{
                    
    $paginate.= "<span class='disabled'>Prev</span>";
                }
                
    // Pages
                
    if ($lastpage + ($stages 2)){
                    for (
    $counter 1$counter <= $lastpage$counter++){
                        if (
    $counter == $page){
                            
    $paginate.= "<span class='current'>$counter</span>";
                        }else{
                            
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";
                        }
                    }
                }elseif(
    $lastpage + ($stages 2)){
                    
    // Beginning only hide later pages
                    
    if($page + ($stages 2)){
                        for (
    $counter 1$counter + ($stages 2); $counter++){
                            if (
    $counter == $page){
                                
    $paginate.= "<span class='current'>$counter</span>";
                            }else{
                                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";
                            }
                        }
                        
    $paginate.= "...";
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$LastPagem1'>$LastPagem1</a>";
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$lastpage'>$lastpage</a>";
                        
    // Middle hide some front and some back
                    
    }elseif($lastpage - ($stages 2) > $page && $page > ($stages 2)){
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=1'>1</a>";
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=2'>2</a>";
                        
    $paginate.= "...";
                        for (
    $counter $page $stages$counter <= $page $stages$counter++){
                            if (
    $counter == $page){
                                
    $paginate.= "<span class='current'>$counter</span>";
                            }else{
                                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";
                            }
                        }
                        
    $paginate.= "...";
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$LastPagem1'>$LastPagem1</a>";
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$lastpage'>$lastpage</a>";
                    }else{
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=1'>1</a>";
                        
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=2'>2</a>";
                        
    $paginate.= "...";
                        for (
    $counter $lastpage - (+ ($stages 2)); $counter <= $lastpage$counter++){
                            if (
    $counter == $page){
                                
    $paginate.= "<span class='current'>$counter</span>";
                            }else{
                                
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$counter'>$counter</a>";
                            }
                        }
                    }
                }
                
    // Next
                
    if ($page $counter 1){
                    
    $paginate.= "<a href='index.php?act=rankings$target&amp;page=$next'>Next</a>";
                }else{
                    
    $paginate.= "<span class='disabled'>Next</span>";
                }
                
    $paginate.= "</div>";
            }
            
    //Paginate End
            
    echo "<tr><td align='center' colspan='7'>";
            echo 
    "</td></tr><tr><td align='center' colspan='7'>";
            echo 
    $paginate;
            echo 
    "</td></tr>";
            
    ?>
                </table>
        </div>
    </div>
    <div class="tbl_footer"></div><p />
    <!-- End Of Rankings -->
    Code cleaned and formatted as well.

  17. #17
    Member MAJ is offline
    MemberRank
    Jun 2012 Join Date
    83Posts

    Re: Two things... dll and Administrators on ranking

    It shows nothing, just the empty table.
    Last edited by MAJ; 18-08-13 at 08:07 AM.

  18. #18
    Member Franc[e]sco is offline
    MemberRank
    Apr 2009 Join Date
    ItalyLocation
    74Posts

    Re: Two things... dll and Administrators on ranking

    replace
    Code:
    $sqlplayer = odbc_exec($con,"SELECT TOP $limit * FROM Character WHERE CID not in (SELECT TOP $start CID FROM Character ORDER BY XP DESC) AND DeleteFlag='0' ORDER BY Level DESC,XP DESC,KillCount DESC,DeathCount DESC");
    with:
    Code:
    $sqlplayer = odbc_exec($con,"SELECT TOP $limit * FROM Character WHERE CID not in (SELECT TOP $start CID FROM Character ORDER BY XP DESC) AND DeleteFlag='0' ORDER BY Level DESC,XP DESC,KillCount DESC,DeathCount DESC AND NOT NULL (SELECT * FROM Account WHERE Account.AID = Character.AID AND Account.UGradeID < 252) ");
    I'm not 100% sure I wrote the query correctly, I haven't touched sql in months



Advertisement