assign('pagetitle',$object -> getLabel()); $LSsearch = new LSsearch($LSobject,'LSselect'); $LSsearch -> setParamsFormPostData(); $LSsearch -> setParam('nbObjectsByPage',NB_LSOBJECT_LIST_SELECT); $multiple = ((isset($_REQUEST['multiple']))?1:0); $searchForm = array ( 'action' => $_SERVER['PHP_SELF'], 'recursive' => (! LSsession :: isSubDnLSobject($LSobject) ), 'multiple' => $multiple, 'labels' => array ( 'submit' => _('Search'), 'approx' => _('Approximative search'), 'recursive' => _('Recursive search'), 'level' => _('Level') ), 'values' => array ( 'pattern' => $LSsearch->getParam('pattern'), 'approx' => $LSsearch->getParam('approx'), 'recursive' => $LSsearch->getParam('recursive'), 'basedn' => $LSsearch->getParam('basedn') ), 'names' => array ( 'submit' => 'LSsearch_submit' ), 'hiddenFields' => array_merge( $LSsearch -> getHiddenFieldForm(), array( 'ajax' => 1, 'multiple' => $multiple ) ) ); $GLOBALS['Smarty']->assign('searchForm',$searchForm); $LSview_actions=array( array ( 'label' => 'Refresh', 'url' => 'view.php?LSobject='.$LSobject.'&refresh', 'action' => 'refresh' ) ); $GLOBALS['Smarty']->assign('LSview_actions',$LSview_actions); $LSsearch -> run(); $page=(int)$_REQUEST['page']; $page = $LSsearch -> getPage($page); $GLOBALS['Smarty']->assign('page',$page); $GLOBALS['Smarty']->assign('LSsearch',$LSsearch); $GLOBALS['Smarty']->assign('LSobject_list_objectname',$object -> getLabel()); if (isset($_REQUEST['ajax'])) { LSsession :: setTemplate('select_table.tpl'); } else { LSsession :: setTemplate('select.tpl'); } LSsession :: setAjaxDisplay(); } else { LSsession :: addErrorCode('LSsession_05','LSsearch'); } } } else { LSerror :: addErrorCode('LSsession_12'); } } else { LSsession :: setTemplate('login.tpl'); } // Affichage des retours d'erreurs LSsession :: displayTemplate(); if (isset($LSsearch)) { $LSsearch->afterUsingResult(); } ?>