Location: PHPKode > projects > Local Lyric Displayer > lyrics/SHOW.PHP
<?
//echo "<br>" . $count;
include ('functions.php');
//echo $username . "<br>" . $password;
$user_kontrol_arrays = userkontrol($username,$password,"hashed");
if ($user_kontrol_arrays <> "") {
	$login_correct = "1";
	//print_r($user_kontrol_arrays);
} else {
	$login_correct = "";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Þarký Göster</title>
	<link rel="stylesheet" type="text/css" href="lyrics.css">
	<META HTTP-EQUIV="Expires" CONTENT="0">
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-9">
<?
	$band_info = get_band ($a,"bandname");
	$bandname = stripslashes($band_info["bandname"]);
	$bandno = $band_info["bandno"];
	$say = "sayma";
	if ($count == "" ) {
		$say = "say";
		//echo $say;
	} else {
		$say = "sayma";
		//echo "say bos";
	}
	$song_info = get_lyric ($band_info[bandid],$t,"songname",$say);
	//print_r($band_info);
	//print_r($song_info);
	//echo $bandname;
	$songname = htmlspecialchars(ucwords(stripslashes($song_info[songname])));
	$albumname = htmlspecialchars(ucwords(stripslashes($song_info[albumname])));
	$lyrics = $song_info[lyrics];
	if ($song_info[userid]) {
		$username = get_user_by_id($song_info[userid]);
	}
	//print_r ($username);
	//$lyrics = ereg_replace("\n", "<br>", htmlspecialchars(stripslashes(ucwords ($song_info[lyrics]))));
	if ($count == "" ) {
		$counter = $song_info[counter]++;
	} else {
		$counter = $song_info[counter];
	}
	
	$no = $song_info[no];
	if ($target == "") {
		$target = "_blank";
	}

	if ($login_correct) {
		//echo "user_kontrol_arrays : " . $user_kontrol_arrays[0] . "&nbsp;song_info : " . $song_info[userid];
		$colspan = 1;
		if (($user_kontrol_arrays[3]) || ($song_info[userid] == $user_kontrol_arrays[0])) {
			//echo $user_kontrol_arrays[3];
			$user_menu = "<td align=\"right\"><a title=\"Þarkýnýn Sözlerini Deðiþtir\" target=\"" . $target . "\" href=\"edit.php?no=" . $no . "\">Deðiþtir</a></td><td><a title=\"Sistemden Çýk\" href=\"logout.php?bandname=" . $bandname . "&songname=" . $songname . "&albumname=" . $albumname . "\">X</a></td><td title=\"Bu Kullanýcý Adýnýz Sanýrým :) (vay be nerden bildim)\" class=\"username\" align=\"right\">&nbsp;(" . $user_kontrol_arrays[1] . ")</td>";
		} else {
			// Burdaki &nbsp;'nin kalkmasý lazým !!!!
			$user_menu = "<td colspan=\"2\" align=\"right\"><a title=\"Sistemden Çýk\" href=\"logout.php?bandname=" . $bandname . "&songname=" . $songname . "&albumname=" . $albumname . "\">X</a></td><td title=\"Bu Kullanýcý Adýnýz Sanýrým :) (vay be nerden bildim)\" class=\"username\" align=\"right\">&nbsp;(" . $user_kontrol_arrays[1] . ")</td>";

		}
		$add_menu = "<td align=\"right\" align=\"right\"><a title=\"Þarkýyý Ekle\" target=\"_blank\" href=\"add.php?bandname=" . $a . "&songname=" . $t . "&albumname=" . $b . "\">Ekle</a><td><a title=\"Sistemden Çýk\" href=\"logout.php?bandname=" . $a . "&songname=" . $t . "&albumname=" . $b . "\">X</a></td><td title=\"Bu Kullanýcý Adýnýz Sanýrým :) (vay be nerden bildim)\" class=\"username\" align=\"right\">&nbsp;(" . $user_kontrol_arrays[1] . ")</td>";
	} else {
		$colspan = 2;
		$user_menu = "<td><a title=\"Sisteme Giriþ\" href=\"javascript:;\" OnClick=\"open_Window('login.php?bandname=" . $a . "&songname=" . $t . "&albumname=" . $b . "','Login','width=300,height=150')\">Login</a></td>";
		$add_menu = $user_menu;
	}

if (($bandname <> "") && ($songname <> "")) {
	$lines = explode("\n",$lyrics);
	//print_r($lines);
	for ($i=0;$i<=count($lines)-1;$i++) {
		$line = kontrol_et($lines[$i]);
			$zaman_sayisi = count($line[1]);
			//echo $zaman_sayisi;
			//print_r ($line[1]);
			for ($y=0;$y<= $zaman_sayisi;$y++) {
				if ($line[1][$y]) {
					$javascript .= "setTimeout('change_bg(line" . $i . ")'," . $line[1][$y] . ");\n";
					$change_bg = $line[1][$y] - 20;
					$javascript .= "setTimeout('change_bg_all()'," . $change_bg . ");\n";
					$change_bg_all .= "line" . $i . ".className=\"lyrics\";\n";
					$javastart = " onload=\"starteverything()\"";
				}
			}
			if ( ($line[0] == "") || ($line[0] == " ") || (ord($line[0]) == 13) || (strlen($line[0]) == 0) ) { $line[0] = "&nbsp;"; }
				$in_html .= "<tr><td class=\"lyrics\" id=\"line" . $i . "\">" . $line[0] . "</td></tr>";
	}
?>
<?include ('javascripts.php');?>
</head>
<body<?=$javastart?>>
<table border="0" width="100%">
	<tr>
		<td colspan="<?=$colspan?>" width="90%"><span class="bandname"><?=$bandname?></span> <span class="line">-</span> <span class="songname"><?=$songname?></span></td><?=$user_menu?>
	</tr>
	<tr>
		<td colspan="4"><? if ($albumname) { echo "<span class=\"albumname\">" . $albumname . "</span>&nbsp;"; }?><span class="counter">(<?=$counter?>)</span></td>
	</tr>
	<tr>
		<td colspan="4"><table width="100%" cellpadding="0" border="0" cellspacing="0"><?=$in_html?></table></td>
	</tr>
<?
if ($login_correct) {
?>
	<tr>
		<td colspan="4" align="left" class="username" title="Bu Parçanýn Sözlerini Giren Kiþi"><?=$username[1]?></td>	
	</tr>
<?
}
	if (($count != "edited") && ($count <> "")) { echo "<tr><td><a href=\"javascript:history.back(1)\">Geri</a></td></tr>"; } ?>
</table>
<?
} else {
?>
<body>
<?include ('javascripts.php');?>
<table border="0" width="100%">
	<tr>
		<td width="90%" colspan="<?=$colspan?>"><span class="bandname"><?=htmlspecialchars(ucwords(stripslashes($a)))?></span> <span class="line">-</span> <span class="songname"><?=htmlspecialchars(ucwords(stripslashes($t)))?></span></td><?=$add_menu?>
	</tr>
	<tr>
		<td colspan="4"><span class="albumname"><?=htmlspecialchars(ucwords(stripslashes($b)))?></span></td>
	</tr>
	<tr>
		<td colspan="4"><span class="lyrics">Bu Þarkýnýn Sözleri Yok</span></td>
	</tr>
<?
}
?>
</table>
<!--<iframe src="http://tanaydin/cgi-bin/edonkey.pl" height="16" frameborder="0" scrolling="No"></iframe>-->
</body>
</html>
Return current item: Local Lyric Displayer