예제 #1
0
 public function getValue()
 {
     $value = parent::getValue();
     if (!isset($this->url)) {
         $this->url = str_ireplace(PUBLIC_PATH, '', $this->destination);
     }
     $values = explode('*', $value);
     if (!$this->getAttrib('multi')) {
         $values = array($values[0]);
     }
     foreach ($values as $num => $v) {
         $ss = substr($v, 0, 2);
         if ($ss == 'u|') {
             $values[$num] = $v = str_replace('u|', '', $v);
             //$this->getView()->inlineScript('script', 'zuf.add("'.$this->getName().'", "'.$v.'", "'.$this->url.'", '.(int)$this->isRequired().');');
         } else {
             if ($ss == 'd|') {
                 $v = str_replace('d|', '', $v);
                 @unlink($this->destination . '/' . $v);
                 unset($values[$num]);
                 $this->setValue(implode('*', $values));
                 //$this->getView()->inlineScript('script', 'zuf.remove("'.$this->getName().'", "'.$v.'");');
             }
         }
     }
     return implode('*', $values);
 }