Example #1
0
<?php

$dir = dirname(__FILE__);
require $_SERVER['DOCUMENT_ROOT'] . '/phpsvnclient/phpsvnclient.php';
$sources = array();
$dom = extractElements($dir . '/config.xml', $sources);
foreach ($sources['SOURCE'] as $source) {
    $user = $source->hasAttribute('user') ? $source->getAttribute('user') : NULL;
    $pass = $source->hasAttribute('pass') ? $source->getAttribute('pass') : NULL;
    $phpsvnclient = new phpsvnclient($source->getAttribute('url'), $user, $password);
    for ($i = 0; $i < $source->childNodes->length; ++$i) {
        if ($source->childNodes->item($i)->nodeType == 1) {
            $dir = $source->childNodes->item($i);
            $phpsvnclient->checkOut($dir->getAttribute('remote'), $dir->getAttribute('local'));
        }
    }
}
Example #2
0
                    </li>
                </ul>
MENU
);
if ($_SERVER['QUERY_STRING'] == '') {
    $file = 'index.php';
} else {
    $file = $_SERVER['QUERY_STRING'];
}
$file = realpath($_SERVER['DOCUMENT_ROOT'] . '/' . preg_replace('/\\.php$/', '.xml', $file));
/*
 * Eventually I think I'd like to use the DOM to assemble the entire page. But
 * for now it's only used to easily find child nodes.
 */
$page = extractElements($file, $variables);
$template = extractElements(realpath($_SERVER['DOCUMENT_ROOT'] . '/kuva/templates/default.xml'), $variables);
/**
 * void processStyle(DOMElement $style)
 * 
 * Organizes the contents of a 'style' element within the $styles
 * array according to which media ty$components['BODY']pe it is intended for, and
 * whether it links to an external stylesheet or contains one within
 * itself.
 * 
 * The $styles array contains two branches, 'ext' and 'int', within
 * each of which the media types indicated on all style elements
 * represented on that branch are keys associated with numeric arrays
 * of the corresponding style elements' representations.
 * 
 * External styles are recognized by the presence of the 'src'
 * attribute, and are represented within the 'ext' branch as the