예제 #1
0
 function display($add_index = 0, $class = "")
 {
     $html = "";
     if (!sizeof($this->elements)) {
         return "";
     }
     #   if ($add_index)
     #     $html = $this->index();
     $html .= $this->listingStart($class);
     if (!empty($this->insideNav)) {
         $html .= sprintf('<tr><td colspan="%d">%s</td></tr>', sizeof($this->columns) + 1, $this->insideNav);
     }
     if (!$this->suppressHeader) {
         $html .= $this->listingHeader();
     }
     #    global $float_menu;
     #    $float_menu .= "<a style=\"display: block;\" href=\"#".htmlspecialchars($this->title)."\">$this->title</a>";
     if ($this->sort) {
         usort($this->elements, array($this, "cmp"));
     }
     if ($this->sortcolumn) {
         usort($this->elements, array($this, "cmp"));
     }
     foreach ($this->elements as $element) {
         $html .= $this->listingElement($element);
     }
     $html .= $this->listingEnd();
     if ($this->usePanel) {
         $p = new UIPanel($this->title, $html, $this->panelNav);
         return $p->display();
     }
     if (!$this->useShader) {
         return $html;
     }
     $shader = new WebblerShader($this->title);
     $shader->addContent($html);
     $shader->display = $this->initialstate;
     $html = $shader->shaderStart();
     $html .= $shader->header();
     $html .= $shader->dividerRow();
     $html .= $shader->contentDiv();
     $html .= $shader->footer();
     return $html;
 }
예제 #2
0
 function display($add_index = 0)
 {
     $html = "";
     if (!sizeof($this->elements)) {
         return "";
     }
     #   if ($add_index)
     #     $html = $this->index();
     $html .= $this->listingStart();
     $html .= $this->listingHeader();
     #    global $float_menu;
     #    $float_menu .= "<a style=\"display: block;\" href=\"#".htmlspecialchars($this->title)."\">$this->title</a>";
     if ($this->sort) {
         usort($this->elements, array("WebblerListing", "cmp"));
     }
     if ($this->sortcolumn) {
         usort($this->elements, array("WebblerListing", "cmp"));
     }
     foreach ($this->elements as $element) {
         $html .= $this->listingElement($element);
     }
     $html .= $this->listingEnd();
     $shader = new WebblerShader($this->title);
     $shader->addContent($html);
     $shader->display = $this->initialstate;
     $html = $shader->shaderStart();
     $html .= $shader->header();
     $html .= $shader->dividerRow();
     $html .= $shader->contentDiv();
     $html .= $shader->footer();
     return $html;
 }