[insert_php] $time = microtime(); $time = explode(‘ ‘, $time); $time = $time[1] + $time[0]; $start = $time; $load = 10; if ($debug == 1) { if ($cload == 100) { $load = 100; } if ($cload == 1000) { $load = 1000; } if ($cload == 10000) { $load = 10000; } } $db = new PDO(‘mysql:host=185.114.157.172;dbname=gimmesne_celtcast;charset=utf8mb4’, ‘gimmesne_cadmin’, ‘GimmesProductions’); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); function br() { echo “
“; } [/insert_php] CeltCast Song Voting [insert_php] if (isset($_GET[“q”])) { echo “
“; $q = ‘”%’ . stripslashes(htmlspecialchars($_GET[“q”])) . ‘%”‘; $stmt = $db->query(” SELECT SONGTITLE, TIMESTAMP FROM History WHERE SONGTITLE LIKE $q ORDER BY id DESC LIMIT 3″); if ($stmt->rowCount() == 3) { echo “Found more then 3 results, limited to 3.

“; } else { echo “Found “. $stmt->rowCount() . ” results.
“; } while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $songtitle = $row[‘SONGTITLE’]; $timestamp = $row[‘TIMESTAMP’]; echo $songtitle . ” played at ” . str_replace(“+0100”, “”, date(‘r’, $timestamp)); echo “
“; } } else { $stmt = $db->query(“SELECT SONGTITLE,TIMESTAMP,VoteRating,ID FROM History ORDER BY id DESC LIMIT $load”); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $song = $row[‘SONGTITLE’]; $timestamp = $row[‘TIMESTAMP’]; $voterating = $row[‘VoteRating’]; $id = $row[‘ID’]; if ($voterating > 0) { echo “