function __construct($uri) { $xml = new xml($uri, 'events'); parent::__construct($xml->de(), 'event'); $this->xml = $xml; }
function next() { return new row(parent::next(), $this->headers); }
function onMove() { if (($row = $this->getRow()) && ($pos = param('pos')) && ($sec = ap::getClientSection($this->getSection()->getId())) && ($tl = new taglist($sec->getElement(), 'sec')) && $tl->move($tl->getById($row), $pos)) { $tl->getXML()->save(); return true; } }
function next() { if ($e = parent::next()) { return new user($e); } }
function updateImagesSize($form) { $formFields = $form->getFields('@type="image"'); foreach ($formFields as $ff) { $scheme = new xmlScheme(); if (($n = $scheme->getNode($ff->getRootElement()->getAttribute('target'))) && $n instanceof DOMElement) { $tl = new taglist($n, 'img'); foreach ($tl as $img) { if ($img->hasAttribute('width') && $img->hasAttribute('height')) { continue; } $fieldName = $ff->getName() . '_IMAGE_ID_' . $img->getAttribute('id'); if (($res = $ff->query('param[@name="' . htmlspecialchars($fieldName) . '"]')) && ($e = $res->item(0)) && ($src_rel = $ff->getImagePath(form::getURI($e)))) { list($w, $h) = getimagesize($src_rel); if ($w && $h) { $img->setAttribute('width', $w); $img->setAttribute('height', $h); } if (($prv = $tl->getXML()->query('preview', $img)->item(0)) && ($e = $res->item(1)) && ($src_rel = $ff->getImagePath(form::getURI($e)))) { list($w, $h) = getimagesize($src_rel); if ($w && $h) { $prv->setAttribute('width', $w); $prv->setAttribute('height', $h); } } } } $tl->getXML()->save(); } } }
function key() { return parent::key(); }