Register for your free account! | Forgot your password?

You last visited: Today at 02:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Statistic Srcipt

Discussion on Statistic Srcipt within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2009
Posts: 6
Received Thanks: 1
Statistic Srcipt

Hi, this is my code
Code:
<div id="content">			<div class="postui2 text-title">
					<h2>
                    Statystyki
                    
                    </h2>
				
				</div>
				<div class="postui2 text-con">
				<div class="con-wrap">
<center>
<?PHP
  $CPSeite = 50;
  $markierteZeile=0;
  if(isset($_GET['p'])) {
    if(!checkInt($_GET['p']) || !($_GET['p']>0)) $aSeite = 1;
    else $aSeite = $_GET['p'];
  }
  else { $aSeite = 1; }
  
  if(isset($_POST['suche']) && $_POST['suche']=='suchen') {
    if(!empty($_POST['charakter'])) {
      $sqlCmd="SELECT id, name, level, exp, empire, guild_name, rang
      FROM (
      
        SELECT id, name, level, exp, empire, guild_name, @num := @num +1 AS rang
        FROM (
        
          SELECT player.id, player.name, player.level, player.exp, player_index.empire, guild.name AS guild_name, @num :=0
          FROM player.player
          LEFT JOIN player.player_index ON player_index.id = player.account_id
          LEFT JOIN player.guild_member ON guild_member.pid = player.id
          LEFT JOIN player.guild ON guild.id = guild_member.guild_id
          INNER JOIN account.account ON account.id=player.account_id
          WHERE player.name NOT LIKE '[%]%'  AND
		  account.status!='BLOCK'
          ORDER BY player.level DESC , player.exp DESC
          
        ) AS t1
        
      ) AS t2
      
      WHERE name LIKE '".mysql_real_escape_string($_POST['charakter'])."' LIMIT 1";
      $sqlQry=mysql_query($sqlCmd,$sqlServ);
      if(mysql_num_rows($sqlQry)>0) {
      
        $getRang = mysql_fetch_object($sqlQry);
        $aSeite = ceil($getRang->rang/$CPSeite);
        $markierteZeile = $getRang->rang;
      }
      
    }
    
  }
  
  $sqlCmd = "SELECT COUNT(*) as summeChars  
  FROM player.player 
  LEFT JOIN player.player_index 
  ON player_index.id=player.account_id 
  LEFT JOIN player.guild_member 
  ON guild_member.pid=player.id 
  LEFT JOIN player.guild 
  ON guild.id=guild_member.guild_id
  INNER JOIN account.account 
  ON account.id=player.account_id
  WHERE player.name NOT LIKE '[%]%'  AND account.status!='BLOCK'
  ORDER BY player.level DESC, player.exp DESC";
  
  $sqlQry = mysql_query($sqlCmd,$sqlServ);
  
  $getSum = mysql_fetch_object($sqlQry);
  $cSeite = calcPages($getSum->summeChars,$aSeite,$CPSeite);
  
?>

<form action="index.php?s=rankings" method="POST">
  <table>
    <tr>
      <th class="topLine">Charaktersuche:</th>
      <td class="thell" style="text-align:center;"><input type="text" name="charakter" maxlength="20" size="20"/></td>
      <td class="tdunkel" style="text-align:center;"><input type="submit" name="suche" value="suchen" maxlength="20" size="20"/></td>
    </tr>
  </table>
</form>
<?PHP
  $maxRange = 5;
  $maxStep = 15;
  if(($aSeite-$maxRange)>0) $sStart = $aSeite-$maxRange;
  else $sStart = 1;
  if(($aSeite+$maxRange)<=$cSeite[0]) $sEnde = $aSeite+$maxRange;
  else $sEnde = $cSeite[0];
  
  echo '<table>
  <tr>
  <td class="tdunkel">';
  if(($aSeite-$maxStep)>0) echo '<a href="index.php?s=rankings&p='.($aSeite-$maxStep).'">'.($aSeite-$maxStep).'</a> &laquo;';
  else echo '<a href="index.php?s=rankings&p=1">1</a> &laquo;';
  echo'</td>';
  
  for($i=$sStart;$i<=$sEnde;$i++) {
    $sKlasse = ($i==$aSeite) ? "topLine" : "thell";
    echo'<td class="'.$sKlasse.'" style="text-align:center;">';
    echo'<a href="index.php?s=rankings&p='.$i.'">'.$i.'</a>';
    echo'</td>';
  }
  
  echo'<td class="tdunkel" style="text-align:right;">';
  if(($aSeite+$maxStep)<=$cSeite[0]) echo '&raquo; <a href="index.php?s=rankings&p='.($aSeite+$maxStep).'">'.($aSeite+$maxStep).'</a>';
  else echo '&raquo; <a href="index.php?s=rankings&p='.$cSeite[0].'">'.$cSeite[0].'</a>';
  echo'</td>';
  echo'</table>';
