$em = $val["email"];
$fn = $val["fullname"];
$ds = $val["desc"];
- echo "<tr><td>$un</td><td>$em</td><td>$fn</td><td>$ds</td><td><a href=\"$BASE_URL/admin/removeuser&id=$id\">Remove</a> <a href=\"$BASE_URL/admin/disableuser&id=$id\">Disable</a></td></tr>";
+ $unlval = "<a href=\"$BASE_URL/user/$un\">$un</a>";
+ echo "<tr><td>$unlval</td><td>$em</td><td>$fn</td><td>$ds</td><td><a href=\"$BASE_URL/admin/removeuser&id=$id\">Remove</a> <a href=\"$BASE_URL/admin/disableuser&id=$id\">Disable</a></td></tr>";
}
+
+
echo "</table>";
echo "</td><td>";
echo "<h3>Create User</h3>";
return $retval;
}
+
+function gwvpmini_GetRepoDescFromName($reponame)\r
+{\r
+\r
+ /*\r
+ * $reposql = '\r
+ CREATE TABLE "repos" (\r
+ "repos_id" INTEGER PRIMARY KEY AUTOINCREMENT,\r
+ "repos_name" TEXT,\r
+ "repos_description" TEXT,\r
+ "repos_owner" INTEGER\r
+ )';\r
+\r
+ */\r
+\r
+ $conn = gwvpmini_ConnectDB();\r
+\r
+ $sql = "select repos_description from repos where repos_name='$reponame'";
+ error_log("desc for name sql: $sql");\r
+\r
+ $res = $conn->query($sql);\r
+\r
+ $retval = -1;\r
+ if(!$res) return -1;\r
+ foreach($res as $row) {\r
+ $retval = $row[0];\r
+ }\r
+\r
+ return $retval;\r
+}
\r
function gwvpmini_GetRepoOwnerDetailsFromName($reponame)\r
{\r
$sname = $_SERVER["SERVER_NAME"];
$owner = gwvpmini_GetRepoOwnerDetailsFromName($repo_view_call);
+ $desc = gwvpmini_GetRepoDescFromName($repo_view_call);
$owner_name = $owner["username"];
error_log("STUFF:".print_r($owner,true));
+ $cloneurl = "git clone $proto$sname$BASE_URL/git/$repo_view_call.git";
+ echo "<textarea rows=1 cols=".strlen($cloneurl).">$cloneurl</textarea><br>";\r
- echo "<br><h2>".get_gravatar($owner["email"], 30, 'mm', 'g', true)."$repo_view_call - $owner_name</h2>";
- echo "<b>Desc</b><br>";
- echo "<textarea rows=1 cols=100>git clone $proto$sname$BASE_URL/git/$repo_view_call.git</textarea><br>";
+ echo "<h2>".get_gravatar($owner["email"], 30, 'mm', 'g', true)."$repo_view_call - $owner_name</h2>";
+ echo "<b>$desc</b><br>";
//echo "command: git log --git-dir=$repo_base/$repo_view_call.git --pretty=format:\"%H\" -10";
$rs = popen("git --git-dir=$repo_base/$repo_view_call.git log --pretty=format:\"%H\" -10", "r");
$commitids = array();
if($login === false) {
gwvpmini_SingleLineLoginForm();
} else {
- echo "Hello ".$_SESSION["fullname"]." <a href=\"$BASE_URL/logout\">logout</a>";
+ echo "Hello <a href=\"$BASE_URL/user/".$_SESSION["username"]."\">".$_SESSION["fullname"]."</a> <a href=\"$BASE_URL/logout\">logout</a>";
}
}
gwvpmini_goWeb();
-echo "<pre>";
+/*echo "<pre>";
print_r($_SERVER);
print_r($_REQUEST);
print_r($_SESSION);
-echo "</pre>";
+echo "</pre>";*/
?>
\ No newline at end of file