[Req] Online Module

MichaelxD

New Member
Joined
Aug 26, 2014
Messages
17
Reaction score
4
Line "Resets" and "country" no Found :/

PHP:
<? 
$i = 0;
$status = mssql_query("SELECT DISTINCT 
AccountCharacter.GameIDC, 
memb_stat.ServerName, memb_stat.ServerName, 
memb_stat.IP, memb_stat.ConnectTM, 
memb_stat.DisConnectTM 
from 
Memb_stat 
join 
AccountCharacter 
on 
Memb_stat.memb___id = AccountCharacter.ID 
collate Latin1_general_CI_AS 
where Memb_stat.connectstat = 1");
?>
<style type="text/css">
<!--
.titulo {
	font-weight: bold;
	color: #FFF;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
}
-->
</style>


<br>
<table width="100%" align="center" cellpadding="2" cellspacing="0">
  <tbody>
    <tr>
      <td height="122"><table border="1" cellpadding="0" bordercolor="#a67330" cellspacing="0" width="100%">
        <tbody>
          <tr>
            <td height="25"   align="center" bgcolor="#a67330" class="titulo">#</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Jugador</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Class</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Level</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Resetss</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Mapa</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Estado</td>
            <td  align="center" bgcolor="#a67330" class="titulo">Pais</td>
          </tr>
<?php
$i = 0;
while($row=mssql_fetch_array($status)) {
			$dados_query = mssql_query("SELECT * FROM Character WHERE Name='$row[GameIDC]'");
			$dados = mssql_fetch_array($dados_query);
			$Resets_query = mssql_query("SELECT * FROM Character WHERE Name='$row[GameIDC]'");
			$Resets = mssql_fetch_array($Resets_query);
			$membstat_query = mssql_query("SELECT * FROM MEMB_STAT WHERE memb___id='$dados[AccountID]'");
			$membstat = mssql_fetch_array($membstat_query);
			$pais_query = mssql_query("SELECT vip, country FROM MEMB_INFO WHERE memb___id='$dados[AccountID]'");
			$row2 = mssql_fetch_array($pais_query);
			$zebe1 = mssql_query("Select ConnectStat from MEMB_STAT where memb___id='$dados[AccountID]'");
			$zebe2 = mssql_fetch_array($zebe1);
			$zo1 = mssql_query("Select MapPosX,MapPosY,Class from Character where Name='$row[GameIDC]'");
			$zo2 = mssql_fetch_row($zo1);

			$i = $i+1;	
			if($zebe2[0] == 0){ $zebe2[0] ='<img src=http://www.Mu-Online.co.ve/Imagenes/off1.png>'; }
            if($zebe2[0] == 1){ $zebe2[0] ='<img src=http://www.Mu-Online.co.ve/Imagenes/on1.png>'; }
			if($zo2[2] == 0){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/wiz.gif>';}
			if($zo2[2] == 1){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/wiz.gif>';}
			if($zo2[2] == 16){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/dk.gif>';}
			if($zo2[2] == 17){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/dk.gif>';}
			if($zo2[2] == 32){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/elf.gif>';}
			if($zo2[2] == 33){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/elf.gif>';}
			if($zo2[2] == 48){ $zo2[2] ='<img src=http://www.Mu-Online.co.ve/template/MuOnline/images/class/mg.gif>';}

			
			if($row2[1] == 'Argentina'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Argentina.png>';}
			if($row2[1] == '9'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Argentina.png>';}
			if($row2[1] == 'Alemania'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Alemania.png>';}
			if($row2[1] == 'Bolivia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Bolivia.png>';}
			if($row2[1] == '25'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Bolivia.png>';}
			if($row2[1] == 'Brazil'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Brazil.png>';}
			if($row2[1] == 'Canada'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Canada.png>';}
			if($row2[1] == 'Chile'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Chile.png>';}
			if($row2[1] == '39'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Chile.png>';}
			if($row2[1] == 'China'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/China.png>';}
			if($row2[1] == 'Colombia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Colombia.png>';}
			if($row2[1] == '42'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Colombia.png>';}
			if($row2[1] == 'Croacia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Croacia.png>';}
			if($row2[1] == 'Ecuador'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Ecuador.png>';}
			if($row2[1] == 'Escocia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Escocia.png>';}
			if($row2[1] == 'Espana'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Espana.png>';}
			if($row2[1] == '184'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Espana.png>';}
			if($row2[1] == 'Francia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Francia.png>';}
			if($row2[1] == 'Gales'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Gales.png>';}
			if($row2[1] == 'Grecia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Grecia.png>';}
			if($row2[1] == 'Guatemala'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Guatemala.png>';}
			if($row2[1] == 'Holanda'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Holanda.png>';}
			if($row2[1] == 'Honduras'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Honduras.png>';}
			if($row2[1] == 'India'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/India.png>';}
			if($row2[1] == 'Inglaterra'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Inglaterra.png>';}
			if($row2[1] == 'Italia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Italia.png>';}
			if($row2[1] == 'Jamaica'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Jamaica.png>';}
			if($row2[1] == 'Japon'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Japon.png>';}
			if($row2[1] == 'Kenia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Kenia.png>';}
			if($row2[1] == 'Korea'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Korea.png>';}
			if($row2[1] == 'Mexico'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Mexico.png>';}
			if($row2[1] == '131'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Mexico.png>';}
			if($row2[1] == 'Nicaragua'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Nicaragua.png>';}
			if($row2[1] == 'Nigeria'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Nigeria.png>';}
			if($row2[1] == 'Noruega'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Noruega.png>';}
			if($row2[1] == 'Panama'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Panama.png>';}
			if($row2[1] == '154'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Panama.png>';}
			if($row2[1] == 'Paraguay'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Paraguay.png>';}
			if($row2[1] == '156'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Paraguay.png>';}
			if($row2[1] == '157'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Peru.png>';}
			if($row2[1] == 'Peru'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Peru.png>';}
			if($row2[1] == 'Polonia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Polonia.png>';}
			if($row2[1] == 'Portugal'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Portugal.png>';}
			if($row2[1] == 'Puerto'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Puerto.png>';}
			if($row2[1] == 'Rusia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Rusia.png>';}
			if($row2[1] == 'Salvador'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Salvador.png>';}
			if($row2[1] == 'Turquia'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Turquia.png>';}
			if($row2[1] == 'Ucrania'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Ucrania.png>';}
			if($row2[1] == 'Uruguay'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Uruguay.png>';}
			if($row2[1] == '208'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Uruguay.png>';}
			if($row2[1] == 'USA'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/USA.png>';}
			if($row2[1] == 'Venezuela'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Venezuela.png>';}			
			if($row2[1] == ''){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Venezuela.png>';}	
			if($row2[1] == 'Peru'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Peru.png>';}		
			if($row2[1] == '158'){ $row2[1] ='<img src=http://www.muvictoriaonline.net/images/flags/Banderas/Philippines.gif>';}			
			
			
			
			if ($dados[MapNumber] == 0) {$dados[MapNumber] = 'Lorencia';}
			if ($dados[MapNumber] == 1) {$dados[MapNumber] = 'Dungeon';}
			if ($dados[MapNumber] == 2) {$dados[MapNumber] = 'Devias';}
			if ($dados[MapNumber] == 3) {$dados[MapNumber] = 'Noria';}
			if ($dados[MapNumber] == 4) {$dados[MapNumber] = 'Lost Tower';}
			if ($dados[MapNumber] == 6) {$dados[MapNumber] = 'Arena';}
			if ($dados[MapNumber] == 7) {$dados[MapNumber] = 'Atlans';}
			if ($dados[MapNumber] == 8) {$dados[MapNumber] = 'Tarkan';}
			if ($dados[MapNumber] == 9) {$dados[MapNumber] = 'Devil Square';}
			if ($dados[MapNumber] == 10) {$dados[MapNumber] = 'Icarus';}
			if ($dados[MapNumber] == 11) {$dados[MapNumber] = 'Blood Castle I';}
			if ($dados[MapNumber] == 12) {$dados[MapNumber] = 'Blood Castle II';}
			if ($dados[MapNumber] == 13) {$dados[MapNumber] = 'Blood Castle III';}
			if ($dados[MapNumber] == 14) {$dados[MapNumber] = 'Blood Castle IV';}
			if ($dados[MapNumber] == 15) {$dados[MapNumber] = 'Blood Castle V';}
			if ($dados[MapNumber] == 16) {$dados[MapNumber] = 'Blood Castle VI';}
			if ($dados[MapNumber] == 17) {$dados[MapNumber] = 'Blood Castle VII';}
			if ($dados[MapNumber] == 18) {$dados[MapNumber] = 'Chaos Castle I';}
			if ($dados[MapNumber] == 19) {$dados[MapNumber] = 'Chaos Castle II';}
			if ($dados[MapNumber] == 20) {$dados[MapNumber] = 'Chaos Castle III';}
			if ($dados[MapNumber] == 21) {$dados[MapNumber] = 'Chaos Castle IV';}
			if ($dados[MapNumber] == 22) {$dados[MapNumber] = 'Chaos Castle V';}
			if ($dados[MapNumber] == 23) {$dados[MapNumber] = 'Chaos Castle VI';}
			if ($dados[MapNumber] == 24) {$dados[MapNumber] = 'Kalima I';}
			if ($dados[MapNumber] == 25) {$dados[MapNumber] = 'Kalima II';}
			if ($dados[MapNumber] == 26) {$dados[MapNumber] = 'Kalima III';}
			if ($dados[MapNumber] == 27) {$dados[MapNumber] = 'Kalima IV';}
			if ($dados[MapNumber] == 28) {$dados[MapNumber] = 'Kalima V';}
			if ($dados[MapNumber] == 29) {$dados[MapNumber] = 'Kalima VI';}
			if ($dados[MapNumber] == 30) {$dados[MapNumber] = 'Valley Of Loren';}
			if ($dados[MapNumber] == 31) {$dados[MapNumber] = 'Lands Of Trial';}
			if ($dados[MapNumber] == 32) {$dados[MapNumber] = 'Devil Square';}
			if ($dados[MapNumber] == 33) {$dados[MapNumber] = 'Aida';}
			if ($dados[MapNumber] == 34) {$dados[MapNumber] = 'CryWolf';}
			if ($dados[MapNumber] == 36) {$dados[MapNumber] = 'Kalima VII';}
			if ($dados[MapNumber] == 37) {$dados[MapNumber] = 'Kantru';}
			if ($dados[MapNumber] == 38) {$dados[MapNumber] = 'Kantru Ruins';}
			if ($dados[MapNumber] == 39) {$dados[MapNumber] = 'Kantru Tower';}
			if ($dados[MapNumber] == 40) {$dados[MapNumber] = 'Silent Map';}
			if ($dados[MapNumber] == 41) {$dados[MapNumber] = 'Barrakas';}
			if ($dados[MapNumber] == 42) {$dados[MapNumber] = 'Refuge';}
			if ($dados[MapNumber] == 45) {$dados[MapNumber] = 'Illusion Temple I';}
			if ($dados[MapNumber] == 46) {$dados[MapNumber] = 'Illusion Temple II';}
			if ($dados[MapNumber] == 47) {$dados[MapNumber] = 'Illusion Temple III';}
			if ($dados[MapNumber] == 48) {$dados[MapNumber] = 'Illusion Temple IV';}
			if ($dados[MapNumber] == 49) {$dados[MapNumber] = 'Illusion Temple V';}
			if ($dados[MapNumber] == 50) {$dados[MapNumber] = 'Illusion Temple VI';}
			if ($dados[MapNumber] == 51) {$dados[MapNumber] = 'Elbeland';}
			if ($dados[MapNumber] == 52) {$dados[MapNumber] = 'Blood Castle VIII';}
			if ($dados[MapNumber] == 53) {$dados[MapNumber] = 'Chaos Castle VII';}
			if ($dados[MapNumber] == 56) {$dados[MapNumber] = 'Swamp Of Calmness';}
			if ($dados[MapNumber] == 57) {$dados[MapNumber] = 'Raklion';}
			if ($dados[MapNumber] == 58) {$dados[MapNumber] = 'Raklion II';}
			if ($dados[MapNumber] == 62) {$dados[MapNumber] = 'Santa Town';}
			if ($dados[MapNumber] == 63) {$dados[MapNumber] = 'Vulcan';}			
			if ($dados[MapNumber] == 64) {$dados[MapNumber] = 'Vulcan';}
			if ($dados[MapNumber] == 79) {$dados[MapNumber] = 'Loren Market';}
	    	if ($dados[MapNumber] == 80) {$dados[MapNumber] = 'Kalrutan';}
			

echo"

        <tr>
		  <td  bgcolor='#fbedbe' align='center'>$i</td>
          <td  bgcolor='#fbedbe' align='center'>$row[0]</td>
          <td  bgcolor='#fbedbe' align='center' height='30px'>$zo2[2]</td>
		  <td  bgcolor='#fbedbe' align='center'>$Resets[2]</td>
		  <td  bgcolor='#fbedbe' align='center'>$Resets[37]</td>
  		  <td  bgcolor='#fbedbe' align='center'>$dados[MapNumber]</td>
  		  <td  bgcolor='#fbedbe' align='center'>$zebe2[0]</td>
		  <td  bgcolor='#fbedbe' align='center'>$row2[1]</td>		  
        </tr>
 
		  ";;			}
?>     
        </tbody>
      </table></td>
    </tr>
  </tbody>
</table>
<br>
 
You are missing the column "country"
you need to add "country" in MEMB_INFO

and for the "Resets" problem it's not a SQL problem but a problem in the php script

edit:
$Resets[2] to $Resets['cLevel']
and
$Resets[37] to $Resets['Resets'] or $Resets['Reset'] whatever works

also this is not written very well
example:
1. you can remove the $Resets, $zo1 and use only $dados cuz it does the same thing it only drains more resources
2. the if() statement can be replaced by arrays or switch case
3. same as 1. but for $zebe1 it can use only $membstat
4. there are much more "problems"
 
You are missing the column "country"
you need to add "country" in MEMB_INFO

and for the "Resets" problem it's not a SQL problem but a problem in the php script

edit:
$Resets[2] to $Resets['cLevel']
and
$Resets[37] to $Resets['Resets'] or $Resets['Reset'] whatever works

also this is not written very well
example:
1. you can remove the $Resets, $zo1 and use only $dados cuz it does the same thing it only drains more resources
2. the if() statement can be replaced by arrays or switch case
3. same as 1. but for $zebe1 it can use only $membstat
4. there are much more "problems"


OMG Thanks! Reset Fix, country exist but line
if($row2[1] == ''){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Argentina.png>';}

all uses from Argentina

and

if($row2[1] == 'Argentina'){ $row2[1] ='<img src=http://Mu-Online.co.ve/Imagenes/Flang/Argentina.png>';}

not found image of flag
 

Attachments

  • Country.png
    Country.png
    5.9 KB · Views: 34
  • Like
Reactions: Erazmho
Mby I'm wrong but as far as I know you can't request row results from array query.
So you have
$row2 = mssql_fetch_array($pais_query); but I think it must be => $row2 = mssql_fetch_row($pais_query); in your case

Also check for missing image files
 
Last edited: