• Bu site çerezler kullanır. Bu siteyi kullanmaya devam ederek çerez kullanımımızı kabul etmiş olursunuz. Daha fazla bilgi edin.

Bana acil yardım etmeniz lazım çok acil

Konuyu Okuyan Kişiler (0)

TeknoTost

webmaster.tc
Katılım
20 Ağu 2012
Mesajlar
386
Beğeniler
0
#1
Arkdaşlar kingcapable.com sitesine giriyorsunuz orda travain pvp scripti kurlu şimdi oyundaki online user total usr leri nasıl göstericem elimde kod var ekleyince çalışmıyor yardım edebilirminiz.


Yapmak istediğim vericeğim kodaki online ve total user leri bana yırmanız ben ayırınca çalışmıyor



Kod:
<?php
#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       index.php                                                   ##
##  Developed by:  StamiS                                                      ##
##  License:       Travian Project                                        ##
##  Copyright:     Travian (c)  2012. All rights reserved.                ##
##  Page:          http://travian.com/                             ##
#################################################################################


       if(!file_exists('GameEngine/config.php')) {
        header("Location: install/");
       }
       include ("GameEngine/Database.php");
       include ("GameEngine/config.php");
       include ("GameEngine/Lang/en.php");
?>

<title><?php echo SERVER_NAME;
?></title>

<?php
   $tribe1 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE tribe = 1");
   $tribe2 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE tribe = 2");
   $tribe3 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE tribe = 3");
   $tribes = array(mysql_num_rows($tribe1), mysql_num_rows($tribe2), mysql_num_rows($tribe3));
   $users = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE tribe!=0 AND tribe!=4 AND tribe!=5")); ?>

<body bgproperties="fixed" repeat="no-repeat" background="Travian/1280x960.jpg">




<div cellspacing="0" cellpadding="0" border="0" style="position: absolute; top: 0px; left: 50px;">
<img src="Travian/content_bg1.png" border="0" align="top"  class="" alt="Close"/>


<br><hr><center><b><font color="#000000">©2012 by Travian.blogger.ba ~ <?php print SERVER_NAME; ?> rights reserved
</b></center></font>


    <title><?php echo SERVER_NAME; ?></title>



<div cellspacing="0" cellpadding="0" border="0" style="position: absolute; width: 220px; top: 100px; left: 78px;"><center>
<font color="blue" size="5"><b><?php print SERVER_NAME; ?></b><br>* Welcome *</font></b></center>
</div>





<div cellspacing="0" cellpadding="0" border="0" style="position: absolute; top: 58px; left: 682px;"><center>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="Travian/imageswapaudio.js">
</script>
<a href="anmelden.php"><img width="140"  src="Travian/s2.png" data-srcover="Travian/s1.png" data-soundover="Travian/horned.mp3"></a>
</div>


<div cellspacing="0" cellpadding="0" border="0" style="position: absolute; top: 60px; left: 430px;"><center>
<a href="login.php">
<img width="120"  src="Travian/t2.png" data-srcover="Travian/t1.png" data-soundover="Travian/horned.mp3"></a>
</div>


<div cellspacing="0" cellpadding="0" border="0" style="position: absolute; top: 180px; left: 555px;"><center>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<style type="text/css">
#simplegallery1{ //CSS for Simple Gallery Example 1
position: relative; /*keep this intact*/
visibility: hidden; /*keep this intact*/
border: 2px solid darkred;
}

#simplegallery1 .gallerydesctext{ //CSS for description DIV of Example 1 (if defined)
text-align: left;
padding: 2px 5px;
}

</style>

<script type="text/javascript" src="Travian/simplegallery.js">
</script>
<script type="text/javascript">
var mygallery=new simpleGallery({
	wrapperid: "simplegallery1", //ID of main gallery container,
	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	imagearray: [
		["Travian/2.jpg", "", "", ""],
		["Travian/1.jpg", "", "", ""],
		["Travian/3.jpg", "", "", ""],
		["Travian/4.jpg", "http://Travian.blogger.ba", "", ""],
		["Travian/2.jpg", "http://Travian.blogger.ba", "", "Tavian"],

	],
	autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 500, //transition duration (milliseconds)
	oninit:function(){ //event that fires when gallery has initialized/ ready to run
		//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
	},
	onslide:function(curslide, i){ //event that fires after each slide is shown
		//Keyword "this": references current gallery instance
		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
	}
})

</script><div id="simplegallery1"></div></div>











<div cellspacing="0" cellpadding="0" border="0" style="position: absolute; top: 210px; left: 36px;">
 <table><tbody> <th><p><img src="Travian/statistics-icon.png" width="28" height="28" border="0"> Statistics <img src="Travian/statistics-icon.png" width="28" height="28" border="0"></div>
  </p></th><tr><th>Total players: <td><?php
                                   $users = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE id > 0"));
                                           echo ($users)-3;

                                    ?>  </td>      </th>
                                </tr>
                                <tr>
   <th>Active players:<td> <?php

                                           $active = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE " . time() . "-timestamp < (3600*24)"));
                                           echo $active;

                                    ?> </td>                              </th>

                                <tr>
                                    <th>Online players:<td>

                                    <?php

                                           $online = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE " . time() . "-timestamp < (60*5)"));
                                           echo $online;

                                    ?>  </td><tr><td><br></td></tr><tr>


<td>Romans</td>

                <td><?php
                   echo $tribes[0]; ?></td>

                <td><?php
                   $percents = 100 * (($tribes[0]) / $users);
                  ?></td>
            </tr>

            <tr>
                <td>Teutons</td>

                <td><?php
                   echo $tribes[1]; ?></td>

                <td><?php
                   $percents = 100 * ($tribes[1] / $users);
                   ?></td>
            </tr>

            <tr>
                <td>Gauls</td>

                <td><?php
                   echo $tribes[2]; ?></td>

                <td><?php
                   $percents = 100 * ($tribes[2] / $users);
                   ?></td>
            </tr>

                               </th>
                            </tbody>
                        </table></div>







</div>