index.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<style type="text/css">
<!--
.txt {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
border: 1px solid #000000;
}
.btn {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
height: auto;
width: 55px;
border: 1px solid #000000;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
text-decoration: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
}
#table {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
border: 1px solid #000000;
}
.boxtext {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
color: #000000;
text-decoration: underline;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #000000;
}
a:hover {
color: #333333;
}
-->
</style>
</head>
<body>
<table width="375" border="0" align="center" cellpadding="1" cellspacing="1" id="table">
<tr>
<td><div class="boxtext"></div>
<?php
include("connect.php");
$gener = $_GET['gener'];
$cat = mysql_query("SELECT * FROM `songs_cat`");
while($row = mysql_fetch_array($cat)){
$our = mysql_query("SELECT count(id) as total FROM songs WHERE cat=$row[id]");
while($raw=mysql_fetch_array($our)){
$total=$raw['total'];
}
echo "<a href="?gener=$row[id]">$row[value] ($total) </a> | ";
}
?>
<br></td>
</tr>
<tr>
<td><div class="boxtext">
<?php if($gener == ""){
echo " ";
} else {
$cat = mysql_query("SELECT * FROM `songs_cat` WHERE `id`='$gener'");
$category = mysql_fetch_array($cat);
$id=$category['id'];
$genername = $category['value'];
echo " $genername";
}
?>
</div>
<?php
if($_GET['gener']){
//
$pp = "50";
//
$table = "songs";
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM $table"),0);
$numofpages = $total / $pp;
if (!isset($_GET['page'])) {
$page = 1;
}
else {
$page = $_GET['page'];
}
$limitvalue = $page * $pp - ($pp);
/* , [username] */
$query = "SELECT * FROM `$table` WHERE `cat`='$gener' ORDER BY `id` DESC LIMIT $limitvalue, $pp";
$result = mysql_query($query);
while($row=mysql_fetch_array($result))
{
echo " <a href="playsong.php?id=$row[id]">$row[artist] - $row[title]</a><br>";
}
function per_page($link, $offset) {
global $numofpages, $page;
$numofpages = round($numofpages);
$pagesstart = round($page-$offset);
$pagesend = round($page+$offset);
/* */
if ($page != "1" && round($numofpages) != "0") {
echo str_replace("%page", round($page-1), '<a href="'.$link.'"><font face="Trebuchet MS"></font></a> ');
}
for($i = 1; $i <= $numofpages; $i++) {
if ($pagesstart <= $i && $pagesend >= $i) {
if ($i == $page) {
echo "<b>[$i]</b> ";
}
else {
echo str_replace("%page", "$i", '<a href="'.$link.'">'.$i.'</a> '); //
}
}
}
if (round($numofpages) == "0") {
echo "[$i]";
}
/* */
if ($page != round($numofpages) && round($numofpages) != "0") {
echo str_replace("%page", round($page+1), '<a href="'.$link.'"><font face="Trebuchet MS"></font></a>');
}
}
/* */
echo '<br>';
echo ' : '.round($numofpages).'<br>';
per_page("?page=%page", "5");
} else {
//
$pp = "50";
//
$table = "songs";
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM $table"),0);
$numofpages = $total / $pp;
if (!isset($_GET['page'])) {
$page = 1;
}
else {
$page = $_GET['page'];
}
$limitvalue = $page * $pp - ($pp);
/* , [username] */
$sql = "SELECT * FROM `$table` ORDER BY id DESC LIMIT $limitvalue, $pp";
$result = mysql_query($sql);
while($row=mysql_fetch_array($result))
{
echo " <a href="playsong.php?id=$row[id]">$row[artist] - $row[title]</a><br>";
}
function per_page($link, $offset) {
global $numofpages, $page;
$numofpages = round($numofpages);
$pagesstart = round($page-$offset);
$pagesend = round($page+$offset);
/* */
if ($page != "1" && round($numofpages) != "0") {
echo str_replace("%page", round($page-1), '<a href="'.$link.'"><font face="Trebuchet MS"></font></a> ');
}
for($i = 1; $i <= $numofpages; $i++) {
if ($pagesstart <= $i && $pagesend >= $i) {
if ($i == $page) {
echo "<b>[$i]</b> ";
}
else {
echo str_replace("%page", "$i", '<a href="'.$link.'">'.$i.'</a> '); //
}
}
}
if (round($numofpages) == "0") {
echo "[$i]";
}
/* */
if ($page != round($numofpages) && round($numofpages) != "0") {
echo str_replace("%page", round($page+1), '<a href="'.$link.'"><font face="Trebuchet MS"></font></a>');
}
}
/* */
echo '<br>';
echo ' : '.round($numofpages).'<br>';
per_page("?page=%page", "5");
}
?></td>
</tr>
</table>
</body>
</html>
play.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<style type="text/css">
<!--
.txt {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
border: 1px solid #000000;
}
.btn {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
height: auto;
width: 55px;
border: 1px solid #000000;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
text-decoration: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
}
#table {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
border: 1px solid #000000;
}
.table {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
border: 1px solid #000000;
}
.boxtext {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
color: #000000;
text-decoration: underline;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #000000;
}
a:hover {
color: #333333;
}
-->
</style>
</head>
<body>
<?php
include("connect.php");
$id = $_GET['id'];
$sql = mysql_query("SELECT * FROM `songs` WHERE `id`='$id'");
$row = mysql_fetch_array($sql);
?>
<table width="395" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
<tr>
<td colspan="2" class="lfhead"><?php echo "$row[artist] - $row[title]"; ?></td>
</tr>
<tr>
<td width="100"> :</td>
<td width="200"><?php
$cat = mysql_query("SELECT * FROM `songs_cat` WHERE `id`='$row[cat]'");
$raw = mysql_fetch_array($cat);
$genername = $raw['value'];
echo "<a href="songs.php?gener=$row[cat]" title=" $genername">$genername</a>";
?></td>
</tr>
<tr>
<td> :</td>
<td><?php echo $row['date']; ?></td>
</tr>
<tr>
<td> :</td>
<td><?php echo $row['author']; ?></td>
</tr>
<tr>
<td> :</td>
<td><?php echo $row['album']; ?></td>
</tr>
<tr>
<td> :</td>
<td><?php echo $row['size']; ?></td>
</tr>
<tr>
<td> :</td>
<td align="left"><?php echo $row['year']; ?></td>
</tr>
<tr>
<td colspan="2" align="center"><object type="application/x-shockwave-flash" data="player.swf?son=<?php echo $row['path']; ?>" height="20" width="200">
<param name="movie" value="player.swf?son=<?php echo $row['path']; ?>">
</object></td>
</tr>
<tr>
<td colspan="2" align="center"><a href="broken.php?id=<?php echo $row['id']; ?>" title=" <?php echo "$row[artist] - $row[title]"; ?>"> </a> | <a href="<?php echo $row['path']; ?>" target="_blank" title=" <?php echo "$row[artist] - $row[title]"; ?>"></a></td>
</tr>
</table>
</body>
</html>
broken.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<style type="text/css">
<!--
.txt {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
border: 1px solid #000000;
}
.btn {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
height: auto;
width: 55px;
border: 1px solid #000000;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
text-decoration: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
}
#table {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
border: 1px solid #000000;
}
.table {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
color: #000000;
text-decoration: none;
border: 1px solid #000000;
}
.boxtext {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
color: #000000;
text-decoration: underline;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #000000;
}
a:hover {
color: #333333;
}
-->
</style>
</head>
<body>
<?php
include("connect.php");
$id = $_GET['id'];
$update = mysql_query("UPDATE `songs` SET `broken` = '1' WHERE `songs`.`id` = '$id'");
if($update == true){
$r = "<div align=center" class="boxtext"> . / / . !</div>";
} elseif($update == false){
$r = "<div align=center" class="boxtext"> . !</div>";
} else {
$r = "";
}
echo $r;
?>
</body>
</html>
playera -
. :) :)
: <!--[if gte mso 9]>