Exemple #1
0
 $txthide = $tLang->lang('btn_hide');
 $txtscored = $tLang->lang('btn_scored');
 $txtunscore = $tLang->lang('btn_unscored');
 $site = new WC_Site(array());
 $regat = new WC_RegAt(array());
 foreach ($tVars['linked'] as $data) {
     $site instanceof WC_Site;
     $site->setVars($data);
     $regat->setVars($data);
     $siteid = $site->getVar('site_id');
     //		$regat = WC_RegAt::getRegatRow($userid, $siteid);
     $btn_update = sprintf('<input type="submit" name="update[%s]" value="%s" />', $siteid, $tLang->lang('btn_update'));
     echo GWF_Table::rowStart();
     echo GWF_Table::column($site->displayStatus());
     echo GWF_Table::column($site->displayIcon(1.0) . '&nbsp;' . $site->displayLink());
     echo GWF_Table::column($regat->getVar('regat_challsolved'), 'gwf_num');
     echo GWF_Table::column($site->getVar('site_challcount'), 'gwf_num');
     echo GWF_Table::column($site->displayAutoUpdate());
     echo GWF_Table::column($btn_update);
     echo GWF_Table::column($regat->getVar('regat_score'), 'gwf_num');
     $perc = $regat->getPercent($site->getOnsiteScore());
     $color = WC_HTML::getColorForPercent($perc);
     echo GWF_Table::column(sprintf('<span style="color: #%s">%.02f%%</span>', $color, $perc), 'gwf_num');
     echo GWF_Table::column($regat->displayLastDate(), 'gwf_date');
     echo GWF_Table::column($regat->displayOnsiteName());
     if ($regat->isOnsitenameHidden()) {
         echo GWF_Table::column(sprintf('<input type="submit" name="showname[%s]" value="%s" />', $siteid, $txtshow));
     } else {
         echo GWF_Table::column(sprintf('<input type="submit" name="hidename[%s]" value="%s" />', $siteid, $txthide));
     }
     //		if ($regat->isScored()) {