#include <stdio.h>
#include <string.h>
#include <unistd.h>		/* for getcwd() */
#include <dirent.h>		/* Directory information */
#include <sys/types.h>
#include <stdlib.h>		/* for rand() */
#include <ctype.h>		/* for isdigit() .. */
#include <sys/stat.h>		/* for mkdir() */


#include "global.h"

#include "manhat-lib/shared_course_search.h"
#include "manhat-lib/shared_cs_util.h"
#include "manhat-lib/shared_cs_course_search.h"
#include "manhat-lib/shared_super_menu.h"



int
main()
{
   char key[MAX_KEY + 1];
   COURSE_SEARCH_NODE *course_head;
   COURSE_SEARCH_PARAMS params;
   SESSION user;

   cs_cgi_init();   
   course_head = read_search_course_parameters(key, &params);
   validate_super_key(key, &user);
   set_admin_page(&user, key, 0, "super_config_course_list");  /* shared_super_menu.c */
  cs_set_searched_courses (key, course_head, &params, "super_config_course_list"); /* shared_cs_course_search.h */

   free_subdir_list(params.subdir_head);  /* shared_course_search.c */
   free_course_search_list(course_head);   /* shared_course_search.c */
   cs_cgi_display("super_config_course_list", 0);
   cs_cgi_destroy();
   return 0;

}

