nå, den deur så heller ikke.... er der nogen der ved hvorfor den kun skriver en lille del af min kode, og ignorere slutnigen på kode tagget?
prøver lige uden kode tagget:
php koden i index.php:
<?php
$action = @$_GET['action'];
if ($action=='alm') {
include('mysql.php');
$query = mysql_query("SELECT * FROM music_cms ORDER BY kunstner") or die(mysql_error());
while ($music = mysql_fetch_array($query)) {
$mp3 = stat('sange/'.$musik['sti'].'');
$mp3 = $mp3[7] / 1048576;
echo '<tr>
<td valign="top" style="border-right:1px solid #cccccc; border-bottom:1px solid #cccccc;">
<a onMouseOver="javascript:this.style.color=\\'#0000ff\\'" onMouseOut="javascript:this.style.color=\\'#0000ff\\'" onClick="expandcontent(this, \\''.$music['id'].'\\')" style="cursor:hand; cursor:pointer; color: #0000ff; text-decoration: underline;"><span class="showstate"></span>'.$music['titel'].'</a>
<div id="'.$music['id'].'" class="switchcontent">
<br>
<b>Download:</b><br>
<a link href="sange/'.$music['sti'].'"> Her</a><br>
<b>Album:</b><br>
'.$music['album'].'<br>
<b>Tilføjet:</b><br>
<i>'.$music['dato'].'</i><br><br>
</div></td>
<td valign="top" style="border-right:1px solid #cccccc; border-bottom:1px solid #cccccc;">'.$music['kunstner'].'</td>
<td valign="top" style="border-bottom:1px solid #cccccc;">'.$mp3.'</td>
</tr>';
}
}
if ($action=='alfa') {
include('mysql.php');
$bogstav = $_GET['bogstav'];
$query = mysql_query("SELECT id, titel, kunstner, størrelse FROM music_cms WHERE kunstner LIKE '$bogstav%'");
while ($music = mysql_fetch_array($query)) {
$mp3 = stat('sange/'.$musik['sti'].'');
$mp3 = $mp3[7] / 1048576;
echo '<tr>
<td valign="top" style="border-right:1px solid #cccccc; border-bottom:1px solid #cccccc;">
<a onMouseOver="javascript:this.style.color=\\'#0000ff\\'" onMouseOut="javascript:this.style.color=\\'#0000ff\\'" onClick="expandcontent(this, \\''.$music['id'].'\\')" style="cursor:hand; cursor:pointer; color: #0000ff; text-decoration: underline;"><span class="showstate"></span>'.$music['titel'].'</a>
<div id="'.$music['id'].'" class="switchcontent">
<br>
<b>Download:</b><br>
<a link href="sange/'.$music['sti'].'"> Her</a><br>
<b>Album:</b><br>
'.$music['album'].'<br>
<b>Tilføjet:</b><br>
<i>'.$music['dato'].'</i><br><br>
</div></td>
<td valign="top" style="border-right:1px solid #cccccc; border-bottom:1px solid #cccccc;">'.$music['kunstner'].'</td>
<td valign="top" style="border-bottom:1px solid #cccccc;">'.$mp3.'</td>
</tr>';
}
}
if ($action=='sog') {
include('mysql.php');
if($_GET['seek']){
$bogstav = $_GET['bogstav'];
$query = mysql_query("SELECT * FROM music_cms WHERE kunstner LIKE '%$_GET[seek]%' OR titel LIKE '%$_GET[seek]%'");
$number = mysql_num_rows($result);
if($number == 0){
echo '<script language="Javascript">alert ("Der blev ikke funder nogle resultater til sødeordet:'.$_GET[seek].'")</script>';
} elseif($number > 50){
echo '<script language="Javascript">alert ("Over 50 resultater, prøv at indskrænke dine søgeord.")</script>';
} else {
while ($music = mysql_fetch_array($query)) {
$mp3 = stat('sange/'.$musik['sti'].'');
$mp3 = $mp3[7] / 1048576;
echo '<tr>
<td valign="top" style="border-right:1px solid #cccccc; border-bottom:1px solid #cccccc;">
<a onMouseOver="javascript:this.style.color=\\'#0000ff\\'" onMouseOut="javascript:this.style.color=\\'#0000ff\\'" onClick="expandcontent(this, \\''.$music['id'].'\\')" style="cursor:hand; cursor:pointer; color: #0000ff; text-decoration: underline;"><span class="showstate"></span>'.$music['titel'].'</a>
<div id="'.$music['id'].'" class="switchcontent">
<br>
<b>Download:</b><br>
<a link href="sange/'.$music['sti'].'"> Her</a><br>
<b>Album:</b><br>
'.$music['album'].'<br>
<b>Tilføjet:</b><br>
<i>'.$music['dato'].'</i><br><br>
</div></td>
<td valign="top" style="border-right:1px solid #cccccc; border-bottom:1px solid #cccccc;">'.$music['kunstner'].'</td>
<td valign="top" style="border-bottom:1px solid #cccccc;">'.$mp3.'</td>
</tr>';
}
}
}
?>
Indlæg senest redigeret d. 06.04.2006 15:52 af Bruger #8835