#include <stdio.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <dirent.h>

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


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


static void
display_passwd_form ( char *key)
{
  char url[MAX_PATH +1];
  cs_set_int_value("max_password", MAX_PASSWORD);
  snprintf(url, MAX_PATH +1, "%s?id=%s", "super_admin_page", key);
  cs_set_value("back_url", url);

}


int
main (void)
{

  char key[MAX_KEY + 1];	/* from id=? command line */
  SESSION user;
   
  cs_cgi_init(); 
  read_param( key);
  validate_super_key(key, &user);
  set_admin_page(&user, key, 0, "super_admin_page");  /* shared_super_menu.c */
  display_passwd_form (key);
  cs_cgi_display("super_chg_passwd_form", 1);
  cs_cgi_destroy();
  return 0;
}






















