[BETA] MapleBitCMS

Page 6 of 46 FirstFirst 123456789101112131416 ... LastLast
Results 76 to 90 of 680
  1. #76
    Hardcore Member Kerning is offline
    MemberRank
    Nov 2013 Join Date
    126Posts

    Re: [BETA] MapleBitCMS

    [BETA] MapleBitCMS
    Wow much nice!

  2. #77
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by Kerning View Post
    Wow much nice!
    thanks!
    edit:
    My Characters:


    Slightly nicer timestamps:


    edit2: Fixed potentially site breaking vulnerability. Also made some misc. changes to gm panel and ucp.
    Last edited by greenelfx; 20-01-14 at 06:55 PM.

  3. #78
    Registered brunno97 is offline
    MemberRank
    Feb 2009 Join Date
    BrazilLocation
    13Posts

    Re: [BETA] MapleBitCMS

    Can anyone help me with this error? I put my username and password correctly and still keeps popping up what is wrong, then I squeeze F5 and opens the panel.

    error:

  4. #79
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by brunno97 View Post
    Can anyone help me with this error? I put my username and password correctly and still keeps popping up what is wrong, then I squeeze F5 and opens the panel.

    error:
    When did you download MapleBit?

  5. #80
    Member Hao Yi is offline
    MemberRank
    May 2013 Join Date
    88Posts

    Re: [BETA] MapleBitCMS

    how to be a web admin?

  6. #81
    Registered brunno97 is offline
    MemberRank
    Feb 2009 Join Date
    BrazilLocation
    13Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by greenelfx View Post
    When did you download MapleBit?
    a while ago, in the admin panel does not have to change the home page news and also do not have to add the page.

  7. #82
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by brunno97 View Post
    a while ago, in the admin panel does not have to change the home page news and also do not have to add the page.
    Try downloading the latest version then, I think I fixed that problem a while ago.

    Quote Originally Posted by Hao Yi View Post
    how to be a web admin?
    Open up MySQL Query Browser, go to your accounts table, find your account name, scroll until you see "webadmin", and then edit that value to 1.

  8. #83
    Member JsPastel is offline
    MemberRank
    Dec 2013 Join Date
    72Posts

    Re: [BETA] MapleBitCMS

    ( ! ) Warning: Division by zero in C:\wamp\www\maple\sources\public\news.php on line 43
    Call Stack
    # Time Memory Function Location
    1 0.0002 149944 {main}( ) ..\index.php:0
    2 0.0193 370176 include( 'C:\wamp\www\maple\sources\public\main.php' ) ..\index.php:30
    3 0.0197 409616 include( 'C:\wamp\www\maple\sources\public\news.php' ) ..\main.php:35

    ( ! ) Warning: Division by zero in C:\wamp\www\maple\sources\public\news.php on line 44
    Call Stack
    # Time Memory Function Location
    1 0.0002 149944 {main}( ) ..\index.php:0
    2 0.0193 370176 include( 'C:\wamp\www\maple\sources\public\main.php' ) ..\index.php:30
    3 0.0197 409616 include( 'C:\wamp\www\maple\sources\public\news.php' ) ..\main.php:35

    ( ! ) Warning: Division by zero in C:\wamp\www\maple\sources\public\news.php on line 45
    Call Stack
    # Time Memory Function Location
    1 0.0002 149944 {main}( ) ..\index.php:0
    2 0.0193 370176 include( 'C:\wamp\www\maple\sources\public\main.php' ) ..\index.php:30
    3 0.0197 409616 include( 'C:\wamp\www\maple\sources\public\news.php' ) ..\main.php:35



    I having this problem in my news =(

  9. #84
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by JsPastel View Post
    ( ! ) Warning: Division by zero in C:\wamp\www\maple\sources\public\news.php on line 43
    Call Stack
    # Time Memory Function Location
    1 0.0002 149944 {main}( ) ..\index.php:0
    2 0.0193 370176 include( 'C:\wamp\www\maple\sources\public\main.php' ) ..\index.php:30
    3 0.0197 409616 include( 'C:\wamp\www\maple\sources\public\news.php' ) ..\main.php:35

    ( ! ) Warning: Division by zero in C:\wamp\www\maple\sources\public\news.php on line 44
    Call Stack
    # Time Memory Function Location
    1 0.0002 149944 {main}( ) ..\index.php:0
    2 0.0193 370176 include( 'C:\wamp\www\maple\sources\public\main.php' ) ..\index.php:30
    3 0.0197 409616 include( 'C:\wamp\www\maple\sources\public\news.php' ) ..\main.php:35

    ( ! ) Warning: Division by zero in C:\wamp\www\maple\sources\public\news.php on line 45
    Call Stack
    # Time Memory Function Location
    1 0.0002 149944 {main}( ) ..\index.php:0
    2 0.0193 370176 include( 'C:\wamp\www\maple\sources\public\main.php' ) ..\index.php:30
    3 0.0197 409616 include( 'C:\wamp\www\maple\sources\public\news.php' ) ..\main.php:35



    I having this problem in my news =(
    Is this the latest version of MapleBit? I remember fixing this issue.
    Edit: Fixed. Please redownload!
    Last edited by greenelfx; 27-01-14 at 02:11 PM.

  10. #85
    Member JsPastel is offline
    MemberRank
    Dec 2013 Join Date
    72Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by greenelfx View Post
    Is this the latest version of MapleBit? I remember fixing this issue.
    Edit: Fixed. Please redownload!
    Ok tq it works =)

    How about the vote system , it show
    Code:
    Error - Could not update vote points!
    Is there anyway to fix?

  11. #86
    Beep Boop Rampenbram is offline
    True MemberRank
    Feb 2009 Join Date
    The NetherlandsLocation
    340Posts

    Re: [BETA] MapleBitCMS

    This is a simple edit that makes voting works. It uses 'vpoints' and it gives you 2 votepoints.

    Vote.php > \MapleBit-master\sources\public\vote.php
    PHP Code:
    <h2 class="text-left">Vote</h2><hr/>
    <?php
        $earnedpoints 
    false;
        
    $insertnew false
        
    $time $mysqli->real_escape_string(time());  
        
    $redirect "";
        
    $getaccount $mysqli->real_escape_string(@$_POST['name']);  
        
    $account preg_replace("/[^A-Za-z0-9 ]/"''$getaccount);
        
    $checkacc $mysqli->query("SELECT * FROM accounts WHERE name = '$account'");
        
    $countcheckacc $checkacc->num_rows;
        if(
    $countcheckacc == && isset($_POST['submit'])) { $funct_error =  "This account doesn't exist!"; }
        elseif (
    $account == '' && isset($_POST['submit'])) {$funct_error 'You need to put in a username!';} 
        elseif(isset(
    $_POST['submit'])) { 
            
    $result $mysqli->query("SELECT *, SUM(times) as amount FROM ".$prefix."votingrecords WHERE NOT account='' AND NOT account='0' AND account='".$account."' OR ip='".$ipaddress."'") or die('Error - Could not look up vote record!');  
            
    $row $result->fetch_assoc();
            
    $timecalc $time $row['date']; 

            if (
    $row['amount'] == '' || $timecalc $vtime) { 
                if(
    $row['amount'] == '') { 
                    
    $result $mysqli->query("INSERT INTO ".$prefix."votingrecords (ip, account, date, times) VALUES ('".$ipaddress."', '".$account."', '".$time."', '1')") or die ('Error - Could not update vote records!'); 
                } 
                else { 
                    
    $result $mysqli->query("UPDATE ".$prefix."votingrecords SET ip='".$ipaddress."', account='".$account."', date='".$time."', times='1' WHERE ip='".$ipaddress."' OR account='".$account."'") or die ('Error - Could not update vote records!'); 
                } 
                
    $earnedpoints true;  
                if (
    $earnedpoints == true) { 
                    if (
    $account != '') {$result $mysqli->query("UPDATE accounts SET vpoints = vpoints + '2' WHERE name='".$account."'") or die ('Error - Could not update vote points!');} 
                    
    $funct_msg '<meta http-equiv="refresh" content="0; url='.$vlink.'">'
                    
    $redirect true
                } 
            } 
            elseif(
    $timecalc $vtime && $row['amount'] != '') { 
                
    $funct_msg 'You\'ve already voted within the last '.round($vtime/3600).' hours!'
                
    $funct_msg .= '<br />Vote time: 'date('M d\, h:i A'$row['date']); 
            } 
            else { 
                
    $funct_error 'Unknown Error'
            } 
        } 
        if(
    $redirect == true) { 
            echo 
    $funct_msg
        } 
         
        else { 
    ?> 
    <div class="alert alert-info">You can vote 1 time every <?php echo round($vtime/3600) . " hours for " $gvp " votepoints and " round($gnx/1000) . "k NX. Make sure to be logged off while voting!</div>"?>
    <form method="post">  
        <?php  
            
    if(isset($funct_msg)) {echo '<div class="alert alert-danger">'.$funct_msg.'</div>';}  
            if(isset(
    $funct_error)) {echo '<div class="alert alert-danger">'.$funct_error.'</div>';}
            if(!isset(
    $_SESSION['id'])) {
                echo 
    "<input type=\"text\" name=\"name\" maxlength=\"15\" class=\"form-control\" placeholder=\"Username\" required autocomplete=\"off\"/><br/>";
            } else {
                echo 
    "<input type=\"text\" name=\"name\" maxlength=\"15\" class=\"form-control\" placeholder=\"".$_SESSION['name']."\" value=\"".$_SESSION['name']."\"required autocomplete=\"off\" readonly=\"readonly\"/><br/>";
            }
        
    ?>
        
        <input type="submit" name="submit" value="Submit &raquo;" class="btn btn-primary"/>
    </form> 
    <br/>
    <?php ?>
    ofc all credits goes to greenelfx !

    - - - Updated - - -

    And here a v142.2 ranking script.

    http://www.mediafire.com/download/yx...71o2g/rank.rar the rank images.

    PHP Code:
    <h2 class="text-left">Rankings</h2>
    <hr/>
    <?php
    error_reporting
    (-1);
    $egetjob $mysqli->real_escape_string(@$_GET['job']);
    $getjob preg_replace("/[^A-Za-z0-9 ]/"''$egetjob); # Escape and Strip
    $dir "/";
    if(@
    $getjob != NULL && ctype_alpha($getjob)) {
        if(
    $getjob == "beginner"){
            
    $show "AND c.job = 000 OR c.job = 1000 OR c.job = 3000";
        }
        elseif(
    $getjob == "warrior"){
            
    $show "AND c.job = 100 OR c.job = 110 OR c.job = 120 OR c.job = 130 OR c.job = 121 OR c.job = 112 OR c.job = 122 OR c.job = 132";
        }
        elseif(
    $getjob == "magician"){
            
    $show "AND c.job = 210 OR c.job = 220 OR c.job = 230 OR c.job = 211 OR c.job = 221 OR c.job = 231 OR c.job = 212 OR c.job = 222 OR c.job = 232";
        }
        elseif(
    $getjob == "bowman"){
            
    $show "AND c.job = 300 OR c.job = 310 OR c.job = 320 OR c.job = 311 OR c.job = 321 OR c.job = 312 OR c.job = 322";
        }
        elseif(
    $getjob == "thief"){
            
    $show "AND c.job = 400 OR c.job = 410 OR c.job = 420 OR c.job = 411 OR c.job = 421 OR c.job = 422";
        }    
        elseif(
    $getjob == "pirate"){
            
    $show "AND c.job = 500 OR c.job = 500 OR c.job = 510 OR c.job = 520 OR c.job = 511 OR c.job = 521 OR c.job = 512 OR c.job = 522";
        }
        elseif(
    $getjob == "aran"){
            
    $show "AND c.job = 2000 OR c.job = 2100 OR c.job = 2110 OR c.job = 2111 OR c.job = 2112";
        }
        elseif(
    $getjob == "DawnWarrior"){
            
    $show "AND c.job = 1000 OR c.job = 1200 OR c.job = 1210 OR c.job = 1211 OR c.job = 1212";
        }
        elseif(
    $getjob == "BlazeMage"){
            
    $show "AND c.job = 2000 OR c.job = 1200 OR c.job = 1210 OR c.job = 1211 OR c.job = 1212";
        }
        elseif(
    $getjob == "WindArcher"){
            
    $show "AND c.job = 2000 OR c.job = 1300 OR c.job = 1310 OR c.job = 1311 OR c.job = 1312";
        }
        elseif(
    $getjob == "NightWalker"){
            
    $show "AND c.job = 2000 OR c.job = 1400 OR c.job = 1410 OR c.job = 1411 OR c.job = 1412";
        }
        elseif(
    $getjob == "ThunderBreaker"){
            
    $show "AND c.job = 2000 OR c.job = 1500 OR c.job = 1510 OR c.job = 1511 OR c.job = 1512";
        }
        elseif(
    $getjob == "Legend"){
            
    $show "AND c.job = 2000 OR c.job = 2002 OR c.job = 2001";
        }
        elseif(
    $getjob == "Evan"){
            
    $show "AND c.job = 2200 OR c.job = 2210 OR c.job = 2211 OR c.job = 2212 OR c.job = 2213 OR c.job = 2214 OR c.job = 2215 OR c.job = 2216 OR c.job = 2217 OR c.job = 2218";
        }
        elseif(
    $getjob == "Dualblade"){
            
    $show "AND c.job = 430 OR c.job = 431 OR c.job = 432 OR c.job = 433 OR c.job = 434";
        }
        elseif(
    $getjob == "Cannon"){
            
    $show "AND c.job = 530 OR c.job = 531 OR c.job = 532";
        }
        elseif(
    $getjob == "Jett"){
            
    $show "AND c.job = 508 OR c.job = 570 OR c.job = 571 OR c.job = 572";
        }
        elseif(
    $getjob == "Mercedes"){
            
    $show "AND c.job = 2002 OR c.job = 2300 OR c.job = 2310 OR c.job = 2311 OR c.job = 2312";
        }
        elseif(
    $getjob == "Phantom"){
            
    $show "AND c.job = 2003 OR c.job = 2400 OR c.job = 2410 OR c.job = 2411 OR c.job = 2412";
        }
        elseif(
    $getjob == "Luminous"){
            
    $show "AND c.job = 2004 OR c.job = 2700 OR c.job = 2710 OR c.job = 2711 OR c.job = 2712";
        }
        elseif(
    $getjob == "DemonSlayer"){
            
    $show "AND c.job = 3001 OR c.job = 3100 OR c.job = 3110 OR c.job = 3111 OR c.job = 3112";
        }
        elseif(
    $getjob == "DemonAvenger"){
            
    $show "AND c.job = 3001 OR c.job = 3100 OR c.job = 3120 OR c.job = 3121 OR c.job = 3122";
        }
        elseif(
    $getjob == "BattleMage"){
            
    $show "AND c.job = 3200 OR c.job = 3210 OR c.job = 3210 OR c.job = 3211 OR c.job = 3212";
        }
        elseif(
    $getjob == "WildHunter"){
            
    $show "AND c.job = 3300 OR c.job = 3300 OR c.job = 3310 OR c.job = 3311 OR c.job = 3312";
        }
        elseif(
    $getjob == "Mechanic"){
            
    $show "AND c.job = 3500 OR c.job = 3500 OR c.job = 3510 OR c.job = 3511 OR c.job = 3512";
        }
        elseif(
    $getjob == "Xenon"){
            
    $show "AND c.job = 3600 OR c.job = 3600 OR c.job = 3610 OR c.job = 3611 OR c.job = 3612";
        }
        elseif(
    $getjob == "Hayato"){
            
    $show "AND c.job = 4001 OR c.job = 4100 OR c.job = 4110 OR c.job = 4111 OR c.job = 4112";
        }
        elseif(
    $getjob == "Kanna"){
            
    $show "AND c.job = 4002 OR c.job = 4200 OR c.job = 4210 OR c.job = 4211 OR c.job = 4212";
        }
        elseif(
    $getjob == "Mihile"){
            
    $show "AND c.job = 5000 OR c.job = 5100 OR c.job = 5110 OR c.job = 5111 OR c.job = 5112";
        }
        elseif(
    $getjob == "Kaiser"){
            
    $show "AND c.job = 6000 OR c.job = 6100 OR c.job = 6110 OR c.job = 6111 OR c.job = 6112";
        }
        elseif(
    $getjob == "Angelic"){
            
    $show "AND c.job = 6500 OR c.job = 6500 OR c.job = 6510 OR c.job = 6511 OR c.job = 6512";
        }
        elseif(
    $getjob == "all"){
            
    $show "";
        }
    } else {
        
    $show "";
        
    $getjob "all";
    }
    $estart $mysqli->real_escape_string(@$_GET['start']);
    $start intval(+preg_replace("/[^A-Za-z0-9 ]/"''$estart)); # Escape and Strip and ensure it's a number

    $esearch $mysqli->real_escape_string(@$_GET['search']);
    $search preg_replace("/[^A-Za-z0-9 ]/"''$esearch); # Escape and Strip
    if(isset($search)) {
    $esearch $mysqli->real_escape_string(@$_POST['search']);
    $search preg_replace("/[^A-Za-z0-9 ]/"''$esearch); # Escape and Strip
        
    $csearch " AND c.name LIKE '".$search."%'";
    } else {
        
    $csearch "";
    }
    $order $mysqli->real_escape_string(@$_GET['order']);
    if(@
    $order) {
        
    $order $order." DESC,";
    } else {
            
    $order "";
            
    $result2 $mysqli->query("SELECT c.name , c.job , c.level, c.reborns, g.guildid, g.name AS gname, g.logo AS logo, g.logoColor AS logoColor, g.logoBGColor AS logoBGColor, g.logoBG AS logoBG FROM characters c LEFT JOIN guilds g ON c.guildid = g.guildid WHERE c.gm < '$gmlevel' ".$show."".$csearch." GROUP BY c.id DESC ORDER BY reborns DESC, level DESC LIMIT $start, 15") or die("IT IS LINE "__LINE__ "<br />" $mysqli->error);
            
    $num_players $result2->num_rows;
    }
    if(isset(
    $search)){
        
    $row_number 0;
        
    $int 0;
        while((
    $row $result2->fetch_assoc()) && !$row_number){
            if(
    strtolower($row['name']) == strtolower($search)){
                
    $row_number $int;
            }
            
    $int++;
        }
        if(
    $row_number){
            
    $start $row_number - ($row_number 5);
        }
    }
    $result $mysqli->query("SELECT c.name , c.job, c.level, c.reborns, g.guildid, g.name AS gname, g.logo AS logo, g.logoColor AS logoColor, g.logoBGColor AS logoBGColor, g.logoBG AS logoBG FROM characters c LEFT JOIN guilds g ON c.guildid = g.guildid WHERE c.gm < '$gmlevel' ".$show."".$csearch." GROUP BY c.id DESC ORDER BY reborns DESC, level DESC LIMIT $start, 15") or die("IT IS LINE "__LINE__ "<br />" $mysqli->error);
    echo 
    "
    <div class=\"row\">
    <div class=\"col-md-6\">
        <div class=\"well well2\" style=\"margin: 0 auto; display: inline-block;margin-bottom:0px;\">
        <a href=\"?base=main&page=rankings&job=beginner\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-legend.gif\" data-toggle=\"tooltip\" title=\"Beginner\"/></a>
        <a href=\"?base=main&page=rankings&job=warrior\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-warrior.gif\" data-toggle=\"tooltip\" title=\"Warrior\"/></a>
        <a href=\"?base=main&page=rankings&job=magician\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-magician.gif\" data-toggle=\"tooltip\" title=\"Magician\"/></a>
        <a href=\"?base=main&page=rankings&job=bowman\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-bowman.gif\" data-toggle=\"tooltip\" title=\"Bowman\"/></a>
        <a href=\"?base=main&page=rankings&job=thief\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-thief.gif\" data-toggle=\"tooltip\" title=\"Thief\"/></a>
        <a href=\"?base=main&page=rankings&job=pirate\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-pirate.gif\" data-toggle=\"tooltip\" title=\"Pirate\"/></a>
        <a href=\"?base=main&page=rankings&job=warrior\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-warrior.gif\" data-toggle=\"tooltip\" title=\"DawnWarrior\"/></a>
        <a href=\"?base=main&page=rankings&job=magician\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-magician.gif\" data-toggle=\"tooltip\" title=\"BlazeMage\"/></a>
        <a href=\"?base=main&page=rankings&job=bowman\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-bowman.gif\" data-toggle=\"tooltip\" title=\"WindArcher\"/></a>
        <a href=\"?base=main&page=rankings&job=thief\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-thief.gif\" data-toggle=\"tooltip\" title=\"NightWalker\"/></a>
        <a href=\"?base=main&page=rankings&job=pirate\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-pirate.gif\" data-toggle=\"tooltip\" title=\"ThunderBreaker\"/></a><br>
        <a href=\"?base=main&page=rankings&job=Legend\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-legend.gif\" data-toggle=\"tooltip\" title=\"Legend\"/></a>
        <a href=\"?base=main&page=rankings&job=aran\"><img src=\""
    .$siteurl."assets/img/rank/aran.png\" data-toggle=\"tooltip\" title=\"Aran\"/></a>
        <a href=\"?base=main&page=rankings&job=Evan\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-evan.gif\" data-toggle=\"tooltip\" title=\"Evan\"/></a>
        <a href=\"?base=main&page=rankings&job=Dualblade\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-dual_blade.gif\" data-toggle=\"tooltip\" title=\"Dualblade\"/></a>
        <a href=\"?base=main&page=rankings&job=aran\"><img src=\""
    .$siteurl."assets/img/rank/Icon-job-cannon_shooter.png\" data-toggle=\"tooltip\" title=\"Cannon\"/></a>
        <a href=\"?base=main&page=rankings&job=Cannon\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-jett.gif\" data-toggle=\"tooltip\" title=\"Jett\"/></a>
        <a href=\"?base=main&page=rankings&job=Mercedes\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mercedes.gif\" data-toggle=\"tooltip\" title=\"Mercedes\"/></a>
        <a href=\"?base=main&page=rankings&job=Phantom\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-phantom.gif\" data-toggle=\"tooltip\" title=\"Phantom\"/></a>
        <a href=\"?base=main&page=rankings&job=Luminous\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-luminous.png\" data-toggle=\"tooltip\" title=\"Luminous\"/></a>
        <a href=\"?base=main&page=rankings&job=DemonSlayer\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-demonslayer.gif\" data-toggle=\"tooltip\" title=\"DemonSlayer\"/></a>
        <a href=\"?base=main&page=rankings&job=DemonAvenger\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-demon_avenger.gif\" data-toggle=\"tooltip\" title=\"DemonAvenger\"/></a>
        <a href=\"?base=main&page=rankings&job=BattleMage\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-battle_mage.gif\" data-toggle=\"tooltip\" title=\"BattleMage\"/></a>
        <a href=\"?base=main&page=rankings&job=WildHunter\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-wild_hunter.gif\" data-toggle=\"tooltip\" title=\"WildHunter\"/></a>
        <a href=\"?base=main&page=rankings&job=Mechanic\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mechanic.gif\" data-toggle=\"tooltip\" title=\"Mechanic\"/></a>
        <a href=\"?base=main&page=rankings&job=Xenon\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-xenon.gif\" data-toggle=\"tooltip\" title=\"Xenon\"/></a>
        <a href=\"?base=main&page=rankings&job=Hayato\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-hayato.png\" data-toggle=\"tooltip\" title=\"Hayato\"/></a>
        <a href=\"?base=main&page=rankings&job=Kanna\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-kanna.png\" data-toggle=\"tooltip\" title=\"Kanna\"/></a>
        <a href=\"?base=main&page=rankings&job=Mihile\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mihile.gif\" data-toggle=\"tooltip\" title=\"Mihile\"/></a>
        <a href=\"?base=main&page=rankings&job=Kaiser\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-kaiser.png\" data-toggle=\"tooltip\" title=\"Kaiser\"/></a>
        <a href=\"?base=main&page=rankings&job=Angelic\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-angelic_buster.png\" data-toggle=\"tooltip\" title=\"Angelic\"/></a>
        </div>
    </div>
    <div class=\"col-md-5 col-md-offset-1\">
        <form id='search_form' method='post' action='?base=main&page=rankings&amp;order="
    .isset($_POST['order'])."&amp;search'>
                <div style=\"float:right;\">
                <div class=\"well well2\" style=\"margin-bottom:0px;\">
                    <div class=\"input-group\">            
                        <input type='text' name='search' id='s' class='form-control' placeholder='Character Name' required value='"
    .$search."'/>
                            <span class=\"input-group-btn\">
                                <button class=\"btn btn-primary\" type=\"submit\"><i class=\"icon-search\"></i> Search</button>
                            </span>
                    </div>
                </div>
            </div>
        </form>
        </div>
    </div><hr/>"
    ;
    echo 
    "
    <div class=\"table-responsive\">
    <table class=\"table table-striped table-hover center-table table-bordered\">
        <thead>
            <tr>
                <th>Rank</th>
                <th class=\"hidden-sm hidden-xs\">Picture</th>
                <th>Name</th>
                <th>Job</th>"
    ;
                if(
    $servertype == 1){
                    echo 
    "<th>Rebirths</th>";
                }
    echo 
    "        <th>Level</th>
            </tr>
        </thead>
    <tbody>"
    ;

    $ranking=$start;
    $backcolor="";
    $rootfolder "";
    require_once(
    "assets/img/GD/coordinates.php");
    require_once(
    "assets/img/GD/cache_character.php");    
    while(
    $row $result->fetch_assoc()) {
        
    $ranking++;
        
    $name $row['name'];
        
    createChar($name$rootfolder);
        
    $cachechar $mysqli->query("SELECT hash, name FROM ".$prefix."gdcache WHERE name='".$name."'")->fetch_assoc();
        echo 
    "
            <tr>
                <td><span class=\"badge\">
    $ranking</span></td>
                <td class=\"hidden-sm hidden-xs\"><img src=\""
    .$siteurl."assets/img/GD/Characters/".$cachechar['hash'].".png\" alt=\"".$cachechar['name']."\" class=\"avatar img-responsive\" style=\"margin: 0 auto;\"></td>
                <td><a href=\"?base=main&page=character&n="
    .$row['name']."\">".$row['name']."</a></td>
                <td>"
    ;
                    if (
    $row['job']=="000")
                        echo 
    "Beginner";
                    if (
    $row['job']=="100")
                        echo 
    "Warrior";
                    if (
    $row['job']=="110")
                        echo 
    "Fighter";
                    if (
    $row['job']=="120")
                        echo 
    "Page";
                    if (
    $row['job']=="130")
                        echo 
    "Spearman";
                    if (
    $row['job']=="111")
                        echo 
    "Crusader";
                    if (
    $row['job']=="121")
                        echo 
    "White Knight";
                    if (
    $row['job']=="131")
                        echo 
    "Dragon Knight";
                    if (
    $row['job']=="112")
                        echo 
    "Hero";
                    if (
    $row['job']=="122")
                        echo 
    "Paladin";
                    if (
    $row['job']=="132")
                        echo 
    "Dark Knight";
                    if (
    $row['job']=="200")
                        echo 
    "Magician";
                    if (
    $row['job']=="210")
                        echo 
    "Wizard";
                    if (
    $row['job']=="220")
                        echo 
    "Wizard";
                    if (
    $row['job']=="230")
                        echo 
    "Cleric";
                    if (
    $row['job']=="211")
                        echo 
    "Mage";
                    if (
    $row['job']=="221")
                        echo 
    "Mage";
                    if (
    $row['job']=="231")
                        echo 
    "Priest";
                    if (
    $row['job']=="212")
                        echo 
    "Arch Mage";
                    if (
    $row['job']=="222")
                        echo 
    "Arch Mage";
                    if (
    $row['job']=="232")
                        echo 
    "Bishop";
                    if (
    $row['job']=="300")
                        echo 
    "Bowman";
                    if (
    $row['job']=="310")
                        echo 
    "Hunter";
                    if (
    $row['job']=="320")
                        echo 
    "Crossbowman";
                    if (
    $row['job']=="311")
                        echo 
    "Ranger";
                    if (
    $row['job']=="321")
                        echo 
    "Sniper";
                    if (
    $row['job']=="312")
                        echo 
    "Bow Master";
                    if (
    $row['job']=="322")
                        echo 
    "Crossbow Master";
                    if (
    $row['job']=="400")
                        echo 
    "Thief";
                    if (
    $row['job']=="410")
                        echo 
    "Assassin";
                    if (
    $row['job']=="420")
                        echo 
    "Bandit";
                    if (
    $row['job']=="411")
                        echo 
    "Hermit";
                    if (
    $row['job']=="421")
                        echo 
    "Chief Bandit";
                    if (
    $row['job']=="412")
                        echo 
    "Night Lord";
                    if (
    $row['job']=="422")
                        echo 
    "Shadower";
                    if (
    $row['job']=="500")
                        echo 
    "Pirate";
                    if (
    $row['job']=="501")
                        echo 
    "Cannon Shooter";    
                    if (
    $row['job']=="510")
                        echo 
    "Brawler";
                    if (
    $row['job']=="520")
                        echo 
    "Gunslinger";
                    if (
    $row['job']=="511")
                        echo 
    "Marauder";
                    if (
    $row['job']=="521")
                        echo 
    "Buccaneer";
                    if (
    $row['job']=="512")
                        echo 
    "Outlaw";
                    if (
    $row['job']=="522")
                        echo 
    "Corsair";
                        
    //Explorers
                        //Dualblader
                    
    if ($row['job']=="430")
                        echo 
    "Blade Recruit";
                    if (
    $row['job']=="431")
                        echo 
    "Blade Acolyte";    
                    if (
    $row['job']=="432")
                        echo 
    "Blade Specialist";
                    if (
    $row['job']=="433")
                        echo 
    "Blade Lord";    
                    if (
    $row['job']=="434")
                        echo 
    "Blade Master";
                        
    //Dualblader
                        //Cannon shooter
                    
    if ($row['job']=="530")
                        echo 
    "Cannonneer";
                    if (
    $row['job']=="531")
                        echo 
    "Cannon Blaster";    
                    if (
    $row['job']=="532")
                        echo 
    "Cannon Master";
                        
    //Cannon shooter
                        //Jett
                    
    if ($row['job']=="508")
                        echo 
    "Jett 1";
                    if (
    $row['job']=="570")
                        echo 
    "Jett 2";    
                    if (
    $row['job']=="571")
                        echo 
    "Jett 3";
                    if (
    $row['job']=="572")
                        echo 
    "Jett 4";
                        
    //Jett
                        //Cygnus knights
                    
    if ($row['job']=="1000")
                        echo 
    "Noblesse";
                    if (
    $row['job']=="1100")
                        echo 
    "Dawn Warrior 1";
                    if (
    $row['job']=="1110")
                        echo 
    "Dawn Warrior 2";
                    if (
    $row['job']=="1111")
                        echo 
    "Dawn Warrior 3";
                    if (
    $row['job']=="1112")
                        echo 
    "Dawn Warrior 4";
                    if (
    $row['job']=="1200")
                        echo 
    "Blaze Mage 1";
                    if (
    $row['job']=="1210")
                        echo 
    "Blaze Mage 2";
                    if (
    $row['job']=="1211")
                        echo 
    "Blaze Mage 3";
                    if (
    $row['job']=="1212")
                        echo 
    "Blaze Mage 4";
                    if (
    $row['job']=="1300")
                        echo 
    "Wind Archer 1";
                    if (
    $row['job']=="1310")
                        echo 
    "Wind Archer 2";
                    if (
    $row['job']=="1311")
                        echo 
    "Wind Archer 3";
                    if (
    $row['job']=="1312")
                        echo 
    "Wind Archer 4";
                    if (
    $row['job']=="1400")
                        echo 
    "Night walker 1";
                    if (
    $row['job']=="1410")
                        echo 
    "Night walker 2";
                    if (
    $row['job']=="1411")
                        echo 
    "Night walker 3";
                    if (
    $row['job']=="1412")
                        echo 
    "Night walker 4";
                    if (
    $row['job']=="1500")
                        echo 
    "Thunder Breaker 1";
                    if (
    $row['job']=="1510")
                        echo 
    "Thunder Breaker 2";
                    if (
    $row['job']=="1511")
                        echo 
    "Thunder Breaker 3";
                    if (
    $row['job']=="1512")
                        echo 
    "Thunder Breaker 4";
                        
    //Cygnus knights
                        //Legends
                    
    if ($row['job']=="2000")
                        echo 
    "Legend";
                    if (
    $row['job']=="2001")
                        echo 
    "Evan0";    
                        
    //Legends
                        //Aran
                    
    if ($row['job']=="2100")
                        echo 
    "Aran 1";
                    if (
    $row['job']=="2110")
                        echo 
    "Aran 2";    
                    if (
    $row['job']=="2111")
                        echo 
    "Aran 3";
                    if (
    $row['job']=="2112")
                        echo 
    "Aran 4";    
                        
    //Aran
                        //Evan
                    
    if ($row['job']=="2200")
                        echo 
    "Evan 1";
                    if (
    $row['job']=="2210")
                        echo 
    "Evan 2";    
                    if (
    $row['job']=="2211")
                        echo 
    "Evan 3";
                    if (
    $row['job']=="2212")
                        echo 
    "Evan 4";    
                    if (
    $row['job']=="2213")
                        echo 
    "Evan 5";
                    if (
    $row['job']=="2214")
                        echo 
    "Evan 6";    
                    if (
    $row['job']=="2215")
                        echo 
    "Evan 7";
                    if (
    $row['job']=="2216")
                        echo 
    "Evan 8";
                    if (
    $row['job']=="2217")
                        echo 
    "Evan 9";
                    if (
    $row['job']=="2218")
                        echo 
    "Evan 10";
                        
    //Evan
                        //Mercedes
                    
    if ($row['job']=="2002")
                        echo 
    "Mercedes";
                    if (
    $row['job']=="2300")
                        echo 
    "Mercedes 1";    
                    if (
    $row['job']=="2310")
                        echo 
    "Mercedes 2";    
                    if (
    $row['job']=="2311")
                        echo 
    "Mercedes 3";
                    if (
    $row['job']=="2312")
                        echo 
    "Mercedes 4";    
                        
    //Mercedes
                        //Phantom
                    
    if ($row['job']=="2003")
                        echo 
    "Phantom";
                    if (
    $row['job']=="2400")
                        echo 
    "Phantom 1";    
                    if (
    $row['job']=="2410")
                        echo 
    "Phantom 2";    
                    if (
    $row['job']=="2411")
                        echo 
    "Phantom 3";
                    if (
    $row['job']=="2412")
                        echo 
    "Phantom 4";    
                        
    //Phantom
                        //Luminous
                    
    if ($row['job']=="2004")
                        echo 
    "Luminous";
                    if (
    $row['job']=="2700")
                        echo 
    "Luminous 1";    
                    if (
    $row['job']=="2710")
                        echo 
    "Luminous 2";    
                    if (
    $row['job']=="2711")
                        echo 
    "Luminous 3";
                    if (
    $row['job']=="2712")
                        echo 
    "Luminous 4";    
                        
    //Luminous
                        //Demon Slayer
                    
    if ($row['job']=="3000")
                        echo 
    "Citizen";
                    if (
    $row['job']=="3001")
                        echo 
    "Demon Slayer";
                    if (
    $row['job']=="3100")
                        echo 
    "Demon Slayer 1";    
                    if (
    $row['job']=="3110")
                        echo 
    "Demon Slayer 2";    
                    if (
    $row['job']=="3111")
                        echo 
    "Demon Slayer 3";
                    if (
    $row['job']=="3112")
                        echo 
    "Demon Slayer 4";    
                        
    //Demon Slayer
                        //Demon Avenger
                    
    if ($row['job']=="3101")
                        echo 
    "Demon Avenger 1";    
                    if (
    $row['job']=="3120")
                        echo 
    "Demon Avenger 2";    
                    if (
    $row['job']=="3121")
                        echo 
    "Demon Avenger 3";
                    if (
    $row['job']=="3122")
                        echo 
    "Demon Avenger 4";    
                        
    //Demon Avenger
                        //Battle Mage
                    
    if ($row['job']=="3200")
                        echo 
    "Battle Mage 1";    
                    if (
    $row['job']=="3210")
                        echo 
    "Battle Mage 2";    
                    if (
    $row['job']=="3211")
                        echo 
    "Battle Mage 3";
                    if (
    $row['job']=="3212")
                        echo 
    "Battle Mage 4";    
                        
    //Battle Mage
                        //Wild hunter
                    
    if ($row['job']=="3300")
                        echo 
    "Wild hunter 1";    
                    if (
    $row['job']=="3310")
                        echo 
    "Wild hunter 2";    
                    if (
    $row['job']=="3311")
                        echo 
    "Wild hunter 3";
                    if (
    $row['job']=="3312")
                        echo 
    "Wild hunter 4";    
                        
    //Wild hunter
                        //mechanic
                    
    if ($row['job']=="3500")
                        echo 
    "mechanic 1";    
                    if (
    $row['job']=="3510")
                        echo 
    "mechanic 2";    
                    if (
    $row['job']=="3511")
                        echo 
    "mechanic 3";
                    if (
    $row['job']=="3512")
                        echo 
    "mechanic 4";    
                        
    //mechanic
                        //Xenon
                    
    if ($row['job']=="3002")
                        echo 
    "Xenon";    
                    if (
    $row['job']=="3600")
                        echo 
    "Xenon 1";    
                    if (
    $row['job']=="3610")
                        echo 
    "Xenon 2";    
                    if (
    $row['job']=="3611")
                        echo 
    "Xenon 3";
                    if (
    $row['job']=="3612")
                        echo 
    "Xenon 4";    
                        
    //Xenon
                        //Hayato
                    
    if ($row['job']=="4001")
                        echo 
    "Hayato";    
                    if (
    $row['job']=="4002")
                        echo 
    "Kanna";    
                    if (
    $row['job']=="4100")
                        echo 
    "Hayato 1";    
                    if (
    $row['job']=="4110")
                        echo 
    "Hayato 2";
                    if (
    $row['job']=="4111")
                        echo 
    "Hayato 3";
                    if (
    $row['job']=="4112")
                        echo 
    "Hayato 4";
                    if (
    $row['job']=="4200")
                        echo 
    "Kanna 1";    
                    if (
    $row['job']=="4210")
                        echo 
    "Kanna 2";
                    if (
    $row['job']=="4211")
                        echo 
    "Kanna 3";
                    if (
    $row['job']=="4212")
                        echo 
    "Kanna 4";
                        
    //Hayato
                        //Mihile
                    
    if ($row['job']=="5000")
                        echo 
    "Mihile";    
                    if (
    $row['job']=="5100")
                        echo 
    "Mihile 1";    
                    if (
    $row['job']=="5110")
                        echo 
    "Mihile 2";    
                    if (
    $row['job']=="5111")
                        echo 
    "Mihile 3";
                    if (
    $row['job']=="5112")
                        echo 
    "Mihile 4";    
                        
    //Mihile
                        //Kaiser
                    
    if ($row['job']=="6000")
                        echo 
    "Kaiser";    
                    if (
    $row['job']=="6100")
                        echo 
    "Kaiser 1";    
                    if (
    $row['job']=="6110")
                        echo 
    "Kaiser 2";    
                    if (
    $row['job']=="6111")
                        echo 
    "Kaiser 3";
                    if (
    $row['job']=="6112")
                        echo 
    "Kaiser 4";    
                        
    //Kaiser
                        //Angelic Buster
                    
    if ($row['job']=="6001")
                        echo 
    "Angelic Buster";    
                    if (
    $row['job']=="6500")
                        echo 
    "Angelic Buster 1";    
                    if (
    $row['job']=="6510")
                        echo 
    "Angelic Buster 2";    
                    if (
    $row['job']=="6511")
                        echo 
    "Angelic Buster 3";
                    if (
    $row['job']=="6512")
                        echo 
    "Angelic Buster 4";    
                        
    //Angelic Buster
                    
    if ($row['job']=="800")
                        echo 
    "Manager";
                    if (
    $row['job']=="900")
                        echo 
    "GMs";
                    if (
    $row['job']=="910")
                        echo 
    "SuperGM";
            
        if(
    $servertype == 1){
            echo 
    "</td>
                <td>"
    .$row['reborns']."</td>";
        }            
        echo 
    "
                <td>"
    .$row['level']."</td>
            </tr>"
    ;                
        }
    echo 
    "
        </tbody>
    </table>
    </div>
    <ul class=\"pager\">
        "
    ;

    if(
    $start == || $start<=15) {
        echo 
    "  <li class=\"previous\"><a href=\"?base=main&page=rankings&job=".$getjob."/\"><i class=\"icon-arrow-left\"></i> Previous</a></li>";
    }
    else{
            echo 
    "<li class=\"previous\"><a href=\"?base=main&page=rankings&job=".$getjob."&start="abs($start 15) ."\"><i class=\"icon-arrow-left\"></i> Previous</a></li>";
    }
    echo
    "
        <li class=\"next\"><a href=\"?base=main&page=rankings&job="
    .$getjob."&start="abs($start 15) ."\">Next<i class=\"icon-arrow-right\"></i></a></li>";
    ?>

    </ul>

    Lars, creator of BoomBoomMS - 2009 / 2016

  12. #87
    Member vZero is offline
    MemberRank
    Dec 2013 Join Date
    United StatesLocation
    87Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by Rampenbram View Post
    This is a simple edit that makes voting works. It uses 'vpoints' and it gives you 2 votepoints.

    Vote.php > \MapleBit-master\sources\public\vote.php
    PHP Code:
    <h2 class="text-left">Vote</h2><hr/>
    <?php
        $earnedpoints 
    false;
    $insertnew false
        
    $time $mysqli->real_escape_string(time());  
    $redirect "";
        
    $getaccount $mysqli->real_escape_string(@$_POST['name']);  
    $account preg_replace("/[^A-Za-z0-9 ]/"''$getaccount);
    $checkacc $mysqli->query("SELECT * FROM accounts WHERE name = '$account'");
    $countcheckacc $checkacc->num_rows;
    if(
    $countcheckacc == && isset($_POST['submit'])) { $funct_error =  "This account doesn't exist!"; }
    elseif (
    $account == '' && isset($_POST['submit'])) {$funct_error 'You need to put in a username!';} 
        elseif(isset(
    $_POST['submit'])) { 
            
    $result $mysqli->query("SELECT *, SUM(times) as amount FROM ".$prefix."votingrecords WHERE NOT account='' AND NOT account='0' AND account='".$account."' OR ip='".$ipaddress."'") or die('Error - Could not look up vote record!');  
            
    $row $result->fetch_assoc();
            
    $timecalc $time $row['date']; 

            if (
    $row['amount'] == '' || $timecalc $vtime) { 
                if(
    $row['amount'] == '') { 
                    
    $result $mysqli->query("INSERT INTO ".$prefix."votingrecords (ip, account, date, times) VALUES ('".$ipaddress."', '".$account."', '".$time."', '1')") or die ('Error - Could not update vote records!'); 
                } 
                else { 
                    
    $result $mysqli->query("UPDATE ".$prefix."votingrecords SET ip='".$ipaddress."', account='".$account."', date='".$time."', times='1' WHERE ip='".$ipaddress."' OR account='".$account."'") or die ('Error - Could not update vote records!'); 
                } 
                
    $earnedpoints true;  
                if (
    $earnedpoints == true) { 
                    if (
    $account != '') {$result $mysqli->query("UPDATE accounts SET vpoints = vpoints + '2' WHERE name='".$account."'") or die ('Error - Could not update vote points!');} 
    $funct_msg '<meta http-equiv="refresh" content="0; url='.$vlink.'">'
                    
    $redirect true
                } 
            } 
            elseif(
    $timecalc $vtime && $row['amount'] != '') { 
                
    $funct_msg 'You\'ve already voted within the last '.round($vtime/3600).' hours!'
                
    $funct_msg .= '<br />Vote time: 'date('M d\, h:i A'$row['date']); 
            } 
            else { 
                
    $funct_error 'Unknown Error'
            } 
        } 
        if(
    $redirect == true) { 
            echo 
    $funct_msg
        } 
         
        else { 
    ?> 
    <div class="alert alert-info">You can vote 1 time every <?php echo round($vtime/3600) . " hours for " $gvp " votepoints and " round($gnx/1000) . "k NX. Make sure to be logged off while voting!</div>"?>
    <form method="post">  
    <?php  
    if(isset($funct_msg)) {echo '<div class="alert alert-danger">'.$funct_msg.'</div>';}  
    if(isset(
    $funct_error)) {echo '<div class="alert alert-danger">'.$funct_error.'</div>';}
    if(!isset(
    $_SESSION['id'])) {
    echo 
    "<input type=\"text\" name=\"name\" maxlength=\"15\" class=\"form-control\" placeholder=\"Username\" required autocomplete=\"off\"/><br/>";
    } else {
    echo 
    "<input type=\"text\" name=\"name\" maxlength=\"15\" class=\"form-control\" placeholder=\"".$_SESSION['name']."\" value=\"".$_SESSION['name']."\"required autocomplete=\"off\" readonly=\"readonly\"/><br/>";
    }
    ?>

    <input type="submit" name="submit" value="Submit ┬╗" class="btn btn-primary"/>
    </form> 
    <br/>
    <?php ?>
    ofc all credits goes to greenelfx !

    - - - Updated - - -

    And here a v142.2 ranking script.

    http://www.mediafire.com/download/yx...71o2g/rank.rar the rank images.

    PHP Code:
    <h2 class="text-left">Rankings</h2>
    <hr/>
    <?php
    error_reporting
    (-1);
    $egetjob $mysqli->real_escape_string(@$_GET['job']);
    $getjob preg_replace("/[^A-Za-z0-9 ]/"''$egetjob); # Escape and Strip
    $dir "/";
    if(@
    $getjob != NULL && ctype_alpha($getjob)) {
    if(
    $getjob == "beginner"){
    $show "AND c.job = 000 OR c.job = 1000 OR c.job = 3000";
    }
    elseif(
    $getjob == "warrior"){
    $show "AND c.job = 100 OR c.job = 110 OR c.job = 120 OR c.job = 130 OR c.job = 121 OR c.job = 112 OR c.job = 122 OR c.job = 132";
    }
    elseif(
    $getjob == "magician"){
    $show "AND c.job = 210 OR c.job = 220 OR c.job = 230 OR c.job = 211 OR c.job = 221 OR c.job = 231 OR c.job = 212 OR c.job = 222 OR c.job = 232";
    }
    elseif(
    $getjob == "bowman"){
    $show "AND c.job = 300 OR c.job = 310 OR c.job = 320 OR c.job = 311 OR c.job = 321 OR c.job = 312 OR c.job = 322";
    }
    elseif(
    $getjob == "thief"){
    $show "AND c.job = 400 OR c.job = 410 OR c.job = 420 OR c.job = 411 OR c.job = 421 OR c.job = 422";
    }
    elseif(
    $getjob == "pirate"){
    $show "AND c.job = 500 OR c.job = 500 OR c.job = 510 OR c.job = 520 OR c.job = 511 OR c.job = 521 OR c.job = 512 OR c.job = 522";
    }
    elseif(
    $getjob == "aran"){
    $show "AND c.job = 2000 OR c.job = 2100 OR c.job = 2110 OR c.job = 2111 OR c.job = 2112";
    }
    elseif(
    $getjob == "DawnWarrior"){
    $show "AND c.job = 1000 OR c.job = 1200 OR c.job = 1210 OR c.job = 1211 OR c.job = 1212";
    }
    elseif(
    $getjob == "BlazeMage"){
    $show "AND c.job = 2000 OR c.job = 1200 OR c.job = 1210 OR c.job = 1211 OR c.job = 1212";
    }
    elseif(
    $getjob == "WindArcher"){
    $show "AND c.job = 2000 OR c.job = 1300 OR c.job = 1310 OR c.job = 1311 OR c.job = 1312";
    }
    elseif(
    $getjob == "NightWalker"){
    $show "AND c.job = 2000 OR c.job = 1400 OR c.job = 1410 OR c.job = 1411 OR c.job = 1412";
    }
    elseif(
    $getjob == "ThunderBreaker"){
    $show "AND c.job = 2000 OR c.job = 1500 OR c.job = 1510 OR c.job = 1511 OR c.job = 1512";
    }
    elseif(
    $getjob == "Legend"){
    $show "AND c.job = 2000 OR c.job = 2002 OR c.job = 2001";
    }
    elseif(
    $getjob == "Evan"){
    $show "AND c.job = 2200 OR c.job = 2210 OR c.job = 2211 OR c.job = 2212 OR c.job = 2213 OR c.job = 2214 OR c.job = 2215 OR c.job = 2216 OR c.job = 2217 OR c.job = 2218";
    }
    elseif(
    $getjob == "Dualblade"){
    $show "AND c.job = 430 OR c.job = 431 OR c.job = 432 OR c.job = 433 OR c.job = 434";
    }
    elseif(
    $getjob == "Cannon"){
    $show "AND c.job = 530 OR c.job = 531 OR c.job = 532";
    }
    elseif(
    $getjob == "Jett"){
    $show "AND c.job = 508 OR c.job = 570 OR c.job = 571 OR c.job = 572";
    }
    elseif(
    $getjob == "Mercedes"){
    $show "AND c.job = 2002 OR c.job = 2300 OR c.job = 2310 OR c.job = 2311 OR c.job = 2312";
    }
    elseif(
    $getjob == "Phantom"){
    $show "AND c.job = 2003 OR c.job = 2400 OR c.job = 2410 OR c.job = 2411 OR c.job = 2412";
    }
    elseif(
    $getjob == "Luminous"){
    $show "AND c.job = 2004 OR c.job = 2700 OR c.job = 2710 OR c.job = 2711 OR c.job = 2712";
    }
    elseif(
    $getjob == "DemonSlayer"){
    $show "AND c.job = 3001 OR c.job = 3100 OR c.job = 3110 OR c.job = 3111 OR c.job = 3112";
    }
    elseif(
    $getjob == "DemonAvenger"){
    $show "AND c.job = 3001 OR c.job = 3100 OR c.job = 3120 OR c.job = 3121 OR c.job = 3122";
    }
    elseif(
    $getjob == "BattleMage"){
    $show "AND c.job = 3200 OR c.job = 3210 OR c.job = 3210 OR c.job = 3211 OR c.job = 3212";
    }
    elseif(
    $getjob == "WildHunter"){
    $show "AND c.job = 3300 OR c.job = 3300 OR c.job = 3310 OR c.job = 3311 OR c.job = 3312";
    }
    elseif(
    $getjob == "Mechanic"){
    $show "AND c.job = 3500 OR c.job = 3500 OR c.job = 3510 OR c.job = 3511 OR c.job = 3512";
    }
    elseif(
    $getjob == "Xenon"){
    $show "AND c.job = 3600 OR c.job = 3600 OR c.job = 3610 OR c.job = 3611 OR c.job = 3612";
    }
    elseif(
    $getjob == "Hayato"){
    $show "AND c.job = 4001 OR c.job = 4100 OR c.job = 4110 OR c.job = 4111 OR c.job = 4112";
    }
    elseif(
    $getjob == "Kanna"){
    $show "AND c.job = 4002 OR c.job = 4200 OR c.job = 4210 OR c.job = 4211 OR c.job = 4212";
    }
    elseif(
    $getjob == "Mihile"){
    $show "AND c.job = 5000 OR c.job = 5100 OR c.job = 5110 OR c.job = 5111 OR c.job = 5112";
    }
    elseif(
    $getjob == "Kaiser"){
    $show "AND c.job = 6000 OR c.job = 6100 OR c.job = 6110 OR c.job = 6111 OR c.job = 6112";
    }
    elseif(
    $getjob == "Angelic"){
    $show "AND c.job = 6500 OR c.job = 6500 OR c.job = 6510 OR c.job = 6511 OR c.job = 6512";
    }
    elseif(
    $getjob == "all"){
    $show "";
    }
    } else {
    $show "";
    $getjob "all";
    }
    $estart $mysqli->real_escape_string(@$_GET['start']);
    $start intval(+preg_replace("/[^A-Za-z0-9 ]/"''$estart)); # Escape and Strip and ensure it's a number

    $esearch $mysqli->real_escape_string(@$_GET['search']);
    $search preg_replace("/[^A-Za-z0-9 ]/"''$esearch); # Escape and Strip
    if(isset($search)) {
    $esearch $mysqli->real_escape_string(@$_POST['search']);
    $search preg_replace("/[^A-Za-z0-9 ]/"''$esearch); # Escape and Strip
    $csearch " AND c.name LIKE '".$search."%'";
    } else {
    $csearch "";
    }
    $order $mysqli->real_escape_string(@$_GET['order']);
    if(@
    $order) {
    $order $order." DESC,";
    } else {
    $order "";
    $result2 $mysqli->query("SELECT c.name , c.job , c.level, c.reborns, g.guildid, g.name AS gname, g.logo AS logo, g.logoColor AS logoColor, g.logoBGColor AS logoBGColor, g.logoBG AS logoBG FROM characters c LEFT JOIN guilds g ON c.guildid = g.guildid WHERE c.gm < '$gmlevel' ".$show."".$csearch." GROUP BY c.id DESC ORDER BY reborns DESC, level DESC LIMIT $start, 15") or die("IT IS LINE "__LINE__ "<br />" $mysqli->error);
    $num_players $result2->num_rows;
    }
    if(isset(
    $search)){
    $row_number 0;
    $int 0;
    while((
    $row $result2->fetch_assoc()) && !$row_number){
    if(
    strtolower($row['name']) == strtolower($search)){
    $row_number $int;
    }
    $int++;
    }
    if(
    $row_number){
    $start $row_number - ($row_number 5);
    }
    }
    $result $mysqli->query("SELECT c.name , c.job, c.level, c.reborns, g.guildid, g.name AS gname, g.logo AS logo, g.logoColor AS logoColor, g.logoBGColor AS logoBGColor, g.logoBG AS logoBG FROM characters c LEFT JOIN guilds g ON c.guildid = g.guildid WHERE c.gm < '$gmlevel' ".$show."".$csearch." GROUP BY c.id DESC ORDER BY reborns DESC, level DESC LIMIT $start, 15") or die("IT IS LINE "__LINE__ "<br />" $mysqli->error);
    echo 
    "
    <div class=\"row\">
    <div class=\"col-md-6\">
    <div class=\"well well2\" style=\"margin: 0 auto; display: inline-block;margin-bottom:0px;\">
    <a href=\"?base=main&page=rankings&job=beginner\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-legend.gif\" data-toggle=\"tooltip\" title=\"Beginner\"/></a>
    <a href=\"?base=main&page=rankings&job=warrior\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-warrior.gif\" data-toggle=\"tooltip\" title=\"Warrior\"/></a>
    <a href=\"?base=main&page=rankings&job=magician\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-magician.gif\" data-toggle=\"tooltip\" title=\"Magician\"/></a>
    <a href=\"?base=main&page=rankings&job=bowman\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-bowman.gif\" data-toggle=\"tooltip\" title=\"Bowman\"/></a>
    <a href=\"?base=main&page=rankings&job=thief\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-thief.gif\" data-toggle=\"tooltip\" title=\"Thief\"/></a>
    <a href=\"?base=main&page=rankings&job=pirate\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-pirate.gif\" data-toggle=\"tooltip\" title=\"Pirate\"/></a>
    <a href=\"?base=main&page=rankings&job=warrior\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-warrior.gif\" data-toggle=\"tooltip\" title=\"DawnWarrior\"/></a>
    <a href=\"?base=main&page=rankings&job=magician\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-magician.gif\" data-toggle=\"tooltip\" title=\"BlazeMage\"/></a>
    <a href=\"?base=main&page=rankings&job=bowman\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-bowman.gif\" data-toggle=\"tooltip\" title=\"WindArcher\"/></a>
    <a href=\"?base=main&page=rankings&job=thief\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-thief.gif\" data-toggle=\"tooltip\" title=\"NightWalker\"/></a>
    <a href=\"?base=main&page=rankings&job=pirate\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-pirate.gif\" data-toggle=\"tooltip\" title=\"ThunderBreaker\"/></a><br>
    <a href=\"?base=main&page=rankings&job=Legend\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-legend.gif\" data-toggle=\"tooltip\" title=\"Legend\"/></a>
    <a href=\"?base=main&page=rankings&job=aran\"><img src=\""
    .$siteurl."assets/img/rank/aran.png\" data-toggle=\"tooltip\" title=\"Aran\"/></a>
    <a href=\"?base=main&page=rankings&job=Evan\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-evan.gif\" data-toggle=\"tooltip\" title=\"Evan\"/></a>
    <a href=\"?base=main&page=rankings&job=Dualblade\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-dual_blade.gif\" data-toggle=\"tooltip\" title=\"Dualblade\"/></a>
    <a href=\"?base=main&page=rankings&job=aran\"><img src=\""
    .$siteurl."assets/img/rank/Icon-job-cannon_shooter.png\" data-toggle=\"tooltip\" title=\"Cannon\"/></a>
    <a href=\"?base=main&page=rankings&job=Cannon\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-jett.gif\" data-toggle=\"tooltip\" title=\"Jett\"/></a>
    <a href=\"?base=main&page=rankings&job=Mercedes\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mercedes.gif\" data-toggle=\"tooltip\" title=\"Mercedes\"/></a>
    <a href=\"?base=main&page=rankings&job=Phantom\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-phantom.gif\" data-toggle=\"tooltip\" title=\"Phantom\"/></a>
    <a href=\"?base=main&page=rankings&job=Luminous\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-luminous.png\" data-toggle=\"tooltip\" title=\"Luminous\"/></a>
    <a href=\"?base=main&page=rankings&job=DemonSlayer\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-demonslayer.gif\" data-toggle=\"tooltip\" title=\"DemonSlayer\"/></a>
    <a href=\"?base=main&page=rankings&job=DemonAvenger\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-demon_avenger.gif\" data-toggle=\"tooltip\" title=\"DemonAvenger\"/></a>
    <a href=\"?base=main&page=rankings&job=BattleMage\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-battle_mage.gif\" data-toggle=\"tooltip\" title=\"BattleMage\"/></a>
    <a href=\"?base=main&page=rankings&job=WildHunter\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-wild_hunter.gif\" data-toggle=\"tooltip\" title=\"WildHunter\"/></a>
    <a href=\"?base=main&page=rankings&job=Mechanic\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mechanic.gif\" data-toggle=\"tooltip\" title=\"Mechanic\"/></a>
    <a href=\"?base=main&page=rankings&job=Xenon\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-xenon.gif\" data-toggle=\"tooltip\" title=\"Xenon\"/></a>
    <a href=\"?base=main&page=rankings&job=Hayato\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-hayato.png\" data-toggle=\"tooltip\" title=\"Hayato\"/></a>
    <a href=\"?base=main&page=rankings&job=Kanna\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-kanna.png\" data-toggle=\"tooltip\" title=\"Kanna\"/></a>
    <a href=\"?base=main&page=rankings&job=Mihile\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mihile.gif\" data-toggle=\"tooltip\" title=\"Mihile\"/></a>
    <a href=\"?base=main&page=rankings&job=Kaiser\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-kaiser.png\" data-toggle=\"tooltip\" title=\"Kaiser\"/></a>
    <a href=\"?base=main&page=rankings&job=Angelic\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-angelic_buster.png\" data-toggle=\"tooltip\" title=\"Angelic\"/></a>
    </div>
    </div>
    <div class=\"col-md-5 col-md-offset-1\">
    <form id='search_form' method='post' action='?base=main&page=rankings&order="
    .isset($_POST['order'])."&search'>
    <div style=\"float:right;\">
    <div class=\"well well2\" style=\"margin-bottom:0px;\">
    <div class=\"input-group\">
    <input type='text' name='search' id='s' class='form-control' placeholder='Character Name' required value='"
    .$search."'/>
    <span class=\"input-group-btn\">
    <button class=\"btn btn-primary\" type=\"submit\"><i class=\"icon-search\"></i> Search</button>
    </span>
    </div>
    </div>
    </div>
    </form>
    </div>
    </div><hr/>"
    ;
    echo 
    "
    <div class=\"table-responsive\">
    <table class=\"table table-striped table-hover center-table table-bordered\">
    <thead>
    <tr>
    <th>Rank</th>
    <th class=\"hidden-sm hidden-xs\">Picture</th>
    <th>Name</th>
    <th>Job</th>"
    ;
    if(
    $servertype == 1){
    echo 
    "<th>Rebirths</th>";
    }
    echo 
    "<th>Level</th>
    </tr>
    </thead>
    <tbody>"
    ;

    $ranking=$start;
    $backcolor="";
    $rootfolder "";
    require_once(
    "assets/img/GD/coordinates.php");
    require_once(
    "assets/img/GD/cache_character.php");
    while(
    $row $result->fetch_assoc()) {
    $ranking++;
    $name $row['name'];
    createChar($name$rootfolder);
    $cachechar $mysqli->query("SELECT hash, name FROM ".$prefix."gdcache WHERE name='".$name."'")->fetch_assoc();
    echo 
    "
    <tr>
    <td><span class=\"badge\">
    $ranking</span></td>
    <td class=\"hidden-sm hidden-xs\"><img src=\""
    .$siteurl."assets/img/GD/Characters/".$cachechar['hash'].".png\" alt=\"".$cachechar['name']."\" class=\"avatar img-responsive\" style=\"margin: 0 auto;\"></td>
    <td><a href=\"?base=main&page=character&n="
    .$row['name']."\">".$row['name']."</a></td>
    <td>"
    ;
    if (
    $row['job']=="000")
    echo 
    "Beginner";
    if (
    $row['job']=="100")
    echo 
    "Warrior";
    if (
    $row['job']=="110")
    echo 
    "Fighter";
    if (
    $row['job']=="120")
    echo 
    "Page";
    if (
    $row['job']=="130")
    echo 
    "Spearman";
    if (
    $row['job']=="111")
    echo 
    "Crusader";
    if (
    $row['job']=="121")
    echo 
    "White Knight";
    if (
    $row['job']=="131")
    echo 
    "Dragon Knight";
    if (
    $row['job']=="112")
    echo 
    "Hero";
    if (
    $row['job']=="122")
    echo 
    "Paladin";
    if (
    $row['job']=="132")
    echo 
    "Dark Knight";
    if (
    $row['job']=="200")
    echo 
    "Magician";
    if (
    $row['job']=="210")
    echo 
    "Wizard";
    if (
    $row['job']=="220")
    echo 
    "Wizard";
    if (
    $row['job']=="230")
    echo 
    "Cleric";
    if (
    $row['job']=="211")
    echo 
    "Mage";
    if (
    $row['job']=="221")
    echo 
    "Mage";
    if (
    $row['job']=="231")
    echo 
    "Priest";
    if (
    $row['job']=="212")
    echo 
    "Arch Mage";
    if (
    $row['job']=="222")
    echo 
    "Arch Mage";
    if (
    $row['job']=="232")
    echo 
    "Bishop";
    if (
    $row['job']=="300")
    echo 
    "Bowman";
    if (
    $row['job']=="310")
    echo 
    "Hunter";
    if (
    $row['job']=="320")
    echo 
    "Crossbowman";
    if (
    $row['job']=="311")
    echo 
    "Ranger";
    if (
    $row['job']=="321")
    echo 
    "Sniper";
    if (
    $row['job']=="312")
    echo 
    "Bow Master";
    if (
    $row['job']=="322")
    echo 
    "Crossbow Master";
    if (
    $row['job']=="400")
    echo 
    "Thief";
    if (
    $row['job']=="410")
    echo 
    "Assassin";
    if (
    $row['job']=="420")
    echo 
    "Bandit";
    if (
    $row['job']=="411")
    echo 
    "Hermit";
    if (
    $row['job']=="421")
    echo 
    "Chief Bandit";
    if (
    $row['job']=="412")
    echo 
    "Night Lord";
    if (
    $row['job']=="422")
    echo 
    "Shadower";
    if (
    $row['job']=="500")
    echo 
    "Pirate";
    if (
    $row['job']=="501")
    echo 
    "Cannon Shooter";
    if (
    $row['job']=="510")
    echo 
    "Brawler";
    if (
    $row['job']=="520")
    echo 
    "Gunslinger";
    if (
    $row['job']=="511")
    echo 
    "Marauder";
    if (
    $row['job']=="521")
    echo 
    "Buccaneer";
    if (
    $row['job']=="512")
    echo 
    "Outlaw";
    if (
    $row['job']=="522")
    echo 
    "Corsair";
    //Explorers
    //Dualblader
    if ($row['job']=="430")
    echo 
    "Blade Recruit";
    if (
    $row['job']=="431")
    echo 
    "Blade Acolyte";
    if (
    $row['job']=="432")
    echo 
    "Blade Specialist";
    if (
    $row['job']=="433")
    echo 
    "Blade Lord";
    if (
    $row['job']=="434")
    echo 
    "Blade Master";
    //Dualblader
    //Cannon shooter
    if ($row['job']=="530")
    echo 
    "Cannonneer";
    if (
    $row['job']=="531")
    echo 
    "Cannon Blaster";
    if (
    $row['job']=="532")
    echo 
    "Cannon Master";
    //Cannon shooter
    //Jett
    if ($row['job']=="508")
    echo 
    "Jett 1";
    if (
    $row['job']=="570")
    echo 
    "Jett 2";
    if (
    $row['job']=="571")
    echo 
    "Jett 3";
    if (
    $row['job']=="572")
    echo 
    "Jett 4";
    //Jett
    //Cygnus knights
    if ($row['job']=="1000")
    echo 
    "Noblesse";
    if (
    $row['job']=="1100")
    echo 
    "Dawn Warrior 1";
    if (
    $row['job']=="1110")
    echo 
    "Dawn Warrior 2";
    if (
    $row['job']=="1111")
    echo 
    "Dawn Warrior 3";
    if (
    $row['job']=="1112")
    echo 
    "Dawn Warrior 4";
    if (
    $row['job']=="1200")
    echo 
    "Blaze Mage 1";
    if (
    $row['job']=="1210")
    echo 
    "Blaze Mage 2";
    if (
    $row['job']=="1211")
    echo 
    "Blaze Mage 3";
    if (
    $row['job']=="1212")
    echo 
    "Blaze Mage 4";
    if (
    $row['job']=="1300")
    echo 
    "Wind Archer 1";
    if (
    $row['job']=="1310")
    echo 
    "Wind Archer 2";
    if (
    $row['job']=="1311")
    echo 
    "Wind Archer 3";
    if (
    $row['job']=="1312")
    echo 
    "Wind Archer 4";
    if (
    $row['job']=="1400")
    echo 
    "Night walker 1";
    if (
    $row['job']=="1410")
    echo 
    "Night walker 2";
    if (
    $row['job']=="1411")
    echo 
    "Night walker 3";
    if (
    $row['job']=="1412")
    echo 
    "Night walker 4";
    if (
    $row['job']=="1500")
    echo 
    "Thunder Breaker 1";
    if (
    $row['job']=="1510")
    echo 
    "Thunder Breaker 2";
    if (
    $row['job']=="1511")
    echo 
    "Thunder Breaker 3";
    if (
    $row['job']=="1512")
    echo 
    "Thunder Breaker 4";
    //Cygnus knights
    //Legends
    if ($row['job']=="2000")
    echo 
    "Legend";
    if (
    $row['job']=="2001")
    echo 
    "Evan0";
    //Legends
    //Aran
    if ($row['job']=="2100")
    echo 
    "Aran 1";
    if (
    $row['job']=="2110")
    echo 
    "Aran 2";
    if (
    $row['job']=="2111")
    echo 
    "Aran 3";
    if (
    $row['job']=="2112")
    echo 
    "Aran 4";
    //Aran
    //Evan
    if ($row['job']=="2200")
    echo 
    "Evan 1";
    if (
    $row['job']=="2210")
    echo 
    "Evan 2";
    if (
    $row['job']=="2211")
    echo 
    "Evan 3";
    if (
    $row['job']=="2212")
    echo 
    "Evan 4";
    if (
    $row['job']=="2213")
    echo 
    "Evan 5";
    if (
    $row['job']=="2214")
    echo 
    "Evan 6";
    if (
    $row['job']=="2215")
    echo 
    "Evan 7";
    if (
    $row['job']=="2216")
    echo 
    "Evan 8";
    if (
    $row['job']=="2217")
    echo 
    "Evan 9";
    if (
    $row['job']=="2218")
    echo 
    "Evan 10";
    //Evan
    //Mercedes
    if ($row['job']=="2002")
    echo 
    "Mercedes";
    if (
    $row['job']=="2300")
    echo 
    "Mercedes 1";
    if (
    $row['job']=="2310")
    echo 
    "Mercedes 2";
    if (
    $row['job']=="2311")
    echo 
    "Mercedes 3";
    if (
    $row['job']=="2312")
    echo 
    "Mercedes 4";
    //Mercedes
    //Phantom
    if ($row['job']=="2003")
    echo 
    "Phantom";
    if (
    $row['job']=="2400")
    echo 
    "Phantom 1";
    if (
    $row['job']=="2410")
    echo 
    "Phantom 2";
    if (
    $row['job']=="2411")
    echo 
    "Phantom 3";
    if (
    $row['job']=="2412")
    echo 
    "Phantom 4";
    //Phantom
    //Luminous
    if ($row['job']=="2004")
    echo 
    "Luminous";
    if (
    $row['job']=="2700")
    echo 
    "Luminous 1";
    if (
    $row['job']=="2710")
    echo 
    "Luminous 2";
    if (
    $row['job']=="2711")
    echo 
    "Luminous 3";
    if (
    $row['job']=="2712")
    echo 
    "Luminous 4";
    //Luminous
    //Demon Slayer
    if ($row['job']=="3000")
    echo 
    "Citizen";
    if (
    $row['job']=="3001")
    echo 
    "Demon Slayer";
    if (
    $row['job']=="3100")
    echo 
    "Demon Slayer 1";
    if (
    $row['job']=="3110")
    echo 
    "Demon Slayer 2";
    if (
    $row['job']=="3111")
    echo 
    "Demon Slayer 3";
    if (
    $row['job']=="3112")
    echo 
    "Demon Slayer 4";
    //Demon Slayer
    //Demon Avenger
    if ($row['job']=="3101")
    echo 
    "Demon Avenger 1";
    if (
    $row['job']=="3120")
    echo 
    "Demon Avenger 2";
    if (
    $row['job']=="3121")
    echo 
    "Demon Avenger 3";
    if (
    $row['job']=="3122")
    echo 
    "Demon Avenger 4";
    //Demon Avenger
    //Battle Mage
    if ($row['job']=="3200")
    echo 
    "Battle Mage 1";
    if (
    $row['job']=="3210")
    echo 
    "Battle Mage 2";
    if (
    $row['job']=="3211")
    echo 
    "Battle Mage 3";
    if (
    $row['job']=="3212")
    echo 
    "Battle Mage 4";
    //Battle Mage
    //Wild hunter
    if ($row['job']=="3300")
    echo 
    "Wild hunter 1";
    if (
    $row['job']=="3310")
    echo 
    "Wild hunter 2";
    if (
    $row['job']=="3311")
    echo 
    "Wild hunter 3";
    if (
    $row['job']=="3312")
    echo 
    "Wild hunter 4";
    //Wild hunter
    //mechanic
    if ($row['job']=="3500")
    echo 
    "mechanic 1";
    if (
    $row['job']=="3510")
    echo 
    "mechanic 2";
    if (
    $row['job']=="3511")
    echo 
    "mechanic 3";
    if (
    $row['job']=="3512")
    echo 
    "mechanic 4";
    //mechanic
    //Xenon
    if ($row['job']=="3002")
    echo 
    "Xenon";
    if (
    $row['job']=="3600")
    echo 
    "Xenon 1";
    if (
    $row['job']=="3610")
    echo 
    "Xenon 2";
    if (
    $row['job']=="3611")
    echo 
    "Xenon 3";
    if (
    $row['job']=="3612")
    echo 
    "Xenon 4";
    //Xenon
    //Hayato
    if ($row['job']=="4001")
    echo 
    "Hayato";
    if (
    $row['job']=="4002")
    echo 
    "Kanna";
    if (
    $row['job']=="4100")
    echo 
    "Hayato 1";
    if (
    $row['job']=="4110")
    echo 
    "Hayato 2";
    if (
    $row['job']=="4111")
    echo 
    "Hayato 3";
    if (
    $row['job']=="4112")
    echo 
    "Hayato 4";
    if (
    $row['job']=="4200")
    echo 
    "Kanna 1";
    if (
    $row['job']=="4210")
    echo 
    "Kanna 2";
    if (
    $row['job']=="4211")
    echo 
    "Kanna 3";
    if (
    $row['job']=="4212")
    echo 
    "Kanna 4";
    //Hayato
    //Mihile
    if ($row['job']=="5000")
    echo 
    "Mihile";
    if (
    $row['job']=="5100")
    echo 
    "Mihile 1";
    if (
    $row['job']=="5110")
    echo 
    "Mihile 2";
    if (
    $row['job']=="5111")
    echo 
    "Mihile 3";
    if (
    $row['job']=="5112")
    echo 
    "Mihile 4";
    //Mihile
    //Kaiser
    if ($row['job']=="6000")
    echo 
    "Kaiser";
    if (
    $row['job']=="6100")
    echo 
    "Kaiser 1";
    if (
    $row['job']=="6110")
    echo 
    "Kaiser 2";
    if (
    $row['job']=="6111")
    echo 
    "Kaiser 3";
    if (
    $row['job']=="6112")
    echo 
    "Kaiser 4";
    //Kaiser
    //Angelic Buster
    if ($row['job']=="6001")
    echo 
    "Angelic Buster";
    if (
    $row['job']=="6500")
    echo 
    "Angelic Buster 1";
    if (
    $row['job']=="6510")
    echo 
    "Angelic Buster 2";
    if (
    $row['job']=="6511")
    echo 
    "Angelic Buster 3";
    if (
    $row['job']=="6512")
    echo 
    "Angelic Buster 4";
    //Angelic Buster
    if ($row['job']=="800")
    echo 
    "Manager";
    if (
    $row['job']=="900")
    echo 
    "GMs";
    if (
    $row['job']=="910")
    echo 
    "SuperGM";

    if(
    $servertype == 1){
    echo 
    "</td>
    <td>"
    .$row['reborns']."</td>";
    }
    echo 
    "
    <td>"
    .$row['level']."</td>
    </tr>"
    ;
    }
    echo 
    "
    </tbody>
    </table>
    </div>
    <ul class=\"pager\">
    "
    ;

    if(
    $start == || $start<=15) {
    echo 
    "  <li class=\"previous\"><a href=\"?base=main&page=rankings&job=".$getjob."/\"><i class=\"icon-arrow-left\"></i> Previous</a></li>";
    }
    else{
    echo 
    "<li class=\"previous\"><a href=\"?base=main&page=rankings&job=".$getjob."&start="abs($start 15) ."\"><i class=\"icon-arrow-left\"></i> Previous</a></li>";
    }
    echo
    "
    <li class=\"next\"><a href=\"?base=main&page=rankings&job="
    .$getjob."&start="abs($start 15) ."\">Next<i class=\"icon-arrow-right\"></i></a></li>";
    ?>

    </ul>
    You didn't have to put that code. It's better to show what you did rather than the whole script.

  13. #88
    Beep Boop Rampenbram is offline
    True MemberRank
    Feb 2009 Join Date
    The NetherlandsLocation
    340Posts

    Re: [BETA] MapleBitCMS

    alright 0.o


    - - - Updated - - -

    I moddifyed my own stuff in as you can see, I'm totally gonna use this CMS!

    Lars, creator of BoomBoomMS - 2009 / 2016

  14. #89
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by Rampenbram View Post
    alright 0.o


    - - - Updated - - -

    I moddifyed my own stuff in as you can see, I'm totally gonna use this CMS!
    Cool! Please make sure to retain credits!
    Quote Originally Posted by JsPastel View Post
    Ok tq it works =)

    How about the vote system , it show
    Code:
    Error - Could not update vote points!
    Is there anyway to fix?
    That error is generated by this line:
    PHP Code:
     if ($account != '') {$result $mysqli->query("UPDATE accounts SET $colvp = $colvp + $gvp$colnx = $colnx + $gnx WHERE name='".$account."'") or die ('Error - Could not update vote points!');} 
    Go to the admin panel, and click Vote Configuration. If this information is correct, then I'm not totally sure how this error would be created.

  15. #90
    Member JsPastel is offline
    MemberRank
    Dec 2013 Join Date
    72Posts

    Re: [BETA] MapleBitCMS

    Quote Originally Posted by Rampenbram View Post
    This is a simple edit that makes voting works. It uses 'vpoints' and it gives you 2 votepoints.

    Vote.php > \MapleBit-master\sources\public\vote.php
    PHP Code:
    <h2 class="text-left">Vote</h2><hr/>
    <?php
        $earnedpoints 
    false;
        
    $insertnew false
        
    $time $mysqli->real_escape_string(time());  
        
    $redirect "";
        
    $getaccount $mysqli->real_escape_string(@$_POST['name']);  
        
    $account preg_replace("/[^A-Za-z0-9 ]/"''$getaccount);
        
    $checkacc $mysqli->query("SELECT * FROM accounts WHERE name = '$account'");
        
    $countcheckacc $checkacc->num_rows;
        if(
    $countcheckacc == && isset($_POST['submit'])) { $funct_error =  "This account doesn't exist!"; }
        elseif (
    $account == '' && isset($_POST['submit'])) {$funct_error 'You need to put in a username!';} 
        elseif(isset(
    $_POST['submit'])) { 
            
    $result $mysqli->query("SELECT *, SUM(times) as amount FROM ".$prefix."votingrecords WHERE NOT account='' AND NOT account='0' AND account='".$account."' OR ip='".$ipaddress."'") or die('Error - Could not look up vote record!');  
            
    $row $result->fetch_assoc();
            
    $timecalc $time $row['date']; 

            if (
    $row['amount'] == '' || $timecalc $vtime) { 
                if(
    $row['amount'] == '') { 
                    
    $result $mysqli->query("INSERT INTO ".$prefix."votingrecords (ip, account, date, times) VALUES ('".$ipaddress."', '".$account."', '".$time."', '1')") or die ('Error - Could not update vote records!'); 
                } 
                else { 
                    
    $result $mysqli->query("UPDATE ".$prefix."votingrecords SET ip='".$ipaddress."', account='".$account."', date='".$time."', times='1' WHERE ip='".$ipaddress."' OR account='".$account."'") or die ('Error - Could not update vote records!'); 
                } 
                
    $earnedpoints true;  
                if (
    $earnedpoints == true) { 
                    if (
    $account != '') {$result $mysqli->query("UPDATE accounts SET vpoints = vpoints + '2' WHERE name='".$account."'") or die ('Error - Could not update vote points!');} 
                    
    $funct_msg '<meta http-equiv="refresh" content="0; url='.$vlink.'">'
                    
    $redirect true
                } 
            } 
            elseif(
    $timecalc $vtime && $row['amount'] != '') { 
                
    $funct_msg 'You\'ve already voted within the last '.round($vtime/3600).' hours!'
                
    $funct_msg .= '<br />Vote time: 'date('M d\, h:i A'$row['date']); 
            } 
            else { 
                
    $funct_error 'Unknown Error'
            } 
        } 
        if(
    $redirect == true) { 
            echo 
    $funct_msg
        } 
         
        else { 
    ?> 
    <div class="alert alert-info">You can vote 1 time every <?php echo round($vtime/3600) . " hours for " $gvp " votepoints and " round($gnx/1000) . "k NX. Make sure to be logged off while voting!</div>"?>
    <form method="post">  
        <?php  
            
    if(isset($funct_msg)) {echo '<div class="alert alert-danger">'.$funct_msg.'</div>';}  
            if(isset(
    $funct_error)) {echo '<div class="alert alert-danger">'.$funct_error.'</div>';}
            if(!isset(
    $_SESSION['id'])) {
                echo 
    "<input type=\"text\" name=\"name\" maxlength=\"15\" class=\"form-control\" placeholder=\"Username\" required autocomplete=\"off\"/><br/>";
            } else {
                echo 
    "<input type=\"text\" name=\"name\" maxlength=\"15\" class=\"form-control\" placeholder=\"".$_SESSION['name']."\" value=\"".$_SESSION['name']."\"required autocomplete=\"off\" readonly=\"readonly\"/><br/>";
            }
        
    ?>
        
        <input type="submit" name="submit" value="Submit &raquo;" class="btn btn-primary"/>
    </form> 
    <br/>
    <?php ?>
    ofc all credits goes to greenelfx !

    - - - Updated - - -

    And here a v142.2 ranking script.

    http://www.mediafire.com/download/yx...71o2g/rank.rar the rank images.

    PHP Code:
    <h2 class="text-left">Rankings</h2>
    <hr/>
    <?php
    error_reporting
    (-1);
    $egetjob $mysqli->real_escape_string(@$_GET['job']);
    $getjob preg_replace("/[^A-Za-z0-9 ]/"''$egetjob); # Escape and Strip
    $dir "/";
    if(@
    $getjob != NULL && ctype_alpha($getjob)) {
        if(
    $getjob == "beginner"){
            
    $show "AND c.job = 000 OR c.job = 1000 OR c.job = 3000";
        }
        elseif(
    $getjob == "warrior"){
            
    $show "AND c.job = 100 OR c.job = 110 OR c.job = 120 OR c.job = 130 OR c.job = 121 OR c.job = 112 OR c.job = 122 OR c.job = 132";
        }
        elseif(
    $getjob == "magician"){
            
    $show "AND c.job = 210 OR c.job = 220 OR c.job = 230 OR c.job = 211 OR c.job = 221 OR c.job = 231 OR c.job = 212 OR c.job = 222 OR c.job = 232";
        }
        elseif(
    $getjob == "bowman"){
            
    $show "AND c.job = 300 OR c.job = 310 OR c.job = 320 OR c.job = 311 OR c.job = 321 OR c.job = 312 OR c.job = 322";
        }
        elseif(
    $getjob == "thief"){
            
    $show "AND c.job = 400 OR c.job = 410 OR c.job = 420 OR c.job = 411 OR c.job = 421 OR c.job = 422";
        }    
        elseif(
    $getjob == "pirate"){
            
    $show "AND c.job = 500 OR c.job = 500 OR c.job = 510 OR c.job = 520 OR c.job = 511 OR c.job = 521 OR c.job = 512 OR c.job = 522";
        }
        elseif(
    $getjob == "aran"){
            
    $show "AND c.job = 2000 OR c.job = 2100 OR c.job = 2110 OR c.job = 2111 OR c.job = 2112";
        }
        elseif(
    $getjob == "DawnWarrior"){
            
    $show "AND c.job = 1000 OR c.job = 1200 OR c.job = 1210 OR c.job = 1211 OR c.job = 1212";
        }
        elseif(
    $getjob == "BlazeMage"){
            
    $show "AND c.job = 2000 OR c.job = 1200 OR c.job = 1210 OR c.job = 1211 OR c.job = 1212";
        }
        elseif(
    $getjob == "WindArcher"){
            
    $show "AND c.job = 2000 OR c.job = 1300 OR c.job = 1310 OR c.job = 1311 OR c.job = 1312";
        }
        elseif(
    $getjob == "NightWalker"){
            
    $show "AND c.job = 2000 OR c.job = 1400 OR c.job = 1410 OR c.job = 1411 OR c.job = 1412";
        }
        elseif(
    $getjob == "ThunderBreaker"){
            
    $show "AND c.job = 2000 OR c.job = 1500 OR c.job = 1510 OR c.job = 1511 OR c.job = 1512";
        }
        elseif(
    $getjob == "Legend"){
            
    $show "AND c.job = 2000 OR c.job = 2002 OR c.job = 2001";
        }
        elseif(
    $getjob == "Evan"){
            
    $show "AND c.job = 2200 OR c.job = 2210 OR c.job = 2211 OR c.job = 2212 OR c.job = 2213 OR c.job = 2214 OR c.job = 2215 OR c.job = 2216 OR c.job = 2217 OR c.job = 2218";
        }
        elseif(
    $getjob == "Dualblade"){
            
    $show "AND c.job = 430 OR c.job = 431 OR c.job = 432 OR c.job = 433 OR c.job = 434";
        }
        elseif(
    $getjob == "Cannon"){
            
    $show "AND c.job = 530 OR c.job = 531 OR c.job = 532";
        }
        elseif(
    $getjob == "Jett"){
            
    $show "AND c.job = 508 OR c.job = 570 OR c.job = 571 OR c.job = 572";
        }
        elseif(
    $getjob == "Mercedes"){
            
    $show "AND c.job = 2002 OR c.job = 2300 OR c.job = 2310 OR c.job = 2311 OR c.job = 2312";
        }
        elseif(
    $getjob == "Phantom"){
            
    $show "AND c.job = 2003 OR c.job = 2400 OR c.job = 2410 OR c.job = 2411 OR c.job = 2412";
        }
        elseif(
    $getjob == "Luminous"){
            
    $show "AND c.job = 2004 OR c.job = 2700 OR c.job = 2710 OR c.job = 2711 OR c.job = 2712";
        }
        elseif(
    $getjob == "DemonSlayer"){
            
    $show "AND c.job = 3001 OR c.job = 3100 OR c.job = 3110 OR c.job = 3111 OR c.job = 3112";
        }
        elseif(
    $getjob == "DemonAvenger"){
            
    $show "AND c.job = 3001 OR c.job = 3100 OR c.job = 3120 OR c.job = 3121 OR c.job = 3122";
        }
        elseif(
    $getjob == "BattleMage"){
            
    $show "AND c.job = 3200 OR c.job = 3210 OR c.job = 3210 OR c.job = 3211 OR c.job = 3212";
        }
        elseif(
    $getjob == "WildHunter"){
            
    $show "AND c.job = 3300 OR c.job = 3300 OR c.job = 3310 OR c.job = 3311 OR c.job = 3312";
        }
        elseif(
    $getjob == "Mechanic"){
            
    $show "AND c.job = 3500 OR c.job = 3500 OR c.job = 3510 OR c.job = 3511 OR c.job = 3512";
        }
        elseif(
    $getjob == "Xenon"){
            
    $show "AND c.job = 3600 OR c.job = 3600 OR c.job = 3610 OR c.job = 3611 OR c.job = 3612";
        }
        elseif(
    $getjob == "Hayato"){
            
    $show "AND c.job = 4001 OR c.job = 4100 OR c.job = 4110 OR c.job = 4111 OR c.job = 4112";
        }
        elseif(
    $getjob == "Kanna"){
            
    $show "AND c.job = 4002 OR c.job = 4200 OR c.job = 4210 OR c.job = 4211 OR c.job = 4212";
        }
        elseif(
    $getjob == "Mihile"){
            
    $show "AND c.job = 5000 OR c.job = 5100 OR c.job = 5110 OR c.job = 5111 OR c.job = 5112";
        }
        elseif(
    $getjob == "Kaiser"){
            
    $show "AND c.job = 6000 OR c.job = 6100 OR c.job = 6110 OR c.job = 6111 OR c.job = 6112";
        }
        elseif(
    $getjob == "Angelic"){
            
    $show "AND c.job = 6500 OR c.job = 6500 OR c.job = 6510 OR c.job = 6511 OR c.job = 6512";
        }
        elseif(
    $getjob == "all"){
            
    $show "";
        }
    } else {
        
    $show "";
        
    $getjob "all";
    }
    $estart $mysqli->real_escape_string(@$_GET['start']);
    $start intval(+preg_replace("/[^A-Za-z0-9 ]/"''$estart)); # Escape and Strip and ensure it's a number

    $esearch $mysqli->real_escape_string(@$_GET['search']);
    $search preg_replace("/[^A-Za-z0-9 ]/"''$esearch); # Escape and Strip
    if(isset($search)) {
    $esearch $mysqli->real_escape_string(@$_POST['search']);
    $search preg_replace("/[^A-Za-z0-9 ]/"''$esearch); # Escape and Strip
        
    $csearch " AND c.name LIKE '".$search."%'";
    } else {
        
    $csearch "";
    }
    $order $mysqli->real_escape_string(@$_GET['order']);
    if(@
    $order) {
        
    $order $order." DESC,";
    } else {
            
    $order "";
            
    $result2 $mysqli->query("SELECT c.name , c.job , c.level, c.reborns, g.guildid, g.name AS gname, g.logo AS logo, g.logoColor AS logoColor, g.logoBGColor AS logoBGColor, g.logoBG AS logoBG FROM characters c LEFT JOIN guilds g ON c.guildid = g.guildid WHERE c.gm < '$gmlevel' ".$show."".$csearch." GROUP BY c.id DESC ORDER BY reborns DESC, level DESC LIMIT $start, 15") or die("IT IS LINE "__LINE__ "<br />" $mysqli->error);
            
    $num_players $result2->num_rows;
    }
    if(isset(
    $search)){
        
    $row_number 0;
        
    $int 0;
        while((
    $row $result2->fetch_assoc()) && !$row_number){
            if(
    strtolower($row['name']) == strtolower($search)){
                
    $row_number $int;
            }
            
    $int++;
        }
        if(
    $row_number){
            
    $start $row_number - ($row_number 5);
        }
    }
    $result $mysqli->query("SELECT c.name , c.job, c.level, c.reborns, g.guildid, g.name AS gname, g.logo AS logo, g.logoColor AS logoColor, g.logoBGColor AS logoBGColor, g.logoBG AS logoBG FROM characters c LEFT JOIN guilds g ON c.guildid = g.guildid WHERE c.gm < '$gmlevel' ".$show."".$csearch." GROUP BY c.id DESC ORDER BY reborns DESC, level DESC LIMIT $start, 15") or die("IT IS LINE "__LINE__ "<br />" $mysqli->error);
    echo 
    "
    <div class=\"row\">
    <div class=\"col-md-6\">
        <div class=\"well well2\" style=\"margin: 0 auto; display: inline-block;margin-bottom:0px;\">
        <a href=\"?base=main&page=rankings&job=beginner\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-legend.gif\" data-toggle=\"tooltip\" title=\"Beginner\"/></a>
        <a href=\"?base=main&page=rankings&job=warrior\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-warrior.gif\" data-toggle=\"tooltip\" title=\"Warrior\"/></a>
        <a href=\"?base=main&page=rankings&job=magician\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-magician.gif\" data-toggle=\"tooltip\" title=\"Magician\"/></a>
        <a href=\"?base=main&page=rankings&job=bowman\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-bowman.gif\" data-toggle=\"tooltip\" title=\"Bowman\"/></a>
        <a href=\"?base=main&page=rankings&job=thief\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-thief.gif\" data-toggle=\"tooltip\" title=\"Thief\"/></a>
        <a href=\"?base=main&page=rankings&job=pirate\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-pirate.gif\" data-toggle=\"tooltip\" title=\"Pirate\"/></a>
        <a href=\"?base=main&page=rankings&job=warrior\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-warrior.gif\" data-toggle=\"tooltip\" title=\"DawnWarrior\"/></a>
        <a href=\"?base=main&page=rankings&job=magician\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-magician.gif\" data-toggle=\"tooltip\" title=\"BlazeMage\"/></a>
        <a href=\"?base=main&page=rankings&job=bowman\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-bowman.gif\" data-toggle=\"tooltip\" title=\"WindArcher\"/></a>
        <a href=\"?base=main&page=rankings&job=thief\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-thief.gif\" data-toggle=\"tooltip\" title=\"NightWalker\"/></a>
        <a href=\"?base=main&page=rankings&job=pirate\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-pirate.gif\" data-toggle=\"tooltip\" title=\"ThunderBreaker\"/></a><br>
        <a href=\"?base=main&page=rankings&job=Legend\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-legend.gif\" data-toggle=\"tooltip\" title=\"Legend\"/></a>
        <a href=\"?base=main&page=rankings&job=aran\"><img src=\""
    .$siteurl."assets/img/rank/aran.png\" data-toggle=\"tooltip\" title=\"Aran\"/></a>
        <a href=\"?base=main&page=rankings&job=Evan\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-evan.gif\" data-toggle=\"tooltip\" title=\"Evan\"/></a>
        <a href=\"?base=main&page=rankings&job=Dualblade\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-dual_blade.gif\" data-toggle=\"tooltip\" title=\"Dualblade\"/></a>
        <a href=\"?base=main&page=rankings&job=aran\"><img src=\""
    .$siteurl."assets/img/rank/Icon-job-cannon_shooter.png\" data-toggle=\"tooltip\" title=\"Cannon\"/></a>
        <a href=\"?base=main&page=rankings&job=Cannon\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-jett.gif\" data-toggle=\"tooltip\" title=\"Jett\"/></a>
        <a href=\"?base=main&page=rankings&job=Mercedes\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mercedes.gif\" data-toggle=\"tooltip\" title=\"Mercedes\"/></a>
        <a href=\"?base=main&page=rankings&job=Phantom\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-phantom.gif\" data-toggle=\"tooltip\" title=\"Phantom\"/></a>
        <a href=\"?base=main&page=rankings&job=Luminous\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-luminous.png\" data-toggle=\"tooltip\" title=\"Luminous\"/></a>
        <a href=\"?base=main&page=rankings&job=DemonSlayer\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-demonslayer.gif\" data-toggle=\"tooltip\" title=\"DemonSlayer\"/></a>
        <a href=\"?base=main&page=rankings&job=DemonAvenger\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-demon_avenger.gif\" data-toggle=\"tooltip\" title=\"DemonAvenger\"/></a>
        <a href=\"?base=main&page=rankings&job=BattleMage\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-battle_mage.gif\" data-toggle=\"tooltip\" title=\"BattleMage\"/></a>
        <a href=\"?base=main&page=rankings&job=WildHunter\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-wild_hunter.gif\" data-toggle=\"tooltip\" title=\"WildHunter\"/></a>
        <a href=\"?base=main&page=rankings&job=Mechanic\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mechanic.gif\" data-toggle=\"tooltip\" title=\"Mechanic\"/></a>
        <a href=\"?base=main&page=rankings&job=Xenon\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-xenon.gif\" data-toggle=\"tooltip\" title=\"Xenon\"/></a>
        <a href=\"?base=main&page=rankings&job=Hayato\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-hayato.png\" data-toggle=\"tooltip\" title=\"Hayato\"/></a>
        <a href=\"?base=main&page=rankings&job=Kanna\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-kanna.png\" data-toggle=\"tooltip\" title=\"Kanna\"/></a>
        <a href=\"?base=main&page=rankings&job=Mihile\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-mihile.gif\" data-toggle=\"tooltip\" title=\"Mihile\"/></a>
        <a href=\"?base=main&page=rankings&job=Kaiser\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-kaiser.png\" data-toggle=\"tooltip\" title=\"Kaiser\"/></a>
        <a href=\"?base=main&page=rankings&job=Angelic\"><img src=\""
    .$siteurl."assets/img/rank/icon-job-angelic_buster.png\" data-toggle=\"tooltip\" title=\"Angelic\"/></a>
        </div>
    </div>
    <div class=\"col-md-5 col-md-offset-1\">
        <form id='search_form' method='post' action='http://forum.ragezone.com/?base=main&page=rankings&order="
    .isset($_POST['order'])."&amp;search'>
                <div style=\"float:right;\">
                <div class=\"well well2\" style=\"margin-bottom:0px;\">
                    <div class=\"input-group\">            
                        <input type='text' name='search' id='s' class='form-control' placeholder='Character Name' required value='"
    .$search."'/>
                            <span class=\"input-group-btn\">
                                <button class=\"btn btn-primary\" type=\"submit\"><i class=\"icon-search\"></i> Search</button>
                            </span>
                    </div>
                </div>
            </div>
        </form>
        </div>
    </div><hr/>"
    ;
    echo 
    "
    <div class=\"table-responsive\">
    <table class=\"table table-striped table-hover center-table table-bordered\">
        <thead>
            <tr>
                <th>Rank</th>
                <th class=\"hidden-sm hidden-xs\">Picture</th>
                <th>Name</th>
                <th>Job</th>"
    ;
                if(
    $servertype == 1){
                    echo 
    "<th>Rebirths</th>";
                }
    echo 
    "        <th>Level</th>
            </tr>
        </thead>
    <tbody>"
    ;

    $ranking=$start;
    $backcolor="";
    $rootfolder "";
    require_once(
    "assets/img/GD/coordinates.php");
    require_once(
    "assets/img/GD/cache_character.php");    
    while(
    $row $result->fetch_assoc()) {
        
    $ranking++;
        
    $name $row['name'];
        
    createChar($name$rootfolder);
        
    $cachechar $mysqli->query("SELECT hash, name FROM ".$prefix."gdcache WHERE name='".$name."'")->fetch_assoc();
        echo 
    "
            <tr>
                <td><span class=\"badge\">
    $ranking</span></td>
                <td class=\"hidden-sm hidden-xs\"><img src=\""
    .$siteurl."assets/img/GD/Characters/".$cachechar['hash'].".png\" alt=\"".$cachechar['name']."\" class=\"avatar img-responsive\" style=\"margin: 0 auto;\"></td>
                <td><a href=\"?base=main&page=character&n="
    .$row['name']."\">".$row['name']."</a></td>
                <td>"
    ;
                    if (
    $row['job']=="000")
                        echo 
    "Beginner";
                    if (
    $row['job']=="100")
                        echo 
    "Warrior";
                    if (
    $row['job']=="110")
                        echo 
    "Fighter";
                    if (
    $row['job']=="120")
                        echo 
    "Page";
                    if (
    $row['job']=="130")
                        echo 
    "Spearman";
                    if (
    $row['job']=="111")
                        echo 
    "Crusader";
                    if (
    $row['job']=="121")
                        echo 
    "White Knight";
                    if (
    $row['job']=="131")
                        echo 
    "Dragon Knight";
                    if (
    $row['job']=="112")
                        echo 
    "Hero";
                    if (
    $row['job']=="122")
                        echo 
    "Paladin";
                    if (
    $row['job']=="132")
                        echo 
    "Dark Knight";
                    if (
    $row['job']=="200")
                        echo 
    "Magician";
                    if (
    $row['job']=="210")
                        echo 
    "Wizard";
                    if (
    $row['job']=="220")
                        echo 
    "Wizard";
                    if (
    $row['job']=="230")
                        echo 
    "Cleric";
                    if (
    $row['job']=="211")
                        echo 
    "Mage";
                    if (
    $row['job']=="221")
                        echo 
    "Mage";
                    if (
    $row['job']=="231")
                        echo 
    "Priest";
                    if (
    $row['job']=="212")
                        echo 
    "Arch Mage";
                    if (
    $row['job']=="222")
                        echo 
    "Arch Mage";
                    if (
    $row['job']=="232")
                        echo 
    "Bishop";
                    if (
    $row['job']=="300")
                        echo 
    "Bowman";
                    if (
    $row['job']=="310")
                        echo 
    "Hunter";
                    if (
    $row['job']=="320")
                        echo 
    "Crossbowman";
                    if (
    $row['job']=="311")
                        echo 
    "Ranger";
                    if (
    $row['job']=="321")
                        echo 
    "Sniper";
                    if (
    $row['job']=="312")
                        echo 
    "Bow Master";
                    if (
    $row['job']=="322")
                        echo 
    "Crossbow Master";
                    if (
    $row['job']=="400")
                        echo 
    "Thief";
                    if (
    $row['job']=="410")
                        echo 
    "Assassin";
                    if (
    $row['job']=="420")
                        echo 
    "Bandit";
                    if (
    $row['job']=="411")
                        echo 
    "Hermit";
                    if (
    $row['job']=="421")
                        echo 
    "Chief Bandit";
                    if (
    $row['job']=="412")
                        echo 
    "Night Lord";
                    if (
    $row['job']=="422")
                        echo 
    "Shadower";
                    if (
    $row['job']=="500")
                        echo 
    "Pirate";
                    if (
    $row['job']=="501")
                        echo 
    "Cannon Shooter";    
                    if (
    $row['job']=="510")
                        echo 
    "Brawler";
                    if (
    $row['job']=="520")
                        echo 
    "Gunslinger";
                    if (
    $row['job']=="511")
                        echo 
    "Marauder";
                    if (
    $row['job']=="521")
                        echo 
    "Buccaneer";
                    if (
    $row['job']=="512")
                        echo 
    "Outlaw";
                    if (
    $row['job']=="522")
                        echo 
    "Corsair";
                        
    //Explorers
                        //Dualblader
                    
    if ($row['job']=="430")
                        echo 
    "Blade Recruit";
                    if (
    $row['job']=="431")
                        echo 
    "Blade Acolyte";    
                    if (
    $row['job']=="432")
                        echo 
    "Blade Specialist";
                    if (
    $row['job']=="433")
                        echo 
    "Blade Lord";    
                    if (
    $row['job']=="434")
                        echo 
    "Blade Master";
                        
    //Dualblader
                        //Cannon shooter
                    
    if ($row['job']=="530")
                        echo 
    "Cannonneer";
                    if (
    $row['job']=="531")
                        echo 
    "Cannon Blaster";    
                    if (
    $row['job']=="532")
                        echo 
    "Cannon Master";
                        
    //Cannon shooter
                        //Jett
                    
    if ($row['job']=="508")
                        echo 
    "Jett 1";
                    if (
    $row['job']=="570")
                        echo 
    "Jett 2";    
                    if (
    $row['job']=="571")
                        echo 
    "Jett 3";
                    if (
    $row['job']=="572")
                        echo 
    "Jett 4";
                        
    //Jett
                        //Cygnus knights
                    
    if ($row['job']=="1000")
                        echo 
    "Noblesse";
                    if (
    $row['job']=="1100")
                        echo 
    "Dawn Warrior 1";
                    if (
    $row['job']=="1110")
                        echo 
    "Dawn Warrior 2";
                    if (
    $row['job']=="1111")
                        echo 
    "Dawn Warrior 3";
                    if (
    $row['job']=="1112")
                        echo 
    "Dawn Warrior 4";
                    if (
    $row['job']=="1200")
                        echo 
    "Blaze Mage 1";
                    if (
    $row['job']=="1210")
                        echo 
    "Blaze Mage 2";
                    if (
    $row['job']=="1211")
                        echo 
    "Blaze Mage 3";
                    if (
    $row['job']=="1212")
                        echo 
    "Blaze Mage 4";
                    if (
    $row['job']=="1300")
                        echo 
    "Wind Archer 1";
                    if (
    $row['job']=="1310")
                        echo 
    "Wind Archer 2";
                    if (
    $row['job']=="1311")
                        echo 
    "Wind Archer 3";
                    if (
    $row['job']=="1312")
                        echo 
    "Wind Archer 4";
                    if (
    $row['job']=="1400")
                        echo 
    "Night walker 1";
                    if (
    $row['job']=="1410")
                        echo 
    "Night walker 2";
                    if (
    $row['job']=="1411")
                        echo 
    "Night walker 3";
                    if (
    $row['job']=="1412")
                        echo 
    "Night walker 4";
                    if (
    $row['job']=="1500")
                        echo 
    "Thunder Breaker 1";
                    if (
    $row['job']=="1510")
                        echo 
    "Thunder Breaker 2";
                    if (
    $row['job']=="1511")
                        echo 
    "Thunder Breaker 3";
                    if (
    $row['job']=="1512")
                        echo 
    "Thunder Breaker 4";
                        
    //Cygnus knights
                        //Legends
                    
    if ($row['job']=="2000")
                        echo 
    "Legend";
                    if (
    $row['job']=="2001")
                        echo 
    "Evan0";    
                        
    //Legends
                        //Aran
                    
    if ($row['job']=="2100")
                        echo 
    "Aran 1";
                    if (
    $row['job']=="2110")
                        echo 
    "Aran 2";    
                    if (
    $row['job']=="2111")
                        echo 
    "Aran 3";
                    if (
    $row['job']=="2112")
                        echo 
    "Aran 4";    
                        
    //Aran
                        //Evan
                    
    if ($row['job']=="2200")
                        echo 
    "Evan 1";
                    if (
    $row['job']=="2210")
                        echo 
    "Evan 2";    
                    if (
    $row['job']=="2211")
                        echo 
    "Evan 3";
                    if (
    $row['job']=="2212")
                        echo 
    "Evan 4";    
                    if (
    $row['job']=="2213")
                        echo 
    "Evan 5";
                    if (
    $row['job']=="2214")
                        echo 
    "Evan 6";    
                    if (
    $row['job']=="2215")
                        echo 
    "Evan 7";
                    if (
    $row['job']=="2216")
                        echo 
    "Evan 8";
                    if (
    $row['job']=="2217")
                        echo 
    "Evan 9";
                    if (
    $row['job']=="2218")
                        echo 
    "Evan 10";
                        
    //Evan
                        //Mercedes
                    
    if ($row['job']=="2002")
                        echo 
    "Mercedes";
                    if (
    $row['job']=="2300")
                        echo 
    "Mercedes 1";    
                    if (
    $row['job']=="2310")
                        echo 
    "Mercedes 2";    
                    if (
    $row['job']=="2311")
                        echo 
    "Mercedes 3";
                    if (
    $row['job']=="2312")
                        echo 
    "Mercedes 4";    
                        
    //Mercedes
                        //Phantom
                    
    if ($row['job']=="2003")
                        echo 
    "Phantom";
                    if (
    $row['job']=="2400")
                        echo 
    "Phantom 1";    
                    if (
    $row['job']=="2410")
                        echo 
    "Phantom 2";    
                    if (
    $row['job']=="2411")
                        echo 
    "Phantom 3";
                    if (
    $row['job']=="2412")
                        echo 
    "Phantom 4";    
                        
    //Phantom
                        //Luminous
                    
    if ($row['job']=="2004")
                        echo 
    "Luminous";
                    if (
    $row['job']=="2700")
                        echo 
    "Luminous 1";    
                    if (
    $row['job']=="2710")
                        echo 
    "Luminous 2";    
                    if (
    $row['job']=="2711")
                        echo 
    "Luminous 3";
                    if (
    $row['job']=="2712")
                        echo 
    "Luminous 4";    
                        
    //Luminous
                        //Demon Slayer
                    
    if ($row['job']=="3000")
                        echo 
    "Citizen";
                    if (
    $row['job']=="3001")
                        echo 
    "Demon Slayer";
                    if (
    $row['job']=="3100")
                        echo 
    "Demon Slayer 1";    
                    if (
    $row['job']=="3110")
                        echo 
    "Demon Slayer 2";    
                    if (
    $row['job']=="3111")
                        echo 
    "Demon Slayer 3";
                    if (
    $row['job']=="3112")
                        echo 
    "Demon Slayer 4";    
                        
    //Demon Slayer
                        //Demon Avenger
                    
    if ($row['job']=="3101")
                        echo 
    "Demon Avenger 1";    
                    if (
    $row['job']=="3120")
                        echo 
    "Demon Avenger 2";    
                    if (
    $row['job']=="3121")
                        echo 
    "Demon Avenger 3";
                    if (
    $row['job']=="3122")
                        echo 
    "Demon Avenger 4";    
                        
    //Demon Avenger
                        //Battle Mage
                    
    if ($row['job']=="3200")
                        echo 
    "Battle Mage 1";    
                    if (
    $row['job']=="3210")
                        echo 
    "Battle Mage 2";    
                    if (
    $row['job']=="3211")
                        echo 
    "Battle Mage 3";
                    if (
    $row['job']=="3212")
                        echo 
    "Battle Mage 4";    
                        
    //Battle Mage
                        //Wild hunter
                    
    if ($row['job']=="3300")
                        echo 
    "Wild hunter 1";    
                    if (
    $row['job']=="3310")
                        echo 
    "Wild hunter 2";    
                    if (
    $row['job']=="3311")
                        echo 
    "Wild hunter 3";
                    if (
    $row['job']=="3312")
                        echo 
    "Wild hunter 4";    
                        
    //Wild hunter
                        //mechanic
                    
    if ($row['job']=="3500")
                        echo 
    "mechanic 1";    
                    if (
    $row['job']=="3510")
                        echo 
    "mechanic 2";    
                    if (
    $row['job']=="3511")
                        echo 
    "mechanic 3";
                    if (
    $row['job']=="3512")
                        echo 
    "mechanic 4";    
                        
    //mechanic
                        //Xenon
                    
    if ($row['job']=="3002")
                        echo 
    "Xenon";    
                    if (
    $row['job']=="3600")
                        echo 
    "Xenon 1";    
                    if (
    $row['job']=="3610")
                        echo 
    "Xenon 2";    
                    if (
    $row['job']=="3611")
                        echo 
    "Xenon 3";
                    if (
    $row['job']=="3612")
                        echo 
    "Xenon 4";    
                        
    //Xenon
                        //Hayato
                    
    if ($row['job']=="4001")
                        echo 
    "Hayato";    
                    if (
    $row['job']=="4002")
                        echo 
    "Kanna";    
                    if (
    $row['job']=="4100")
                        echo 
    "Hayato 1";    
                    if (
    $row['job']=="4110")
                        echo 
    "Hayato 2";
                    if (
    $row['job']=="4111")
                        echo 
    "Hayato 3";
                    if (
    $row['job']=="4112")
                        echo 
    "Hayato 4";
                    if (
    $row['job']=="4200")
                        echo 
    "Kanna 1";    
                    if (
    $row['job']=="4210")
                        echo 
    "Kanna 2";
                    if (
    $row['job']=="4211")
                        echo 
    "Kanna 3";
                    if (
    $row['job']=="4212")
                        echo 
    "Kanna 4";
                        
    //Hayato
                        //Mihile
                    
    if ($row['job']=="5000")
                        echo 
    "Mihile";    
                    if (
    $row['job']=="5100")
                        echo 
    "Mihile 1";    
                    if (
    $row['job']=="5110")
                        echo 
    "Mihile 2";    
                    if (
    $row['job']=="5111")
                        echo 
    "Mihile 3";
                    if (
    $row['job']=="5112")
                        echo 
    "Mihile 4";    
                        
    //Mihile
                        //Kaiser
                    
    if ($row['job']=="6000")
                        echo 
    "Kaiser";    
                    if (
    $row['job']=="6100")
                        echo 
    "Kaiser 1";    
                    if (
    $row['job']=="6110")
                        echo 
    "Kaiser 2";    
                    if (
    $row['job']=="6111")
                        echo 
    "Kaiser 3";
                    if (
    $row['job']=="6112")
                        echo 
    "Kaiser 4";    
                        
    //Kaiser
                        //Angelic Buster
                    
    if ($row['job']=="6001")
                        echo 
    "Angelic Buster";    
                    if (
    $row['job']=="6500")
                        echo 
    "Angelic Buster 1";    
                    if (
    $row['job']=="6510")
                        echo 
    "Angelic Buster 2";    
                    if (
    $row['job']=="6511")
                        echo 
    "Angelic Buster 3";
                    if (
    $row['job']=="6512")
                        echo 
    "Angelic Buster 4";    
                        
    //Angelic Buster
                    
    if ($row['job']=="800")
                        echo 
    "Manager";
                    if (
    $row['job']=="900")
                        echo 
    "GMs";
                    if (
    $row['job']=="910")
                        echo 
    "SuperGM";
            
        if(
    $servertype == 1){
            echo 
    "</td>
                <td>"
    .$row['reborns']."</td>";
        }            
        echo 
    "
                <td>"
    .$row['level']."</td>
            </tr>"
    ;                
        }
    echo 
    "
        </tbody>
    </table>
    </div>
    <ul class=\"pager\">
        "
    ;

    if(
    $start == || $start<=15) {
        echo 
    "  <li class=\"previous\"><a href=\"?base=main&page=rankings&job=".$getjob."/\"><i class=\"icon-arrow-left\"></i> Previous</a></li>";
    }
    else{
            echo 
    "<li class=\"previous\"><a href=\"?base=main&page=rankings&job=".$getjob."&start="abs($start 15) ."\"><i class=\"icon-arrow-left\"></i> Previous</a></li>";
    }
    echo
    "
        <li class=\"next\"><a href=\"?base=main&page=rankings&job="
    .$getjob."&start="abs($start 15) ."\">Next<i class=\"icon-arrow-right\"></i></a></li>";
    ?>

    </ul>


    But your vote system only give vote points , how about NX?



Advertisement