Superman
25-11-12, 08:55 PM
code BXH chuyen sinh mình chạy server 3 lổ thì nó hiện ra số lần chuyên bao nhieu lan
mình đem qua bản 4 lổ thì nó ko hiện số lần sinh toàn đề số lần chuyền sinh =0 ,ai biết cấu hình sao cho nó hiện ra số lần chuyền sinh
help mình với
<?php
if (file_exists("laivt_firewall.php"))
include_once "laivt_firewall.php";
include("cauhinh.php");
require_once('../header.php');
require_once('menu.php');
?>
<!--Tra cuu-->
<div class="clearthis">
</div>
</div>
<div class="left_col_bt">
</div>
</div>
<div id="right_col">
<div class="right_col_top"></div>
<div class="right_col_ct">
<h2>Bản Xếp Hạng Cao Thủ</h2>
<div class="right_acc_grey">
<div class="right_acc_grey_top"></div>
<div class="right_acc_grey_ct">
<table border="0" cellpadding="1" cellspacing="1" width="95%">
<?php
$run=0;
$ketqua=mysql_query("select str, spr, con, accname, ipr, dex from tlbbdb.t_char")
or die (mysql_error());
while($row=mysql_fetch_array($ketqua))
{
$sumprop[$run]= $row["str"]+$row["spr"]+$row["con"]+$row["ipr"]+$row["dex"];
$charname[$run]=$row["accname"];
$run=$run+1;
}
mysql_free_result($ketqua);
for($i=0;$i<$run-1;$i++)
{for($g=$i+1;$g<$run;$g++)
{if($sumprop[$i]<$sumprop[$g])
{ //hoan doi chi so sumprop
$bientam1=$sumprop[$i];
$sumprop[$i]=$sumprop[$g];
$sumprop[$g]=$bientam1;
//hoan doi charname
$bientam2=$charname[$i];
$charname[$i]=$charname[$g];
$charname[$g]=$bientam2;
}}}
?>
<!--END Notice-->
<!--BEGIN Char infomation-->
<table border="0" cellpadding="1" cellspacing="1" width="95%">
<table border="0" cellpadding="1" cellspacing="1" width="95%">
<div class="tab_napbac">
<div class="tab_napbac1">
Xếp hạng theo số lần chuyển sinh
</div>
<?php
function solancs($mdata)
{
//$str = substr($mdata,1776,4);
$str1 = hexdec(substr($mdata,1776,1));
$str2 = hexdec(substr($mdata,1777,1));
$str3 = hexdec(substr($mdata,1778,1));//$str3*4096
$str4 = hexdec(substr($mdata,1779,1));
$cs = $str4*256+$str1*16+$str2;
return $cs;
}
//lien ket file ket noi voi mysql
include_once('../include/config_mysql_win.php');
include_once('../include/class2.php');
//db linux
$tlbb_web = new DB2($db_host_linux, $db_user_linux, $db_pwd_linux, $tlbbdb, $pconnect);
//query xep hang
/*
$query = "
select accname,charname,charguid,mdata,(str+spr+con+ipr+d ex+points)as tongcong
from t_char
order by tongcong desc
limit 50
";
$check = $tlbb_web->query($query);
*/
//query check so lan cs cua nv
$query = "
select accname,charname,charguid,mdata
from t_char
";
$check = $tlbb_web->query($query);
$tennv[0];
$nv[0];
$lancs[0];
$i=0;
while($result = $tlbb_web->fetch_array($check))
{
$mdata = $result['mdata'];
$cs = solancs($mdata);
$charguid = strtoupper(dechex($result['charguid']));
$tennv[$i]=$result['charname'];
$nv[$i]=$result['accname'];
$lancs[$i]=$cs;
$i=$i+1;
/************************************************** **
echo '
<tr>
<td>'.$result['accname'].'</td><td>'.$result['charname'].'</td><td>'.$charguid.'</td><td>'.$cs.'</td>
</tr>
';
************************************************** ***/
}
for($z=0;$z<$i-1;$z++){
for($g=$z+1;$g<$i;$g++){
if($lancs[$z]<$lancs[$g]){
$bt1=$lancs[$z];
$lancs[$z]=$lancs[$g];
$lancs[$g]=$bt1;
$bt2=$tennv[$z];
$tennv[$z]=$tennv[$g];
$tennv[$g]=$bt2;
}}}
for($j=0;$j<100;$j++){
echo'
<div class="right_content_line">
<div class="right_content_line1">
'.$j.'</div>
<div class="right_content_line2">
'.$tennv[$j].'
</div>
<div class="right_content_line3">
'.$lancs[$j].'
</div>
</div> <div class="right_dot"></div>
'
/******************/
;
}
//thong bao thanh cong
?>
</tbody></table>
<div class="right_col_bt"></div>
<!--END Char infomation-->
</tbody></table>
<?php
require_once('../footer.php');
?>
mình đem qua bản 4 lổ thì nó ko hiện số lần sinh toàn đề số lần chuyền sinh =0 ,ai biết cấu hình sao cho nó hiện ra số lần chuyền sinh
help mình với
<?php
if (file_exists("laivt_firewall.php"))
include_once "laivt_firewall.php";
include("cauhinh.php");
require_once('../header.php');
require_once('menu.php');
?>
<!--Tra cuu-->
<div class="clearthis">
</div>
</div>
<div class="left_col_bt">
</div>
</div>
<div id="right_col">
<div class="right_col_top"></div>
<div class="right_col_ct">
<h2>Bản Xếp Hạng Cao Thủ</h2>
<div class="right_acc_grey">
<div class="right_acc_grey_top"></div>
<div class="right_acc_grey_ct">
<table border="0" cellpadding="1" cellspacing="1" width="95%">
<?php
$run=0;
$ketqua=mysql_query("select str, spr, con, accname, ipr, dex from tlbbdb.t_char")
or die (mysql_error());
while($row=mysql_fetch_array($ketqua))
{
$sumprop[$run]= $row["str"]+$row["spr"]+$row["con"]+$row["ipr"]+$row["dex"];
$charname[$run]=$row["accname"];
$run=$run+1;
}
mysql_free_result($ketqua);
for($i=0;$i<$run-1;$i++)
{for($g=$i+1;$g<$run;$g++)
{if($sumprop[$i]<$sumprop[$g])
{ //hoan doi chi so sumprop
$bientam1=$sumprop[$i];
$sumprop[$i]=$sumprop[$g];
$sumprop[$g]=$bientam1;
//hoan doi charname
$bientam2=$charname[$i];
$charname[$i]=$charname[$g];
$charname[$g]=$bientam2;
}}}
?>
<!--END Notice-->
<!--BEGIN Char infomation-->
<table border="0" cellpadding="1" cellspacing="1" width="95%">
<table border="0" cellpadding="1" cellspacing="1" width="95%">
<div class="tab_napbac">
<div class="tab_napbac1">
Xếp hạng theo số lần chuyển sinh
</div>
<?php
function solancs($mdata)
{
//$str = substr($mdata,1776,4);
$str1 = hexdec(substr($mdata,1776,1));
$str2 = hexdec(substr($mdata,1777,1));
$str3 = hexdec(substr($mdata,1778,1));//$str3*4096
$str4 = hexdec(substr($mdata,1779,1));
$cs = $str4*256+$str1*16+$str2;
return $cs;
}
//lien ket file ket noi voi mysql
include_once('../include/config_mysql_win.php');
include_once('../include/class2.php');
//db linux
$tlbb_web = new DB2($db_host_linux, $db_user_linux, $db_pwd_linux, $tlbbdb, $pconnect);
//query xep hang
/*
$query = "
select accname,charname,charguid,mdata,(str+spr+con+ipr+d ex+points)as tongcong
from t_char
order by tongcong desc
limit 50
";
$check = $tlbb_web->query($query);
*/
//query check so lan cs cua nv
$query = "
select accname,charname,charguid,mdata
from t_char
";
$check = $tlbb_web->query($query);
$tennv[0];
$nv[0];
$lancs[0];
$i=0;
while($result = $tlbb_web->fetch_array($check))
{
$mdata = $result['mdata'];
$cs = solancs($mdata);
$charguid = strtoupper(dechex($result['charguid']));
$tennv[$i]=$result['charname'];
$nv[$i]=$result['accname'];
$lancs[$i]=$cs;
$i=$i+1;
/************************************************** **
echo '
<tr>
<td>'.$result['accname'].'</td><td>'.$result['charname'].'</td><td>'.$charguid.'</td><td>'.$cs.'</td>
</tr>
';
************************************************** ***/
}
for($z=0;$z<$i-1;$z++){
for($g=$z+1;$g<$i;$g++){
if($lancs[$z]<$lancs[$g]){
$bt1=$lancs[$z];
$lancs[$z]=$lancs[$g];
$lancs[$g]=$bt1;
$bt2=$tennv[$z];
$tennv[$z]=$tennv[$g];
$tennv[$g]=$bt2;
}}}
for($j=0;$j<100;$j++){
echo'
<div class="right_content_line">
<div class="right_content_line1">
'.$j.'</div>
<div class="right_content_line2">
'.$tennv[$j].'
</div>
<div class="right_content_line3">
'.$lancs[$j].'
</div>
</div> <div class="right_dot"></div>
'
/******************/
;
}
//thong bao thanh cong
?>
</tbody></table>
<div class="right_col_bt"></div>
<!--END Char infomation-->
</tbody></table>
<?php
require_once('../footer.php');
?>