function getData()
 {
     parent::getData();
     $this->wop = value_from_POST_GET(FMWK_PARAM_OP, 'sign');
     if (empty($this->asked_app)) {
         $this->asked_app = value_from_POST('asked_app', Null);
     }
     $op = $this->wop;
     $siteuser = $this->site->username();
     $this->user_signed = isset($siteuser);
     if ($this->user_signed) {
         $this->wusername = $siteuser;
     } else {
         $this->wusername = value_from_POST('username', Null);
         $this->wpassword = value_from_POST('password', Null);
     }
     switch ($op) {
         case 'logout':
             $auth = $this->site->auth;
             $auth->logoutUser($this->wusername);
             $this->site->redirectToApp($this->asked_app);
             exit;
             break;
         case 'login':
             if ($this->user_signed) {
                 $this->message .= "Already authentificated in";
                 $this->wop = 'info';
             } else {
                 $is_ok = FALSE;
                 if (!empty($this->wusername)) {
                     $auth = $this->site->auth;
                     if (isset($auth)) {
                         $is_ok = $auth->loginUser($this->wusername, $this->wpassword);
                     }
                 }
                 if ($is_ok) {
                     $this->message .= "Welcome";
                     $this->wop = 'login';
                     $this->site->redirectToApp($this->asked_app);
                 } else {
                     $this->message .= "Invalid login or password";
                     $this->wop = 'sign';
                 }
             }
             break;
         default:
             $this->wop = 'info';
             break;
     }
 }
 function getData()
 {
     global $SCMUSER;
     global $SCMLOGS;
     parent::getData();
     if ($this->use_tpl_engine) {
         $this->initTplEngine();
     }
     if (isset($_GET['repo'])) {
         $asked_repo = $_GET['repo'];
     } elseif (isset($_SESSION['repo'])) {
         $asked_repo = $_SESSION['repo'];
     }
     if (isset($asked_repo)) {
         if ($asked_repo == SCMLogs_repository_id()) {
             $_SESSION['repo'] = Null;
             unset($_SESSION['repo']);
         } else {
             SCMLogs_set_repository_by_id($asked_repo);
             $_SESSION['repo'] = SCMLogs_repository_id();
         }
     }
     $param =& $this->param;
     if ($this->is_signed()) {
         $param['is_signed'] = TRUE;
         $SCMUSER = $this->site->username();
         $param['DIS_User'] = $SCMUSER;
         $param['DIS_Title'] = " :: Welcome {$SCMUSER}";
     } else {
         $param['is_signed'] = FALSE;
         $param['DIS_Title'] = " :: Authentification";
         $SCMUSER = NULL;
     }
     include INC_DIR . "users.inc";
     //		if (!isset($SCMUSER) && isset ($_GET['user'])) { $SCMUSER = $_GET['user']; }
     //		if (!isset($SCMUSER) && isset ($_POST['user'])) { $SCMUSER = $_POST['user']; }
     //		if (!isset($SCMUSER) && isset ($_SESSION['user'])) { $SCMUSER = $_SESSION['user']; }
     /// Fill Data
     $repo =& SCMLogs_repository();
     $param['DIS_REPOSITORY'] = $repo->path;
     $param['DIS_REPO_BROWSING'] = SCMLogs_WebBrowsing();
     $html = '';
     if (isset($SCMLOGS['repositories'])) {
         $repos = $SCMLOGS['repositories'];
         if (count($repos) > 1) {
             $html .= '<form action="' . $this_url . '" method="GET"><input type="submit" value="&gt;&gt;" />';
             $html .= '<select name="repo">';
             foreach ($repos as $k_repoid => $v_repo) {
                 $html .= '<option value="' . $v_repo->id . '" ';
                 if ($v_repo->id == SCMLogs_repository_id()) {
                     $html .= ' SELECTED ';
                 }
                 $html .= '>' . $v_repo->id . '</option>';
             }
             $html .= '</select></form>';
         } else {
             $html .= "Repository " . SCMLogs_repository_id();
         }
     }
     $param['DIS_VAR_PAGE_REPO_LIST'] = $html;
 }