#echo 'ToonJet is temporarily down for maintenance. Please be patient and check back shortly. Thanks!'; #exit; #if(!ob_("ob_gzhandler")) ob_start("ob_gzhandler"); header("Content-type: text/html; charset: UTF-8"); header("Cache-Control: must-revalidate"); //http://www.fiftyfoureleven.com/weblog/web-development/css/the-definitive-css-gzip-method $offset = 60 * 60 * 4; $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; header($ExpStr); #need to create a class that uses private variables(or constants) to connect and output info. include('modules/visitor_tracking.inc'); require_once('modules/class.toonjet.inc'); require_once('modules/class.adsystem.php'); require_once('modules/functions.inc'); /* TODO - Update adminbar.inc to use icons, and to use a more simple design [Favorites], [CP], etc. - Create a table to set up categories, so that new ones can be created and integrated much more easily from the admin panel. */ $cartoons = new Cartoons; $cartoons->Set('db_name','toonjet_cartoons'); $cartoons->conn('toonjet_cartoons'); $mysql = $cartoons->mysql; if( !$conf ) { # LOADING TOONJET CONFIG $getconf = $mysql->query("SELECT * FROM `config_toonjet`"); $conf = array(); WHILE( $c = $getconf->fetch_array() ) { $conf[$c['name']] = $c['value']; } $currtheme = $conf['current_theme']; } if(isset($_GET['mode'])){$getmode = escapeStr($_GET['mode']);}else{$getmode = '';} // selecting the action to perform function selectAction ( $mode ) { # These variables work anywhere inside all modes $Win = new Container; #http://webitect.net/development/phpmysql/object-oriented-php-the-basics/ #http://www.php.net/manual/en/mysqli.query.php # START MYSQL CONNECTION $cartoons = new Cartoons; $cartoons->Set('db_name','toonjet_cartoons'); $cartoons->conn('toonjet_cartoons'); $mysql = $cartoons->mysql; $ads = new Ads(); if( !$conf ) { # LOADING TOONJET CONFIG $getconf = $mysql->query("SELECT * FROM `config_toonjet`"); $conf = array(); WHILE( $c = $getconf->fetch_array() ) { $conf[$c['name']] = $c['value']; } $currtheme = $conf['current_theme']; } $imgwidth = $conf['default_thumb_size']; # default thumb size throughout the site; if(isset($_GET['mode'])){$getmode = escapeStr($_GET['mode']);}else{$getmode = '';} switch ($mode) { case '': //---------------LOAD CARTOONS---------------// if( $currtheme == "Halloween" ) { $featlim = 2; } else { $featlim = 8; } //ChitikaAd ( $width, $height, $title, $color_bg, $color_text, $color_link, $color_button ) //$blockAd = $ads->ChitikaAd ( 300, 250, "ToonJet Index - 300x250", "7E9ABD", "003366", "FFFFCC", "404F63" ); $rectAd = $ads->ShowAd ( "small_rect" ); $get_vids = $mysql->query("SELECT * FROM cartoons WHERE `copyright_claim`='' ORDER BY id DESC LIMIT $featlim") or die(mysql_error()); $videos = 0; //$ytmediano = 'IbjOYafacZY?playlist='; $ytvids = 0; $featdata = ' Featured Cartoons on ToonJet
'; while( $row = $get_vids->fetch_array() ) { //---------------YOUTUBE DATA---------------// $ytmediano .= $row['youtube_media_code']; if( $ytvids == 0 ) { $ytmediano .= '?playlist='; } else if( $ytvids < $featlim ) { $ytmediano .= ','; } $ytvids++; //---------------FEATURED TOONS DATA---------------// $ctext = stripslashes($row['description']); $toonid = $row['id']; $thisurl = makeUrl($toonid); $vidcount++; //if( $vidcount <= $numfeatured && /*$imgsize = '320'; if( is_file('/home/toonjet/www/html/images/icons/'.$imgsize.'_'.$row['url']) ) { $thisimg = $imgsize.'_'.$row['url']; }else{*/ $thisimg = $row['url']; //} $numfav = $row['favorited']; if( $numfav > 1 || $numfav == 0 ){$s = 's';} else{$s = '';} if ($videos==1) { $c = 'lb'; $bgc = '#8cadd9'; $ft = 'png'; $f1t = 'jpg'; $videos = 0; } else { $featdata .= ''; $c = 'db'; $bgc = '#596d8a'; $ft = 'jpg'; $f1t = 'png'; $videos++; } $featdata .= ''; } $featdata .= '
watch cartoons online
'.$row['series'].': '. stripslashes(Shorten($row['title'],32)).' Add cartoon to your favorites Email this cartoon
'
								.stripslashes($row['alt']).'
