/************************************************************************/ /* */ /* INCLUDE: common.h AUTHOR: Tim Sabin */ /* DESCRIPTION: common.h contains the function prototypes and other */ /* items necessary for the file "common.ec". */ /* DATE CREATED: 09/03/1996 LAST UPDATED: 11/25/1996 */ /* */ /************************************************************************/ #ifndef COMMON_H #define COMMON_H #define NEXT_RECORD 1 #define PREV_RECORD 2 #define FIRST_RECORD 3 #define LAST_RECORD 4 #define NUM_RECORD 5 #define LINK -1 #define LIST -1 #define SELECT TRUE #define NO_SELECT FALSE int informixEnv (void); void htmlErrorMsg (void); #define paragraph() cgi_print_text ("\n

") void boldPrint (char *msg); void htmlTitle (char *brTitle, char *backFile, char *iconFile, char *pgTitle1, char *pgTitle2); void sectionTitle (char *title); void formBegin (void); #define formEnd() cgi_print_text ("\n\n") void fillHidden (char *name, char *textFill); void fillText (int newForm, char *name, int size, int maxSize, char *textFill); void fillPassword (char *name, int size, int maxSize); void fillTextArea (int newForm, char *name, int rows, int cols, char *textFill); void fillSelectBegin (char *name, int size); void fillSelectAdd (int newForm, char *textFill, int selected); #define fillSelectEnd() cgi_print_text ("\n") #define fillPopupBegin(name) fillSelectBegin (name, 0) #define fillPopupAdd(newForm,textFill,select) \ fillSelectAdd (newForm,textFill,select) #define fillPopupEnd fillSelectEnd void fillCheckbox (int checked, char *name, char *title); void fillRadiobutton (char *boxName, char *buttonLabel, int def); void fillReset (char *name); void fillButton (char *name); # define fillQueryButton() fillButton ("Query"); void fillHelp (char *name); void traverseButtons (void); void remainCount (char *table, int newForm); void getCount (char *table); #define border() cgi_print_text ("
\n") #define endBorder() cgi_print_text ("

\n") int traverseOn (void); int traverseList (int buttonNum, char *table, ...); void initSqlTable (char *table); void queryTable (char *table, char *linkTable, char *fields, ...); int fetch (char *table, int whichRecord, ...); t_cgi_entry *queryFloat (float flNum); t_cgi_entry *queryDouble (double dblNum); t_cgi_entry *queryShort (short shNum); t_cgi_entry *queryInt (int intNum); void clearList (void); void wordWrap (char *str, int maxLen); void unWordWrap (char *str); void link (char *before, char *hyper, char *where, char *after); char *hashName (char *table, char *user); void spaceFill (char *string, int howLong); int add (char *table, ...); int removeRec (char *table, ...); int updateRec (char *table, int recNum, ...); #endif