error_reporting(E_ERROR); ini_set('display_errors', 'On'); session_start(); mysql_connect("localhost", "frontlin_a", "BDnd9121") or die (mysql_error()); mysql_select_db("frontlin_thisishardstyle") or die (mysql_error()); function get_artists($artists) { $multi = strpos($artists, ','); if ($multi === false) { $query = "SELECT * FROM `tih_artists` WHERE `ta_id` = '".$artists."' LIMIT 1"; $sql = mysql_query($query) or die (mysql_error()); $artist_array = mysql_fetch_assoc($sql); $returnarr['db_array'] = $artist_array; $returnarr['num_rows'] = mysql_num_rows($sql); } else { $ids = explode(',', $artists); $query = "SELECT * FROM `tih_artists` WHERE "; foreach ($ids as $key => $value) { $query .= "`ta_id` = '".$value."' OR "; } $query = substr($query, 0, -4); $sql = mysql_query($query) or die (mysql_error()); while ($arr = mysql_fetch_assoc($sql)) { $artist_array[] = $arr; } } $returnarr['db_array'] = $artist_array; $returnarr['num_rows'] = mysql_num_rows($sql); return $returnarr; } if ($_GET['rl'] == '') { header("location: https://thisishard.style"); } else { $safe_url = preg_replace("/[^a-z0-9]+/", "", $_GET['rl']); $query = "SELECT * FROM `tih_releases` WHERE `tr_url` = '".$safe_url."' LIMIT 1"; $sql = mysql_query($query) or die (mysql_error()); $release_array = mysql_fetch_assoc($sql); $artists = get_artists($release_array['tr_artist_ids']); } ?>
$meta['title'] = $release_array['tr_track_artist'].' - '.$release_array['tr_track_title']; $meta['listen_to'] = 'Listen to '.$release_array['tr_track_title'].' by '.$release_array['tr_track_artist'].' on This Is Hardstyle.'; $meta['crrnt_url'] = 'https://thisishard.style/release/?rl='.$release_array['tr_url']; $meta['fi_src_start'] = '../favicons/tih_icon_'; ?>
-
Choose your music portal