Code:
if(!defined('ADMIN_FILE') and !defined('MODULE_FILE')) { header("Location: ../../../index.php"); die(); }
class seoDigital_Goods extends searchmodule {
function seoDigital_Goods(){
global $prefix;
$this->name = 'Digital_Goods';
$this->module = 'Digital_Goods';
$this->sql_table_with_prefix = $prefix.'_royal_memberships_downloads_deluxe';
}
function formatGoogleResult($result){
global $url;
return $this->formatGoogleURL($url['host'].$url['path'].'?name=Digital_Goods&op=getdetailed&lid='.$result['rid']);
}
function formatSitemapResult($result){
return '<a href="modules.php?name=Digital_Goods&op=getdetailed&lid='.$result['rid'].'">'.$result['title'].'</a>';
}
function doquery(){
global $prefix, $tblname, $db;
$q = $this->query[0][1];
foreach ($q as $query){
$db->sql_query('INSERT INTO '.$tblname.'
(`id`, `relevance`, `date`, `title`, `rid`, `desc`, `author`, `searchmodule`)
SELECT CONCAT("Digital_Goods", `lid`) AS `id`, \'1\', UNIX_TIMESTAMP(`date`),
`title`, `lid`, `description`, `submitter`, "Digital_Goods"
FROM '.$prefix.'_royal_memberships_downloads_deluxe
WHERE ((title like \'%'.$query.'%\')
OR (description like \'%'.$query.'%\'))');}
}
}
|