#include <stdarg.h>
#include <pthread.h>
#include <signal.h>
+#include <syslog.h>
#include <sys/utsname.h>
#include <libcitadel.h>
StrBuf *c_language;
StrBuf *this_page; /* URL of current page */
StrBuf *PlainArgs;
+ StrBuf *HostHeader;
HashList *urlstrings; /* variables passed to webcit in a URL */
HashList *HTTPHeaders; /* the headers the client sent us */
pthread_mutex_t SessionMutex; /* mutex for exclusive access */
int wc_session; /* WebCit session ID */
int killthis; /* Nonzero == purge this session */
- int is_mobile; /* Client is a handheld browser */
int ctdl_pid; /* Session ID on the Citadel server */
int nonce; /* session nonce (to prevent session riding) */
int SessionKey;
#define num_parms(source) num_tokens(source, '|')
#endif
+#define site_prefix (WC ? (WC->Hdr->HostHeader) : NULL)
+
/* Per-session data */
#define WC ((struct wcsession *)pthread_getspecific(MyConKey))
extern pthread_key_t MyConKey;
extern int follow_xff;
extern int num_threads_existing;
extern int num_threads_executing;
-extern StrBuf *site_prefix;
void InitialiseSemaphores(void);
void begin_critical_section(int which_one);
void display_default_landing_page(void);
void do_welcome(void);
void do_logout(void);
+void display_reg(int during_login);
void display_main_menu(void);
void display_aide_menu(void);
void slrp_highest(void);
int GetServerStatus(StrBuf *Line, long* FullState);
void serv_puts(const char *string);
void who(void);
+void push_destination(void);
+void pop_destination(void);
void ajax_mini_calendar(void);
void fmout(char *align);
void webcit_fmt_date(char *buf, size_t siz, time_t thetime, int Format);
void summary(void);
-int is_mobile_ua(char *user_agent);
-
/* actual supported locales */
void TmplGettext(StrBuf *Target, WCTemplputParams *TP);
void offer_languages(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType);