The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
//////////
// Update Sources
/////////
include ("functions/global.php");
////////////
// Get the table prefix
///////////
$prefix = GetPrefix(); // get the table prefix so we know which tables to use
////////////
// Make a connection to the database
////////////
$db = ConnectDb(); // get the database connection going from global.php
$ip = GetIP();
$time = time();
require_once 'fetch/rss_fetch.inc';
// get the time
$time = time();
// get the rss feeds from the database table 'feedsource'
$getSources = $db->query("SELECT * FROM ".$prefix."feedsource ORDER BY lastUpdate");
while ($rssFeeds = $db->fetch_array($getSources)) {
$url = "$rssFeeds[rssLocation]";
$rss = fetch_rss( $url );
foreach ($rss->items as $item) {
$href = $item['link'];
$title = addSlashes($item['title']);
$description = addslashes($item['description']);
// check to see if this feed has only just been added
if ($rssFeeds[lastUpdate]) {
$checkHeadlines = $db->query("SELECT * FROM ".$prefix."headlines WHERE link='$href'");
$checkRubbishedHeadlines = $db->query("SELECT * FROM ".$prefix."headlinerubbishbin WHERE link='$href'");
if($db->num_rows($checkHeadlines) > 0) { }
elseif($db->num_rows($checkRubbishedHeadlines) > 0) { }
else {
$db->unbuffered_query("INSERT INTO ".$prefix."headlines VALUES ('', '$title', '$description', '$href',
'$rssFeeds[id]', '$time', '0')");
}
} // end of if rssFeeds[lastupdate]
else {
$db->unbuffered_query("INSERT INTO ".$prefix."headlinerubbishbin VALUES ('', '$title', '$description', '$href',
'$rssFeeds[id]', '$time')");
$db->unbuffered_query("UPDATE ".$prefix."feedsource SET lastupdate='$time' WHERE (id=$rssFeeds[id])");
}
} // end of foreach rss item
} // end of while feedsource
?>
//////////
// Update Sources
/////////
include ("functions/global.php");
////////////
// Get the table prefix
///////////
$prefix = GetPrefix(); // get the table prefix so we know which tables to use
////////////
// Make a connection to the database
////////////
$db = ConnectDb(); // get the database connection going from global.php
$ip = GetIP();
$time = time();
require_once 'fetch/rss_fetch.inc';
// get the time
$time = time();
// get the rss feeds from the database table 'feedsource'
$getSources = $db->query("SELECT * FROM ".$prefix."feedsource ORDER BY lastUpdate");
while ($rssFeeds = $db->fetch_array($getSources)) {
$url = "$rssFeeds[rssLocation]";
$rss = fetch_rss( $url );
foreach ($rss->items as $item) {
$href = $item['link'];
$title = addSlashes($item['title']);
$description = addslashes($item['description']);
// check to see if this feed has only just been added
if ($rssFeeds[lastUpdate]) {
$checkHeadlines = $db->query("SELECT * FROM ".$prefix."headlines WHERE link='$href'");
$checkRubbishedHeadlines = $db->query("SELECT * FROM ".$prefix."headlinerubbishbin WHERE link='$href'");
if($db->num_rows($checkHeadlines) > 0) { }
elseif($db->num_rows($checkRubbishedHeadlines) > 0) { }
else {
$db->unbuffered_query("INSERT INTO ".$prefix."headlines VALUES ('', '$title', '$description', '$href',
'$rssFeeds[id]', '$time', '0')");
}
} // end of if rssFeeds[lastupdate]
else {
$db->unbuffered_query("INSERT INTO ".$prefix."headlinerubbishbin VALUES ('', '$title', '$description', '$href',
'$rssFeeds[id]', '$time')");
$db->unbuffered_query("UPDATE ".$prefix."feedsource SET lastupdate='$time' WHERE (id=$rssFeeds[id])");
}
} // end of foreach rss item
} // end of while feedsource
?>