"._NEWJOKES."
"; $counter = 0; $allweekjokes = 0; while ( $counter <= 7-1 ){ $newjokedayRaw = ( time()-( 86400 * $counter ) ); $newjokeday = date( "d-M-Y", $newjokedayRaw ); $newjokeView = date( "F d, Y", $newjokedayRaw ); $newjokeDB = Date( "Y-m-d", $newjokedayRaw ); $result = $db->sql_query( "select * FROM ".$prefix."_jokes WHERE date LIKE '%$newjokeDB%'", $db ); $totaljokes = sql_num_rows( $result, $db ); $counter++; $allweekjokes = $allweekjokes + $totaljokes; } $counter = 0; while ( $counter <=30-1 ){ $newjokedayRaw = ( time()-( 86400 * $counter ) ); $newjokeDB = Date( "Y-m-d", $newjokedayRaw ); $result = $db->sql_query( "select * FROM ".$prefix."_jokes WHERE date LIKE '%$newjokeDB%'", $db ); $totaljokes = sql_num_rows( $result, $db ); $allmonthjokes = $allmonthjokes + $totaljokes; $counter++; } echo "
"._TOTALNEWJOKES.": "._LASTWEEK." - $allweekjokes / "._ONEMONTH." - $allmonthjokes
" .""._SHOW.": "._LASTWEEK." - " .""._TWOWEEKS." - " .""._ONEMONTH2."" ."

"; /* List Last VARIABLE Days of Links */ if ( !isset( $week ) ) { $week = 1; } echo "
"._TOTALNEWJOKES." "; if ( $week == '1' ) { $newjokedays = "7"; echo _LASTWEEK; } else if ( $week == '2' ) { $newjokedays = "14"; echo _LASTTWOWEEKS; } else if ( $week == '3' ) { $newjokedays = "30"; echo _LASTMONTH; } else { echo "
"; } echo ":


"; $counter = 0; $allweekjokes = 0; while ( $counter <= $newjokedays-1 ) { $newjokedayRaw = ( time()-( 86400 * $counter ) ); $newjokeday = date( "d-M-Y", $newjokedayRaw ); $newjokeView = date( "F d, Y", $newjokedayRaw ); $newjokeDB = Date( "Y-m-d", $newjokedayRaw ); $result = $db->sql_query( "select * FROM ".$prefix."_jokes WHERE date LIKE '%$newjokeDB%'", $db ); $totaljokes = sql_num_rows( $result, $db ); $counter++; $allweekjokes = $allweekjokes + $totaljokes; echo "· $newjokeView ($totaljokes)
"; } $counter = 0; $allmonthjokes = 0; echo "
"; CloseTable(); include( "footer.php" ); } function NewJokesDate( $selectdate ) { global $prefix, $db, $admin, $bgcolor1, $bgcolor2, $module_name; $admin = base64_decode( $admin ); $admin = explode( ":", $admin ); $aid = "$admin[0]"; $result3 = $db->sql_query( "select radminlink,radminsuper from ".$prefix."_authors where aid='$aid'", $db ); list( $radminlink,$radminsuper ) = $db->sql_fetchrow( $result3, $db ); $dateDB = ( date( "d-M-Y", $selectdate ) ); $dateView = ( date( "F d, Y", $selectdate ) ); include("header.php"); ModuleHeader(); ModuleSearch(); OpenTable(); $newjokeDB = Date( "Y-m-d", $selectdate ); $result = $db->sql_query( "select * FROM ".$prefix."_jokes WHERE date LIKE '%$newjokeDB%'", $db ); $totaljokes = $db->sql_numrows( $result, $db ); echo "
$dateView - $totaljokes "._NEWJOKES."

" ."" ."" ."" ."" ."\n"; $result = $db->sql_query( "select jokeid, author, date, name, cat, joke, hits, ratings from ".$prefix."_jokes where date LIKE '%$newjokeDB%' order by name ASC", $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 ); @setlocale ( "LC_TIME", "$locale" ); /* INSERT code for *editor review* here */ ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $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"; /* voting & comments stats */ if ( $ratings == 0 ) { echo _JOKEUNRATED; } else { $rate = substr( $ratings, 0, 4 ); echo $rate; } echo "$hits
"; CloseTable(); include("footer.php"); } switch( $func ){ case "main": main( $week ); break; case "NewJokesDate": NewJokesDate( $selectdate ); break; } ?>