'.Shorten($ctext,120).'
cartoon links
'; //----------------FEATURED WINDOW----------------// echo''; /**/ echo'
  classic cartoons watch cartoons online
cartoons online
classic cartoons '; /*echo'';*/ /*echo' ';*/ # echo' # '; # echo''; # We can use autohide = 2 (or blank) to leave controls visible, but hide top bar and slider. echo''; #&modestbranding=1 #src=?http://www.youtube.com/embed/oHg5SJYRHA0?playlist=0oicc86PwEM,lq2zHpcLBXI,MkYGDzO_2hs,WepArag_IUc? echo'
You\'re watching the ToonJet Classic Cartoon Channel, where you can watch all of your favorite cartoons online, all the time! Included in the daily schedule are Looney Tunes, Popeye, Betty Boop, Woody Woodpecker, and more! So, stop on by anytime to watch the coolest cartoons you\'ll find online--the classics! New cartoons are added all the time, so add ToonJet to your favorites and share it with your friends!'; $tj = 'http://www.toonjet.com'; echo'

Subscribe to the ToonJet Cartoon Feed  ToonJet on Myspace
internet tv channel
classic cartoons classic cartoons online watch classic cartoons
watch cartoons online free Watch ToonJet Classic Cartoons Online Free Click for Featured Cartoons Click for different cartoon shows
classic cartoons watch cartoons online online cartoons cartoon network classic cartoons kids cartoons vintage cartoons classic cartoons online
'.$rectAd.'
'; //----------------TOONJET NEWS FLASH----------------// #require_once('modules/index_news_win.inc'); $query = $mysql->query("SELECT `id`,`article`,`date`,`title` FROM `news` ORDER BY `id` DESC LIMIT 1"); $row = $query->fetch_array(); $txt = stripslashes($row['article']); $dt = strftime('%b %e, %Y', strtotime($row['date'])); $hd = '
ToonJet News Flash Posted on '.$dt.'
'; $text = '
'.stripslashes($row['title']).'
'.Shorten(strip_tags($txt),155).'
'; $Win->Set('margin','10px auto 10px auto'); $Win->Set('innermargin','0px auto 5px auto'); $Win->Set('width','92%'); $Win->BlueWin($hd,$text); echo '
'; //----------------SIGNUP BOX----------------// #require_once('modules/index_signup.inc'); echo '
Sign Up Now!
What\'s the Catch?!
No catch! Sign up for a free membership on ToonJet to get access to ToonJet\'s growing cartoon community, plus all the new features, including:
  • ToonJet\'s Free Newsletter!
  • Build Your Own ToonJet Profile
  • Post Comments
  • Send Shouts
  • Send and Receive Messages
  • Get Involved!
So, what are you waiting for, a kick in the shinola?
Sign up Now!
'; #-------------------------HALLOWEEN------------------------# if( $currtheme == 'Halloween' ) { $Win->Set('margin','10px auto 10px auto'); $Win->Set('margin','4px 5px'); $Win->Set('innermargin','0px'); $Win->Set('cl','b0 tables'); $Win->Set('width','262px'); $Win->Set('header',''); $Win->Set('header2',''); $gethall = $mysql->query("SELECT * FROM `cartoons` WHERE `alt` LIKE '%halloween%' && `blocked`='' ORDER BY `id` DESC LIMIT 6"); $hcount = 0; $alt = 'Watch Halloween cartoons on ToonJet'; echo ''.$alt.''; echo' '; WHILE( $h = $gethall->fetch_array() ) { $numfav = $h['favorited']; if( $numfav > 1 || $numfav == 0 ){$s = 's';} else{$s = '';} $timesEmailed = $h['times_emailed']; if( $timesEmailed > 1 || $timesEmailed == 0 ){$s1 = 's';} else{$s1 = '';} $ctext = $h['description']; $thisurl = 'http://www.toonjet.com/'.makeUrl($h['id']); $thisimg = $h['url']; $t = '
'.$h['series'].': '. stripslashes(Shorten($h['title'],32)).' Add cartoon to your favorites Email this cartoon
'
							.stripslashes($h['alt']).'
'.Shorten($ctext,120).'
'; if( $hcount == 0 ) { echo ''; $Win->GlassWin($t,'darkblue'); $hcount = 1; echo ''; } else { echo ''; $Win->GlassWin($t,'lightblue'); $hcount = 0; echo ' '; } }# WHILE echo''; }# HALLOWEEN #require_once('modules/featured_table.inc'); echo $featdata; #require_once('modules/links.inc'); echo''; /*echo'';*/ echo'
Internet TV Watch Cartoons Classic Cartoon Blog Classic Cartoon Forum Get Your Cartoons By RSS Feed
'; break; case'about': require_once('modules/index_about.inc'); break; case'cartoons': require_once('modules/index_cartoons.inc'); break; case'category': require_once('modules/index_category.inc'); break; case 'contact': require_once('modules/index_contact.inc'); break; case'join': require_once('register.php'); break; case'news': require_once('modules/index_news.inc'); break; case'old': require_once('modules/index_old.inc'); break; case'report_bugs': require_once('modules/index_report_bugs.inc'); break; case'show_users': require_once('modules/index_show_users.inc'); break; case'sitemap': require_once('modules/index_sitemap.inc'); break; case'test': require_once('modules/index_test.inc'); break; case'terms': require_once('modules/index_terms.inc'); break; default: } // end switch mode } // end function selectAction //----------------HTML HEADER----------------// ########################################################### #-------------------------AD DATA-------------------------# ########################################################### $ads = new Ads(); //ChitikaAd ( $width, $height, $title, $color_bg, $color_text, $color_link, $color_button ) $bannerAd = $ads->ShowAd ( "banner" ); $towerAd = $ads->ShowAd ( "tower" ); echo' '; pageTitle(); echo' '; //echo ''; //echo''; //echo''; //echo $ads->ShowAd ( "blog" ); #require_once('adminbar.inc'); $cartoons = new Cartoons; $cartoons->Set('db_name','toonjet_cartoons'); $cartoons->conn('toonjet_cartoons'); $mysql = $cartoons->mysql; $Win = new Container; //----------------ADMIN BAR----------------// echo '
'; if(isset($_COOKIE['TJID'])) { echo '
'; $uname = addslashes($_COOKIE['TJID']); $result = $mysql->query("SELECT * FROM `uploads` WHERE LOWER(`setavatar` = '$uname') ORDER BY `id` DESC LIMIT 1"); $row = $result->fetch_array(); $av = $row['setavatar']; if($av = $uname) { getAvatar(); } else { echo' '; } $uname = $_COOKIE['TJID']; echo' User Admin: User Control Panel | ToonJet Home | My Profile | Private Messages'; $if_new = $mysql->query("SELECT * FROM private_messages WHERE `to` = '$uname' && `unread` = 1 && `delete_to` != '1' && `archive` != '1'") or die(mysql_error()); $countmsgs = $if_new->num_rows; if($countmsgs>0){ echo ' ('.$countmsgs.' New)'; } echo' | User Options
Logged in as: '.$uname.' | logout'; echo '
'.date("m/d/y g:ia").'
'; }else{ echo '
Login or Register for user options.
'; } echo '

'; if(isset($_GET['remove'])) { if(($_GET['remove'] == 'top_favorites') && isset($_COOKIE['TJID'])) { $usr = $_COOKIE['TJID']; $mysql->query("UPDATE users SET remove_top_favorites_box='x' WHERE username='$usr'"); } } echo'
watch cartoons online free, animated cartoons, cartoons online, movies online, looney tunes, betty boop, merrie melodies, popeye, superman, download, view, classic, classics, vintage, toons, toon, jet, toonjet Looney Tunes, watch cartoons online, online cartoons, download, videos watch cartoons for kids, cartoon characters, Bugs Bunny, Daffy Duck Watch cartoons live
'; //----------------MENU BAR----------------// require_once('modules/menu_bar.inc'); echo $bannerAd; echo'
'; // flush(); echo'
'; //setting left-column margins $marginleft = 15; $marginright = 5; $margintop = 5; if(isset($_COOKIE['TJID'])) { $cartoons = new Cartoons; $cartoons->Set('db_name','toonjet_cartoons'); $cartoons->conn('toonjet_cartoons'); $mysql = $cartoons->mysql; #require_once('modules/index_top_favorites_lb_solid.inc'); //----------------TOP FAVORITES----------------// $tjuser = $_COOKIE['TJID']; $chktopfavs = $mysql->query("SELECT topfavorites, toonid FROM favorites WHERE username = '$tjuser' && topfavorites = '1'"); $topfavs = 0; $chkpref = $mysql->query("SELECT remove_top_favorites_box FROM users WHERE remove_top_favorites_box='x' && username='$tjuser'"); if(!$chkpref->num_rows){ echo'
watch cartoons live
watch cartoons tom and jerry '; if($chktopfavs->num_rows) { echo '
My Top Favorites (Update)
'; while( $topfavrow = $chktopfavs->fetch_array() ) { $tnid=$topfavrow['toonid']; $rtninfo = $mysql->query("SELECT url, series, title FROM cartoons WHERE `id`='$tnid' && `copyright_claim`=''"); $tninfo = $rtninfo->fetch_array(); echo' '; }//***END WHILE*** echo'
'.stripslashes($tninfo['series']).':
'.stripslashes($tninfo['title']).'
'; } else { echo' Update Top Favorites
to display them here.

'; }//***END IF ELSE*** echo'
cartoon links
watch cartoons.com
'; //if( isset($chktopfavs) ){$chktopfavs->free();} //if( isset($tninfo) ){$tninfo->free();} } }#if cookie is set... //----------------ANDROID LINK----------------// $text = ' '; $Win->Set('header','Download the ToonJet App'); $Win->Set('margin','8px auto 0px 15px'); $Win->Set('width','170px'); $Win->Set('header2',''); $Win->GlassWin($text,'yellow'); //----------------REGISTER BOX----------------// $t = '
Not only do you get to watch your favorite classic cartoons online, you get:
  • your own profile page
  • to comment on cartoons
  • to rate cartoons
  • to add cartoons to your favorites
  • private messaging
  • So why not Sign Up!
  • '; $Win->Set('header','Sign Up Now!'); $Win->Set('margin','8px auto 0px 15px'); $Win->Set('width','170px'); $Win->Set('header2',''); $Win->GlassWin($t,'darkblue'); //----------------TODAY IN CARTOON HISTORY----------------// if( $conf['show_cartoon_history'] == 'y' ) { $mo = date("n"); $d = date("j"); $getmd = $mysql->query("SELECT COUNT(`id`) as entries FROM `cartoon_history` WHERE `month`='$mo' && `day`='$d'"); $retmd = $getmd->fetch_array(); #if($_COOKIE['TJID'] == 'toonjet'){var_dump($retmd);} if( $retmd['entries'] > 0 ) { $getm = $mysql->query("SELECT COUNT(`id`) as entries FROM `cartoon_history` WHERE `month`='$mo' && `day`='0'"); $retm = $getm->fetch_array(); if( $retmd['entries'] > 0 ) { $where = "`month`='$mo' && `day`='$d'"; } elseif( $retm['entries'] > 0 ) { $where = "`month`='$mo' && `day`='0'"; } else { $where = "`month`='0' && `day`='0' LIMIT 3"; } $text = ''; $his = $mysql->query("SELECT * FROM `cartoon_history` WHERE $where"); WHILE( $h = $his->fetch_array() ) { if( $retmd['entries'] > 0 ) { $dispdt = dtshtn($h['year'].sprintf("%02u",$h['month']).sprintf("%02u",$h['day'])); } elseif( $retm['entries'] > 0 ) { $dispdt = convMonth($h['month']).' '.$h['year']; } else { $dispdt = $h['year']; } $text .= $Win->FontHeader(stripslashes($h['title'])); $text .= $Win->FontIndent( ''.$dispdt.' - '.stripslashes($h['event']) ); } $Win->Set('header','Today in Cartoon History'); $Win->Set('margin','8px auto 0px 15px'); $Win->Set('width','170px'); $Win->Set('header2',''); $Win->GlassWin($text,'yellow'); } #IF THERE ARE ENTRIES TO SHOW } #HISTORY //----------------BLOG SIDEBAR----------------//' $blog = new Cartoons; $blog->Set('db_name','toonjet_bvlt1'); $blog->conn('toonjet_bvlt1'); $mysql = $blog->mysql; //Start the Connection $getblog = $mysql->query("SELECT `post_ID`,`post_content`,`post_datestart`,`post_title`,`post_urltitle` FROM `evo_items__item` WHERE `post_status`='published' ORDER BY `post_datecreated` DESC LIMIT 1") or die(mysql_error()); $showblog = $getblog->fetch_array(); $text = stripslashes(strip_tags(Shorten($showblog['post_content'],350))); $dt = $showblog['post_datestart']; $month = substr($dt, 5, 2); $day = substr($dt, 8, 2); $year = substr($dt, 0, 4); $hd = stripslashes($showblog['post_title']); $text = $text.' '; # $Win = new Container; $Win->Set('margin','8px auto 0px 15px'); $Win->Set('width','170px'); $Win->Set('header','ToonJet Classic Cartoon Blog'); $Win->Set('header2',$hd); $Win->GlassWin($text,'grey'); $cartoons = new Cartoons; $cartoons->conn('toonjet_cartoons'); $mysql = $cartoons->mysql; //----------------SHOW USERS BUTTON----------------// if( $getmode != 'show_users') { echo'
    '; } //----------------FACEBOOK BUTTON----------------// echo ' '; echo'
    '; selectAction($getmode); echo' '; //----------------AD - RIGHT SIDEBAR----------------// $Win->Set('margin','10px 15px 0px auto'); $Win->Set('align','center'); $Win->Set('extright','.png'); $Win->Set('header',''); $Win->Set('header2',''); $Win->Set('cl','b0'); $Win->GlassWin($towerAd,'brown'); //----------------UPDATES - LIGHT BLUE WIN----------------// $getupdates = $mysql->query("SELECT DISTINCT id AS id, COMMENT AS title, postdate AS updatedate, COMMENT AS article, username AS username, 'comment' AS TYPE FROM comments UNION SELECT id AS id, title AS title, DATE AS updatedate, article AS article, author AS username, 'news' AS TYPE FROM news UNION SELECT DISTINCT ID AS id, username AS title, date_registered AS updatedate, username AS article, username AS username, 'user' AS TYPE FROM latest_users ORDER BY updatedate DESC LIMIT 6") or die($mysql->error); $udata = ''; while( $row = $getupdates->fetch_array() ) { $thisdt = $row['updatedate']; $thsid = $row['id']; $checktitle = stripslashes($row['title']); $thisusr = stripslashes($row['username']); $utype = $row['TYPE']; if($utype == 'user') { $getavtr = $mysql->query("SELECT url FROM uploads WHERE setavatar='$checktitle'"); $fetchavtr = $getavtr->fetch_array(); if($fetchavtr['url']!='Temp.jpg' && $fetchavtr['url']!='') { $isrc = '"images/avatars/'.$fetchavtr['url'].'"'; } else { $isrc = '"images/ol.gif" id="sprite-Temp"'; } $ustxt = $checktitle; $udata .= '

    '; $udata .= ShortenWord($checktitle,10); $udata .= ' joined on '.strftime("%a %b %d, %Y", strtotime($thisdt)).'

    '; } elseif($utype == 'comment') { $rtnid = $row['id']; $gettnid = $mysql->query("SELECT toonid, comment FROM comments WHERE id = '$rtnid'"); $fetchtnid = $gettnid->fetch_array(); $rtntnid = $fetchtnid['toonid']; $uptxt = stripslashes($fetchtnid['comment']); $toonie = $mysql->query("SELECT ID, title, url, copyright_claim FROM cartoons WHERE ID='$rtntnid' LIMIT 1"); $disptoon = $toonie->fetch_array(); $ustxt = stripslashes($row['username']); if( $disptoon['copyright_claim'] == '' ) { $udata .= ''; } } }//while $Win->Set('extright','.jpg'); $Win->GlassWin($udata,'lightblue'); //----------------POPULAR - BROWN SIDEBAR----------------// $fdata = ''; $featured = $mysql->query("SELECT (100 * (times_emailed / hits)) + (100 *(favorited / hits)) + (100 *(comment_count / hits)) + 1 * hits + ratings_cumulative AS total, id, url, alt, series, title FROM cartoons WHERE `copyright_claim`='' ORDER BY total DESC LIMIT 4"); while( $showfeat = $featured->fetch_assoc() ) { $fdata .= ''; }//end while $fdata .= '
    Popular Cartoons:
    '.stripslashes($showfeat['alt'])
	.'
    '.stripslashes($showfeat['title']).'
    More...
    '; $Win->Set('extright','.png'); $Win->GlassWin($fdata,'brown'); //----------------CLOSE CONNECTION----------------// $mysql->close(); echo'
    '; require_once('modules/footer_links.inc'); echo'

    '; $text = '
    © Copyright '.date('Y').' Singed Tentacle Productions. All rights reserved.
    '; $Win->Set('margin','0px'); $Win->Set('text-align','center'); $Win->Set('width','775px'); $Win->Set('header',''); $Win->Set('header2',''); $Win->Set('extright','.png'); $Win->GlassWin($text,'darkblue'); echo'
    '; /*echo' ';*/ echo' '; //ob_end_clean(); ob_end_flush(); ob_flush(); flush(); ?>