debug = 1; //right here we should XSS clean $_REQUEST //initialize to avoid warnings $p = array(); $p['id']=0; $p['typo_or_synonym']=''; $alias_name=''; $alias_search_name=''; // first see if we have an alias to work with if (isset($_REQUEST['alias'])) { $query = "select * from aliases where alias_sort_by='" . strtolower($_REQUEST['alias']) . "' limit 1"; $parent_result = $db->query($query); if ( $db->num_rows($parent_result) ) { $p = $db->fetch_assoc($parent_result); //if there was a match, then load the "parent" movie name into $_REQUEST $_REQUEST['movie']= $p['parent_sort_by']; //default alias & alias_search to the movie name. if typo, then convert //search to "search for movie name". it's just easier to work with. $alias_name = $alias_search_name = ''; $alias_name = $alias_search_name = $p['alias']; if ($p['typo_or_synonym']=='t') { $alias_search_name = 'Search for "' . $p['alias'] . '"'; } } } // take movie from post info & see if there is a match $query = "select * from entries where movie_sort_by='" . strtolower($_REQUEST['movie']) . "' and status='live' order by actor_last,actor_first;"; $result = $db->query($query); $entry_count = $db->num_rows($result); //if no match, redirect out of here if ( $entry_count == 0 ) { header( "Location: http://www.notstarring.com/movies/menu.html" ); exit; } //now get some global-ish stuff from the array then rewind $stuff = $db->fetch_assoc($result); $movie_name = $stuff['movie']; $letter = $stuff['movie_file_under']; //calculate seed for anchoring aliases, alias+parent+month $seed = $p['id']+$stuff['id']+date("m"); mysql_data_seek( $result, 0 ); // if there are movies, create the menu box links //old long result $query = "select movie,max(movie_sort_by) as movie_sort_by,count(*) as count from entries where movie_file_under='$letter' and status='live' group by movie order by movie_sort_by;"; $query = "select movie,max(movie_sort_by) as movie_sort_by,count(*) as count from entries where length(movie_sort_by)<50 and status='live' and movie_sort_by > '" . $_REQUEST['movie'] . "' group by movie order by movie_sort_by limit 30"; $menu_result = $db->query($query); $movie_count = $db->num_rows($menu_result); // temp commented to reduce db load 2-4-2010, see also 1==2 below // check if there are aliases for this movie // $query = "select * from aliases where parent_sort_by='". $_REQUEST['movie'] ."' order by rand($seed) limit 4"; // $alias_result = $db->query($query); // $alias_count = $db->num_rows($alias_result); //set global variables $gbl->page_title= ($alias_name ? $alias_name : $movie_name) . ' - Trivia'; $gbl->meta_key= ($alias_name ? $alias_name : $movie_name) . ' Trivia'; $gbl->meta_desc= 'See who turned down roles in ' . ($alias_name ? $alias_name : $movie_name) . '.'; $gbl->show_ads='none'; $gbl->getHeader(); if ( !$p['typo_or_synonym']=='t' ) { $temp_footer_name = ($alias_name && $p['typo_or_synonym']=='s' ? $alias_name : $movie_name); $gbl->footer_override = " This $temp_footer_name trivia and all movie trivia on notstarring.com is submitted and reviewed by movie fans from around the world. We strive to provide reliability in our movie trivia database, and we go to great lengths to try and corroborate entries. Still, by its nature, this type of trivia will always be prone to rumor and funny Hollywood gossip and should be relied upon with appropriate caution. Please help by reporting corrections for this $temp_footer_name trivia or other movie trivia."; } $movie_actor = ''; /* temp commented out to reduce db load 2-4-2010 // select previous link $query = "select movie_sort_by,movie from entries where status='live' and movie_sort_by < '".$_REQUEST['movie']."' order by movie_sort_by desc limit 1"; $prev_menu_result = $db->query($query); $prev_menu_array = $db->fetch_assoc($prev_menu_result); $prev_link = ($db->num_rows($prev_menu_result)) ? '/movies/'.$prev_menu_array['movie_sort_by'] : '/movies/menu.html'; $prev_name = ($db->num_rows($prev_menu_result)) ? $prev_menu_array['movie'] : 'Menu'; // select next link $query = "select movie_sort_by,movie from entries where status='live' and movie_sort_by > '".$_REQUEST['movie']."' order by movie_sort_by limit 1;"; $next_menu_result = $db->query($query); $next_menu_array = $db->fetch_assoc($next_menu_result); $next_link = ($db->num_rows($next_menu_result)) ? '/movies/'.$next_menu_array['movie_sort_by'] : '/movies/menu.html'; $next_name = ($db->num_rows($next_menu_result)) ? $next_menu_array['movie'] : 'Menu'; */ //$year is used to link to other films from this year. Not every entry has //a year specified, so walk them all until we find one that does. then rewind. $year=''; while ($e = $db->fetch_assoc($result)) { $year = ($e['year'] > $year && preg_match("/[0-9]{4}/", $e['year'])) ? $e['year'] : $year; } mysql_data_seek( $result, 0 ); ?>  «   »  */ ?>


Movie Triva » "" Movies » Trivia Tell a friend about this site!    Save to del.icio.us    digg it
*/ ?>
 Did you mean: '.$p['parent'].'?

'; } ?>
 Who was considered for ?

fetch_assoc($result)) { ?>
new_days)) ); if ( $e['date_published'] > $thirty_days ) { echo ''; } ?> (?????)'; } ?>
Submitted by:
Actor who got the part:
Help! Can you verify this entry?  » THIS IS TRUE  » JUST A RUMOR 

*/ ?>


See more trivia









 Other Popular Movies:
fetch_assoc($menu_result)) { echo '- '.$m['movie'].' ('.$m['count'].')
'; if ($x++%$break == 0) { echo '
'; } } ?>

getFooter(); ?>