コード例 #1
0
 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;
 }
コード例 #2
0
}
if (isset($_POST['user'])) {
    $w_user = $_POST['user'];
} elseif (isset($_GET['user'])) {
    $w_user = $_GET['user'];
}
if (isset($_GET['confirm'])) {
    $w_confirm = $_GET['confirm'] == 'yes';
} else {
    $w_confirm = false;
}
if (isset($_POST['action'])) {
    $w_action = $_POST['action'];
}
if (isset($asked_repo)) {
    if ($asked_repo == SCMLogs_repository_id()) {
    } else {
        SCMLogs_set_repository_by_id($asked_repo);
    }
}
$repo =& SCMLogs_repository();
$msg_exists = "<span class=\"valid\">EXISTS</span>";
$msg_missing = "<span class=\"error\">MISSING</span>";
$msg_not_found = "<span class=\"warning\">NOT FOUND</span>";
$last_check_had_error = false;
function adminCheckPath($path, $required = true)
{
    global $msg_exists, $msg_not_found, $msg_missing;
    global $last_check_had_error;
    $last_check_had_error = false;
    $res = "{$path}";