#include varargs string gateway(mixed args){ string ret = ""; string *ret_array; mixed cookie, session; if(ENABLE_CREWEB){ if(!args || !stringp(args)) args = "123456789101112"; cookie = previous_object()->GetCookie(); if(!cookie || !cookie["shib"] || !cookie["name"]){ ret += "Not logged in."; ret += ""; return ret; } session = WEB_SESSIONS_D->GetSession(cookie["name"]); if(!sizeof(session) || session["shibboleth"] != cookie["shib"]){ WEB_SESSIONS_D->EndSession(cookie["name"]); ret += "Expired or conflicted session. Resetting."; ret += ""; return ret; } ret += "Welcome to CreWeb.

"; ret += "CreWeb is a very simple CGI web application that allows creators to
"; ret += "log in, browse their home directories, upload and edit files.
"; ret += "
"; ret += "To mitigate potential security hazards, "; ret += "directories outside home dirs may not be browsed.
"; ret += "
"; ret += "
"; ret += "Your home directory is here
"; ret += "Click here to see channel logs.
"; ret += "Click here to logout.
"; } else { ret += "CreWeb is disabled. To enable it: mudconfig creweb enable

"; } ret += "

Home

"; ret += "Dead Souls Home"; ret += "

Your ip is: "+session["ip"]; return ret; }