e662bb5d015c6163c4075fde9bc2eb59e6463c59 kent Tue Dec 14 15:55:16 2010 -0800 Adding genome and assembly to hgHubConnect, and a submit button. Adding dbList to hubConnect table. diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index ba302b1..fb4a710 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -11,91 +11,131 @@ #include "cheapcgi.h" #include "htmshell.h" #include "hdb.h" #include "hui.h" #include "cart.h" #include "dbDb.h" #include "web.h" #include "trackHub.h" #include "hubConnect.h" static char const rcsid[] = "$Id: hgPcr.c,v 1.29 2009/09/23 18:42:17 angie Exp $"; struct cart *cart; /* The user's ui state. */ struct hash *oldVars = NULL; +static char *destUrl = "../cgi-bin/hgTracks"; static char *pageTitle = "UCSC Track Hub Connect"; +char *database = NULL; +char *organism = NULL; +boolean nameInCommaList(char *name, char *commaList) +/* Return TRUE if name is in comma separated list. */ +{ +if (commaList == NULL) + return FALSE; +int nameLen = strlen(name); +for (;;) + { + char c = *commaList; + if (c == 0) + return FALSE; + if (memcmp(name, commaList, nameLen) == 0) + { + c = commaList[nameLen]; + if (c == 0 || c == ',') + return TRUE; + } + commaList = strchr(commaList, ','); + if (commaList == NULL) + return FALSE; + commaList += 1; + } +} void hgHubConnect() /* Put up the list of hubs and other controls for the page. */ { -printf("
\n"); hDisconnectCentral(&conn); } void doMiddle(struct cart *theCart) /* Write header and body of html page. */ { cart = theCart; setUdcCacheDir(); cartWebStart(cart, NULL, pageTitle); hgHubConnect(); cartWebEnd(); } -char *excludeVars[] = {"Submit", "submit", "hc_one_url", NULL}; +char *excludeVars[] = {"Submit", "submit", "hc_one_url", hgHubConnectCgiDestUrl, NULL}; int main(int argc, char *argv[]) /* Process command line. */ { oldVars = hashNew(10); cgiSpoof(&argc, argv); cartEmptyShell(doMiddle, hUserCookie(), excludeVars, oldVars); return 0; }