Oto kawałek kodu mysle sadze iz tu mam błąd:
<?php
$play_file="";
$autostart=0;
}
if ($port!=80) {
require ("cfg.php");
$current_date = date("Y-m-d"); $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or
die("<b> MySQL connection error :</b><br><br>The MySQL server seems to be offline. If not, please check if the host, user
or password are correct."); $db = @mysql_select_db($db, $conn) or
die("<b> Error selecting database :</b><br><br>I can't connect to database "$db""); $match = "SELECT url FROM radios WHERE url = '$_POST[submit]'";
$query_match = @mysql_query ($match, $conn) or
die("<b> Error :</b><br><br> Cannot execute query. Please check the MySQL syntax.");
if ($count_match < 1) {
$insert_data = "INSERT INTO radios VALUES ('' ,'$_POST[submit]' , '$current_date')" or
die(mysql_error()); $optimize = "OPTIMIZE TABLE radios";
$query_opt = @mysql_query ($optimize , $conn) or
die("<b> Error :</b><br><br> Cannot execute query. Please check the MySQL syntax."); $query = @mysql_query ($insert_data, $conn) or
die("<b> Error :</b><br><br> Cannot execute query. Please check the MySQL syntax."); $play_file=$_POST['submit'];
$autostart=1;
}
elseif ($count_match > 0) {
print "<script LANGUAGE=\"JavaScript\"> alert(\"This URL already exists in the radios list!\")
parent.play.location.href=\"player.php\";
</script>";
$play_file="";
$autostart=0;
}
}
}
else {
$play_file="";
print "<script LANGUAGE=\"JavaScript\"> alert(\"I can't connect to this host\nMaybe the host is offline or is not valid\nPlease check the spelling and than try again.\")
parent.play.location.href=\"player.php\";
</script>";
?>
<?
$dbhost = "xxxxxx"; // MySQL hostname
$db = "xxxxxxx"; // Database name
$dbuser = "xxxxxx"; // Database username
$dbpass = "xxxxxx"; // Database password
// Upload data
$enabled=1; //Enable or disable file uploading. 0=disable; 1=enable
$dir = "media"; // Directory in witch the audio files are stored. By default, this directory is ca
lled media (player/media).
$audioext = "mp3,wav,mid,wma,m3u"; // Audio extensions. ATENTION! Extensions like mp4 and ram are not supported.
$file_max_size = "3000"; // Maximum allowable file size in bytes that can be uploaded.
// URL playing
$play=1; //Enable or disable URL playing. 0=disable; 1=enable. If you disable this option,
the URL field will not be displayed.
$filter=".php.mp3,.php.wav,.php.mid,.php.wma,.php.m3u,.php.,.exe."; //Filter the URL input field.
//Autostart player
$play_file = "http://shoutcast.omroep.nl:8058"; //The URL of the file or radio station to be played;
$autostart_player = 1; // Start the player automaticly at every launch; 0=disabled; 1 = enabled;
?>