/** * getScroller * * Returns a view scroller * * @param object $obj * a page scroller configuration object * * @return string * html text */ function getScroller($obj) { $scrpos = $obj->start; $showlist = isset($obj->showlist) ? $obj->showlist : TRUE; $count = min($obj->limit + $obj->start, $obj->rowCount); $options = isset($obj->scrolleroptions) ? $obj->scrolleroptions : array(5, 10, 25, 50); ?> <div class = 'scrollerpanel'> <input type = 'hidden' class = 'ufo-viewscrollervalues' id = 'start' value = '<?php echo $obj->start; ?> '> <input type = 'hidden' class = 'ufo-viewscrollervalues' id = 'rowcount' value = '<?php echo $obj->rowCount; ?> '> <div> <span class = 'label'> <?php echo EasyContactFormsT::get('ScrollerRows'); ?> </span> </div> <?php if ($showlist) { ?> <div> <select class = 'scrollerlist ufo-viewscrollervalues' id = 'limit' onchange = 'ufo.filter(<?php echo $obj->jsconfig; ?> )'> <?php echo EasyContactFormsIHTML::getScrollerStepsList($obj->limit, $options); ?> </select> </div> <?php } else { ?> <input type = 'hidden' class = 'ufo-viewscrollervalues' id = 'limit' value = '<?php echo $obj->limit; ?> '> <?php } ?> <div style = 'white-space:nowrap;'> <span class = 'label'> (<?php echo $obj->start + 1; ?> -<?php echo $count . ' ' . EasyContactFormsT::get('Of') . ' ' . $obj->rowCount; ?> ) </span> </div> <div> <?php echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerFirst'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', -2)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_first" ')); ?> </div> <div> <?php echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerBack'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', -1)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_prev" ')); ?> </div> <div> <?php echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerForward'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', 1)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_next" ')); ?> </div> <div> <?php echo EasyContactFormsIHTML::getButton(array('title' => EasyContactFormsT::get('ScrollerLast'), 'events' => ' onclick = \'ufo.scroll(' . $obj->jsconfig . ', 2)\'', 'bclass' => 'ufo-imagebutton', 'iclass' => ' class = "icon_scroller_last" ')); ?> </div> </div> <?php }