function get_pageturn() { $strR = ''; if ($this->sort != '') { #$this->init_table_builder(); $first = new htmlobject_input(); $first->name = $this->_var_prefix . 'action'; $first->value = '<<'; $first->type = 'submit'; $prev = new htmlobject_input(); $prev->name = $this->_var_prefix . 'action'; $prev->value = '<'; $prev->type = 'submit'; $next = new htmlobject_input(); $next->name = $this->_var_prefix . 'action'; $next->value = '>'; $next->type = 'submit'; $last = new htmlobject_input(); $last->name = $this->_var_prefix . 'action'; $last->value = '>>'; $last->type = 'submit'; if ($this->limit == 0) { $this->limit = $this->max; } if ($this->offset + $this->limit >= $this->max) { $next->style = 'visibility:hidden;'; $last->style = 'visibility:hidden;'; } if ($this->offset <= 0) { $first->style = 'visibility:hidden;'; $prev->style = 'visibility:hidden;'; } if ($this->offset + $this->limit < $this->max) { $max = $this->offset + $this->limit; } else { $max = $this->max; } $strR .= '<div class="pageturn_box">'; $strR .= '<table class="pageturn_table" cellpadding="0" cellspacing="0"></tr>'; $strR .= ' <td class="pageturn_left">' . $first->get_string() . $prev->get_string() . '</td>'; $strR .= ' <td class="pageturn_middle">'; $strR .= ' <span>' . ($this->offset + 1) . '</span> - '; $strR .= ' <span>' . $max . '</span> / '; $strR .= ' <span>' . $this->max . '</span>'; $strR .= ' </td>'; $strR .= ' <td class="pageturn_right">' . $next->get_string() . $last->get_string() . '</td>'; $strR .= '</tr></table>'; $strR .= '</div>'; } return $strR; }
function get_table_bottom() { $tr = ''; if (isset($this->bottom[0])) { $tr = new htmlobject_tr(); $tr->css = 'htmlobject_tr'; $tr->id = 'tr_' . uniqid(); $td = new htmlobject_td(); $td->colspan = $this->_num_cols; $td->type = 'td'; $td->css = 'htmlobject_td bottom'; $str = ''; foreach ($this->bottom as $key_2 => $v) { $html = new htmlobject_input(); $html->name = 'action'; $html->value = $v; $html->type = 'submit'; $str .= $html->get_string(); } $str .= join("", $this->_identifiers); $td->text = $str; $tr->add($td); } return $tr; }
function get_input($name, $value, $type = 'hidden') { $value = str_replace('"', '"', $value); $value = str_replace('<', '<', $value); $html = new htmlobject_input(); $html->name = $name; $html->value = $value; $html->type = $type; return $html->get_string(); }