");
- puts("");
-
- if (isEncode)
- printf("Home | \n");
- else
- {
- printf("Home | \n", uiState);
- if (isGsid)
- printf("Subject View | \n",
- uiState);
- else
- printf("Genomes | \n",
- uiState);
-
- if (endsWith(scriptName, "hgTracks") || endsWith(scriptName, "hgGene") ||
- endsWith(scriptName, "hgTables") || endsWith(scriptName, "hgTrackUi") ||
- endsWith(scriptName, "hgSession") || endsWith(scriptName, "hgCustom") ||
- endsWith(scriptName, "hgHubConnect") ||
- endsWith(scriptName, "hgc") || endsWith(scriptName, "hgPal"))
- printf("Genome Browser | \n",uiState,TRACK_SEARCH);
-
- if (haveBlat && !endsWith(scriptName, "hgBlat"))
- printf("Blat | \n",theCart ? "&" : "", uiState+1 );
- }
-
- if (!isGsid && !hIsCgbServer()) // disable TB for both GSID and CGB servers
- {
- char *table = (theCart == NULL ? NULL :
- (endsWith(scriptName, "hgGene") ?
- cartOptionalString(theCart, "hgg_type") :
- cartOptionalString(theCart, "g")));
- if (table && theCart &&
- (endsWith(scriptName, "hgc") || endsWith(scriptName, "hgTrackUi") ||
- endsWith(scriptName, "hgGene")))
- {
- struct trackDb *tdb = hTrackDbForTrack(db, table);
- if (tdb != NULL)
- printf("",
- uiState, tdb->grp, tdb->track, tdb->table);
- else
- printf(" | ",
- uiState);
- trackDbFree(&tdb);
- }
- else
- printf(" | ",
- uiState, theCart ? "&" : "?" );
- printf("Tables | \n");
- }
-
- if (!endsWith(scriptName, "hgNear") && db != NULL && hgNearOk(db))
- {
- if (isGsid)
- printf("Table View | \n",
- uiState);
- else
- printf("Gene Sorter | \n",
- uiState);
- }
- if ((!endsWith(scriptName, "hgPcr")) && (db == NULL || hgPcrOk(db)))
- printf("PCR | \n",uiState);
- if (endsWith(scriptName, "hgGenome"))
- printf(""
- "PDF/PS | \n",uiState);
- if (endsWith(scriptName, "hgHeatmap"))
- printf(""
- "PDF/PS | \n",uiState);
-#ifndef GBROWSE
- if (wikiLinkEnabled() && !endsWith(scriptName, "hgSession"))
- printf(""
- "Session | \n",uiState, theCart ? "&" : "?" );
-#endif /* GBROWSE */
- if (!isGsid)
- printf("FAQ | ");
- if (!isGsid)
- {
- if (endsWith(scriptName, "hgBlat"))
- printf("Help | \n");
- }
+ jsIncludeFile("jquery.js", NULL);
+ puts(menuStr);
}
- printf(" | \n");
- // last column squeezes other columns left
- puts(" |
\n");
-
-#endif
if (endsWith(scriptName, "hgGateway") && geoMirrorEnabled())
{
// Show an opt-out alert if user is on a host to which user has been automatically redirected (just once, right after they have been redirected)
char *source = cgiOptionalString("source");
char *redirect = cgiOptionalString("redirect");
if (source != NULL && redirect != NULL && sameString(redirect, "auto"))
{
char *domain = cgiServerName();
char *port = cgiServerPort();
// We don't bother maintaining stuff in request URI, because it may contain items like hgsid and other host specific values
int newUriSize = 2048;
char *newUri = needMem(newUriSize);
// TODO what about https?
safef(newUri, newUriSize, "http://%s:%s/cgi-bin/hgGateway?redirect=manual&source=%s", source, port, domain);