Citadel/UX Web Framework for PHP

something resembling documentation


Global variables

You can count on these being available:


$_SESSION["serv_nodename"] – Short nodename of the Citadel server.

$_SESSION["serv_humannode"] – Human-readable name of the site.

$_SESSION["serv_fqdn"] – Fully-qualified domain name of the Citadel server.

$_SESSION["serv_software"] – The server software (e.g. Citadel/UX 9.99)

$_SESSION["serv_city"] – Geographic location of the Citadel server.

$_SESSION["serv_sysadmin"] – Name of the system administrator.


$_SESSION["ctdlsession"] – Name of the session ID. Not very useful.

$_SESSION["username"] – Name of the user currently logged in.

$_SESSION["password"] – Current user's password. Don't use this.


Session stuff


Upon establishment of a new PHP session, a copy of “sessionproxy.php” will be spawned. This is a session proxy which maintains a connection to the Citadel server. It will time out after 15 minutes if no additional connections are made.


Only the login.php, do_login.php, and logout.php pages may be displayed when there is no user logged in. Any attempt to load another page without logging in will automatically be redirected to login.php.


When a successful login is completed, welcome.php will be loaded.


To end the session, simply link to logout.php. There is code on that page to end the session and shut everything down.


Protocol library


ctdl_iden()

Called without any arguments. This just identifies our client to the Citadel server. This is called by ctdlsession.php so you probably don't need to use it.


ctdl_get_server_info()

Also called by ctdlsession.php, this loads up most of the global variables listed above.


login_existing_user($user, $pass)

create_new_user($user, $pass)

ctdl_mesg($banner_name)

ctdl_rwho()