Exemplo n.º 1
0
 public function templateSiteDetail(WC_Site $site)
 {
     $this->module->includeVotes();
     //		$this->module->includeForums();
     //		GWF_Module::loadModuleDB('Forum', true, true);
     //		GWF_ForumBoard::init(true, true);
     //		GWF_Module::loadModuleDB('Votes', true);
     $time = $this->module->cfgLastPlayersTime();
     $tVars = array('site' => $site, 'boxcount' => $site->getBoxCount(), 'descr' => WC_SiteDescr::getDescription($site->getID()), 'site_quickjump' => $this->module->templateSiteQuickjumpDetail(), 'latest_players_time' => GWF_Time::humanDuration($time), 'latest_players' => $this->getLatestPlayers($time, $site->getID()), 'jquery' => Common::getGet('ajax') !== false, 'can_vote' => $site->canVote(GWF_User::getStaticOrGuest()));
     $ajax = isset($_GET['ajax']) ? '_ajax' : '';
     return $this->module->templatePHP('site_detail' . $ajax . '.php', $tVars);
 }
Exemplo n.º 2
0
 private function showSiteDetail($input)
 {
     $classname = trim(Common::substrFrom($input, ' ', ''));
     if (false === ($site = WC_Site::getByClassName($classname))) {
         die('Unknown Site ' . $classname);
     }
     require_once GWF_CORE_PATH . 'module/WeChall/WC_SiteDescr.php';
     $descr = WC_SiteDescr::getDescription($site->getID());
     //		$descr = $site->getVar('site_description');
     //		$message = $descr;
     $message = Common::stripMessage($descr, 148);
     die(sprintf('%s (%s challs): %s - %s', $site->displayName(), $site->getChallcount(), $site->getVar('site_url'), $message));
 }