[Yardım] Günlük NP Sıralaması PHP KOD HAZIR. QA KODU LAZIM

  • Konbuyu başlatan Konbuyu başlatan s7eve7n
  • Başlangıç tarihi Başlangıç tarihi
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Konu Yazar

s7eve7n

Active Member
Şub
3,049
4
PHP:
<?
// Oturumlar
ob_start();
session_start();


if ($_SESSION['sesusera'] == '') {
	
	
	echo 'Üye Girişi yapınız!';
	
	}
	
	else {

?> 
<center> <B> <a href="index.php?page=gunluk"> Ortak Gunluk Sıralama </a> | <a href="index.php?page=gunluk&irk=hmn"> Human Gunluk Sıralama </a> | <a href="index.php?page=gunluk&irk=krs"> Karus Gunluk Sıralama </a>

<br /><br />Hergun Saat 24:00'da resetlenir.<br /> 


 <? 
$irkg = $_GET['irk'];

if ($irkg == '') {
	
	 $irkgunluk = "ORTAK";
	 
	
	}
	elseif ($irkg == 'hmn') {
		
		$irkgunluk = "HUMAN";
		$irks = "2";
		
		}
		elseif ($irkg == 'krs') {
		
		$irkgunluk = "KARUS";
		$irks = "1";
		
		}
		
		else {
			
			$irkgunluk = "ORTAK";
			
			}
			
			if ($irks == '') {
				
				///  ORTAK
				
				?>
				<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title><? echo $titled; ?></title>
<link href="../style.css" rel="stylesheet" type="text/css" />
 <link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>

</head>

<body background="../imgs/bg.jpg" topmargin="0" marginheight="0">
<table width="520" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="24" align="left"  >&nbsp;<img src="../imgs/arti.gif" width="9" height="9" />&nbsp;<strong><center>Gunluk NP Sıralaması - <? echo ($irkgunluk) ; ?></strong></td>
  </tr>
  <tr>
  <?
	function GNation($nation)
{
	if ($nation == 1) {
		$nation = '<img src="../imgs/karus.gif">';
	} elseif ($nation == 2) {
		$nation = '<img src="../imgs/elmo.gif">';
	}

	return $nation;
}
?>
    <td align="left" valign="top" background="../imgs/bg.png">

       <table width="520" border="0" cellpadding="0" cellspacing="0">

          <?	
	

$results=odbc_exec($conn,"SELECT TOP 100 strUserID, Level, Nation, Class, Knights, Loyalty, GunlukLoyalty strCharID FROM USERDATA   ORDER  BY GunlukLoyalty DESC, LEVEL DESC");
$asd = 0;
$tablo_1 = '
 <center> <tr>
      <td width="25" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Sira</span></td>
 
    <td width="100" align="center" height="14" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Karakter Ady </span></td>
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Level</span></td>
    
 
  
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">National Point</span></td>  
  <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Gunluk NP</span></td>
  </tr>
';
echo $tablo_1;
while (odbc_fetch_row($results)) {
$user = odbc_result($results,1);
		
	$np = odbc_result($results, 6);
	$aylik = odbc_result($results, 7);
	$level = odbc_result($results, 2);
	$clan = odbc_result($results, 5);
	$clannm = odbc_result($results, 5);
		$clanr=odbc_exec($conn,"SELECT IDName FROM KNIGHTS WHERE IDNum = '$clan'");
	$clan=odbc_result($clanr, 1);
	if ($clan == '') {
		$clan = 'Yok';
	}
	$sira++;

?>

<?


$tablo_2 = '

            <tr class="textwhite">
            <td align="center"><font color="#990000">'.$sira.'</font></td>
	
            <td align="center"><a href="index.php?page=userdetay&karakter='.$user.'"><font color="#990000">'.$user.'</a></td>
            <td align="center"><font color="#990000">'.$level.'</font></td>
			  
				  
					
<td align="center"><font color="#990000">'.number_format($np).'</font></td>					  
<td align="center"><font color="#990000">'.number_format($aylik).'</font></td>
          </tr>
';
echo $tablo_2;
}

?>  
    </table></td>
  </tr>
</table>
</body>
</html>

				
		<?		}
				
				
				else { ?>
					
					<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title><? echo $titled; ?></title>
<link href="../style.css" rel="stylesheet" type="text/css" />
 <link href="style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>

</head>

<body background="../imgs/bg.jpg" topmargin="0" marginheight="0">
<table width="520" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="24" align="left"  >&nbsp;<img src="../imgs/arti.gif" width="9" height="9" />&nbsp;<strong><center>Gunluk NP Sıralaması - <? echo ($irkgunluk) ; ?></strong></td>
  </tr>
  <tr>
  <?
	function GNation($nation)
{
	if ($nation == 1) {
		$nation = '<img src="../imgs/karus.gif">';
	} elseif ($nation == 2) {
		$nation = '<img src="../imgs/elmo.gif">';
	}

	return $nation;
}
?>
    <td align="left" valign="top" background="../imgs/bg.png">

       <table width="520" border="0" cellpadding="0" cellspacing="0">

          <?	
	

$results=odbc_exec($conn,"SELECT TOP 100 strUserID, Level, Nation, Class, Knights, Loyalty, GunlukLoyalty strCharID FROM USERDATA WHERE Nation = '".$irks."'   ORDER  BY GunlukLoyalty DESC, LEVEL DESC");
$asd = 0;
$tablo_1 = '
 <center> <tr>
      <td width="25" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Sira</span></td>
 
    <td width="100" align="center" height="14" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Karakter Ady </span></td>
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Level</span></td>
    
 
  
    <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">National Point</span></td>  
  <td width="100" align="center" background="../imgs/menubg.gif" bgcolor="#FF9900"><b><font color="#ffffff">Gunluk NP</span></td>
  </tr>
';
echo $tablo_1;
while (odbc_fetch_row($results)) {
$user = odbc_result($results,1);
		
	$np = odbc_result($results, 6);
	$aylik = odbc_result($results, 7);
	$level = odbc_result($results, 2);
	$clan = odbc_result($results, 5);
	$clannm = odbc_result($results, 5);
		$clanr=odbc_exec($conn,"SELECT IDName FROM KNIGHTS WHERE IDNum = '$clan'");
	$clan=odbc_result($clanr, 1);
	if ($clan == '') {
		$clan = 'Yok';
	}
	$sira++;

?>

<?


$tablo_2 = '

          <tr class="textwhite">
            <td align="center"><font color="#990000">'.$sira.'</font></td>
	
            <td align="center"><a href="index.php?page=userdetay&karakter='.$user.'"><font color="#990000">'.$user.'</a></td>
            <td align="center"><font color="#990000">'.$level.'</font></td>
			  
				  
					
<td align="center"><font color="#990000">'.number_format($np).'</font></td>					  
<td align="center"><font color="#990000">'.number_format($aylik).'</font></td>
          </tr>
      
';
echo $tablo_2;
}

?>
    </table></td>
  </tr>
</table>
</body>
</html>
<?
					
					
					
					
					
					}

	}

?>

Bu Php Koda Göre DB E Eklenecek GunlukLoyalty diye bi Clom var ama nasıl eklicem günlük np i orda nasıl oluşmasını ayarlıcam bilmiyorum yardımcı olursanız sevinirim.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Geri
Üst Alt