query($sql); $RS = $db->fetch_array($RSQ); if ($RS==0) { $sql = "SELECT * FROM `videos` WHERE `video_shortcut` LIKE '$_GET[s]%' LIMIT 1"; $RSQ = $db->query($sql); $RS = $db->fetch_array($RSQ); } $msql = "SELECT * FROM `videos_meta` WHERE `id` = '$RS[id]' LIMIT 1"; $MRSQ = $db->query($msql); $MRS = $db->fetch_array($MRSQ); $top_cat_id = $RS[video_cat_id]; $meta_title = $RS[video_title]." | "; $meta_image = "http://img.youtube.com/vi/".$RS[video_id]."/default.jpg"; if ($RS[video_cat_id]>0) { $csql = "SELECT * FROM `categories` WHERE `id` = $RS[video_cat_id] LIMIT 1"; $CRSQ = $db->query($csql); $CRS = $db->fetch_array($CRSQ); $views_sql = "UPDATE `categories` SET `cat_views` = `cat_views` + 1 WHERE `id` = '$CRS[id]'"; if ($CRS[cat_color]!="0") { $top_cat_id = $CRS[id]; $_SESSION[thiscol]=$CRS[cat_color]; } $thiscatparent = $CRS[cat_parent_id]; $thiscatid = $CRS[id]; $thiscat = $CRS[cat_shortcut]; $thiscattitle = $CRS[cat_name]; $title_links = "/ ".strtoupper($thiscattitle).""; $x=0; while ($CRS[cat_parent_id]>0 && $x<5) { $csql = "SELECT * FROM `categories` WHERE `id` = $thiscatparent LIMIT 1"; $CRSQ = $db->query($csql); $CRS = $db->fetch_array($CRSQ); $views_sql.= " OR `id` = '$CRS[id]'"; $thiscatparent = $CRS[cat_parent_id]; $title_links = "/ ".strtoupper($CRS[cat_name])." ".$title_links; if ($CRS[cat_color]!="0") { $top_cat_id = $CRS[id]; $_SESSION['thiscol']=$CRS[cat_color]; } $x++; } // UPDATE VIEWS $db->query($views_sql); } else { $thiscatparent = 0; $thiscatid = 0; $thiscat = "all"; $thiscattitle = "new videos"; $top_cat_id = 0; $_SESSION[thiscol]="d2797f"; } $vid_views_sql = "UPDATE `videos` SET `video_views` = `video_views` + 1, `video_views_today` = `video_views_today` + 1 WHERE `id` = '$RS[id]'"; $db->query($vid_views_sql); $meta_title.=$thiscattitle." Videos"; include('includes/header.php'); //$_SESSION['adplayed']=1; ?>

SHARE THIS



LIKE THIS?




ABOUT THIS




BE OUR FRIEND!




0) { ?>



YOUR COMMENTS ABOUT THIS VIDEO



MORE VIDEOS FROM THE CATEGORY: