Esempio n. 1
0
void hotLinks()
/* Put up the hot links bar. */
{
hPrintf("<TABLE WIDTH=\"100%%\" BGCOLOR=\"#000000\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"1\"><TR><TD>\n");
hPrintf("<TABLE WIDTH=\"100%%\" BGCOLOR=\"#2636D1\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"2\"><TR>\n");

/* Home */
hPrintf("<TD ALIGN=CENTER><A HREF='/index.html' class='topbar' style='color:#FFFFFF;'"
        "Home</A></TD>");
//, orgEnc);

/* Sample View */
hPrintf("<TD ALIGN=CENTER><A HREF='../cgi-bin/gisaidSample' class='topbar' "
        "style='color:#FFFFFF;'>Sample View</A></TD>");

/* Sequence View */
if (hIsGisaidServer())
    {
    hPrintf("<TD ALIGN=CENTER><A HREF='../cgi-bin/hgTracks?db=%s' class='topbar' "
            "style='color:#FFFFFF;'>Sequence View</A></TD>", database);
    }
else
    {
    hPrintf("<TD ALIGN=CENTER><A HREF='../cgi-bin/hgGateway?db=%s' class='topbar' "
            "style='color:#FFFFFF;'>Sequence View Gateway</A></TD>", database);
    }

/* select Subjects */
hPrintf("<TD ALIGN=CENTER><A HREF='../cgi-bin/gisaidTable?gisaidTable.do.advFilter="
        "filter+%c28now+on%c29&fromProg=hgTracks' class='topbar' "
        "style='color:#FFFFFF;'>%s</A></TD>", '%', '%', "Select Subjects");

/* Blat */
hPrintf("<TD ALIGN=CENTER><A HREF='../cgi-bin/hgBlat?command=start' class='topbar' "
        "style='color:#FFFFFF;'>Blat</A></TD>");

/* Help */

if (cartVarExists(cart, advFilterVarName))
    {
    hPrintf("<TD ALIGN=CENTER><A HREF='/goldenPath/help/gisaidTutorial.html#SelectSubject' "
            "TARGET=_blank class='topbar' style='color:#FFFFFF;'>Help</A></TD>");
    }
else
    {
    hPrintf("<TD ALIGN=CENTER><A HREF='/goldenPath/help/gisaidTutorial.html#TableView' "
            "TARGET=_blank class='topbar' style='color:#FFFFFF;'>Help</A></TD>");
    }

hPuts("</TR></TABLE>");


hPuts("</TD></TR></TABLE>\n");
}
Esempio n. 2
0
void doMiddle(struct cart *theCart)
/* Write the middle parts of the HTML page.
 * This routine sets up some globals and then
 * dispatches to the appropriate page-maker. */
{
cart = theCart;

if (hIsGisaidServer())
    {
    validateGisaidUser(cart);
    }

if (cartVarExists(cart, confVarName))
    doConfigure(conn, colList);
else if (cartVarExists(cart, defaultConfName))
    doDefaultConfigure(conn, colList);
else if (cartVarExists(cart, hideAllConfName))
    doConfigHideAll(conn, colList);
else if (cartVarExists(cart, showAllConfName))
    doConfigShowAll(conn, colList);

else if (cartVarExists(cart, getSeqPageVarName))
    doGetSeqPage(conn, colList);

else if (cartVarExists(cart, advFilterVarName))
    doAdvFilter(conn, colList);
else if (cartVarExists(cart, advFilterClearVarName))
    doAdvFilterClear(conn, colList);

else if ((col = advFilterKeyPastePressed(colList)) != NULL)
    doAdvFilterKeyPaste(conn, colList, col);
else if ((col = advFilterKeyPastedPressed(colList)) != NULL)
    doAdvFilterKeyPasted(conn, colList, col);
else if ((col = advFilterKeyUploadPressed(colList)) != NULL)
    doAdvFilterKeyUpload(conn, colList, col);
else if ((col = advFilterKeyClearPressed(colList)) != NULL)
    doAdvFilterKeyClear(conn, colList, col);
else
    displayData(conn, colList);

cartRemovePrefix(cart, "gisaidTable.do.");

}
Esempio n. 3
0
void hotLinks()
/* Put up the hot links bar. */
{
hPrintf("<TABLE WIDTH=\"100%%\" BGCOLOR=\"#000000\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"1\"><TR><TD>\n");
hPrintf("<TABLE WIDTH=\"100%%\" BGCOLOR=\"#2636D1\" BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"2\"><TR>\n");

/* Home */
hPrintf("<TD ALIGN=CENTER><A HREF=\"/index.html\" class='topbar' style='color:#FFFFFF;'>"
        "Home</A></TD>");
//, orgEnc);

/* Blat */
hPrintf("<TD ALIGN=CENTER><A HREF=\"../cgi-bin/hgBlat?command=start\" class='topbar' "
        "style='color:#FFFFFF;'>Blat</A></TD>");

/* Sequence View */
if (hIsGisaidServer())
    {
    hPrintf("<TD ALIGN=CENTER><A HREF=\"../cgi-bin/hgTracks?db=%s\" class='topbar' "
            "style='color:#FFFFFF;'>Sequence View</A></TD>", database);
    }
else
    {
    hPrintf("<TD ALIGN=CENTER><A HREF=\"../cgi-bin/hgGateway?db=%s\" class='topbar' "
            "style='color:#FFFFFF;'>Sequence View Gateway</A></TD>", database);
    }
/* Table View */
hPrintf("<TD ALIGN=CENTER><A HREF=\"../cgi-bin/gisaidTable\" class='topbar' "
        "style='color:#FFFFFF;'>Table View</A></TD>");

/* Help */
hPrintf("<TD ALIGN=CENTER><A HREF=\"/goldenPath/help/gisaidTutorial.html#SubjectView\" "
        "target=_blank class='topbar' style='color:#FFFFFF;'>Help</A></TD>");

hPuts("</TR></TABLE>");
hPuts("</TD></TR></TABLE>\n");
}
Esempio n. 4
0
void webMain(struct sqlConnection *conn)
/* Set up fancy web page with hotlinks bar and
 * sections. */
{
struct section *sectionList = NULL;
char query[256];
struct sqlResult *sr;
char **row;

if (hIsGisaidServer())
    {
    validateGisaidUser(cart);
    }

sectionList = loadSectionList(conn);

puts("<FORM ACTION=\"/cgi-bin/gisaidSubj\" NAME=\"mainForm\" METHOD=\"GET\">\n");

/* display GISAID logo image here */
//printf("<img src=\"/images/gisaid_header.jpg\" alt=\"\" name=\"gisaid_header\" width=\"800\" height=\"86\" border=\"1\" usemap=\"#gisaid_headerMap\">");

//hPrintf("<br><br>");
hotLinks();

printf("<font size=\"5\"><BR><B>Subject View   </B></font>");

if (sameWord(curSubjId, ""))
    {
    printf("<BR><H3>Please enter a subject ID.\n");
    printf("<input type=\"text\" name=\"hgs_subj\" value=\"%s\">\n", curSubjId);
    cgiMakeButton("submit", "Go!");
    printf("</H3>");
    printf("For example: A/California/04/2009");fflush(stdout);
    }
else
    {
    sqlSafef(query, sizeof(query), "select subjId from %s.gisaidSubjInfo where subjId = '%s'",
    	  database, curSubjId);
    sr = sqlMustGetResult(conn, query);
    row = sqlNextRow(sr);
    sqlFreeResult(&sr);
    if (row != NULL)
    	{
    	printf(
	"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;search for another subject:&nbsp;");
    	printf("<input type=\"text\" name=\"hgs_subj\" value=\"\">\n");
	cgiMakeButton("submit", "Go!");
    	printSections(sectionList, conn, curSubjId);
    	}
    else
    	{
    	printf("<H3><span style='color:red;'>%s</span> is not a valid subject ID.</H3>", curSubjId);

    	printf("<H3>Please enter a valid subject ID.\n");
    	printf("<input type=\"text\" name=\"hgs_subj\" value=\"%s\">\n", "");
    	cgiMakeButton("submit", "Go!");
    	printf("<BR><BR>For example: GISAID4123");
	printf("</H3>");
	fflush(stdout);
	}
    }
puts("</FORM>\n");
}