sql_query("select jokespopular from ".$prefix."_jokes_options",$db); list($pagesize) = $db->sql_fetchrow($list_length,$db); ModuleHeader(); ModuleSearch(); OpenTable(); echo "
"._JOKESMORESEEN."
" ."
" ."" ."" ."" .""; $result = $db->sql_query( "select jokeid, author, date, name, cat, joke, hits, ratings from ".$prefix."_jokes order by hits DESC LIMIT 0,$pagesize", $db ); while( list( $jokeid, $author, $date, $name, $cat, $joke, $hits, $ratings ) = $db->sql_fetchrow( $result, $db ) ) { $catn = $db->sql_query( "SELECT catname FROM ".$prefix."_jokes_categories WHERE jokecid='$cat'", $db ); list( $catname ) = $db->sql_fetchrow( $catn, $db ); ereg ( "([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $date, $datetime ); $datetime = strftime( "%d-%b-%Y", mktime( $datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1] ) ); $datetime = ucfirst( $datetime ); echo ""; } echo "
"._JOKENAME.""._CATEGORY.""._RATING.""._VIEWS."
$name$catname"; if( $ratings==0 ) { echo _JOKEUNRATED; } else { $rate = substr( $ratings, 0, 4 ); echo "$rate"; } echo "$hits
"; CloseTable(); include( "footer.php" ); } switch( $func ){ case "main"; main(); break; }