예제 #1
0
파일: list.io.php 프로젝트: suxinde2009/www
 public function get_list()
 {
     $page = 1;
     $template = new HTMLTemplate("base/list/list.html");
     if ($this->display_header == true) {
         $template->set_var("display_header", true);
     } else {
         $template->set_var("display_header", false);
     }
     $head .= "<table class='ListTable'><thead><tr>";
     foreach ($this->columns as $key => $value) {
         if ($value[3] == true) {
             $paramquery = $_GET;
             unset($paramquery['sortvalue']);
             unset($paramquery['sortmethod']);
             $params = http_build_query($paramquery, '', '&#38;');
             if ($value[2] != null) {
                 $head .= "<th width='" . $value[2] . "'  style='width:" . $value[2] . ";' class='" . $this->css_main_id . "Column' id='" . $this->css_main_id . "Column" . $value[1] . "'>" . "<a href='#'>" . $value[0] . "</a>" . "&nbsp;<a href='#'>" . "<img src='images/nosort.png' alt='' border='0' />" . "</a>" . "</th>";
             } else {
                 $head .= "<th class='" . $this->css_main_id . "Column' id='" . $this->css_main_id . "Column" . $value[1] . "'>" . "<a href='#'>" . $value[0] . "</a>" . "&nbsp;<a href='#'>" . "<img src='images/nosort.png' alt='' border='0' />" . "</a>" . "</th>";
             }
         } else {
             if ($value[0]) {
                 if ($value[2] != null) {
                     $head .= "<th width='" . $value[2] . "' style='width:" . $value[2] . ";'>" . $value[0] . "</th>";
                 } else {
                     $head .= "<th>" . $value[0] . "</th>";
                 }
             } else {
                 if ($value[2] != null) {
                     $head .= "<th width='" . $value[2] . "' style='width:" . $value[2] . ";'>&nbsp;</th>";
                 } else {
                     $head .= "<th>&nbsp;</th>";
                 }
             }
         }
     }
     $head .= "</tr></thead>";
     $template->set_var("top_left_text", "");
     $template->set_var("top_right_text", "");
     $template->set_var("head", $head);
     $template->set_var("ajax_handler", $this->ajax_handler);
     $template->set_var("ajax_run", $this->ajax_run);
     $template->set_var("ajax_count_run", $this->ajax_count_run);
     $template->set_var("argument_array", json_encode($this->argument_array));
     $template->set_var("get_array", serialize($_GET));
     $template->set_Var("css_main_id", $this->css_main_id);
     $template->set_var("entries_per_page", $this->entries_per_page);
     $template->set_var("column_array", json_encode($this->columns));
     $template->set_var("list_div", "<tbody id='" . $this->css_main_id . "'></tbody></table>");
     if ($this->display_footer == true) {
         $pagebar = "<div id='" . $this->css_main_id . "ActionSelect'></div><div class='ResultNextPageBar' id='" . $this->css_main_id . "PageBar'></div>";
         $template->set_var("pagebar", $pagebar);
     } else {
         $template->set_var("pagebar", "");
     }
     return $template->get_string();
 }