Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server

  • Konbuyu başlatan Konbuyu başlatan der4eder
  • Başlangıç tarihi Başlangıç tarihi
Konu Yazar

der4eder

New Member
Kalemi Kırıldı!
Eyl
855
0
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name '_anket'., SQL state S0002 in SQLExecDirect in C:\AppServ\www\function.php on line 42

Warning: odbc_result(): supplied argument is not a valid ODBC result resource in C:\AppServ\www\function.php on line 43


Nasıl DuzeltebılıRIM ?

FUNCTION :
PHP:
<?php //K2D

	###################          Resim Upload         #########################

// Türkçe karakterli dosyalar için yazdığım fonksiyon
function ptRU($kaynak) {
$girdi = array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z','ç','ğ','ı','ö','ş','ü',' ','_',);
$cikti = array('a','b','c','c','d','e','f','g','g','h','i','i','j','k','l','m','n','o','o','p','r','s','s','t','u','u','v','y','z','c','g','i','j','ş','u','-','-',);
$sonuc = str_replace($girdi,$cikti,$kaynak);
return $sonuc;
}
// Uzantı tespit fonksiyonum
function ptUzanti($dosyaismi) { 
$degerler = explode('.',$dosyaismi);
$sonnokta = count($degerler)-1; 
$uzanti = $degerler[$sonnokta]; 
return $uzanti;
} 
	
	
	###################          SIKAYET SAYISI         #########################
	$sikayet = odbc_exec($conn,"select count(id) from _sikayet");
	$sikayetsay = odbc_result($sikayet,1);
	
	###################          LINK         #########################	
	$link = odbc_exec($conn,"select count(id) from _link");
	$linksay = odbc_result($link,1);
	
	###################          HABER         #########################	
	$haber = odbc_exec($conn,"select count(id) from _haber");
	$habersay = odbc_result($haber,1);
	
	###################          Aktivite         #########################	
	$aktivite = odbc_exec($conn,"select count(id) from _aktivite");
	$aktivitesay = odbc_result($aktivite,1);
	
	###################          TİCKET         #########################	
	$ticket = odbc_exec($conn,"select count(id) from _ticket");
	$ticketsay = odbc_result($ticket,1);
	
	###################          ANKET         #########################	
	$anket = odbc_exec($conn,"select count(anket_id) from _anket");
	$anketsay = odbc_result($anket,1);
	
	###################          GAME MASTER         #########################	
	$gm = odbc_exec($conn,"select count(struserid) from userdata where authority = '0'");
	$gmsay = odbc_result($gm,1);

	###################          Zones         #########################
	FUNCTION getZones($zone) {
	if ($zone == 21) {
	$zone = "Moradon";
	} elseif ($zone == 1) {
	$zone = "Luferson Castle";
	} elseif ($zone == 201) {
	$zone = "Colony Zone";
	} elseif($zone==31) {
	$zone = "Bifrost";
	} elseif ($zone == 202) {
	$zone = "Ronark Land";
	} elseif ($zone == 103) {
	$zone = "Lunar War";
	} elseif ($zone == 2) {
	$zone = "El Morad Castle";
	} elseif ($zone == 300) {
	$zone = "Delos";
	} elseif ($zone == 480) {
	$zone = "Arena";
	} elseif ($zone == 101) {
	$zone = "Dark Lunar";
	} elseif ($zone == 11) {
	$zone = "Karus Eslant";
	} elseif ($zone == 12) {
	$zone = "El Morad Eslant";
	}
	return $zone;
	}

	###################          TARİH         #########################

	$trh = substr($trhh,0,10);
	$yil = substr($trh,0,4);
	$bul = substr($trh,5,8);
	$gün = substr($bul,3,4);
	$ay = substr($bul,0,2);
		$ay = getAy($ay);
	$tarih = ($gün.' '.$ay.' '.$yil);

	###################          AYLAR          #########################
	FUNCTION getAy($ay) {
			if($ay == '01'){
				$ay = 'Ocak';
			}elseif($ay == '02'){
				$ay = 'Şubat';
			}elseif($ay == '03'){
				$ay = 'Mart';
			}elseif($ay == '04'){
				$ay = 'Nisan';
			}elseif($ay == '05'){
				$ay = 'Mayıs';
			}elseif($ay == '06'){
        $ay = 'Haziran';
      }elseif($ay == '07'){
        $ay = 'Temmuz';
      }elseif($ay == '08'){
        $ay = 'Ağustos';
      }elseif($ay == '09'){
        $ay = 'Eylül';
      }elseif($ay == '10'){
        $ay = 'Ekim';
      }elseif($ay == '11'){
        $ay = 'Kasım';
      }elseif($ay == '12'){
        $ay = 'Aralık';
      }
      
	return $ay;
	}
	###################          Authority          #########################
	FUNCTION getAuthority($auth) {

	if ($auth == '0') {
		$auth = '<font color="red">Game Master</font>';
	}
	elseif ($auth == '255') {
	$auth = '<font color="yellow">Oynama Yasaklı</font>';
	}
	elseif($aut == '2') {
		$auth = '<font color="yellow">Konuşma Yasaklı</font>';
	} else {
    $auth = '<font color="green">Oyuncu</font>';
	}
	
	return $auth;
	
	}	
	

	###################          Gelen Mailler        #########################
	
	$gelen = odbc_exec($conn,"select count(gonderilen) from _mail where gonderilen = '".$_SESSION['k2duser']."' and okundu='0'");
	$gelenler = odbc_result($gelen,1);
	
	if($gelenler == 0) { $gelenler = '';}else{$gelenler = '('.$gelenler.')';}

	###################          Gonderilen Mailler        #########################
	
	$giden = odbc_exec($conn,"select count(gonderen) from _mail where gonderen = '".$_SESSION['k2duser']."'");
	$gidenler = odbc_result($giden,1);	
	
	if($gidenler == 0){	$gidenler = ''; }else{$gidenler = '('.$gidenler.')';}


	###################          Castle Siege War         #########################
	FUNCTION getWar($warday) {
	if ($warday == '1') {
		$warday = 'Pazar';
	} elseif ($warday == '2') {
		$warday = 'Pazartesi';
	} elseif ($warday == '3') {
		$warday =  'Sali';
	} elseif ($warday == '4') {
		$warday = 'Çarsamba';
	} elseif ($warday == '5') {
		$warday = 'Persembe';
	} elseif ($warday == '6') {
		$warday = 'Cuma';
	} elseif ($warday == '7') {
		$warday = 'Cumartesi';
	}
	
	return $warday;
	
	}
	
	###################         Clan Nation Resmi         #########################
	FUNCTION Nation($nation)
	{
	if ($nation == '1') {
		$nation = '<script>put_flash("swf/karus.swf", 120, 65);</script>';
	} elseif ($nation == '2') {
		$nation = '<script>put_flash("swf/elmorad.swf", 120, 65);</script>';
	}

		return $nation;
	}
	
	###################          Nation Resim          #########################
	// Nation Resim
	
	function getNation($nation2)
	{
	if ($nation2 == 1) {
		$nation2 = '<img src="resim/diger/karus.gif" alt="" />';
	} elseif ($nation2 == 2) {
		$nation2 = '<img src="resim/diger/elmo.gif" alt="" />';
	}

	return $nation2;
	
	}
	
	###################          Nation İsim          #########################	
	function getIrk($nation2)
	{
	if ($nation2 == 1) {
		$nation2 = 'Karus';
	} elseif ($nation2 == 2) {
		$nation2 = 'El Morad';
	}

	return $nation2;
	
	}

	###################          Class          #########################	
	function getClass($class) {

	if ($class == 105 or $class==101) {
		$class = "Warrior";
	}
	if ($class == 106) {
		$class = "Berserker Hero";
	}
	if ($class == 107 or $class == 102) {
		$class = "Rogue";
	}
	if ($class == 108) {
		$class = "Shadow Vain";
	}
	if ($class == 109 or $class==103) {
		$class = "Mage";
	}
	if ($class == 110) {
		$class = "Elemental Lord";
	}
	if ($class == 111 or $class==104) {
		$class = "Priest";
	}
	if ($class == 112) {
		$class = "Shadow Knight";
	}
	if ($class == 205 or $class==201) {
		$class = "Warrior";
	}
	if ($class == 206) {
		$class = "Blade Master";
	}
	if ($class == 207 or $class==202) {
		$class = "Rogue";
	}
	if ($class == 208) {
		$class = "Kasar Hood";
	}
	if ($class == 209 or $class==203) {
		$class = "Mage";
	}
	if ($class == 210) {
		$class = "Arch Mage";
	}
	if ($class == 211 or $class==204) {
		$class = "Priest";
	}
	if ($class == 212) {
		$class = "Paladin";
	}

	return $class;

	}


	###################          Class Change          #########################	
	function Class_ch($class) {

	if ($class == 105 or $class==101) {
		$class = "Warrior";
	}
	if ($class == 106) {
		$class = "Warrior";
	}
	if ($class == 107 or $class == 102) {
		$class = "Rogue";
	}
	if ($class == 108) {
		$class = "Rogue";
	}
	if ($class == 109 or $class==103) {
		$class = "Mage";
	}
	if ($class == 110) {
		$class = "Mage";
	}
	if ($class == 111 or $class==104) {
		$class = "Priest";
	}
	if ($class == 112) {
		$class = "Priest";
	}
	if ($class == 205 or $class==201) {
		$class = "Warrior";
	}
	if ($class == 206) {
		$class = "Warrior";
	}
	if ($class == 207 or $class==202) {
		$class = "Rogue";
	}
	if ($class == 208) {
		$class = "Rogue";
	}
	if ($class == 209 or $class==203) {
		$class = "Mage";
	}
	if ($class == 210) {
		$class = "Mage";
	}
	if ($class == 211 or $class==204) {
		$class = "Priest";
	}
	if ($class == 212) {
		$class = "Priest";
	}

	return $class;

	}
	###################          RACE          #########################
	
	function getTip($race) {

	if ($race == '1') {
		$race = "Karus Barbar Warrior";
	}
	if ($race == '2') {
		$race = "Karus Erkek";
	}
	if ($race == '3') {
		$race = "Karus Cüce Mage";
	}
	if ($race == '4') {
		$race = "Karus Kız";
	}
	if ($race == '11') {
		$race = "Barbar Warrior";
	}
	if ($race == '12') {
		$race = "Human Erkek";
	}
	if ($race == '13') {
		$race = "Human Kız";
	}

	return $race;
	
	}
	
	function kral($kral){
	if($kral == '')	{
    $kral = 'Seçilmemiş';
	}
	return $kral;
	}
	


	
	###################          SERVER DURUM          #########################
	$topchar = odbc_exec($conn, "SELECT COUNT(*) FROM USERDATA");
	$ktopchar = $ex($conn,"select count(*) from userdata where nation='1'");
	$htopchar = $ex($conn,"select count(*) from userdata where nation='1'");
	$topacc = odbc_exec($conn, "SELECT COUNT(*) FROM TB_USER");
	$ktopacc = odbc_exec($conn, "SELECT COUNT(*) FROM Account_char where bnation='1'");
	$htopacc = odbc_exec($conn, "SELECT COUNT(*) FROM Account_char where bnation='2'");
	$onacc = odbc_exec($conn, "SELECT COUNT(*) FROM CURRENTUSER");
	$topclan = $ex($conn,"select count(*) from knights");
	$humankral = odbc_exec($conn,"select strKingName from KING_SYSTEM where byNation = '2'");
  $karuskral = odbc_exec($conn,"select strKingName from KING_SYSTEM where byNation = '1'");
  $karus_kral = odbc_result($karuskral,1);
  $human_kral = odbc_result($humankral,1);
  $deloss = odbc_exec($conn,"select sMasterKnights from KNIGHTS_SIEGE_WARFARE where sCastleIndex = '1'");
  $delosss = odbc_result($deloss,1);
  $delossahibi = odbc_exec($conn,"select IDName from KNIGHTS where IDNum = '".$delosss."'"); 
  
  $dls = odbc_result($delossahibi,1);
	$top_char = odbc_result($topchar, 1);
	$top_acc = odbc_result($topacc, 1);
	$top_on = odbc_result($onacc, 1);
	$acc_karus = $re($ktopacc,1);
	$acc_human = $re($htopacc,1);
	$top_clan = $re($topclan,1);
	$top_karus = $re($ktopchar,1);
	$top_human = $re($htopchar,1);

	if($delosss == ''){
   $delos = 'Belirli Değil';
	}else{
    $delos = '<a href="index.php?sayfa=siralama&islem=c_detay&sid='.$delosss.'">'.$dls.'</a>';
	}
	
