From: Paul J R Date: Wed, 19 Sep 2012 02:06:14 +0000 (+1000) Subject: switching user references to link-to-user references X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=d179625f4cf5e9dea9e63b33ad6db0d2f8f999c3;p=gwvp-mini.git switching user references to link-to-user references --- diff --git a/gwvpmini/gwvpmini_admin.php b/gwvpmini/gwvpmini_admin.php index 55eae57..e289d45 100644 --- a/gwvpmini/gwvpmini_admin.php +++ b/gwvpmini/gwvpmini_admin.php @@ -51,8 +51,11 @@ function gwvpmini_AdminMainPageBody() $em = $val["email"]; $fn = $val["fullname"]; $ds = $val["desc"]; - echo "$un$em$fn$dsRemove Disable"; + $unlval = "$un"; + echo "$unlval$em$fn$dsRemove Disable"; } + + echo ""; echo ""; echo "

Create User

"; diff --git a/gwvpmini/gwvpmini_db.php b/gwvpmini/gwvpmini_db.php index f87751c..cf3e0fd 100644 --- a/gwvpmini/gwvpmini_db.php +++ b/gwvpmini/gwvpmini_db.php @@ -240,6 +240,36 @@ function gwvpmini_GetRepoId($reponame) return $retval; } + +function gwvpmini_GetRepoDescFromName($reponame) +{ + + /* + * $reposql = ' + CREATE TABLE "repos" ( + "repos_id" INTEGER PRIMARY KEY AUTOINCREMENT, + "repos_name" TEXT, + "repos_description" TEXT, + "repos_owner" INTEGER + )'; + + */ + + $conn = gwvpmini_ConnectDB(); + + $sql = "select repos_description from repos where repos_name='$reponame'"; + error_log("desc for name sql: $sql"); + + $res = $conn->query($sql); + + $retval = -1; + if(!$res) return -1; + foreach($res as $row) { + $retval = $row[0]; + } + + return $retval; +} function gwvpmini_GetRepoOwnerDetailsFromName($reponame) { diff --git a/gwvpmini/gwvpmini_view.php b/gwvpmini/gwvpmini_view.php index 70ce34d..007261e 100644 --- a/gwvpmini/gwvpmini_view.php +++ b/gwvpmini/gwvpmini_view.php @@ -51,14 +51,16 @@ function gwvpmini_RepoViewPageBody() $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 "
"; - echo "

".get_gravatar($owner["email"], 30, 'mm', 'g', true)."$repo_view_call - $owner_name

"; - echo "Desc
"; - echo "
"; + echo "

".get_gravatar($owner["email"], 30, 'mm', 'g', true)."$repo_view_call - $owner_name

"; + echo "$desc
"; //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(); diff --git a/gwvpmini/gwvpmini_web.php b/gwvpmini/gwvpmini_web.php index 54b34a4..8c2a5c1 100644 --- a/gwvpmini/gwvpmini_web.php +++ b/gwvpmini/gwvpmini_web.php @@ -202,7 +202,7 @@ function gwvpmini_LoginBuilder() if($login === false) { gwvpmini_SingleLineLoginForm(); } else { - echo "Hello ".$_SESSION["fullname"]." logout"; + echo "Hello ".$_SESSION["fullname"]." logout"; } } diff --git a/www/index.php b/www/index.php index 61e77b2..264e4e8 100644 --- a/www/index.php +++ b/www/index.php @@ -30,10 +30,10 @@ if(!gwvpmini_DBExists($db_name)) { gwvpmini_goWeb(); -echo "
";
+/*echo "
";
 print_r($_SERVER);
 print_r($_REQUEST);
 print_r($_SESSION);
-echo "
"; +echo "
";*/ ?> \ No newline at end of file