Пример #1
0
 function edit()
 {
     $this->args[0] = 0;
     $this->args[1] = 0;
     $this->args[2] = '';
     //'lang,tid:template';
     $this->args[3] = "<img src='images/datalibrary/%type%.png' style='float:left;padding-right:3px;'>%name%<br><small>%hsize%bytes</small><br style='clear:both;'>";
     $this->args[4] = L("Edit Document List");
     $this->args[5] = "id";
     $this->attrs[0] = DataLibrary::getDocuments();
     $this->attrs[3] = "<input type='file' name='doclist_upload' onchange='this.form.submit();' style='display:none;'>" . "<input type='button' value='" . L("Upload") . "' class='setsel_button' onclick=\"this.form['pe_f'].value='doclist';this.form['doclist_upload'].click();\">";
     return parent::edit();
 }
Пример #2
0
 function edit()
 {
     $s = !empty($this->args[0]) ? intval($this->args[0]) : 0;
     if (empty(Gallery::$sizes[$s])) {
         $s = 0;
     }
     $h = !empty($this->args[1]) ? intval($this->args[1]) : Gallery::$sizes[$s][1];
     if ($h > 128) {
         $h = 128;
     }
     $this->args[0] = 0;
     $this->args[1] = 0;
     $this->args[2] = '';
     $this->args[3] = "<img src='gallery/" . $s . "/%id%' alt='%id%' height='" . $h . "' style='margin:2px;'>";
     $this->args[4] = L("Edit Image List");
     $this->args[5] = "id";
     $this->attrs[0] = Gallery::getImages();
     $this->attrs[2] = "setsel_img";
     $this->attrs[3] = Gallery::uploadBtn();
     return parent::edit();
 }
Пример #3
0
 function edit()
 {
     $t = !empty($this->args[0]) ? $this->args[0] : [];
     if (is_string($t)) {
         if ($t[0] == '{' || $t[0] == '[') {
             $t = json_decode($t, true);
         } else {
             $t = explode(",", $t);
         }
     }
     if (!is_array($t)) {
         $t = [];
     }
     $this->args[0] = 0;
     $this->args[1] = 0;
     $this->args[2] = 'lang,tid:template';
     $this->args[3] = "<img src='images/lang_%lang%.png' alt='%lang%' style=''> %name%";
     $this->args[4] = L("Edit Page List");
     $this->attrs[0] = Page::getPages(0, $t);
     $this->attrs[1] = "setsel_boxw";
     return parent::edit();
 }