" . $myrow['FeedTitle'] . ""; else $TheData = $TheData . "\n"; } } return $TheData; } function getvidfeed($ID,&$RetVal,$db,&$Descr,&$VidTitle,&$ArticleID,&$AddedDate) { if ($ID == "" || $ID == "random" ) { $SQL = "SELECT * FROM videofeed WHERE MediaType=0 ORDER BY RAND();"; } else { $SQL = "SELECT * FROM videofeed WHERE FeedID=$ID;"; } $result = mysql_query($SQL,$db); $NumRows = mysql_num_rows($result); if ($result) { $myrow = mysql_fetch_array($result); $MainID = $myrow['FeedID']; $ArticleID = $myrow['ArticleID']; $TheTitle = $myrow['FeedTitle']; $VidTitle = $TheTitle; $EntryStamp = strtotime($myrow['EntryStamp']); $AddedDate = date("F j, Y",$EntryStamp); $Descr = $myrow['Descr']; $RetVal = $myrow['FeedID']; if (($Descr == "") && ($ArticleID !=0)) $Descr = getdescr($db,$ArticleID); $TheCode=$myrow['Javascript']; if ($TheCode=="") $TheCode=$myrow['FeedCode']; $Number = time() % count($NumRows); $Count=0; while ($myrow = mysql_fetch_array($result)) { if ($Count == $Number) { $TheTitle = $myrow['FeedTitle']; $MainID = $myrow['FeedID']; $VidTitle = $TheTitle; $ArticleID = $myrow['ArticleID']; $TheCode=$myrow['Javascript']; if ($TheCode=="") $TheCode=$myrow['FeedCode']; $EntryStamp = strtotime($myrow['EntryStamp']); $AddedDate = date("F j, Y",$EntryStamp); $RetVal = $myrow['FeedID']; $Descr = $myrow['Descr']; if ($Descr == "") $Descr = getdescr($db,$ArticleID); } } } else { $TheTitle = "Funny Subway Video"; $Descr = "The next Jarod"; $VidTitle = $TheTitle; $TheCode = ''; } $SelfURL = "http://video.bwebcentral.com/?FeedID=" . $MainID; return "

$TheTitle
 
$TheCode

"; } if ($FindFeed == "") { $FindFeed="random"; $ID="random"; } require_once("/home/bwebcent/public_html/articleswap/db.php"); require_once("/home/bwebcent/public_html/articleswap/utils.inc"); $ID = $FindFeed; $db = connectdb(); $RetVal =""; $Descr = ""; $PageTitle= ""; $ArticleID=0; $EntryDate=""; if (empty($FindFeed)) { $FindFeed="random"; $ID="random"; } $TheData =getvidfeed($FindFeed,$RetVal,$db,$Descr,$PageTitle,$ArticleID,$EntryDate); $TheRows = listfeeds($FindFeed,$db,0); $ShortDesc1 = substr($Descr,0,255); $ShortDesc2 = substr ($Descr,0,125); if ($Descr != "") echo "

$Descr

"; if ($TheData == "") $TheData = "random"; echo "

$TheData

"; ?>

Tell a friend    Stumble It!    Share on Facebook Facebook

More Movies: