Anuncio

Colapsar
No hay anuncio todavía.

Codigos php para crear ranking por pais en mu web

Colapsar
X
  • Filtrar
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes
    • Compartir

    Codigos php para crear ranking por pais en mu web

    Algun groso que sepa php para que en el ranking tambien aparesca la nacionalidad del usuario con su respectiva bandera alguien sabe php se agradece la pronta solucion
    • Compartir

    #2
    en realidad es bien facil de hacer lo que tu quieres, pero debes obligar a tus usuarios que pongan el pais a que pertenecen al momento de registrarse ...

    una duda ... suponiendo que usas MuWeb ¿¿¿ este guarda en algun lado el pais de origen del user ??? lo digo pq no uso MuWeb

    si me das el campo y la tabla tal vez te podria escribir un ranking ...

    Comentario

      • Compartir

      #3
      eso es facil por que solo es mostrar la os campos con SELECT FROM y demas del campo de nacionalidad y si la muweb trae eso... es facil de acer pero para agregarselo ufff eso lo veo dificil ...

      Comentario

        • Compartir

        #4
        CLARO KE SIP TENGO MU WEB PERO COMO HAGO PAR APONERLO KUAL ES EL ALGORITMO EN PHP KE DEBERIA PONER PARA MI RANKING MI RANKING ES EL SIGUIENTE ME DICEN DONDE LO PONGO Y KE ALGORITMO PHP PONGO
        SE AGRADECE SU RESPUESTA............

        require("sys_/config.php");
        $top_rank=stripslashes($_POST['top_rank']);
        $race = stripslashes($_POST['race_']);
        $top_rank=clean_var($top_rank);
        $race=clean_var($race);

        if(!isset($_POST['top_rank'])){$top_rank="20";}
        if(!isset($_POST['race_'])){$race = "allclass"; }

        if($muweb['gm']=='no'){
        $query_allcharacters = "Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_bk="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='17' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_sm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='1' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_me="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='33' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_mg="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='48' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_dl="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='64' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_bs="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='81' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_bm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='18' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_gm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='2' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_he="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='34' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_dm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='50' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_le="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='66' and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";
        $query_dim="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='82'and ctlcode !='32' and ctlcode !='8' order by resets desc ,clevel desc";}
        elseif($muweb['gm']=='yes'){
        $query_allcharacters = "Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character order by resets desc ,clevel desc";
        $query_bk="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='17' order by resets desc ,clevel desc";
        $query_sm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='1' order by resets desc ,clevel desc";
        $query_me="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='33' order by resets desc ,clevel desc";
        $query_mg="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='48' order by resets desc ,clevel desc";
        $query_dl="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='64' order by resets desc ,clevel desc";
        $query_bs="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='81' order by resets desc ,clevel desc";
        $query_bm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='18' order by resets desc ,clevel desc";
        $query_gm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='2' order by resets desc ,clevel desc";
        $query_he="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='34' order by resets desc ,clevel desc";
        $query_dm="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='50' order by resets desc ,clevel desc";
        $query_le="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='66' order by resets desc ,clevel desc";
        $query_dim="Select TOP $top_rank Name,Class,cLevel,resets,strength,dexterity,vitali ty,energy,AccountID from Character where class='82' order by resets desc ,clevel desc";}

        if($race == allclass){
        $result = $db->Execute($query_allcharacters);}
        if($race ==bk){
        $result = $db->Execute($query_bk);}
        if($race ==sm){
        $result = $db->Execute($query_sm);}
        if($race ==me){
        $result = $db->Execute($query_me);}
        if($race ==mg){
        $result = $db->Execute($query_mg);}
        if($race==dl){
        $result = $db->Execute($query_dl);}
        if($race==bs){
        $result = $db->Execute($query_bs);}
        if($race ==bm){
        $result = $db->Execute($query_bm);}
        if($race ==gm){
        $result = $db->Execute($query_gm);}
        if($race ==he){
        $result = $db->Execute($query_he);}
        if($race ==dm){
        $result = $db->Execute($query_dm);}
        if($race==le){
        $result = $db->Execute($query_le);}
        if($race==dim){
        $result = $db->Execute($query_dim);}

        $content ='
        <div align="center" class="mod_title">Top '.$top_rank.' Personajes</span></div><br>
        <table width="530" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#505050" >
        <tr height="20" style="background-image: url();">
        <td class="style10" height="20"><div align="center">#</td></div>
        <td class="style10"><div align="center">Nombre</td></div>
        <td class="style10"><div align="center">Nivel</td></div>
        <td class="style10"><div align="center">Resets</td></div>
        <td class="style10"><div align="center">Clase</td></div>
        <td class="style10"><div align="center">Status</td></div>
        </tr>';

        for($i=0;$i < $result->numrows();++$i)
        {
        $row = $result->fetchrow();
        $status_check="Select ConnectStat from MEMB_STAT where memb___id='$row[8]'";
        $status_reults = $db->Execute($status_check);
        $status = $status_reults->fetchrow();
        $rank = $i+1;
        $rank2 = $rank+1;

        if($status[0] == 0){ $status[0] ='<span class=style6>Offline</span>';
        }
        if($status[0] == 1){ $status[0] ='<span class=style19>Online</span>';
        }

        if($row[1] == 0){ $row[1] ='<span class=style4>Dark Wizard</span>';
        }
        if($row[1] == 1){ $row[1] ='<span class=style4>Soul Master</span>';
        }
        if($row[1] == 2){ $row[1] ='<span class=style4>Grand Master</span>';
        }
        if($row[1] == 16){ $row[1] ='<span class=style4>Dark Knight</span>';
        }
        if($row[1] == 17){ $row[1] ='<span class=style4>Blade Knight</span>';
        }
        if($row[1] == 18){ $row[1] ='<span class=style4>Blade Master</span>';
        }
        if($row[1] == 32){ $row[1] ='<span class=style4>Fairy Elf</span>';
        }
        if($row[1] == 33){ $row[1] ='<span class=style4>Muse Elf</span>';
        }
        if($row[1] == 34){ $row[1] ='<span class=style4>High Elf</span>';
        }
        if($row[1] == 48){ $row[1] ='<span class=style4>Magic Gladiator</span>';
        }
        if($row[1] == 50){ $row[1] ='<span class=style4>Duel Master</span>';
        }
        if($row[1] == 64){ $row[1] ='<span class=style4>Dark Lord</span>';
        }
        if($row[1] == 66){ $row[1] ='<span class=style4>Lord Emperor</span>';
        }
        if($row[1] == 80){ $row[1] ='<span class=style4>Summoner</span>';
        }
        if($row[1] == 81){ $row[1] ='<span class=style4>Blooby Summoner</span>';
        }
        if($row[1] == 82){ $row[1] ='<span class=style4>Dimension Master</span>';
        }
        $content .="<tr style='background-image: url();'>
        <td height='27'><div align='center' class=style4>$rank</div></td>
        <td><div align='center' class=style4>$row[0]</div></td>
        <td height='27'><div align='center' class=style4>$row[2]</div></td>
        <td height='27'><div align='center' class=style3>$row[3]</div></td>
        <td height='27'><div align='center' class=style4>$row[1]</div></td>
        <td height='27'><div align='center' class=style4>$status[0]</div></td>
        </tr>";

        }
        $content .="</table>";
        show($content);
        ?>

        Comentario

        Trabajando...
        X