Emre istedigin kodlar bunlar sorunu çözebilirsen minnet kalacagım.İlgin için teşekkürler.

Alıntı
<?php

// Get user ip
function getip() {
if (getenv('HTTP_CLIENT_IP')) {
$ip = getenv('HTTP_CLIENT_IP');
}
elseif (getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
}
elseif (getenv('HTTP_X_FORWARDED')) {
$ip = getenv('HTTP_X_FORWARDED');
}
elseif (getenv('HTTP_FORWARDED_FOR')) {
$ip = getenv('HTTP_FORWARDED_FOR');
}
elseif (getenv('HTTP_FORWARDED')) {
$ip = getenv('HTTP_FORWARDED');
}
else {
$ip = $_SERVER['REMOTE_ADDR'];
}
return $ip;
}
function fileurl($fileId,$fileTitle) {
global $siteurl, $sefriendly;
if ($sefriendly == '1') {
$fileTitle = str_replace(" ","-",$fileTitle);
$fileTitle = str_replace("'","_",$fileTitle);
$fileTitle = str_replace(":","_",$fileTitle);
$fileTitle = str_replace("ä","a",$fileTitle);



$fileTitle = str_replace("ü","u",$fileTitle);
$fileTitle = str_replace("ğ","g",$fileTitle);
$fileTitle = str_replace("ş","s",$fileTitle);
$fileTitle = str_replace("ı","i",$fileTitle);
$fileTitle = str_replace("ö","o",$fileTitle);
$fileTitle = str_replace("ç","c",$fileTitle);

$fileTitle = str_replace("Ü","u",$fileTitle);
$fileTitle = str_replace("Ğ","g",$fileTitle);
$fileTitle = str_replace("Ş","s",$fileTitle);
$fileTitle = str_replace("İ","i",$fileTitle);
$fileTitle = str_replace("Ö","o",$fileTitle);
$fileTitle = str_replace("Ç","c",$fileTitle);

$fileurl = $siteurl."/oyun/".$fileId."/".$fileTitle.".html";
} else {
$fileurl = $siteurl."/file.php?f=".$fileId;
}
return $fileurl;
}
function categoryurl($categoryId,$categoryname) {
global $siteurl, $sefriendly;
if ($sefriendly == '1') {
$categoryname = str_replace(" ","-",$categoryname);
$categoryname = str_replace("'","_",$categoryname);
$categoryname = str_replace("ä","a",$categoryname);



$categoryname = str_replace("ü","u",$categoryname);
$categoryname = str_replace("ğ","g",$categoryname);
$categoryname = str_replace("ş","s",$categoryname);
$categoryname = str_replace("ı","i",$categoryname);
$categoryname = str_replace("ö","o",$categoryname);
$categoryname = str_replace("ç","c",$categoryname);

$categoryname = str_replace("Ü","u",$categoryname);
$categoryname = str_replace("Ğ","g",$categoryname);
$categoryname = str_replace("Ş","s",$categoryname);
$categoryname = str_replace("İ","i",$categoryname);
$categoryname = str_replace("Ö","o",$categoryname);
$categoryname = str_replace("Ç","c",$categoryname);

$categoryurl = $siteurl."/oyunlar/".$categoryId."/".$categoryname;
} else {
$categoryurl = $siteurl."/browse.php?c=".$categoryId;
}
return $categoryurl;
}
function profileurl($userid,$username) {
global $siteurl, $sefriendly;
if ($sefriendly == '1') {
$username = str_replace(" ","-",$username);
$username = str_replace("'","_",$username);
$username = str_replace("ä","a",$username);
$username = str_replace("ö","o",$username);
$username = str_replace("ü","y",$username);
$profileurl = $siteurl."/profile/".$userid."/".$username.".html";
} else {
$profileurl = $siteurl."/profile.php?u=".$userid;
}
return $profileurl;
}