?>
<table width="408">
<tr>
  <th class="topLine">Platz</th>
  <th class="topLine">Charakter</th>
  <th class="topLine">Level</th>
  <th class="topLine">EXP</th>
  <th class="topLine">Gilde</th>
  <th class="topLine">Reich</th>
</tr>
<?PHP
  $sqlCmd = "SELECT player.id,player.name,player.level,player.exp,player_index.empire,guild.name AS guild_name 
  FROM player.player 
  LEFT JOIN player.player_index 
  ON player_index.id=player.account_id 
  LEFT JOIN player.guild_member 
  ON guild_member.pid=player.id 
  LEFT JOIN player.guild 
  ON guild.id=guild_member.guild_id
  INNER JOIN account.account 
  ON account.id=player.account_id
  WHERE player.name NOT LIKE '[%]%'  AND account.status!='BLOCK'
  ORDER BY player.level DESC, player.exp DESC 
  LIMIT ".$cSeite[1].",".$CPSeite;
  //echo $sqlCmd;
  $sqlQry = mysql_query($sqlCmd,$sqlServ);
  $x=$cSeite[1]+1;
  while($getPlayers = mysql_fetch_object($sqlQry)) {
    $zF = ($x%2==0) ? "thell" : "tdunkel";
    if(checkInt($markierteZeile) && $markierteZeile==$x) { $zF = "tmarkiert"; }
    echo "<tr>";
    echo "<td class=\"$zF\">".$x."</td>";
    echo "<td class=\"$zF\">".$getPlayers->name."</td>";
    echo "<td class=\"$zF\">".$getPlayers->level."</td>";
    echo "<td class=\"$zF\">".$getPlayers->exp."</td>";
    echo "<td class=\"$zF\">".$getPlayers->guild_name."</td>";
    echo "<td class=\"$zF\">";
    if(!empty($getPlayers->empire)) {
      echo '<img src="img/reiche/'.$getPlayers->empire.'_kl.jpg" title="Reich" alt="Reich"/>';
    }
    echo "</td>";
    echo "</tr>";
    
    $x++;
    
  }
?>
</table></center>

				</div>

  </div> 
				<div class="postui2 text-end">
          
                
                  
    </div></div>
i need edit this script to script with sort level.
Sorry for my english. Thanks!
maniekzsk8 is offline  
Reply


Similar Threads Similar Threads
Statistic auf Z8games.com > Hilfe <
03/15/2011 - CrossFire - 6 Replies
Hey^^ Hab da mal eine Frage... wenn man auf Z8Games - Free Gaming. Evolved. geht und sich dann einloggt dann auf " My Profile " dann auf Statistic und dann sind da ja so z.b Yesterday 3 stunden 20 minuten ( ein beispiel ) ist das NUR die Game Zeit also z.b ganze zeit in Eagle oder zählt das da auch die Lobby - Zeit mit? Mfg
Minecraft server statistic
03/01/2011 - Minecraft - 2 Replies
Mochte mal fragen ob jemand ein program bzw addon gibt was ein seite mit statistiquen zum server erstellt (kann auch ein programm sein was zbs die server.log liest) danke im vorraus Mfg.Paradox³
[FRAGE] quest srcipt: was kaput??
11/06/2010 - Metin2 Private Server - 0 Replies
hi ich hab mich mal am quest scripten versucht und ma eine erstellt. leider kommt immer die selbe fehlermeldung: syntax error : :8: `)' expected near `Tigris' big_danger_lv19.quest:71:Abort trap (core dumped) und das is das quest script: quest big_danger_lv19 begin state start begin end
[Info] Necklace Statistic Percentages
12/30/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 51 Replies
I'm doing this for 3 reasons. i'm sick and tired of all the necklace threads that are all pointless superstitions I'm annoyed about how much it floods the forum and keeps addind the exact same thread 3 or 4 times on every page I'd rather have everybody get the RIGHT information instead of the assumed ones First up These are the values for the wind necklace For those who don't understand, Failure has 3 parts to it, further explained to the right of it. Success+Failure=100% double...
[Info] Necklace Statistic Percentages
10/26/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 5 Replies
Necklace Statistic Percentages ------------------------------------------------- ------------------------------- I'm doing this for 3 reasons. i'm sick and tired of all the necklace threads that are all pointless superstitions I'm annoyed about how much it floods the forum and keeps addind the exact same thread 3 or 4 times on every page I'd rather have everybody get the RIGHT information instead of the assumed ones First up These are the values for the wind necklace



All times are GMT +1. The time now is 02:52.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.