X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=www%2Findex.php;h=4468e057bb7fbe2f7082d28fe6f9b2c9506cff3b;hb=28d2c6d84af075263a89025b04df438cdd762658;hp=c75a15765557b337bb369f0819bd9985d9535aae;hpb=6fdbfe32798452ec1c0fdbda57edabb892518409;p=readifood.git diff --git a/www/index.php b/www/index.php index c75a157..4468e05 100644 --- a/www/index.php +++ b/www/index.php @@ -28,6 +28,7 @@ else $module = strtolower($module); #echo "request: $request; module: $module; params: " . print_r($parameters, true); + $http = (isset($_SERVER['HTTPS'])) ? "https" : "http"; $username = $_SERVER['REMOTE_USER']; include_once("$lib_root/constants.php"); include_once("$lib_root/functions.php"); @@ -35,13 +36,18 @@ $q = new UserQuery; $user = $q->findOneByUsername($username); if (! $q->count()) { + echo "

$charity

\n"; echo "

Not logged in!

\n"; if ($_SERVER['REMOTE_USER']) echo "

User " . $_SERVER['REMOTE_USER'] . " needs an entry in the user table.

\n"; } else { $user_id = $user->getContactId(); $admin_level = $user->getAdmin(); - if ($module) include_once("$lib_root/$module.php"); + if ($module) { + echo "

$charity $module

\n"; + include_once("$lib_root/$module.php"); + } + #else include_once("$lib_root/menu.php"); } include_once("$lib_root/footer.php");