+ $_SESSION[$this->name . '_page'] = $curpage;
+ if ($curpage != $oldpage) {
+ pl_redirect($baseurl . '/' . $this->inv_lookup[$curpage]);
+ } else if (!isset($page)) {
+ $page = $this->getPage($curpage);
+ }
+ if ($mode == 'ajax') {
+ header('Content-Type: text/html; charset=utf-8');
+ $smarty->changeTpl($page->template(), NO_SKIN);
+ } else {
+ $smarty->changeTpl($this->layout);
+ }
+ $smarty->assign('pages', $this->titles);
+ $smarty->assign('current', $curpage);
+ $smarty->assign('lookup', $this->inv_lookup);
+ $smarty->assign('stateless', $this->stateless);
+ $smarty->assign('wiz_baseurl', $baseurl);
+ $smarty->assign('wiz_ajax', $this->ajax);
+ $smarty->assign('tab_width', (int)(99 / count($this->pages)));