//CSW

$kode = odbc_exec($conn, "SELECT  byWarDay, byWarTime, byWarMinute FROM KNIGHTS_SIEGE_WARFARE");

//RESULT
while (odbc_fetch_row($kode)) {
	$warday = odbc_result($kode,1);
		$warday = getWar($warday);
	$wartime = odbc_result($kode,2);
	$warmin = odbc_result($kode,3);
}

$ip_ad = "127.0.0.1";	
	
	if ($fp=@fsockopen($ip_ad,15100, $ERROR_NO, $ERROR_STR,(float)0.5)) 
		{ 
	 	fclose($fp); 
	$login = '<img src = "resim/diger/online.gif">'; 
		}
	else 
		{ 
	$login = '<img src = "resim/diger/offline.gif">'; 
		}
	if ($fp2=@fsockopen($ip_ad,15001, $ERROR_NO, $ERROR_STR,(float)0.5)) 
		{ 
	 fclose($fp2); 

	$game = '<img src = "resim/diger/online.gif">'; 
		}
	else 
		{ 
	$game = '<img src = "resim/diger/offline.gif">'; 
		}
	if ($fp3=@fsockopen($ip_ad,80, $ERROR_NO, $ERROR_STR,(float)0.5)) 
		{ 
	 fclose($fp3); 
	$web = '<img src = "resim/diger/online.gif">'; 
		}
	else 
		{ 
	$web = '<img src = "resim/diger/offline.gif">'; 
		}

  if ($fp4=@fsockopen($ip_ad,21, $ERROR_NO, $ERROR_STR,(float)0.5)) 
    { 
    fclose($fp2); 
    $ftp = "<img src=resim/diger/online.gif>"; 
    }
  else 
    { 
    $ftp = "<img src=resim/diger/offline.gif>"; 
    }
	###################          Savas Kahramanı          #########################
	$savasza = odbc_exec($conn,"select strUserName from battle");		 
	$kahraman = odbc_result($savasza,1);

