Working banner advertising module for FF v.3

Download for free the Working banner advertising module for Fruit Farm v.3.
The principle of operation is that the user buys an advertising space. Its advertising will be placed in the place where the administration will allocate a place on the project to display advertising.
The display of advertising directly depends on the ratio of the number of clicks to the number of banner impressions.
Let your project become even more interesting!

Detailed installation instructions :

1) copy the files to the root of the site

2) adding a query to the database
CREATE TABLE IF NOT EXISTS `db_baners` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT ‘0’,
`time_add` int(11) NOT NULL DEFAULT ‘0’,
`type` int(1) NOT NULL DEFAULT ‘1’,
`kolvo` int(11) NOT NULL DEFAULT ‘0’,
`url` varchar(255) NOT NULL,
`baner` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

3) to the file /classes/_class.func.php adding

public function rotator()
{
global $db;

$db->query(“SELECT * FROM db_baners”);

if ($db->NumRows())
{
while ($row = $db->FetchAssoc())
{
if ($row[‘time_add’] + ($row[‘kolvo’] * 86400) < time())
{
// $db2 = new db($config->HostDB, $config->UserDB, $config->PassDB, $config->BaseDB);

$db->query(“DELETE FROM db_baners WHERE id = ‘”.$row[‘id’].”‘”);

continue;
}

$link_baner[] = $row;
}
}

if ($link_baner)
{
shuffle($link_baner);

$d = $link_baner[0][‘type’] == 1 ? $link_baner[0][‘url’] : ‘/gobaner.php?link=’.$link_baner[0][‘id’];

echo ‘<div id=”rollbaner”><a href=”‘.$d.'” target=”_blank” title=”‘.$link_baner[0][‘url’].'”><img src=”‘.$link_baner[0][‘baner’].'” width=”468″ height=”60″ alt=”” /></a></div>’;
}
else
{
echo'<div id=”rollbaner”><a href=”/account/baners” target=”_blank” title=”Place banner”><img src=”/images/468×60.jpg.png” width=”468″ height=”60″ alt=”” /></a></div>’;
}
}

4) to the file /inc/_user_menu.php adding
<div class=”field-gr”><a href=”/account/baners”>Banners</a></div>

5) To the file pages/_account.php adding
case “baners”: include(“pages/account/_baners.php “); break; // Banners

6) to the file.htaccess adding
RewriteRule ^account/baners(/?)+$ index.php?menu=account&sel=baners [L]

7) to show the banner in the right place, write <?php $func->rotator(); ?>

 

 

 



 

Check Also

Online Gaming Platform by Swissbet - Download

Online Gaming Platform by Swissbet – Download

Swissbit online Gaming platform The Swissbit gaming platform is specially designed to combine various gaming …

Leave a Reply

Your email address will not be published. Required fields are marked *