Don't like ads? PRO users don't see any ads ;-)
Guest

wcddl siteinfo

By: a guest on May 8th, 2012  |  syntax: None  |  size: 2.38 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     <?php
  2.         /*BEGIN_INFO
  3.         Show the information abut sites<br />
  4.         by jomasaco
  5.         END_INFO*/
  6.         if(!defined("WCDDL_GUTS"))
  7.             exit;
  8.                
  9.             $modEnabled = true; //Change to false if don't use
  10.             if($modEnabled) {    
  11.      
  12.                if(isset($core->site)) { //if search for an site
  13.                    $siteinfos = '<h3>Site Information:</h3><br />';
  14.               }
  15.      
  16.                if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows >= 1) { //if site url are ok and are in db and have downloads
  17.                $siteinfo = $core->fetchDownloads(true,false); //need this to get the site name, guess one dowload will be missing
  18.                    $siteinfos .= '<b>Site URL:</b>'.$siteinfo['0']['surl'].'<br />
  19.                    <b>Site Name:</b> '.$siteinfo['0']['sname'].'<br />';
  20.                     } //try to change surl to siteLink see wath you like more
  21.                    
  22.                if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows <=0) { //Site exist but no downloads no needed but is here
  23.                    $siteinfos .= '<b>Site URL:</b> http://'.$core->site.'<br />';
  24.               }
  25.      
  26.                if(isset($core->site) && !isset($core->siteSQL)) { //if site url is wroung
  27.                     $siteinfos .= '<b>Site URL: <font color="#ff0000">'.$core->site.'</font></b>  ERROR: Invalid domain ';
  28.                     }
  29.                    
  30.                if(isset($core->siteSQL) && !isset($core->siteSURL)) { //if site isn't present in DB
  31.                    $siteinfos .= '<b>Site URL:</b> '.$core->site.', This site does\'t exist whit us';
  32.               }
  33.                
  34.                if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows !=0) { //if site url are ok and are in db and have downloads
  35.                    $siteinfos .= '<b>Site Downloads:</b> '.$core->numRows.' download'.($core->numRows==1?'':'s') .'<br />';
  36.                     }
  37.                    
  38.                     if(isset($core->siteSQL) && isset($core->siteSURL) && $core->numRows <= 0) { //if site url are ok and are in db and don't have downloads
  39.                    $siteinfos .= '<b>Site Downloads:</b> Theres no downloads from this site<br />';
  40.                     }
  41.                
  42.         $core->setTemplateVar("siteinfos",$siteinfos);
  43.         }
  44.         ?>