1301) or (!is_numeric($prgnr))) $return = "http://sfodb.com/thumbs/"; else $return = "http://sfodb.com/thumbs/"; if (is_numeric($prgnr)) $return .= (floor((substr($image,0,6)-1)/100)*100)+1 . "/"; $return .= $image;//strtolower($image); $return = str_replace("#", "%23", $return); return $return; } function randomkeys($length) { $key = ""; $pattern = "1234567890abcdefghijklmnopqrstuvwxyz"; for($i=0;$i<$length;$i++) { $key .= $pattern{rand(0,35)}; } return $key; } function remote_filesize($url, $user = "", $pw = "") { ob_start(); $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); if(!empty($user) && !empty($pw)) { $headers = array('Authorization: Basic ' . base64_encode("$user:$pw")); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); } $ok = curl_exec($ch); curl_close($ch); $head = ob_get_contents(); ob_end_clean(); $regex = '/Content-Length:\s([0-9].+?)\s/'; $count = preg_match($regex, $head, $matches); return isset($matches[1]) ? $matches[1] : "unknown"; } function CommentConverter($input) { // This function will convert certain specific SFODB parameters to other values // Convert tags to hyperlinks $output = $input; //$output = str_replace(' SFODB - The SixtyFour Originals DataBase





\n"; $sql = "select distinct prg_id, prg_desc from sf_prog inner join sf_prog_log on prl_prg_id = prg_id where UNIX_TIMESTAMP(prl_datetm) > UNIX_TIMESTAMP(AddDate(Now(), INTERVAL -7 DAY)) and prl_type = 2 and prg_active = 1"; $result = sqlselect($sql); echo "New games added this week
"; if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_object($result)) echo "prg_id\">$row->prg_desc
"; } else echo "None"; echo "

\n"; mysql_free_result($result); echo "

\n"; $sql = "select distinct prg_id, prg_desc from sf_prog inner join sf_prog_log on prl_prg_id = prg_id where UNIX_TIMESTAMP(prl_datetm) > UNIX_TIMESTAMP(AddDate(Now(), INTERVAL -7 DAY)) and prl_type = 1 and prg_active = 1 and prg_id not in (select prg_id from sf_prog inner join sf_prog_log on prl_prg_id = prg_id where UNIX_TIMESTAMP(prl_datetm) > UNIX_TIMESTAMP(AddDate(Now(), INTERVAL -7 DAY)) and prl_type = 2 and prg_active = 1)"; $result = sqlselect($sql); echo "Games updated this week
"; if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_object($result)) { echo "prg_id . "\">".$row->prg_desc."
\n"; } } else echo "None"; echo "

\n"; mysql_free_result($result); echo "

\n"; $sql = "select distinct prg_id, prg_desc from sf_prog WHERE prg_active = 1 ORDER BY prg_id DESC LIMIT 1"; $result = sqlselect($sql); echo "Latest game added
"; if (mysql_num_rows($result) > 0) { $row = mysql_fetch_object($result); echo "prg_id . "\">".$row->prg_desc . "
\n"; } else echo "None"; echo "

\n"; mysql_free_result($result); if ((isset($_GET['showrandomimage'])) && ($_GET['showrandomimage'] == 1)) { ?>

Random covershot

bcn_prg_id."\">bui_thumb)."\" style=\"width: 198px;\" alt=\"covershot\" title=\"Click to go to this game\" />"; } ?>