?>
 
Cevap: Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Ser

gerçi sen banlanmışsın ama başkaları için veriyorum.
ama bir de hatanın nedenini açıklayayım.
hata nedeni db nizde anket isimli bi tablonun bulunmaması yani kurduğunuz paneli eksik kurmanız db nize eklenicek kodları tabloları çalıştırmamanız.
aşağıdakini uygulasanız bile başka sorunlar çıkacaktır. aşağıdaki uygulamadan önce panelin kurulumunu düzgün yaptığınızdan emin olun.
PHP:
<?php //K2D

    ###################          Resim Upload         #########################

// Türkçe karakterli dosyalar için yazdığım fonksiyon
function ptRU($kaynak) {
$girdi = array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z','ç','ğ','ı','ö','ş','ü',' ','_',);
$cikti = array('a','b','c','c','d','e','f','g','g','h','i','i','j','k','l','m','n','o','o','p','r','s','s','t','u','u','v','y','z','c','g','i','j','ş','u','-','-',);
$sonuc = str_replace($girdi,$cikti,$kaynak);
return $sonuc;
}
// Uzantı tespit fonksiyonum
function ptUzanti($dosyaismi) { 
$degerler = explode('.',$dosyaismi);
$sonnokta = count($degerler)-1; 
$uzanti = $degerler[$sonnokta]; 
return $uzanti;
} 
    
    
    ###################          SIKAYET SAYISI         #########################
    $sikayet = odbc_exec($conn,"select count(id) from _sikayet");
    $sikayetsay = odbc_result($sikayet,1);
    
    ###################          LINK         #########################    
    $link = odbc_exec($conn,"select count(id) from _link");
    $linksay = odbc_result($link,1);
    
    ###################          HABER         #########################    
    $haber = odbc_exec($conn,"select count(id) from _haber");
    $habersay = odbc_result($haber,1);
    
    ###################          Aktivite         #########################    
    $aktivite = odbc_exec($conn,"select count(id) from _aktivite");
    $aktivitesay = odbc_result($aktivite,1);
    
    ###################          TİCKET         #########################    
    $ticket = odbc_exec($conn,"select count(id) from _ticket");
    $ticketsay = odbc_result($ticket,1);
    
    ###################          ANKET   iptal     #########################    
 //   $anket = odbc_exec($conn,"select count(anket_id) from _anket"); //iptali kaldırmak için başkası // işaretleri kaldırın
 //   $anketsay = odbc_result($anket,1); //iptali kaldırmak için başkası // işaretleri kaldırın
    
    ###################          GAME MASTER         #########################    
    $gm = odbc_exec($conn,"select count(struserid) from userdata where authority = '0'");
    $gmsay = odbc_result($gm,1);

    ###################          Zones         #########################
    FUNCTION getZones($zone) {
    if ($zone == 21) {
    $zone = "Moradon";
    } elseif ($zone == 1) {
    $zone = "Luferson Castle";
    } elseif ($zone == 201) {
    $zone = "Colony Zone";
    } elseif($zone==31) {
    $zone = "Bifrost";
    } elseif ($zone == 202) {
    $zone = "Ronark Land";
    } elseif ($zone == 103) {
    $zone = "Lunar War";
    } elseif ($zone == 2) {
    $zone = "El Morad Castle";
    } elseif ($zone == 300) {
    $zone = "Delos";
    } elseif ($zone == 480) {
    $zone = "Arena";
    } elseif ($zone == 101) {
    $zone = "Dark Lunar";
    } elseif ($zone == 11) {
    $zone = "Karus Eslant";
    } elseif ($zone == 12) {
    $zone = "El Morad Eslant";
    }
    return $zone;
    }

    ###################          TARİH         #########################

    $trh = substr($trhh,0,10);
    $yil = substr($trh,0,4);
    $bul = substr($trh,5,8);
    $gün = substr($bul,3,4);
    $ay = substr($bul,0,2);
        $ay = getAy($ay);
    $tarih = ($gün.' '.$ay.' '.$yil);

    ###################          AYLAR          #########################
    FUNCTION getAy($ay) {
            if($ay == '01'){
                $ay = 'Ocak';
            }elseif($ay == '02'){
                $ay = 'Şubat';
            }elseif($ay == '03'){
                $ay = 'Mart';
            }elseif($ay == '04'){
                $ay = 'Nisan';
            }elseif($ay == '05'){
                $ay = 'Mayıs';
            }elseif($ay == '06'){
        $ay = 'Haziran';
      }elseif($ay == '07'){
        $ay = 'Temmuz';
      }elseif($ay == '08'){
        $ay = 'Ağustos';
      }elseif($ay == '09'){
        $ay = 'Eylül';
      }elseif($ay == '10'){
        $ay = 'Ekim';
      }elseif($ay == '11'){
        $ay = 'Kasım';
      }elseif($ay == '12'){
        $ay = 'Aralık';
      }
      
    return $ay;
    }
    ###################          Authority          #########################
    FUNCTION getAuthority($auth) {

    if ($auth == '0') {
        $auth = '<font color="red">Game Master</font>';
    }
    elseif ($auth == '255') {
    $auth = '<font color="yellow">Oynama Yasaklı</font>';
    }
    elseif($aut == '2') {
        $auth = '<font color="yellow">Konuşma Yasaklı</font>';
    } else {
    $auth = '<font color="green">Oyuncu</font>';
    }
    
    return $auth;
    
    }    
    

    ###################          Gelen Mailler        #########################
    
    $gelen = odbc_exec($conn,"select count(gonderilen) from _mail where gonderilen = '".$_SESSION['k2duser']."' and okundu='0'");
    $gelenler = odbc_result($gelen,1);
    
    if($gelenler == 0) { $gelenler = '';}else{$gelenler = '('.$gelenler.')';}

    ###################          Gonderilen Mailler        #########################
    
    $giden = odbc_exec($conn,"select count(gonderen) from _mail where gonderen = '".$_SESSION['k2duser']."'");
    $gidenler = odbc_result($giden,1);    
    
    if($gidenler == 0){    $gidenler = ''; }else{$gidenler = '('.$gidenler.')';}


    ###################          Castle Siege War         #########################
    FUNCTION getWar($warday) {
    if ($warday == '1') {
        $warday = 'Pazar';
    } elseif ($warday == '2') {
        $warday = 'Pazartesi';
    } elseif ($warday == '3') {
        $warday =  'Sali';
    } elseif ($warday == '4') {
        $warday = 'Çarsamba';
    } elseif ($warday == '5') {
        $warday = 'Persembe';
    } elseif ($warday == '6') {
        $warday = 'Cuma';
    } elseif ($warday == '7') {
        $warday = 'Cumartesi';
    }
    
    return $warday;
    
    }
    
    ###################         Clan Nation Resmi         #########################
    FUNCTION Nation($nation)
    {
    if ($nation == '1') {
        $nation = '<script>put_flash("swf/karus.swf", 120, 65);</script>';
    } elseif ($nation == '2') {
        $nation = '<script>put_flash("swf/elmorad.swf", 120, 65);</script>';
    }

        return $nation;
    }
    
    ###################          Nation Resim          #########################
    // Nation Resim
    
    function getNation($nation2)
    {
    if ($nation2 == 1) {
        $nation2 = '<img src="resim/diger/karus.gif" alt="" />';
    } elseif ($nation2 == 2) {
        $nation2 = '<img src="resim/diger/elmo.gif" alt="" />';
    }

    return $nation2;
    
    }
    
    ###################          Nation İsim          #########################    
    function getIrk($nation2)
    {
    if ($nation2 == 1) {
        $nation2 = 'Karus';
    } elseif ($nation2 == 2) {
        $nation2 = 'El Morad';
    }

    return $nation2;
    
    }

    ###################          Class          #########################    
    function getClass($class) {

    if ($class == 105 or $class==101) {
        $class = "Warrior";
    }
    if ($class == 106) {
        $class = "Berserker Hero";
    }
    if ($class == 107 or $class == 102) {
        $class = "Rogue";
    }
    if ($class == 108) {
        $class = "Shadow Vain";
    }
    if ($class == 109 or $class==103) {
        $class = "Mage";
    }
    if ($class == 110) {
        $class = "Elemental Lord";
    }
    if ($class == 111 or $class==104) {
        $class = "Priest";
    }
    if ($class == 112) {
        $class = "Shadow Knight";
    }
    if ($class == 205 or $class==201) {
        $class = "Warrior";
    }
    if ($class == 206) {
        $class = "Blade Master";
    }
    if ($class == 207 or $class==202) {
        $class = "Rogue";
    }
    if ($class == 208) {
        $class = "Kasar Hood";
    }
    if ($class == 209 or $class==203) {
        $class = "Mage";
    }
    if ($class == 210) {
        $class = "Arch Mage";
    }
    if ($class == 211 or $class==204) {
        $class = "Priest";
    }
    if ($class == 212) {
        $class = "Paladin";
    }

    return $class;

    }


    ###################          Class Change          #########################    
    function Class_ch($class) {

    if ($class == 105 or $class==101) {
        $class = "Warrior";
    }
    if ($class == 106) {
        $class = "Warrior";
    }
    if ($class == 107 or $class == 102) {
        $class = "Rogue";
    }
    if ($class == 108) {
        $class = "Rogue";
    }
    if ($class == 109 or $class==103) {
        $class = "Mage";
    }
    if ($class == 110) {
        $class = "Mage";
    }
    if ($class == 111 or $class==104) {
        $class = "Priest";
    }
    if ($class == 112) {
        $class = "Priest";
    }
    if ($class == 205 or $class==201) {
        $class = "Warrior";
    }
    if ($class == 206) {
        $class = "Warrior";
    }
    if ($class == 207 or $class==202) {
        $class = "Rogue";
    }
    if ($class == 208) {
        $class = "Rogue";
    }
    if ($class == 209 or $class==203) {
        $class = "Mage";
    }
    if ($class == 210) {
        $class = "Mage";
    }
    if ($class == 211 or $class==204) {
        $class = "Priest";
    }
    if ($class == 212) {
        $class = "Priest";
    }

    return $class;

    }
    ###################          RACE          #########################
    
    function getTip($race) {

    if ($race == '1') {
        $race = "Karus Barbar Warrior";
    }
    if ($race == '2') {
        $race = "Karus Erkek";
    }
    if ($race == '3') {
        $race = "Karus Cüce Mage";
    }
    if ($race == '4') {
        $race = "Karus Kız";
    }
    if ($race == '11') {
        $race = "Barbar Warrior";
    }
    if ($race == '12') {
        $race = "Human Erkek";
    }
    if ($race == '13') {
        $race = "Human Kız";
    }

    return $race;
    
    }
    
    function kral($kral){
    if($kral == '')    {
    $kral = 'Seçilmemiş';
    }
    return $kral;
    }
    


    
    ###################          SERVER DURUM          #########################
    $topchar = odbc_exec($conn, "SELECT COUNT(*) FROM USERDATA");
    $ktopchar = $ex($conn,"select count(*) from userdata where nation='1'");
    $htopchar = $ex($conn,"select count(*) from userdata where nation='1'");
    $topacc = odbc_exec($conn, "SELECT COUNT(*) FROM TB_USER");
    $ktopacc = odbc_exec($conn, "SELECT COUNT(*) FROM Account_char where bnation='1'");
    $htopacc = odbc_exec($conn, "SELECT COUNT(*) FROM Account_char where bnation='2'");
    $onacc = odbc_exec($conn, "SELECT COUNT(*) FROM CURRENTUSER");
    $topclan = $ex($conn,"select count(*) from knights");
    $humankral = odbc_exec($conn,"select strKingName from KING_SYSTEM where byNation = '2'");
  $karuskral = odbc_exec($conn,"select strKingName from KING_SYSTEM where byNation = '1'");
  $karus_kral = odbc_result($karuskral,1);
  $human_kral = odbc_result($humankral,1);
  $deloss = odbc_exec($conn,"select sMasterKnights from KNIGHTS_SIEGE_WARFARE where sCastleIndex = '1'");
  $delosss = odbc_result($deloss,1);
  $delossahibi = odbc_exec($conn,"select IDName from KNIGHTS where IDNum = '".$delosss."'"); 
  
  $dls = odbc_result($delossahibi,1);
    $top_char = odbc_result($topchar, 1);
    $top_acc = odbc_result($topacc, 1);
    $top_on = odbc_result($onacc, 1);
    $acc_karus = $re($ktopacc,1);
    $acc_human = $re($htopacc,1);
    $top_clan = $re($topclan,1);
    $top_karus = $re($ktopchar,1);
    $top_human = $re($htopchar,1);

    if($delosss == ''){
   $delos = 'Belirli Değil';
    }else{
    $delos = '<a href="index.php?sayfa=siralama&islem=c_detay&sid='.$delosss.'">'.$dls.'</a>';
    }
    
