
wcddl siteinfo
By: a guest on
May 8th, 2012 | syntax:
None | size: 2.38 KB | hits: 15 | expires: Never
<?php
/*BEGIN_INFO
Show the information abut sites<br />
by jomasaco
END_INFO*/
if(!defined("WCDDL_GUTS"))
exit;
$modEnabled = true; //Change to false if don't use
if($modEnabled) {
if(isset($core->site)) { //if search for an site
$siteinfos = '<h3>Site Information:</h3><br />';
}
if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows >= 1) { //if site url are ok and are in db and have downloads
$siteinfo = $core->fetchDownloads(true,false); //need this to get the site name, guess one dowload will be missing
$siteinfos .= '<b>Site URL:</b>'.$siteinfo['0']['surl'].'<br />
<b>Site Name:</b> '.$siteinfo['0']['sname'].'<br />';
} //try to change surl to siteLink see wath you like more
if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows <=0) { //Site exist but no downloads no needed but is here
$siteinfos .= '<b>Site URL:</b> http://'.$core->site.'<br />';
}
if(isset($core->site) && !isset($core->siteSQL)) { //if site url is wroung
$siteinfos .= '<b>Site URL: <font color="#ff0000">'.$core->site.'</font></b> ERROR: Invalid domain ';
}
if(isset($core->siteSQL) && !isset($core->siteSURL)) { //if site isn't present in DB
$siteinfos .= '<b>Site URL:</b> '.$core->site.', This site does\'t exist whit us';
}
if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows !=0) { //if site url are ok and are in db and have downloads
$siteinfos .= '<b>Site Downloads:</b> '.$core->numRows.' download'.($core->numRows==1?'':'s') .'<br />';
}
if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows <= 0) { //if site url are ok and are in db and don't have downloads
$siteinfos .= '<b>Site Downloads:</b> Theres no downloads from this site<br />';
}
$core->setTemplateVar("siteinfos",$siteinfos);
}
?>