コード例 #1
0
 function show_output($input)
 {
     global $RELPATH, $COREPATH, $menuitem;
     if (!isset($this->info) && $input) {
         $this->info = $this->get_info_iname($input);
         $menuitem = $this->info['id'];
     }
     if (!$this->info) {
         redirect($RELPATH);
     }
     $this->tpl->set_var('page_title', $this->info['name']);
     switch ($this->info['type']) {
         case 2:
             // html
             return $this->info['html'];
             break;
         case 3:
             // block
             include_once $RELPATH . 'blocks/class/block.class.php';
             $table = new block();
             return $table->show($this->info['block_id']);
             break;
         case 4:
             // include
             return implode(" ", @file($this->info['include']));
             break;
         case 5:
             // column
             if (!$this->component) {
                 $this->create_component();
             }
             // split module table method
             $names = explode('-', $this->info['column_id']);
             if (empty($names[2])) {
                 $names[2] = 'show_output';
             }
             if (empty($names[3])) {
                 $names[3] = '';
             }
             $method = $names[2];
             $param = $names[3];
             return $this->component->{$method}($param);
             break;
     }
 }