cgibase.c 823 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. ---- Cgi principal ----
  3. */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include "cgi_func.h"
  8. #include "cgi_theme_gest.h"
  9. #include "test_serre.h"
  10. char cgi_BaseName[256];
  11. int main(int argc, char *argv[])
  12. {
  13. cgi_start();
  14. cgi_parseparam();
  15. cgitheme_init();
  16. strncpy(cgi_BaseName,argv[0], 256);
  17. if ( (cgi_getparam("restart")) != NULL )
  18. {
  19. //system("ls");
  20. cgi_printfile("./files/restart.file");
  21. }
  22. else if (serre_test_start()==-1)
  23. {
  24. cgi_parsefile("./files/error-noserver.file");
  25. }
  26. else
  27. {
  28. cgi_parsefile("./files/base-start.file");
  29. cgi_parsefile("./files/all.file");
  30. cgi_parsefile("./files/base-end.file");
  31. }
  32. cgitheme_close();
  33. cgi_cleanup();
  34. return 0;
  35. }