//echo "2222222222222222222";
//ini_set('display_errors',1);
//error_reporting(E_ALL);
//$forumpath = './forumbackup';
$forumpath = '../forum';
//$forumpatharticlepics = '../forumbackup';
$forumpatharticlepics = '../forum';
$newsfid2=270;
$newsfid=186;
$newsfid=141;
//176 - test forum
$newsfidarray = array(141,163,176,282,284,277,281,285,278,286,283,280,287,279,270);
$newsfidsshow = implode($newsfidarray,',');
//
//IN ($newsfidsshow)
//$defaultpic[163] = 'celeb-bb-2009-eye.jpg';
$defaultpic = array(
141=>'celeb-bb-2009-eye.jpg',
163=>'celeb-bb-2009-eye.jpg',
176=>'celeb-bb-2009-eye.jpg',
282=>'ben_adams.jpg',
284=>'coolio.jpg',
277=>'latoya_jackson.jpg',
281=>'lucy_pinder.jpg',
285=>'michelle_heaton.jpg',
278=>'mutya_buena.jpg',
286=>'terry_christian.jpg',
283=>'tina_malone.jpg',
280=>'tommy_sheridan.jpg',
287=>'ulrika_jonsson.jpg',
279=>'verne_troyer.jpg'
);
$imgarticlemaxwidth = 90;
include 'articlefunctions.php';
//$filenamenewsfp1 = '/var/www/cache/news-fp-articles1-sql-cache.txt';
$filenamenewsfp1 = '/var/www/cachenew/news-fp-articles1-old-sql-cache.txt';
$cachetimenews = 30;
//category
$numberofarticles = 20;
$numberofheadline = 4;
$num_words = 70;
$num_words2 = 50;
//$newquery = "SELECT t.* FROM $table_newssys t WHERE t.verified='1' AND t.fid IN ($newsfidsshow) ORDER BY t.headline DESC, t.dateline DESC LIMIT 0,$numberofarticles";
$newquery = "SELECT t.* FROM bbf_newssys t WHERE t.verified='1' AND t.fid IN ($newsfidsshow) ORDER BY t.headline DESC, t.dateline DESC LIMIT 0,$numberofarticles";
//$newquery = "SELECT t.* FROM bigbroxbk1.bbf_newssys t WHERE 1";
$querynew = outputfile($filenamenewsfp1, $cachetimenews, $newquery);
//$portal_posts = $querynew[0][0];
//print_r($querynew);
$shownews = '';
$shownewsrowh = '';
$shownewsrownonh = '';
//$newquery = "SELECT f.ficon FROM $table_forums f WHERE f.fid='$newsfid2' LIMIT 1";
//$newquery = "SELECT f.ficon FROM bbf_forums f WHERE f.fid='$newsfid2' LIMIT 1";
//$queryf = outputfile('/var/www/cache/news-fp-forumbackup-ficon1-sql-cache.txt', 1, $newquery);
//$queryf = outputfile('/var/www/cachenew/news-fp-forum-ficon1-sql-cache.txt', 1800, $newquery);
//$ficon = $queryf[0][0];
$ficon = 'big-brother-10.gif';
$shownewsstart = '
';
//echo $shownewsstart;
//echo 'countq'.count($querynew);
/*
if ($nonindexpage) {
$filenamecpmpic = "index2009column2cpmfetchgallerynewssinglepic$newpagetitle.html";
$cachefile = "/var/www/cache/".$filenamecpmpic;
$cachetime = 0;
if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile))
{
include($cachefile);
}
else {
ob_start();
//echo "1".$hmdescription;
include_once "/var/www/html/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/var/www/html/gallery/cpmfetch/cpmfetch_config.php");
echo "";
//$options = array("subtitle" => "Views: {{pHits}}");
$myarray =
array(
"rowstyle" =>"gallrow",
"imagestyle"=>"gallimg",
"imagewidth"=>"140",
"cellattributes"=>array("align"=>"center"),
"imageattributes" => array("border"=>"1","align"=>"center")
);
$myarray =
array(
"rowstyle" =>"gallrowsingle",
"imagestyle"=>"gallimgsingle",
"imagewidth"=>"150",
"cellattributes"=>array("class"=>"hmdescriptiontext"),
"imageattributes" => array("border"=>"1"),
"subtitle" => "$hmdescription"
);
$objCpm->cpm_viewRandomMediaFrom("album=$hmpageinfo[galleryid]:cat=73,75:keyword=$hmpageinfo[gallkeyword]",1, 1, $myarray);
$outinfopic = ob_get_contents();
ob_end_clean();
}
*/
/*
$shownewsrownewheader = '
aaaaaaaaaaaaa |
|
|
|
';
}
*/
if ($nonindexpage) {
/*
$hmdescription = nl2br("Angel
Age: 35
From: South London
Occupation: Professional Boxer/Artist
Originally from Russia, Angel is an ex-rock star who moved to England twelve years ago. She is passionate about boxing and fitness and runs a gym owned by her 'adopted' father, a former British & European boxing champion. Angel is a teetotal non-smoker and if she could pass any laws she would make gyms free and introduce a four-day working week.
Angel left home aged 24 to become an international rock star; she was well known in Russia and released one album. Angel admits to being attracted to beautiful women and clever men but is currently single.
Angel feels that once in the house she will fit somewhere between the leader and follower. She will approach the Big Brother experience like a boxing bout where you need to know your opponents strengths and weaknesses.");
*/
$hmdescription = nl2br($hmpageinfo[description]);
$shownewsrownewheader = '
|
|
';
$hmpageinfo[status] = ($hmpageinfo[status] == '') ? 'Current housemate' : $hmpageinfo[status];
/*
$shownewsrownewheader .= '
Status - '.$hmpageinfo[status].' |
|
|
';
*/
$shownewsrownewheader .= '
|
|
';
}
function substr_words ($paragraph, $num_words) {
$paragraph = explode (' ', $paragraph);
$paragraph = array_slice ($paragraph, 0, $num_words);
return implode (' ', $paragraph);
}
if ( count($querynew) != 0 ) {
//echo "1";
$rownumber = 0;
$totalvotes = 0;
$headlineid[] = '';
$shownewscolumn[] = '';
$bgcolourshow = $bgcolour[0] = '36007B';
$bgcolour[1] = '000000';
//while($row = $db->fetch_array($querynew)) {
foreach ($querynew as $whosonlineid=>$row) {
/*
if $row['headline'] == 1 {
$headlineid[] .= $row['nid'];
}
*/
//echo "a";
//print_r($row);
$formatteddate = date("G:i, M j Y", $row['dateline']);
$row['htmlmessage'] = stripslashes($row['htmlmessage']);
//for old news messages
if ( $row['dateline'] < 1231177696 && $row['fid'] == 141 ) {
$row['htmlmessage'] = postify2($row['message'], 'no', 'no', 'yes', 'yes', 'yes', 'yes');
$row['htmlmessage'] = stripslashes($row['htmlmessage']);
$row['subject'] = stripslashes($row['subject']);
}
$row['subject'] = stripslashes($row['subject']);
$countwords = count(explode(" ", $row['htmlmessage']));
//echo "rn".$rownumber.'_'.$row['headline'];
//if ($rownumber < 2) {
//for ($headlinerow=0;$headlinerow<2;$headlinerow++) {
if ( ($row['headline']==1 && $rownumber < $numberofheadline) || ($row['headline']==0 && ($rownumber < $numberofheadline)) ) {
//echo "b";
if ($row['image'] == '') {
$row['image'] = $defaultpic[$row[fid]];
} else {
$row['image'] = 'med_'.substr($row['image'], 19);
}
$row['htmlmessage'] = substr_words($row['htmlmessage'], $num_words);
if ($countwords > $num_words) {
$row['htmlmessage'] = $row['htmlmessage'].' - [Read more]';
}
//
//09:00, 01/01/09
//date("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
$shownewsrowh .= '
|
|
';
//
$bgcolourshow = ($bgcolourshow == $bgcolour[0]) ? $bgcolour[1] : $bgcolour[0];
//echo $shownewsrowh;
} else {
//}
// } else {
//$headline[0] = ;
//$headline[1] = ;
//$favhmname[$column] = $row[$favcolumn];
//$favvotes[$column] = $row['numberofmembers'];
//$totalvotes = $totalvotes + $favvotes[$column];
//echo 'rn-2_'.$rownumber-2;
$row['htmlmessage'] = substr_words($row['htmlmessage'], $num_words2);
//strip img and styles
$row['htmlmessage'] = strip_tags($row['htmlmessage']);
if ($countwords > $num_words2) {
$row['htmlmessage'] = $row['htmlmessage'].' - [Read more]';
}
//'.$row['subject'].'
if ($row['image'] == '') {
$row['image'] = $defaultpic[$row[fid]];
} else {
//$row['image'] = substr($row['image'], 19);
$row['image'] = 'th_'.substr($row['image'], 19);
}
//'.$bgcolourshow.'
//show only 1 or 2 sentences from message?
$columnnewsno = $rownumber-$numberofheadline;
$shownewscolumn[$columnnewsno] = '
|
';
//
// } //else rowcount >= 2
}
$rownumber++;
}
//print_r($shownewscolumn);
$divider = '
|
|
';
$colposition = 0;
//count remaining rows
$nonheadlinerowmax = ceil(($numberofarticles - $numberofheadline) /2); //rounded up
for ($nonheadlinerow=0;$nonheadlinerow<($nonheadlinerowmax-1);$nonheadlinerow++) {
$shownewsrownonh .= '
';
for ($i=0;$i<2;$i++) {
$shownewsrownonh .= $shownewscolumn[$colposition];
$colposition++;
}
$shownewsrownonh .= '
|
';
}
} // count > 0
$endnews = '
|
';
$showallnews .= $shownewsstart;
$showallnews .= $shownewsrownewheader;
$showallnews .= $shownewsrowh;
$showallnews .= $divider;
$showallnews .= $shownewsrownonh;
$showallnews .= $endnews;
echo $showallnews;
/*
echo '
';
*/
?>
|
echo '';
/*
function showtwitter($outtnew, $twittertitle='') {
echo '
'.$twittertitle.'Live Eviction Updates |
'.$outtnew.'
|
'
;
}
*/
/*
$outtnew = '
';
*/
include('/var/www/htmlnew/poll_info.php');
echo ' ';
//showtwitter($outtnew, $twittertitle='');
echo ' ';
?>
|
|
Big Brother 10 Gallery Pictures |
|
|