//Display categories
function displaycategories($userStatus) {
if ($userStatus == '1') {
$result = mysql_query("SELECT name, catid FROM categories WHERE status = '1' && parentcategory = '0' ORDER BY catorder, name");
} else {
$result = mysql_query("SELECT name, catid FROM categories WHERE status = '1' && permissions = '1' && parentcategory = '0' ORDER BY catorder, name");
}
if (mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {
$categoryname = $row['name'];
$categoryid = $row['catid'];
if (isset($separator)) {
echo ' </tr> ';
}
echo ' <tr>
<td width="32"></td>
<td width="10" align="center" valign="middle"><img src="http://www.g94.net/templates/oyun/images/mavi.jpg" width="10" height="10" /></td>
<td width="750" class="kategori"><span class="style1">.<a href ="'.categoryurl($categoryid,$categoryname).'" target="_self"><span class="kategori">'.$categoryname.'</span></a></td>
</tr>';
$separator = "1";
}
unset ($separator);
}
}
//Display most popular files
function displaymostpopular() {
global $maxmostpopular;
$result = mysql_query("SELECT title, fileid, timesplayed FROM files WHERE status = '1' ORDER BY timesplayed DESC LIMIT $maxmostpopular");
if (mysql_num_rows($result)) {

while($row = mysql_fetch_array($result)) {
$mpfiletitle = $row['title'];
$mpfileid = $row['fileid'];
$mptimesplayed = number_format($row['timesplayed']);
?>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.linkler {color: #e467c3}
.populer {color: #e48a67}
.yenioyun {color: #e4676b}
.kategoriisim {color: #b367e4}
.mostpopuler {color: #e4c867}
.populer {color: #e48a67}
.populer {color: #e48a67}
.populer {color: #e48a67}
.style2 {
color: #000000;
font-weight: bold;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>

<table width="188" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32"></td>
<td width="10" align="center" valign="middle"><img src="http://www.g94.net/templates/oyun/images/mavi.jpg" width="10" height="10" /></td>
<td width="146" class="kategori"><span class="style1">.</span><span class="style4"><a href = "<?php echo fileurl($mpfileid,$mpfiletitle); ?>" target="_self"><span class="mostpopuler"><?php echo $mpfiletitle; ?></span></a> <span class="mostpopuler">-</span> <span class="mostpopuler"><?php echo $mptimesplayed; ?></span></td>
</tr>
</table>
<?php
}
} else {
echo "Oyun Yok";
}
}
//Display newest files
function displaynewest() {
global $maxnewest;
$result = mysql_query("SELECT title, fileid, timesplayed FROM files WHERE status = '1' ORDER BY fileid DESC LIMIT $maxnewest");
if (mysql_num_rows($result)) {

while($row = mysql_fetch_array($result)) {
$nfiletitle = $row['title'];
$nfileid = $row['fileid'];
$ntimesplayed = number_format($row['timesplayed']);
?>
<table width="188" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32"></td>
<td width="10" align="center" valign="middle"><img src="http://www.g94.net/templates/oyun/images/mavi.jpg" width="10" height="10" /></td>
<td width="146" class="kategori"><span class="style1">.</span><span class="style4"><a href = "<?php echo fileurl($nfileid,$nfiletitle); ?>"><span class="yenioyun"><?php echo $nfiletitle; ?></span></a> <span class="yenioyun">-</span> <span class="yenioyun"><?php echo $ntimesplayed; ?></span></a></td>
</tr>
</table>

<?php
}
} else {
echo "No files";
}
}
//Display top players
function displaytopplayers() {
global $maxtopplayers;
$top_result = mysql_query("SELECT * FROM users WHERE status = '1' ORDER BY played DESC LIMIT $maxtopplayers");
if (mysql_num_rows($top_result)) {

while($top_row = mysql_fetch_array($top_result)) {
$topuserName = $top_row['username'];
$topuserId = $top_row['userid'];
$topuserPlayed = number_format($top_row['played']);
?>
<table width="188" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32"></td>
<td width="10" align="center" valign="middle"><img src="http://www.g94.net/templates/oyun/images/mavi.jpg" width="10" height="10" /></td>
<td width="146" class="kategori"><span class="style4"><span class="style1">.</span><a href = "<?php echo profileurl($topuserId,$topuserName); ?>" target="_self"><span class="populer"><?php echo $topuserName; ?></span></a> </span><span class="populer">-</span><span class="style4"> <?php echo $topuserPlayed; ?></span></td>
</tr>
</table>
<?php
}
} else {
echo "No users";
}
}
//Display top links
function displaytoplinks() {
global $maxlinks;
$result = mysql_query("SELECT * FROM links WHERE status = '1' ORDER BY hitsin DESC LIMIT $maxlinks");
if (mysql_num_rows($result)) {

while($row = mysql_fetch_array($result)) {
$linkName = htmlentities($row['name']);
$linkUrl = htmlentities($row['linkurl']);
?>
<table width="188" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="32"></td>
<td width="10" align="center" valign="middle"><img src="http://www.g94.net/templates/oyun/images/mavi.jpg" width="10" height="10" /></td>
<td width="146" class="style1"><span class="style1">.</span><a href = "<?php echo $linkUrl; ?>" target="_blank"><span class="linkler"><?php echo $linkName; ?></span></a></td>
</tr>
</table>
<?php
}
} else {
echo "No links";
}
}
// BB Code
function bbcode($text) {
global $siteurl;
$text = str_replace("","<b>",$text);
$text = str_replace("
","</b>",$text);
$text = str_replace("","<u>",$text);
$text = str_replace("
","</u>",$text);
$text = str_replace("","<i>",$text);
$text = str_replace("
","</i>",$text);
$text = str_replace("","<s>",$text);
$text = str_replace("
","</s>",$text);
$text = str_replace("
Alıntı
","<div class=\"quote\">",$text);
$text = str_replace("
","</div>",$text);
$text = str_replace("","<img src=\"".$siteurl."/images/happy.gif\" title=\"Happy\">",$text);
$text = str_replace("","<img src=\"".$siteurl."/images/sad.gif\" title=\"Sad\">",$text);
$text = str_replace("","<img src=\"".$siteurl."/images/wink.gif\" title=\"Wink\">",$text);
$text = str_replace(":@:","<img src=\"".$siteurl."/images/@.gif\" title=\"@\">",$text);
$text = str_replace(":8","<img src=\"".$siteurl."/images/cool.gif\" title=\"Cool\">",$text);
$text = str_replace("","<img src=\"".$siteurl."/images/wave.gif\" title=\"Wave\">",$text);
$text = str_replace(":think:","<img src=\"".$siteurl."/images/think.gif\" title=\"Hmm...\">",$text);
$text = str_replace("","<img src=\"".$siteurl."/images/clap.gif\" title=\"Clap hands\">",$text);
return $text;
}
// Get the number of files in database
function totalfiles() {
$totalfiles_result = mysql_query("SELECT count(fileid) AS total_files FROM files WHERE status = '1'");
$gettotalfiles = mysql_fetch_array($totalfiles_result);
$totalfiles = $gettotalfiles['total_files'];
return number_format($totalfiles);
}
// Count total played
function totalplayed() {
$totalplayed_result = mysql_query("SELECT sum(timesplayed) AS total_played FROM files");
$gettotalplayed = mysql_fetch_array($totalplayed_result);
$totalplayed = $gettotalplayed['total_played'];
return number_format($totalplayed);
}
// Count # of members
function totalmembers() {
$totalmembers_result = mysql_query("SELECT count(userid) AS total_members FROM users WHERE status = '1'");
$gettotalmembers = mysql_fetch_array($totalmembers_result);
$totalmembers = $gettotalmembers['total_members'];
return number_format($totalmembers);
}

function displaytags() {
//rasgele etiket çeker
$result = mysql_query("SELECT title, fileid, timesplayed FROM files WHERE status = '1' ORDER BY rand() DESC LIMIT 0,100");
//Son eklenenleri Çeker başında / işareti kaldırınız ve yukarıdakine ilk satıra 2 tane / ekleyiniz.
//$result = mysql_query("SELECT title, fileid, timesplayed FROM files WHERE status = '1' ORDER BY DESC LIMIT 0,10");
if (mysql_num_rows($result)) {
while($row = mysql_fetch_array($result)) {


$karakter=array ("!","^","'","%","&","[","]","(",")","?","=","*",",",".","~","%","#","@","ç", "Ç","ş","Ş","ğ","Ğ","ü","Ü","İ","ı","ö","Ö","ı"," Å?","ü","ç","ö","Ä?","ÅŸ","Ç","İ","ÄŸ","Å?"," Ö","Ü","ı","Å?","ç","ö","Ä?","ÅŸ","Ç","İ"," ÄŸ","Å?","Ö","Ü","ü","ÄŸ","@",";","~","=");
$karakter2=array("","","","","","","","","","","", "","","","","","","","c","C","s","S","g","G","u"," U","i","i","o","O","i","s","u","c","o","g","s","C" ,"i","g","S","O","U","i","s","c","o","g","s","C"," i","g","S","o","U","u","g","","","","-");
$tagtitle = str_replace($karakter,$karakter2,$row['title']);
$keyword ="$tagtitle";
$kelimeler = explode(' ', $keyword);
foreach ($kelimeler as $anahtar=>$deger)
{
?>
<a href="<?=$siteurl?>/etiket/<?=$deger?>.html"><?=$deger?></a>
<?php
}
}
} else {
echo "Oyun Yok";
}
}

?>