Advertisement
Guest User

Untitled

a guest
Jan 7th, 2011
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.17 KB | None | 0 0
  1. #ifndef CBOOK
  2. #define CBOOK
  3.  
  4. #define CBOOK_CONFFILE              "cbook.conf"
  5.  
  6. #define DQUERY_STATE_KEY            0
  7. #define DQUERY_STATE_VALUE          1
  8. #define DURI_STATE_WAIT             0
  9. #define DURI_STATE_FIRST            1
  10. #define DURI_STATE_SECOND           2
  11.  
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. #include <stdarg.h>
  15. #include <string.h>
  16. #include <ctype.h>
  17. #include <confuse.h>
  18. #include <glib.h>
  19. #include <my_global.h>
  20. #include <mysql.h>
  21.  
  22. struct {
  23.     char *mysqlHostname;
  24.     char *mysqlUsername;
  25.     char *mysqlPassword;
  26.     char *mysqlDatabase;
  27.     char *siteName;
  28. } config;
  29.  
  30. MYSQL *mysql;
  31. GHashTable *queryHash;
  32.  
  33. char *rasprintf(const char *f, ...);
  34. char *htmlEscape(char *s);
  35. void printHtml(char *s);
  36. void parseConf();
  37. void myerror();
  38. char *myescape(char *q);
  39. void fail(const char *s);
  40. void myquery(const char *f, ...);
  41. void createDatabase();
  42. void pageHeader(char *title);
  43. void pageFooter();
  44. void pageHome();
  45. void pageSessions();
  46. void parseQueryString();
  47. void printQueryHash();
  48. void printQueryHashHelper(gpointer key, gpointer value, gpointer user);
  49. char *urlDecode(char *s);
  50.  
  51. static const char *constDays[] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" };
  52.  
  53. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement