示例#1
0
 function __construct($uri)
 {
     $xml = new xml($uri, 'events');
     parent::__construct($xml->de(), 'event');
     $this->xml = $xml;
 }
示例#2
0
 function next()
 {
     return new row(parent::next(), $this->headers);
 }
示例#3
0
 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;
     }
 }
示例#4
0
 function next()
 {
     if ($e = parent::next()) {
         return new user($e);
     }
 }
示例#5
0
 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();
         }
     }
 }
示例#6
0
 function key()
 {
     return parent::key();
 }