//CSW

$kode = odbc_exec($conn, "SELECT  byWarDay, byWarTime, byWarMinute FROM KNIGHTS_SIEGE_WARFARE");

//RESULT
while (odbc_fetch_row($kode)) {
    $warday = odbc_result($kode,1);
        $warday = getWar($warday);
    $wartime = odbc_result($kode,2);
    $warmin = odbc_result($kode,3);
}

$ip_ad = "127.0.0.1";    
    
    if ($fp=@fsockopen($ip_ad,15100, $ERROR_NO, $ERROR_STR,(float)0.5)) 
        { 
         fclose($fp); 
    $login = '<img src = "resim/diger/online.gif">'; 
        }
    else 
        { 
    $login = '<img src = "resim/diger/offline.gif">'; 
        }
    if ($fp2=@fsockopen($ip_ad,15001, $ERROR_NO, $ERROR_STR,(float)0.5)) 
        { 
     fclose($fp2); 

    $game = '<img src = "resim/diger/online.gif">'; 
        }
    else 
        { 
    $game = '<img src = "resim/diger/offline.gif">'; 
        }
    if ($fp3=@fsockopen($ip_ad,80, $ERROR_NO, $ERROR_STR,(float)0.5)) 
        { 
     fclose($fp3); 
    $web = '<img src = "resim/diger/online.gif">'; 
        }
    else 
        { 
    $web = '<img src = "resim/diger/offline.gif">'; 
        }

  if ($fp4=@fsockopen($ip_ad,21, $ERROR_NO, $ERROR_STR,(float)0.5)) 
    { 
    fclose($fp2); 
    $ftp = "<img src=resim/diger/online.gif>"; 
    }
  else 
    { 
    $ftp = "<img src=resim/diger/offline.gif>"; 
    }
    ###################          Savas Kahramanı          #########################
    $savasza = odbc_exec($conn,"select strUserName from battle");         
    $kahraman = odbc_result($savasza,1);

?>
 
Geri
Üst Alt