コード例 #1
0
        			$handle = fopen($path,'w');
        			if($handle)
        			{
        				$funcs = new tmtCSV();
        				$funcs->TeamsToCSV($this,$params['bracket_id'],$params['tsel'],FALSE,$handle);
        				fclose($handle);
        			}
        			else
        			{
        				$newparms['tmt_message'] = $this->PrettyMessage('TODO CANT WRITE FILE',FALSE));
        			}
        		}
        		else
        		{
        */
        $funcs = new tmtCSV();
        $funcs->TeamsToCSV($this, $params['bracket_id'], $params['tsel']);
        return;
        //		}
    }
} elseif (isset($params['notify']) || isset($params['abandon'])) {
    $newparms = $this->GetEditParms($params, 'matchestab');
    if (!empty($params['msel'])) {
        if (isset($params['notify'])) {
            $tpltype = 1;
        } else {
            //isset($params['abandon'])
            $tpltype = 2;
        }
        $ok = TRUE;
        $sql = 'UPDATE ' . cms_db_prefix() . 'module_tmt_matches SET status=' . Tourney::TOLD . ' WHERE match_id=?';
コード例 #2
0
                $rows[$indx]['name'] = $params['plr_name'][$key];
                $rows[$indx]['contact'] = $params['plr_contact'][$key];
                $indx++;
            }
        } else {
            $rows = array();
        }
        break;
    case 12:
        //export selected member(s)
        $rows = array();
        foreach ($params['psel'] as $id) {
            $indx = array_search($id, $params['plr_order']);
            $rows[] = array('name' => $params['plr_name'][$indx], 'contact' => $params['plr_contact'][$indx]);
        }
        $funcs = new tmtCSV();
        $funcs->TeamsToCSV($this, $bracket_id, $thistid, $rows);
        return;
    default:
        $sql = 'SELECT * FROM ' . $pref . 'module_tmt_people WHERE id=? AND flags!=2 ORDER BY displayorder';
        $rows = $db->GetAll($sql, array($thistid));
        break;
}
$jsfuncs = array();
//context-specific-code accumulators
$jsloads = array();
if ($rows) {
    $pc = count($rows);
    $newo = $pc + 1;
    $players = array();
    $theme = cmsms()->get_variable('admintheme');