#ifndef SHARED_UTIL_H
#define SHARED_UTIL_H

#include "../global.h"


void send_content_type ();


void read_configuration_file (const char *fname, CONFIG_STRUCT * config);
int read_configuration_file_ok (const char *fname, CONFIG_STRUCT * config);
int read_config (const char *fname, CONFIG_STRUCT * config);


void session_end(const char *msg,  const char *img, int flag);

void course_slash_to_dot(const char *orig, char *new);
void get_symlink_fname ( const char *course, char *symlink_fname, const SESSION *user);

void validate_server_key (const char *key_fname, SESSION *user);
void validate_key (const char *key_fname, SESSION * user, CONFIG_STRUCT *conf);
void get_ip_address(char *this_ip);
void crash (const char *msg1, const char *msg2);
void check_key_for_cookie(const char *orig_key_fname, char *new_key_fname);
void secure_server_check();
int is_wnec_faculty(const char *id);
#endif
