#include <stdio.h>
#include <string.h>

#include "global.h"
#include "custom.h"

#include "manhat-lib/shared_super_util.h"
#include "manhat-lib/shared_util.h"
#include "manhat-lib/shared_cs_util.h"
#include "manhat-lib/shared_super_menu.h"


void
do_action(const char *key)
{
    ADMIN_USER *list;

    list = build_admin_user_list();   /*shared_super_util.c */
    if(has_other_admins(list))         /* shared_super_util.c */
        set_admin_data(list);       /* shared_super_util.c */
    else
       cs_critical_error( ERR_NO_OTHER_ADMINS_FOUND, "");
       
    free_admin_user_list(list);   /* shared_super_util.c */
}
    


     
		    
int
main()
{
    char key[MAX_KEY +1];
    SESSION user;
   
    cs_cgi_init(); 
    read_param( key);
    validate_super_key(key, &user);
    set_admin_page(&user, key, 0, "super_grant_admin_form");  /* shared_super_menu.c */
    

    do_action(key);
    cs_cgi_display("super_grant_admin_form", 1);
    cs_cgi_destroy();
     return 0;
}
    

    

