Пример #1
0
        $competitionsbyname[$comp->path] = $comp;
        $competitionsbyid[$comp->id] = $comp;
    }
    $comp->found = 'true';
    //echo "<p>Found $fullname. <br/>".$comp->Dump()."</p>";
}
$configxml = new DOMDocument();
$configxml->load($configfilelocation);
$doc = $configxml->documentElement;
foreach ($doc->childNodes as $item) {
    // Only care about series and competitions
    if ('competition' == $item->nodeName) {
        // Create the competition
        $comp = new Competition();
        // Load the competition from the XML
        $comp->load($item);
        //echo $comp->Dump();
        $competitionsbyname[$comp->path] = $comp;
        $competitionsbyid[$comp->id] = $comp;
    } else {
        if ('series' == $item->nodeName) {
            $series = new Series($item);
            //echo $series->Dump();
            $seriesbyid[$series->id] = $series;
        }
    }
}
find_files($basepath, "/competition.egw/", 'found_competition');
// If we are receiving postdata then we need to adjust the state of the objects and recreate the XML
if (array_key_exists("ConfigurationChanges", $_REQUEST)) {
    $newconfigxml = new DOMDocument();